// 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");
    }
Exemple #2
0
    // 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");
    }