Need help with euler angle

Hi! I know that euler can be only 0 to 360, but I just can’t put my head around this.
In my script, I do this:

Debug.Log(“Eugelar in?” + RotX+" " + RotY + " " + RotZ);
Planes.transform.eulerAngles = new Vector3(RotX, RotY, RotZ);
Debug.Log(“Eugelar out?” + Planes.transform.eulerAngles);

And the output is:

Eugelar in?234.5455 0 0
Eugelar out?(305.5, 180.0, 180.0)

I absolutely need those two values to match each other, but as you can see, 234 is being transofrmed somewhere internally into 305. I can not store quaternions, because I use GUI for rotation, limiting values to something like -45 to 45 and e.t.c, so I can only store/display euler angles.

Any possible way to workaround this?

Regards,
Konstantin.

Use a separate variable to hold the rotation value. Use that variable (NOT the transform) for any calculations or value checks, and only set the object’s transform when you need to update the scene.

Got it, seems like I’ll need to use 3 extra variables no matter what, just hoped there was some cleaner way to do it