-
hi working on runtime import with customisation I found this class a little bit confusing (but that might just be me) - it is an import class, but also a kind of model-data class - 1 per model required - if I understand correctly. If above is right then you might need GltfImport as a model data class, something to cache per model loaded to then create GameObject instances from when you need them in scene. (I initially thought it was a single-instance type thing that you would use again and again to import models, but it is for one model) Kind of links to #402 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Correct
If you tried to ask: Isn't making a deep clone of a first instance's GameObjects better than making another instance? Honestly, never tried/compared. I assume it comes with different problems (like unwanted copying of states; e.g. animation). Feel free to do so, but I see no reason to change the multi-instance API in place. If you're saying pooling instances (instead of destroying and re-instantiating) is a good idea, then I agree.
Yes, GameObject OR Entities instances.
Apparently it is for you and I kind of see why. What would you name it? (Disclaimer: I'm not seriously consider renaming it, since that would break the API. But docs could be added/improved, so I'm curious about the input/discussion). Admitted, this class has grown over time, is far from being well structured and overdue for a refactor.
I cannot follow. Why would the suffix Would it make more sense if the So you have trouble to comprehend that I still don't know what to make out of this :) It would be great if you could formulate concise statements about observations and solutions you have. |
Beta Was this translation helpful? Give feedback.
-
Thanks for answering - I was thinking out loud, though I do now understand it all and am using this great library! |
Beta Was this translation helpful? Give feedback.
Thanks for answering - I was thinking out loud, though I do now understand it all and am using this great library!
I guess import can mean 'import something' (verb) or 'an import' noun, so at the beginning I thought, oh maybe you go model = GltfImport.Load("model1"); model2 = GltfImport.Load("model2"), but this is effectively a class with both those meanings - it does the import and it holds the import!!
OK you can delete this thread now! :)