- Home /
MeshTopology and Quads problem
Hi,
I was trying to create a bunch of cubes using MeshTopology in the same Gameobject. The maximum number of vertices inside a GameObject is 65000, so I was suppose to have 8125 cubes using 8 vertices per cube. But, when I was doing that, I got an error telling me that indexCount <= kMaxIndices. I don't understand what index is out of range since I respect the number of vertices (65000).
It says that the error is in the file D3D9VB0.cpp at line: 325 ( I couldnt find that file )
Somebody knows what could be the problem?
thank you
rp
You mention Quads in your subject. You aren't trying to make cubes out of quads are you?
Unity does not support quads. You need to make triangles. That's 2 per side or 12 per cube. First fix that, because the resulting triangles (as quads) will be all messed up.
You can't really make cubes out of 8 vertices, you need 24 (4 per side, because of needing unique normals for each side). You can't find the referenced file because it's an internal error and the file doesn't exist as such in Unity; .cpp is a C++ source file. The error looks like some kind of Direct3D issue.
@DaveA: nothing wrong with making cubes from quads. Unity does for sure support quads; Vectrosity uses it. (Also $$anonymous$$eshTopology.Lines.)
Your answer
Follow this Question
Related Questions
Mesh UVs won't change positions 1 Answer
Runtime mesh generation 2 Answers
Simple LOD Manager Mesh to Mesh (Smoothly Fade) 0 Answers
Generate and render custom mesh in editor? 0 Answers
Switching Between Textures 1 Answer