| | |
| | | SetParent(instance); |
| | | } |
| | | |
| | | [MenuItem("GameObject/UI/CommonItemCell")] |
| | | [MenuItem("GameObject/UI/自选商品")] |
| | | public static void CreateCommonItemCell() |
| | | { |
| | | var prefab = LoadUIPattern("CommonItemCell"); |
| | | var prefab = LoadUIPattern("CustomizedItemCell"); |
| | | var instance = GameObject.Instantiate(prefab) as GameObject; |
| | | instance.name = "CommonItemCell"; |
| | | instance.name = "CustomizedItemCell"; |
| | | SetParent(instance); |
| | | }
|
| | | [MenuItem("GameObject/UI/特效")] |
| | | public static void CreateUIEffect() |
| | | { |
| | | var instance = new GameObject("UIEffect"); |
| | | instance.AddComponent<UIEffect>(); |
| | | SetParent(instance); |
| | | }
|
| | |
|
| | | [MenuItem("GameObject/UI/ItemCell")] |
| | | public static void CreateItemCell() |
| | | { |
| | | var button = UIUtility.CreateWidget("ItemCell", "ItemCell"); |
| | | SetParent(button); |
| | | } |
| | | |
| | | [MenuItem("GameObject/UI/SortTable")] |