Unity・3DCG技術ブログ

TAもどきによるUnity・3DCGに関する記事をアップします。

2020-07-01から1ヶ月間の記事一覧

【Unity】EditorWindowにWarningを表示するサンプル

概要 コード using UnityEditor; using UnityEngine; using UnityEngine.UIElements; public class ExampleWindow : EditorWindow { [MenuItem("Window/ExampleWindow")] static void Init() { GetWindow<ExampleWindow>(); } void OnEnable() { var button1 = new Button((</examplewindow>…

【Unity】GetWindowで特定のEditorWindowの隣にEditorWindowをこさせるサンプル

概要 EditorWindow.GetWindowの引数desiredDockNextToにtypeofでタイプを指定すると、そのタイプの隣に ウィンドウがくるサンプル。 コード using UnityEditor; using UnityEngine; using UnityEngine.UIElements; public class ExampleWindow : EditorWindo…

Unityでファイルの特定の行数にジャンプする

概要 Unityでコンソールウィンドウの行をダブルクリックしたときにコードにジャンプしますが それと同じことをUnityのインターナルなメソッドを呼ぶことでできるのでメモ コード static void OpenFileOnSpecificLineAndColumn(string filePath, int line, in…