I'm dealing with an annoying bug that occurs randomly. Once it occurs, it will stay this way until i delete and recreate the object the script is attached to.
The Script is called AnimatedTexture.cs. It awake function looks like this
MeshFilter myMeshFilter;
Mesh myMesh;
Awake()
{
myMesh = myMeshFilter.mesh;
}
Many Game Objects in the scene have this script attached to them. When Unity is in play mode, selecting a game object with this script attached shows the mesh filter is using an instantiated copy of the mesh.
So the bug is, sometimes, the mesh doesn't get assigned and the mesh is not using an instantiated copy.
Could this be a script execution order issue?
↧