Skip to content

Instantly share code, notes, and snippets.

@heyJordanParker
Created June 24, 2018 22:12
Show Gist options
  • Select an option

  • Save heyJordanParker/2eb007dd2b08dce55f0a234441f9e087 to your computer and use it in GitHub Desktop.

Select an option

Save heyJordanParker/2eb007dd2b08dce55f0a234441f9e087 to your computer and use it in GitHub Desktop.
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