Initial commit

This commit is contained in:
2026-03-03 00:39:30 +05:00
commit fc01f07d9b
29933 changed files with 5353098 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
using System;
using UnityEditor;
namespace Unity.PlasticSCM.Editor
{
internal static class Execute
{
internal static void WhenEditorIsReady(Action action)
{
if (PlasticApp.IsUnitTesting)
{
action();
return;
}
EditorApplication.update += RunOnceWhenEditorIsReady;
void RunOnceWhenEditorIsReady()
{
// Calls action when the editor is ready (not updating or compiling)
if (EditorApplication.isUpdating ||
EditorApplication.isCompiling)
{
return;
}
EditorApplication.update -= RunOnceWhenEditorIsReady;
action();
}
}
}
}