2020-11-20から1日間の記事一覧
リポジトリ 使用例 using Kogane; using UnityEditor; using UnityEditor.TestTools.TestRunner.Api; using UnityEngine; public class Callbacks : ICallbacks { public void TestStarted( ITestAdaptor test ) { // JSON 形式で ITestAdaptor の情報をログ…
概要 using System; using UnityEngine; public class Example : MonoBehaviour { public T Hoge<T>( string json ) { var isError = false; void OnReceive( string condition, string trace, LogType type ) { if ( type != LogType.Error && type != LogType</t>…
概要 削除したい関数を選択した状態で Alt + Delete を押して 確認ダイアログで「Next > 」を2回押すと、 その関数が呼び出されている箇所も含めて安全に削除できる
ソースコード 使用例 using System.Collections.Generic; using Kogane; using UnityEngine; public class Example : MonoBehaviour { private void Awake() { var dictionary1 = new Dictionary<int, string>() { { 1, "フシギダネ" }, { 2, "フシギソウ" }, { 3, "フシ</int,>…
概要 using UnityEngine; using UnityEngine.iOS; public class Example : MonoBehaviour { private void Awake() { // 同じ Debug.Log( SystemInfo.deviceUniqueIdentifier ); Debug.Log( Device.vendorIdentifier ); } }
目次 目次 特定のフィールドで命名規則を無視 特定のファイルで命名規則を無視 特定の範囲で命名規則を無視 特定のフィールドで命名規則を無視(属性版) 特定のクラスで命名規則を無視(属性版) 特定のファイルですべてのルールを無視する 補足 特定のフィ…
ソースコード using UnityEditor; public class Example { [MenuItem( "Tools/Hoge" )] private static void Hoge() { var path = EditorApplication.applicationPath; EditorUtility.RevealInFinder( path ); } }