LoginSignup
0
2

More than 1 year has passed since last update.

スクリプトエディタ拡張した際に[script]を復活させる

Posted at

初めに

スクリプトエディタ拡張すると[script]が消えてしまいます。
シングルクリックで、Projectウィンドウでスクリプトの位置を教えてくれたり
ダブルクリップで、指定のエディタが開いてくれる。
これが便利でよく使うのですが、エディタ拡張するとこれが消えてしまうので
復活させたい。
image.png

Unity Answersに答えが!

調べてみると、Unity Answersに同じように質問して答えてもらっている!

スクリプト

EditorGUI.BeginDisabledGroup(true);
EditorGUILayout.ObjectField("Script", MonoScript.FromMonoBehaviour((MonoBehaviour)target) , typeof(MonoScript), false);
EditorGUI.EndDisabledGroup();

お!復活した!!
image.png

自分で復活させているので、好きな文字を表示できる!
image.png

最後に

スクリプトの位置がわかったり、ダブルクリップするとエディタが開く動作は開発していると
結構使うので、らくちんになったは!

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2