概要 Unity.exe ^ -batchmode ^ -runEditorTests ^ -projectPath "【Unity プロジェクト】" ^ -editorTestsFilter "【関数名】" ^ -editorTestsResultFile "results.xml" -editorTestsFilter で関数名(部分一致)を指定する 参考サイト様
概要 using System.Reflection; using UnityEditor; internal static class Example { [MenuItem( "Tools/Example" )] private static void Hoge() { var assembly = Assembly.Load( "UnityEditor.TestRunner" ); var type = assembly.GetType( "UnityEditor…
概要 start /WAIT "" "Unity.exe" ^ -batchmode ^ -runEditorTests ^ -projectPath "【Unity プロジェクト】" ^ -editorTestsResultFile "results.xml" echo %ERRORLEVEL% 上記のようなコマンドを実行すると %ERRORLEVEL% で終了コードを受け取れる 0: テス…
概要 using UnityEditor; using UnityEditor.TestTools.TestRunner.Api; using UnityEngine; [InitializeOnLoad] internal sealed class Example : ICallbacks { static Example() { var api = ScriptableObject.CreateInstance<TestRunnerApi>(); api.RegisterCallbacks( n</testrunnerapi>…
概要 using UnityEditor; using UnityEditor.TestTools.TestRunner.Api; using UnityEngine; internal static class Example { [MenuItem( "Tools/Run Play Mode" )] private static void RunPlayMode() { RunTest( TestMode.PlayMode ); } [MenuItem( "Tool…
ソースコード
ソースコード using System; using UnityEditor.SceneManagement; public sealed class SceneSetupScope : IDisposable { private readonly SceneSetup[] m_oldSetups; public SceneSetupScope() { m_oldSetups = EditorSceneManager.GetSceneManagerSetup()…
リポジトリ 使い方 Unity の Preferences の左メニューから「UniOpenAssetCustomizer」を開くことで、 ファイルを開くアプリケーションを拡張子ごとに設定できます 項目 内容 Extension 対象の拡張子(「.」は不要) Application Path ファイルを開くアプリ…
リポジトリ 使い方 Preferences の「UniCompileTimeMeasurer」の項目を開いて 「Enabled」をオンにすることでコンパイル時間が計測されるようになります 計測されたコンパイル時間は Unity メニューの「Window > UniCompileTimeMeasurer」から確認できます
リポジトリ 使用例 using UniLogEntriesInternal; using UnityEditor; using UnityEngine; public class Example { [MenuItem( "Tools/Log" )] private static void Log() { int count = 3; for ( int i = 0; i < count; i++ ) { Debug.Log( "ピカチュウ" );…
リポジトリ 使用例 using UniColorUtils; using UnityEngine; public class Example : MonoBehaviour { private void Start() { // RGBA(1.000, 0.502, 0.000, 1.000) Debug.Log( ColorUtils.FromRGB( 255, 128, 0 ) ); // RGBA(1.000, 0.502, 0.000, 1.000)…
スライド
スライド
概要 var roots = new Object[] { spriteAtlas }; var dependencies = EditorUtility.CollectDependencies( roots );
スライド