Beispiel #1
0
    public void generate3DMeshFromTexture(Texture2D texture_2d, float depth = 0.065f)
    {
        ExtrudeSprite extrudeSprite = this.transform.gameObject.AddComponent <ExtrudeSprite> () as ExtrudeSprite;

        extrudeSprite.GenerateMesh(texture_2d, depth);
    }
Beispiel #2
0
    public static void generate3DMeshFrom2D(GameObject g, SpriteData sprite, float depth = 0.0625f)
    {
        ExtrudeSprite extrudeSprite = g.AddComponent <ExtrudeSprite> () as ExtrudeSprite;

        extrudeSprite.GenerateMesh(sprite.texture_2d, depth);
    }