// Use this for initialization void Start() { tileMap = TileMapDestroyScript.FindObjectOfType<TileMapDestroyScript>(); //set manually to right layer, because unity changes this back to default when playing game gameObject.layer = LayerMask.NameToLayer ("TileMapCollision"); }
// Use this for initialization void Start() { tileMap = TileMapDestroyScript.FindObjectOfType <TileMapDestroyScript>(); //set manually to right layer, because unity changes this back to default when playing game gameObject.layer = LayerMask.NameToLayer("TileMapCollision"); }