예제 #1
0
    void CreatePrefab(GameObject go, Dictionary <string, object> parms)
    {
        EditorItemList list = new EditorItemList();

        list.Initiliaze();
        CharacterConfig config = go.GetComponent <CharacterConfig>();

        if (config == null)
        {
            config = go.AddComponent <CharacterConfig>();
        }
        config.ItemList = list.Get();
    }
예제 #2
0
    public TemplateCloth()
    {
        cloths = new List <TemplateClothItem>();

        TextAsset txt = new EditorItemList().Get();

        if (txt != null)
        {
            List <ClothModel> chs = txt.text.JsonTransferObject <List <ClothModel> >();
            for (int i = 0; i < chs.Count; i++)
            {
                cloths.Add(new TemplateClothItem(chs[i]));
            }
        }
    }