Causes the following error:
Burst error BC1091: External and internal calls are not allowed inside static constrcutors: UnityEngine.Quaternion.Internal_FromEulerRad_Injected(ref UnityEngine.Vector3 euler, ref UnityEngine.Quaternion ret)
Update introduces a plethera of other errors/issues as described in your Discord. for tracking sake I’ve included the messages and images here aswell.
I get these errors/messages with WireCapulse & WireCyllinder (no errors with WireCubes)
also, might help you narrow it down, once exiting playmode the allocation logs + the TLS allocator error keep climbing when the editor is my active window
I tried the same code on a new project. and lo and behold, It worked without errors.
I went back to my project and still hade these errors. So I started looking into what part of the code was causing these errors. When passing new float3(0,0,1) into the direction parameter into the WireCapsule() it did NOT throw any errors. So into the function I went.
I had an assumption that the Quaternion.LookRotation was causing something to happen, so… I commented the entire PushMatrix line out (aswell as the corresponding PopMatrix()) and tada…
No errors. So I switched the Matrix4x4.TRS call into the float4x4.TRS call aswell as changed the Quaternion.LookRotation call into the quaternion.LookRotation() (the new math library one) I had to normalize the direciton and tangent though since this new function expects them to be normalized. I then ran into an exception “NaN bounds. A Draw.* command may have been given NaN coordinates.” However, my capsules were drawing just fine. So I just commented out this comment and now i’m back without any errors and the drawing is working as expected. Hopefully this could give you an insight into how and/or why this was happening on my end, but it definetely seemed to be related to the direction parameter…
Hmm, okay I think I forgot to handle the case where the direction parameter is (0,0,0) (or very close to zero).
I couldn’t replicate the push/pop errors, though.
I have a fix for this which will be included in the next update.