[Unity5]Quaternion.Eurler adds me 90Degrees on X

So Hi.

This line of code.

door.transform.rotation = Quaternion.Euler( 0, 0, 0);

Will give my object the following vector (90, 0, 0);

The next line of code

door.transform.rotation = Quaternion.Euler( -90, 0, 0);

Will give me the Vector3.zero.

My question is, if Quaternion is added by default a 90 degrees to the x axis, because if I go with Quaternion.Idenity it will add too. Or is this a bug of Unity5

I suspect your GameObject is already rotated 90 degrees by a parent object. The rotation member is likely in global space. Try using door.transform.Rotate(90,0,0) if you want to rotate it locally.