I am trying to access the objects listed below in the script. Specifically, I’m trying to access the Mesh objects like Prime0, Prime1, etc. (listed under the prefab objects) through a script.
However, I cannot seem to do this. This code fails, for example, (resource is null).
GameObject resource = (GameObject)(Resources.Load("AtomPrimes/Prime0", typeof(GameObject)));
I’ve tried other attempts, such as exporting each prime (Prime0, Prime1…) as individual meshes. However, this only works occasionally, while most of the time the mesh cannot be drawn after it is loaded.
The objects are in the resources folder.
How do I load a mesh?