Topic: Mesh created at runtime, attached to a 3D marker, strange behavior
Hi
I made a prefab (named "frustum") with an empty Gameobject containing a script, which create a mesh. This mesh is displaying properly in a regular empty scene.
I attached this prefab as a child to another prefab which i am using as a 3D marker in my scene with the map.
It doesn't display properly (see the GIF below).
I believed at first that i didn't code properly the mesh creation (particularly the normals) but i made a test :
If i manually add the frustum prefab in my scene at runtime, and make it a child of my 3D marker prefab manually, it display properly.
See the Gif below:
you will first see the "frustum" prefab not displaying properly.
Then i disable it and enable the "frustum2" prefab (that i manually added at runtime)
you will see that there is no problem with this one.
https://media.giphy.com/media/5w2ejH86o … /giphy.gif
You will find the script of the mesh creation attach to this message, though i don't think it is the problem anymore.
So one solution i have is problably to instantiate the frutum prefab separatly and assign it as a child of my drone prefab via script, but i would prefer to keep it as a part of the drone prefab if it is possible. Do you have any idea of what could occur this strange behavior ?