Guest User

Untitled

a guest
Jun 25th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. using UnityEditor;
  2. using UnityEngine;
  3.  
  4. namespace Elarion.Editor.Extensions {
  5. public static class EditorExtensions {
  6.  
  7. public static void DrawDefaultScriptField(this UnityEditor.Editor editor) {
  8. GUI.enabled = false;
  9. EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour(editor.target as MonoBehaviour), typeof(MonoScript), false);
  10. GUI.enabled = true;
  11. }
  12.  
  13. }
  14. }
Add Comment
Please, Sign In to add comment