This commit is contained in:
CortexCore
2024-03-31 23:31:00 +08:00
parent e179d2eb53
commit b7b89ee71a
641 changed files with 31286 additions and 22134 deletions

View File

@@ -11,9 +11,9 @@ namespace BITKit
public class RegistryRunAPP : MonoBehaviour
{
[Header(Constant.Header.Settings)]
public string subKey;
public string excutablePath;
public bool excuteOnStart;
[SerializeReference,SubclassSelector] private IReference subKey;
[SerializeReference,SubclassSelector] private string executablePath;
private bool executeOnStart;
[Header(Constant.Header.Events)]
public UnityEvent<bool> onSuccess = new();
public UnityEvent onfailure = new();
@@ -23,7 +23,7 @@ namespace BITKit
{
Debug.Log("正在启动注册函数");
var path = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
var result = RegisterAppKey(subKey, path);
var result = RegisterAppKey(subKey.Value, path);
Debug.Log($"正在注册启动:{subKey}:{path}");
if (result)
{
@@ -46,7 +46,7 @@ namespace BITKit
async void Start()
{
await UniTask.Yield();
if (excuteOnStart) Excute();
if (executeOnStart) Excute();
}
private static bool RegisterAppKey(string keyName, string value)
{