yasirkula/UnityRuntimeInspector

Local Euler Angles on Mobile

Closed this issue · 2 comments

Hey, I've been using the inspector to position AR objects spawned from markers properly. I would need to use the local euler rotation field to do that propery, but I can't see it on mobile. However, it is visible in the unity editor play mode.

Any ideas on how to make it appear on mobile ?

Thanks !

If you are using IL2CPP, it is possible that localEulerAngles gets stripped by the engine code stripping functionality. Try using localEulerAngles in your code like this:

void Start()
{
    var dummyVar = transform.localEulerAngles;
}

Also see: https://usingtheirs.github.io/2018/10/29/Preserving-Unity-Engine-Classes-against-IL2CPP-Byte-Code-Stripping/

That absolutely solved it, I completely forgot about code stripping.

Thanks for the quick answer !