Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using UnityEditor;
- using System.Collections;
- public class NoticeToolbarMenu : MonoBehaviour {
- [MenuItem("GameObject/UI/Notice")]
- static void Create() {
- GameObject noticeObject = new GameObject("Notice");
- noticeObject.AddComponent<Notice>();
- GameObject canvas = GameObject.Find("Canvas");
- if(canvas != null)
- noticeObject.transform.SetParent(canvas.transform);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement