2021-11-10から1日間の記事一覧
概要 using Cysharp.Threading.Tasks; using UnityEditor; using UnityEditor.Experimental.SceneManagement; using UnityEngine; [InitializeOnLoad] public static class Example { static Example() { PrefabStage.prefabStageOpened += async stage => {…
概要 using UnityEditor; using UnityEngine; public static class Example { [MenuItem( "Tools/FixCameraPivotAndSize" )] public static void FixCameraPivotAndSize() { var sceneView = SceneView.lastActiveSceneView; if ( sceneView == null ) retur…
概要 Rider の設定の「エディター > 一般 > 外観」の「空白を表示」をオンにすると 空白を表示できます
概要 namespace と入力した時に MyNamespace 以外の名前が入力されるようにしたい場合、 Rider の設定の「エディター > Live Templates > C#」を押して 「namespace」の「Edit variables」を押して 好きな名前を入力して「Done」を押して「Save」を押します …
概要 コンポーネントの Inspector に表示される「Script」の欄を非表示にしたい場合は using Sirenix.OdinInspector; using UnityEngine; [HideMonoScript] public class Example : MonoBehaviour { public string m_name; } HideMonoScript をクラスに付け…
ソースコード using UnityEditor; using UnityEditor.SceneManagement; [InitializeOnLoad] public static class Example { static Example() { EditorApplication.playModeStateChanged += change => { if ( change != PlayModeStateChange.ExitingEditMode…
ソースコード using UnityEditor; using UnityEditor.SceneManagement; public static class Example { [MenuItem( "Tools/Hoge" )] public static void Hoge() { StageUtility.GoToMainStage(); } }
概要 Rider で宣言に移動するとデフォルトでは 関数の中身などがデコンパイルされた状態で表示されますが Rider の設定の「ツール > External Symbols」を開いて 「Decompile methods」をオフにして保存すると 宣言に移動した時に関数の中身などがデコンパイ…
概要 Rider メニューの「コード > 折りたたみ > Doc コメントを折りたたむ」を選択すると XML ドキュメントコメントをすべて折りたたむことができる 参考サイト様
概要 The class named 'XXXX' is not derived from MonoBehaviour or ScriptableObject! Console ウィンドウにこのような警告メッセージが表示される場合は シーンに存在するゲームオブジェクトに MonoBehaviour を継承していないクラスのスクリプトがアタッ…
概要 GameObject (named 'XXXX') references runtime script in scene file. Fixing! Console ウィンドウにこのような警告メッセージが表示される場合は シーンに存在するゲームオブジェクトに MonoBehaviour を継承していないクラスのスクリプトがアタッチ…
概要 'XXXX' is missing the class attribute 'ExtensionOfNativeClass'! Console ウィンドウにこのようなエラーメッセージが表示される場合は シーンに存在するゲームオブジェクトに MonoBehaviour を継承していないクラスのスクリプトがアタッチされている…
概要 Saving failed. Check the Console window to get more insight into what needs to be fixed. プレハブを編集して保存する時に上記のエラーダイアログが表示されて You are trying to replace or create a Prefab from the instance 'XXXX' that conta…
概要 Saving failed. Check the Console window to get more insight into what needs to be fixed. プレハブを編集して保存する時に上記のエラーダイアログが表示されて You are trying to replace or create a Prefab from the instance 'XXXX' that refer…
はじめに 「DeltaTimeChecker」を Unity プロジェクトに導入することで Time.deltaTime をグラフで可視化できるようになります 使用例 クイックスタート 空のゲームオブジェクトに「Time Graph」をアタッチして Texture に rect.png を設定することで使用で…