using Cryville.Crtr.Skin.Components; using System; using System.Collections.Generic; using UnityEngine; namespace Cryville.Crtr { public static class BuiltinResources { public static Dictionary Components = new(); public static Dictionary Shaders = new(); public static Dictionary Meshes = new(); public static Dictionary Materials = new(); static bool loaded; public static void LoadDefault() { if (loaded) return; Components.Add("anim", typeof(SkinAnimation)); Components.Add("image", typeof(SpritePlane)); Components.Add("linesec", typeof(TrackLine)); Components.Add("mesh", typeof(MeshBase)); Components.Add("polysec", typeof(PolygonSGO)); Components.Add("rect", typeof(SpriteRect)); Components.Add("scale3", typeof(SpriteScale3)); Components.Add("sec", typeof(SectionalGameObject)); Components.Add("sprite", typeof(SpriteBase)); Components.Add("text", typeof(SpriteText)); Meshes.Add("quad", Resources.Load("Meshes/quad")); Meshes.Add("quad_scale3h", Resources.Load("Meshes/quad_scale3h")); Materials.Add("-SpriteMat", Resources.Load("Materials/SpriteMat")); Shaders.Add("default", Shader.Find("Sprites/Default")); Shaders.Add("additive", Shader.Find("Sprites/Additive")); loaded = true; } } }