- Home /
Question by
CDAXRC · May 03, 2018 at 06:04 PM ·
meshsphereresources.load
How to get access to default sphere mesh?
How to transfer standard sphere mesh to Resources.Load folder or how to get access to this mesh from script?
Mesh mesh = (Mesh)Resources.Load("Sphere", typeof(Mesh));
Comment
Answer by JChilton · May 03, 2018 at 06:13 PM
You could generate the sphere and then reference it, if that works for you.
GameObject.CreatePrimitive(PrimitiveType.Sphere);
Answer by QuarterMillion · Mar 01 at 02:14 PM
I know this is an old thread but I would do this:
GameObject obj = GameObject.CreatePrimitive(PrimitiveType.Sphere);
Mesh mesh = Instantiate(obj.GetComponent<MeshFilter>().mesh);
Destroy(obj);
What it does is it creates a copy of only the mesh of the Primitive and destroys the original source object.
Your answer
![](https://koobas.hobune.stream/wayback/20220612162003im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rotating texture uv on sphere 0 Answers
Randomize Sphere & Smooth Vertex ( like in blender) 1 Answer
Unity OBJ MTL from server to client 1 Answer
Metaball wiki script help 0 Answers
Applying a texture to a sphere 1 Answer