Guest User

NoticeToolbarMenu.cs

a guest
Jul 31st, 2015
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using UnityEditor;
  3. using System.Collections;
  4.  
  5. public class NoticeToolbarMenu : MonoBehaviour {
  6.    
  7.     [MenuItem("GameObject/UI/Notice")]
  8.     static void Create() {
  9.         GameObject noticeObject = new GameObject("Notice");
  10.         noticeObject.AddComponent<Notice>();
  11.        
  12.         GameObject canvas = GameObject.Find("Canvas");
  13.         if(canvas != null)
  14.             noticeObject.transform.SetParent(canvas.transform);
  15.     }
  16. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×