Add OnBeforeDisposeVolatileData method#43
Open
brnkhy wants to merge 2 commits intoUnity-Technologies:mainfrom
Open
Add OnBeforeDisposeVolatileData method#43brnkhy wants to merge 2 commits intoUnity-Technologies:mainfrom
brnkhy wants to merge 2 commits intoUnity-Technologies:mainfrom
Conversation
add OnBeforeDisposeVolatileData virtual method to support extensibility in gltfimport subclasses
remove dictionary parameter OnBeforeDisposeVolatileData as subclasses can get addons using GetImportAddonInstance method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I was working on adding support to read custom vertex attributes for vertices as an add-on and if I understand the structure correct, I need the buffer information before it got disposed, to be able to read data. This method fires after data is loaded but before it's disposed.
About the usage; I have a custom
GltfImportclass, which overrides this newOnBeforeDisposeVolatileDatamethod, then usesGetImportAddonInstancemethod to find my custom add-on and class aOnLoadCompletedmethod in it. Add-on uses accessor data, decodes it and caches the colors. later whenOnMeshAddedis called, it applies the extracted data to the mesh.Can't say I extensively tested my add-on and system built on top of this but it seems to work fine so far. I can also share those if you want to examine the use-case but they are not included into the PR of course.