You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Swizzle property z and w for int2/float2 and w for int3/float3 #224
I was like, ah yes, lets use assembly definition references to add this...
publicpartialstructfloat2{/// <summary>Swizzles the vector.</summary>[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]publicfloat3xy0{[MethodImpl(MethodImplOptions.AggressiveInlining)]get=>new(x,y,0);}}
But nope, as soon as it ends up in Bursted code... Burst error BC0102: Unexpected internal compiler error while processing function
Unfortunately, unity is apparently working on enabling users to extend native class, using the attribute [ExtensionsOfNativeClass], but is definitely not supported at the moment.
In the meantime, You can do a pull request and implement it in this file : https://github.com/LTMX/Unity.mathx/blob/master/Runtime/mathx.floatx.gen.cs
Have a nice day fellow !
Activity
Cat-du-Fromage commentedon Sep 8, 2022
+1, the number of time i wished there was a way to make point.x0z is beyond count!
vertxxyz commentedon Feb 28, 2023
I was like, ah yes, lets use assembly definition references to add this...
But nope, as soon as it ends up in Bursted code...
Burst error BC0102: Unexpected internal compiler error while processing functionAt least
new float3(float2, z)exists.ltmx commentedon Sep 27, 2023
Unfortunately, unity is apparently working on enabling users to extend native class, using the attribute [ExtensionsOfNativeClass], but is definitely not supported at the moment.
In the meantime, You can do a pull request and implement it in this file : https://github.com/LTMX/Unity.mathx/blob/master/Runtime/mathx.floatx.gen.cs
Have a nice day fellow !