ソースコード using System.Reflection; using System.Runtime.CompilerServices; namespace Kogane { public static class MethodInfoExtensionMethods { public static bool IsExtensionMethod( this MethodInfo self ) { return self.IsDefined( typeof( …
ソースコード public static class TypeExtensionMethods { public static bool IsNullable( this Type self ) { return Nullable.GetUnderlyingType( self ) != null; } }
はじめに 「Build Timestamp」を Jenkins に追加することで ビルド日時の環境変数を使用できるようになります 使用例 pipeline { agent any stages { stage('Initialize') { steps { script { echo "${BUILD_TIMESTAMP}" echo "${env.BUILD_TIMESTAMP}" } } …
概要 # LTS のインストール brew install jenkins-lts # 特定のバージョンの LTS のインストール brew install jenkins-lts@YOUR_VERSION # 起動 brew services start jenkins-lts # 再起動 brew services restart jenkins-lts # アップデート brew upgrade …
はじめに 公式サイトに書かれているとおりに /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 上記のコマンドを実行して Homebrew インストールした後に brew -v Homebrew が使えるかどうか上記のコマン…
概要 EditorGUILayout.Popup の displayedOptions に渡す文字列に対して .Replace( "/", "\u2215" ) 上記の処理を行えば「/」で階層が深くならなくなる 参考サイト様
概要 using Unity.CodeEditor; using UnityEditor; public static class Example { [MenuItem( "Tools/Hoge" )] public static void Hoge() { CodeEditor.CurrentEditor.OpenProject ( filePath: "Assets/Example.cs", line: 11, column: 20 ); } } たとえば…
概要 EventSystem の Preset を作成して Preset Manager に登録したら Hierarchy の Create メニューから EventSystem が作成できなくなった Unity を再起動したら作成できるように直った 開発環境 Unity 2022.1.11f1 macOS Monterey バージョン 12.5.1
概要 Event System の Send Navigation Events をオフにする
概要 UnityEngine.WSA.Application Auto Import に上記の文字列を追加する
概要 Unity.Mathematics.Random Auto Import に上記の文字列を追加する
拡張メソッド using NPOI.SS.UserModel; namespace Kogane { public static class ICellExtensionMethods { public static string GetValue( this ICell self ) { if ( self == null ) return string.Empty; return self.CellType switch { CellType.Numeric…
ソースコード using System; using System.IO; using UnityEditor; using UnityEngine; namespace Kogane.Internal { internal static class EditorWindowCapturer { [MenuItem( "Kogane/選択中の EditorWindow をキャプチャ" )] private static void Captur…
概要 [InitializeOnLoad] internal static class Example { static Example() { Debug.Log( ExampleSetting.instance ); } } InitializeOnLoad のタイミングで ScriptableSingleton にアクセスしたら UnityException: LoadSerializedFileAndForget is not al…