Khyrid
November 24, 2012, 9:55pm
1
SOLVED*** See bottom**
I just installed 4.0 free and I get this yellow alert error:
Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(130,73): warning CS0618: UnityEngine.Mesh.GetTriangleStrip(int)' is obsolete:
Use GetTriangles instead. Internally this function converts a list of triangles to a strip, so it might be slow, it might be a mess.’
I’m not sure how to “Use GetTriangles”.
I also get:
Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs(43,58): warning CS0618: UnityEngine.GameObject.active' is obsolete:
GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.’
But I fixed that one.
Solution:
For “Mesh.SetTriangleStrip(int[ ], int)” change to “Mesh.SetTriangles(int[ ], int)”
For “GameObject.active = true;” change to “GameObject.SetActive(true);”
I tried that to begin with, but I suppose I typoed.
I have the same issue, it will be nice to get an anser
Same here. I tried fixing it but I just ended up breaking the whole deal both times.
I’ve had the same problem here!
I replaced with GameObject.SetActive(true); and received the error "An object reference is required to access non-static member `UnityEngine.GameObject.SetActive(bool)’ "
Then i replaced it with gameObject.SetActive (true); and now I am receiving no errors.
Khyrid:
UN-SOLVED*** See bottom**
I just installed 4.0 free and I get this yellow alert error:
I’m not sure how to “Use GetTriangles”.
I also get:
But I fixed that one.
Solution:
For “Mesh.SetTriangleStrip(int[ ], int)” change to “Mesh.SetTriangles(int[ ], int)”
For “GameObject.active = true;” change to “GameObject.SetActive(true);”
I tried that to begin with, but I suppose I typoed.
cmscluff:
I’ve had the same problem here!
I replaced with GameObject.SetActive(true); and received the error "An object reference is required to access non-static member `UnityEngine.GameObject.SetActive(bool)’ "
Then i replaced it with gameObject.SetActive (true); and now I am receiving no errors.
Looks like I forgot to update this thread as solved, yet I still posted the solution that worked on my post… weird.
Anyway this is exactly what I use and no errors:
targetGameObject.SetActive(true);
1 Like
How can this thread be solved?
Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(130,73): warning CS0618: UnityEngine.Mesh.GetTriangleStrip(int)' is obsolete:
Use GetTriangles instead. Internally this function converts a list of triangles to a strip, so it might be slow, it might be a mess.’
I’m not sure how to “Use GetTriangles”.
I’m having the same issue here and I don’t know what do to.
int curStripCount = combine.mesh.GetTriangleStrip(combine.subMeshIndex).Length;
Edit: I just found the solution, use GetTriangles() instead.