using Cryville.Crtr.Components; using System; using System.Collections.Generic; using UnityEngine; namespace Cryville.Crtr { public static class GenericResources { public static Dictionary Components = new Dictionary(); public static Dictionary Shaders = new Dictionary(); public static Dictionary Meshes = new Dictionary(); public static Dictionary Materials = new Dictionary(); static bool loaded; public static void LoadDefault() { if (loaded) return; Components.Add("image", typeof(SpritePlane)); Components.Add("polysec", typeof(PolygonSGO)); Components.Add("rect", typeof(SpriteRect)); Components.Add("scale3", typeof(SpriteScale3)); Components.Add("sprite", typeof(SpriteBase)); Components.Add("text", typeof(SpriteText)); Meshes.Add("quad", Resources.Load("quad")); Meshes.Add("quad_scale3h", Resources.Load("quad_scale3h")); Meshes.Add("quad_scale9", Resources.Load("quad_scale9")); Materials.Add("-CutoutMat", Resources.Load("CutoutMat")); Materials.Add("-TransparentMat", Resources.Load("TransparentMat")); loaded = true; } } }