Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEditor;
  4.  
  5. [CustomEditor(typeof(GameObjectInfo))]
  6. public class GameObjectInfoButton : Editor
  7. {
  8. public override void OnInspectorGUI()
  9. {
  10. DrawDefaultInspector();
  11.  
  12. GameObjectInfo myScript = (GameObjectInfo)target;
  13. if (GUILayout.Button("Search"))
  14. {
  15. myScript.Search();
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement