Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class TransformDummy
- {
- public Vector3 Position, LocalPosition, Scale, LocalScale;
- public Quaternion Rotation, LocalRotation;
- public TransformDummy(Transform toSave)
- {
- this.Position = toSave.position;
- this.LocalPosition = toSave.localPosition;
- this.Scale = toSave.lossyScale;
- this.LocalScale = toSave.localScale;
- this.Rotation = toSave.rotation;
- this.LocalRotation = toSave.localRotation;
- }
- public bool SetTransform(ref Transform toSet)
- {
- if (!toSet) return false;
- toSet.position= this.Position;
- toSet.localScale= this.LocalScale;
- toSet.rotation = this.Rotation;
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement