Hi,
I would like to ask if is there any way to load 3d objects in runtime ?
or
to download the 3d object inside the Resources folder, create the prefab and instantiate it?
I would appreciate for any sample c# code.
Thank you very much
Hi,
I would like to ask if is there any way to load 3d objects in runtime ?
or
to download the 3d object inside the Resources folder, create the prefab and instantiate it?
I would appreciate for any sample c# code.
Thank you very much
Any help ?
I try to use this → http://wiki.unity3d.com/index.php/ObjImporter
the problem is that it gives this errors:
Mesh.vertices is too large. A mesh may not have more than 65000 vertices.
UnityEngine.Mesh:set_vertices(Vector3[ ])
Mesh.uv is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_uv(Vector2[ ])
Mesh.normals is out of bounds. The supplied array needs to be the same size as the Mesh.vertices array.
UnityEngine.Mesh:set_normals(Vector3[ ])
Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 150000, VertexCount: 0
UnityEngine.Mesh:set_triangles(Int32[ ])
Simple, when reading in the vertices and triangles, once your vertex count exceeds the limit, just split your mesh into submeshes and you can get past the limit.
pws devs Can you please give me code example based on ObjImporter ?
Thank you in advcence
When you are reading it from the file, in the filestream portion of the code, there is a part where you are incrementing the vertex count. From that part, you might want to amend that to once you hit the 64k limit, stop increamenting and prepare a second mesh.
i will try it ut i am not sure that i can make it, if you have any sample code i will appreciate it .
Also, can i use the online asset bundle loader (link) to load the mesh (obj file) ?
Thanks
Nope. AssetBundle is AssetBundle. To create an asset bundle, one has to use Unity to recompile the obj into assetbundle.
What exactly are you trying to achieve, runtime loading of 3d assets or runtime loading of meshes?
I exactly try to get large 3d objects (.obj or .fbx …) in run time.
Thank you again.