I made a prefab that uses a custom mesh from an fbx file. Every time I run the game and stop it again (by using the play button in unity), the custom mesh is not any more in the prefab (the value ‘Missing (Mesh)’ is displayed), and I have to set it again.
I tried removing the prefab and rebuilding it, but it didn’t resolve the issue.
I also tried using an other mesh from a different fbx file, but it also didn’t change anything.
I have other prefabs with custom meshes, but there there is no problem.
I’ve got the same issue and I’d like to know if it’s a known bug or if it’s just me screwing something up.
I’ve got a prefab called “BlackPawn” with a simple Cylinder as a Mesh. Somewhere in a script, i have a variable pointing to that prefab (using drag and drop from my assets to the variable in the inspector) :
I have exactly the same problem, my meshfileter dissappears as soon as the game runs. I am however not using a prefab but an object mesh that I have created in an editor script. I tried playing with shared mesh but I had no luck. Any thoughts? It’s probably something to with editor scripts right?
meshes you create through code must be recreated on each run again unless you have code that stores them in a supported model format so unity can import them as real mesh.
dynamic assets run throuhg code only exist until the scene is unloaded (just as a warning: this also holds ingame, DontDestroyOnLoad does not change this fact!)