There is a **Pose **struct that holds a position and rotation. Very cool and useful, but it would be nice to have some helper functions in the Transform Component to use that
EXAMPLE
it would be nice to have also a pose getter/setter or GetPose/GetLocalPose function to do something like this
var startPose = transform.pose; //or transform.GetPose()
//after some time, restore the initial position and rotation
transform.SetPose(startPose);
//or with a setter
transform.pose = startPose
i hope to get some feedback from the community and someone of the unity team
It’s a struct so it’s not likely to save you much if any time. Passing a Pose is still going to jam both those args on the stack, even if they’re just one Pose arg, as it’s obviously not passing it by reference.
Yeah, the code is slightly cleaner, but not sure it would be worth the extra overloading noise.
Just more flavors of the same thing, that’s all. Like Physics.Raycast() is horribly overloaded, but that’s probably just because it grew organically over time, at least I’m guessing.
My limited understanding is that these are just syntactic sugar: there’s no extra call involved, it just replaces the code in place and compiles it.