Closed msub2 closed 3 years ago
Stacktrace from trying to use Embers brush:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00000] in <00000000000000000000000000000000>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <00000000000000000000000000000000>:0
at System.Collections.Generic.List`1[T].set_Item (System.Int32 index, T value) [0x00000] in <00000000000000000000000000000000>:0
at TiltBrush.GeometryBrush.SetVert (System.Int32 iVert, System.Int32 vp, UnityEngine.Vector3 v, UnityEngine.Vector3 n, UnityEngine.Color32 c, System.Single alpha) [0x00000] in <00000000000000000000000000000000>:0
at TiltBrush.GeniusParticlesBrush.CreateParticleGeometry (System.Int32 knotIndex, System.Int32 particleIndex, UnityEngine.Vector3 pos, System.Single size) [0x00000] in <00000000000000000000000000000000>:0
at TiltBrush.GeniusParticlesBrush.ControlPointsChanged (System.Int32 firstKnotIndex) [0x00000] in <00000000000000000000000000000000>:0
at TiltBrush.GeometryBrush.ApplyChangesToVisuals () [0x00000] in <00000000000000000000000000000000>:0
at TiltBrush.PointerScript.UpdatePointer () [0x00000] in <00000000000000000000000000000000>:0
at TiltBrush.PointerManager.Update () [0x00000] in <00000000000000000000000000000000>:0
After clamping values
227b53e3-c9d1-4994-9360-2a97935994dc:4182 Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 196608, VertexCount: 65536
UnityEngine.Mesh:SetIndicesImpl(Int32, MeshTopology, IndexFormat, Array, Int32, Int32, Boolean, Int32)
UnityEngine.Mesh:SetTrianglesImpl(Int32, IndexFormat, Array, Int32, Int32, Int32, Boolean, Int32)
UnityEngine.Mesh:SetTriangles(List`1, Int32, Int32, Int32, Boolean, Int32)
UnityEngine.Mesh:SetTriangles(List`1, Int32, Boolean, Int32)
UnityEngine.Mesh:SetTriangles(List`1, Int32)
TiltBrush.GeometryPool:CopyToMesh(Mesh)
TiltBrush.GeometryBrush:ApplyChangesToVisuals()
TiltBrush.PointerScript:UpdatePointer()
TiltBrush.PointerManager:Update()
[./Runtime/Graphics/Mesh/Mesh.cpp line 1372]
(Filename: ./Runtime/Graphics/Mesh/Mesh.cpp Line: 1372)
Oh my god. Apparently making the change to SetValue in ListExtensions wasn't necessary, and was in fact the reason why I've been getting all these vert/index errors. Switched back to the original code and particle brushes seem to work fine now. Will test all of them after work
All working
The following brushes basically make the program unusable once they're active:
Need to look into them and see if I can track down the issue