Hi guys, I need to save a GameObject to the Asset as a prefab. I properly save it but the saved GameObject has not the MeshFilter. I tried to save the MeshFilter as a JSON file but my JSON string is just : {mesh":{“instanceID”:-3290}}. If I don’t close the program, from this string I can get the right mesh file. If I close and open the program again I get null from this string… Can someone help me?
Check this little snippet out:
The step you’re missing is actually creating the corresponding mesh object on disk, which the prefab will then refer to.
I just confirmed it works: now I have a new little mesh asset in my project.