Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/destroy on destroy #760

Merged
merged 4 commits into from
Mar 1, 2021

Conversation

ousttrue
Copy link
Contributor

#745

ついでにリソース開放の条件が大きく異なるAssetImport向けの機能を分離した

@ousttrue ousttrue requested a review from Santarh February 26, 2021 10:23
Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

のちのちやることとして
ImporterContext だけで必要なリソースと、ロードしたモデルで必要なリソースで所有権を分けることで、 ImporterContext はロード処理が終わったら Dispose してよくなる、ということでヨシ!

/// <summary>
/// Mesh, Material, Texture などを抱えておいて確実に破棄できるようにする
/// </summary>
public class UnityResourceDestroyer : MonoBehaviour
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほど

@ousttrue
Copy link
Contributor Author

ousttrue commented Mar 1, 2021

TODO: UnityResourceDestroyer にリソースを渡したとき、リソースを Asset 化したとき、ImporterContext は所有権を手放す。

@ousttrue ousttrue merged commit 47853d3 into vrm-c:master Mar 1, 2021
@ousttrue ousttrue deleted the feature/destroy_on_destroy branch April 2, 2021 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants