This is copied from a document “Procedural Graphics in Unity3D” from the web
Normally Tris should be set as an Array but in the example it is int[ ]
However if I set Tris[ ] I get same type of error??
I am kinda lost here..
Thanks for any help
yves
Here is the error in the log
Finished compile Library/ScriptAssemblies/Assembly - CSharp.dll
Assets/PlaneMesh.cs(58,6): error CS8025: Parsing error
(Filename: Assets/PlaneMesh.cs Line: 58)
Assets/PlaneMesh.cs(58,6): error CS8025: Parsing error
(Filename: Assets/PlaneMesh.cs Line: 58)
NullReferenceException: Object reference not set to an instance of an object
==============================================
Here is the code
//information per face, so as we have 2 faces, we need information for 6
//Vertices.
int[ ] Tris = new int[6];
// First Face
Tris[0] = 0;
Tris[1] = 1;
Tris[2] = 2;
// Second Face
Tris[3] = 1;
Tris[4] = 3;
Tris[5] = 2;