Created
June 24, 2018 22:12
-
-
Save heyJordanParker/2eb007dd2b08dce55f0a234441f9e087 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEditor; | |
| using UnityEngine; | |
| namespace Elarion.Editor.Extensions { | |
| public static class EditorExtensions { | |
| public static void DrawDefaultScriptField(this UnityEditor.Editor editor) { | |
| GUI.enabled = false; | |
| EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour(editor.target as MonoBehaviour), typeof(MonoScript), false); | |
| GUI.enabled = true; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment