Hello. The title speaks for itself. my Unity goes unresponsive when I import an .obj file. The Editor and the built version goes unresponsive but its actually just loading the .obj. What can I do to stop/prevent it from going unresponsive. I've read a lot of Multithreading and I think this is what I'm looking for.. the problem is.. its way too advance and all of the tutorials, videos I've seen have their own distinct/different way of making their own multithread script. so I can't keep up and follow 1 of them.
https://www.dropbox.com/s/bt3e4qbzvkcxcex/BackupOBJImporter.rar?dl=0
here's my app. basically this is an OBJ importer which you can also change the position, rotation, scale AND change the material color and material shader of the imported obj at runtime. and you can save all the data. but since runtime importation doesn't really save the obj as a prefab or save it in a resource folder at runtime or leave it at runtime or etc. .. so when you want to load you have to close the app, paste the url again and then press load..
for OBJ Importation I'm using this
https://www.assetstore.unity3d.com/en/#!/content/49547
the script that needs threading is the OBJLoader.cs
here's a demo on how to save.
https://youtu.be/K4vKKHcpdyo
and then after saving I close the app and play it again or if you're using the editor unplay the editor and then play it again and paste the url again.. and then press load.
demo of load
https://youtu.be/9X3wnBljJB4
**so again the loading of the obj is my problem.. it goes unresponsive.**
![alt text][1]
by the way the url needs to be all forward slash.. so if the model i added is in here for example.
C:\Users\rhylvin2016\Desktop\Build\BackupOBJImporter\Models\Lamborghini
you just need to change all backslash to forward slash and add Avent.obj
like so
C:/Users/rhylvin2016/Desktop/Build/BackupOBJImporter/Models/Lamborghini/Avent.obj
you'll also notice I wrote "Body" as Material Name. it is the name of the materials that are changed and are edited. so just try to use that one as well.
P.S. I'm using XML to save and load.. the xml file can be found in Assets -> StreamingAssets -> XML -> item_data.xml
[1]: /storage/temp/79197-load3.jpg
↧