public void SnapToGrid()
 {
     SnapParentFirst();
     snapToGrid_ = new SnapToGrid(this.gameObject, GetGrid());
     Undo.RegisterCompleteObjectUndo(this.transform, "Snap");
     snapToGrid_.SnapGameObjectToGrid();
 }
        void Start()
        {
            if(grid == null && PixelGrid.instance != null)
                grid = PixelGrid.instance;

            snapToGrid_ = new SnapToGrid(this.gameObject, grid);
        }
 public void SnapToGrid()
 {
     SnapParentFirst();
     snapToGrid_ = new SnapToGrid(this.gameObject, GetGrid());
     Undo.RegisterCompleteObjectUndo(this.transform, "Snap");
     snapToGrid_.SnapGameObjectToGrid();
 }
Beispiel #4
0
        void Start()
        {
            if (grid == null && PixelGrid.instance != null)
            {
                grid = PixelGrid.instance;
            }

            snapToGrid_ = new SnapToGrid(this.gameObject, grid);
        }