Slightly confussed with setting a rotation

So, I’m having a bit of trouble setting an object’s orientation using C#, I can only seem to rotate it over time instead of just snapping it to a certain rotation, example 0,0,0 so it’s back to square one.

Sorry for this nooby question, and thanks for answering!

What’s your code? If you want it to snap to one direction, just call that function once and make sure the degree is the right amount to rotate it to the desirable orientation.

someTransform.rotation = someQuaternion;
for the default rotation:
someTransform.rotation = Quaternion.identity;

Thanks a ton mate!