gpvigano / AsImpL

Asynchronous Importer and run-time Loader for Unity
MIT License
212 stars 37 forks source link

How to unload an already loaded model? #27

Closed rodcibils closed 6 years ago

rodcibils commented 6 years ago

What is the procedure for unloading an already loaded model? Can I just delete it with unity or there is something else to do with the importer?

I want to prevent the parallel loading of several models, check if a model is already loaded and, if the user wants to load a new one, unload the older and load the newer.

Thanks for develop and share this excellent tool.

gpvigano commented 6 years ago

Try with this procedure:

I think this should work, I'll wait for your feedback.

rodcibils commented 6 years ago

Well, in first place, thank you very much for the fast answer, it's really awesome work with a free tool like this knowing that it's developer takes care about it. I implemented the procedure above with no issues, work as expected. I had already done some of the steps above like getting the reference of the imported object (and edit scale, position, etc.), and adding the new steps has no negative effects on that. so everything works fine at the moment. I'll report if there's a new issue on the road.