Exemplo n.º 1
0
        public static Texture LoadTexture(TextureData texData)
        {
            if (texData.tex == null)
            {
                if (!File.Exists("EZ CSP/" + texData.path))
                {
                    if (!Directory.Exists("Assets/Editor Default Resources/" + EZ_EditorAssets.assetName))
                    {
                        Directory.CreateDirectory("Assets/Editor Default Resources/" + EZ_EditorAssets.assetName);
                    }

                    AssetDatabase.Refresh();

                    FileInfo fInfo = new FileInfo("Assets/" + EZ_EditorAssets.assetName + "/Editor/Texture Resources/" + texData.path);
                    fInfo.CopyTo("Assets/Editor Default Resources/" + EZ_EditorAssets.assetName + "/" + texData.path, true);

                    AssetDatabase.Refresh();

                    texData.tex = EditorGUIUtility.LoadRequired(EZ_EditorAssets.assetName + "/" + texData.path) as Texture;
                }
            }

            return texData.tex;
        }
Exemplo n.º 2
0
 public static void DrawTexture(TextureData texData)
 {
     DrawTexture(LoadTexture(texData));
 }
Exemplo n.º 3
0
 public static void DrawTexture(TextureData texData)
 {
     DrawTexture(LoadTexture(texData));
 }