yasirkula / UnityRuntimeInspector

Runtime Inspector and Hierarchy solution for Unity for debugging and runtime editing purposes
MIT License
1.76k stars 139 forks source link

Local Euler Angles on Mobile #10

Closed SerenaSchiffer closed 5 years ago

SerenaSchiffer commented 5 years ago

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 !

yasirkula commented 5 years ago

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/

SerenaSchiffer commented 5 years ago

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

Thanks for the quick answer !