示例#1
0
 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);
        }
示例#3
0
 public void SnapToGrid()
 {
     SnapParentFirst();
     snapToGrid_ = new SnapToGrid(this.gameObject, GetGrid());
     Undo.RegisterCompleteObjectUndo(this.transform, "Snap");
     snapToGrid_.SnapGameObjectToGrid();
 }
示例#4
0
        void Start()
        {
            if (grid == null && PixelGrid.instance != null)
            {
                grid = PixelGrid.instance;
            }

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