12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEditor;
- namespace SC.Common
- {
- public class ButtonMenu : Editor {
- [MenuItem("GameObject/ShadowSystem/SCButton")]
- public static void CreateSCButton()
- {
- GameObject added = GameObject.Find ("SCButton");
- GameObject obj;
- GameObject sel;
- if (added != null) {
- DestroyImmediate (added);
- }
- obj = (GameObject)Resources.Load ("Prefabs/SCButton");
- sel = (GameObject)Instantiate (obj);
- sel.name = "SCButton";
- }
- [MenuItem("GameObject/ShadowSystem/UIButton")]
- public static void CreateUIButton() {
- GameObject added = GameObject.Find("UIButton");
- GameObject obj;
- GameObject sel;
- if(added != null) {
- DestroyImmediate(added);
- }
- obj = (GameObject)Resources.Load("Prefabs/UIButton");
- sel = (GameObject)Instantiate(obj);
- sel.name = "UIButton";
- }
- }
- }
|