コード例 #1
0
    //-------------------------------------------------------------------------
    static void AddAlphaMeshColliderToOTTilesSprite(Transform tilesSpriteNode, Component otTilesSprite)
    {
        AlphaMeshCollider alphaMeshColliderComponent = tilesSpriteNode.GetComponent <AlphaMeshCollider>();

        if (alphaMeshColliderComponent == null)
        {
            alphaMeshColliderComponent = UndoAware.AddComponent <AlphaMeshCollider>(tilesSpriteNode.gameObject);
            alphaMeshColliderComponent.SetOTTilesSprite(otTilesSprite);
        }
    }