public static List <LocalTransformSnapshot> GetSnapshotCollection(IEnumerable <GameObject> gameObjects)
        {
            if (gameObjects == null)
            {
                return(new List <LocalTransformSnapshot>());
            }

            var localTransformSnapshots = new List <LocalTransformSnapshot>(20);

            foreach (var gameObject in gameObjects)
            {
                if (gameObject != null)
                {
                    var snapshot = new LocalTransformSnapshot();
                    snapshot.Snapshot(gameObject.transform);
                    localTransformSnapshots.Add(snapshot);
                }
            }

            return(localTransformSnapshots);
        }
        public override void OnGizmoDragEnd(int handleId)
        {
            if (_transformableParents.Count != 0)
            {
                var postObjectTransformChangedAction = new PostObjectTransformsChangedAction(_preTransformSnapshots, LocalTransformSnapshot.GetSnapshotCollection(_targetObjects));
                postObjectTransformChangedAction.Execute();
            }

            RefreshPositionAndRotation();
        }
 public override void OnGizmoDragBegin(int handleId)
 {
     _preTransformSnapshots      = LocalTransformSnapshot.GetSnapshotCollection(_targetObjects);
     _transformableParents       = GetTransformableParentObjects();
     _targetGroupAABBOnDragBegin = GetTargetObjectGroupWorldAABB();
 }