void Start(){ cachedTransform = transform; grid = ForbiddenTilesExample.movementGrid; //make a check to prevent getting stuck in a null exception if(grid){ //snap to the grid no matter where we are grid.AlignTransform(cachedTransform); } }
void Start() { grid = ForbiddenTilesExample.movementGrid; //make a check to prevent getting stuck in a null exception if (grid) { //snap to the grid no matter where we are grid.AlignTransform(transform); } }
void Start() { grid = ForbiddenTilesVores.movementGrid; ani = gameObject.GetComponent <Animator> (); //make a check to prevent getting stuck in a null exception if (grid) { //snap to the grid no matter where we are grid.AlignTransform(transform); } }