void Start() { if(grid == null && PixelGrid.instance != null) grid = PixelGrid.instance; snapToGrid_ = new SnapToGrid(this.gameObject, grid); }
void ForceDefaultGrid() { if (isDefaultGrid || instance == null) { instance = this; } }
void Awake() { if (isDefaultGrid) { instance = this; } textureScale_ = new Vector2(gridGameObjectSizeMultiplier_, gridGameObjectSizeMultiplier_); }
public SnapToGrid(GameObject objectToSnap, PixelGrid grid) { objectToSnap_ = objectToSnap; grid_ = grid; }
void ForceDefaultGrid() { if(isDefaultGrid || instance == null) instance = this; }
void Awake() { if(isDefaultGrid) instance = this; textureScale_ = new Vector2(gridGameObjectSizeMultiplier_, gridGameObjectSizeMultiplier_); }