69 lines
1.4 KiB
C#
69 lines
1.4 KiB
C#
|
|
|
||
|
|
|
||
|
|
namespace Guru.Editor
|
||
|
|
{
|
||
|
|
using UnityEditor;
|
||
|
|
using System.IO;
|
||
|
|
using UnityEngine;
|
||
|
|
using System.Collections;
|
||
|
|
using Guru.Editor;
|
||
|
|
using Unity.EditorCoroutines.Editor;
|
||
|
|
|
||
|
|
public class GuruSDKBooster
|
||
|
|
{
|
||
|
|
|
||
|
|
// [MenuItem("Test/API/Test CR")]
|
||
|
|
static void TestCR()
|
||
|
|
{
|
||
|
|
// EditorHelper.StartCoroutine(OnTestRun());
|
||
|
|
EditorCoroutineUtility.StartCoroutineOwnerless(OnTestRun());
|
||
|
|
}
|
||
|
|
|
||
|
|
static IEnumerator OnTestRun()
|
||
|
|
{
|
||
|
|
int i = 0;
|
||
|
|
while (i < 5)
|
||
|
|
{
|
||
|
|
Debug.Log($"--- ticket: {i}");
|
||
|
|
i++;
|
||
|
|
yield return new EditorWaitForSeconds(1);
|
||
|
|
}
|
||
|
|
Debug.Log($"------- runner end -------");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
// [InitializeOnLoad]
|
||
|
|
internal class BoostOnLoad
|
||
|
|
{
|
||
|
|
static BoostOnLoad()
|
||
|
|
{
|
||
|
|
var config = EditorGuruServiceIO.LoadConfig();
|
||
|
|
if (null != config)
|
||
|
|
{
|
||
|
|
Debug.Log("<color=#88ff00>found guru-services file on disk</color>");
|
||
|
|
// TODO:
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
Debug.Log("<color=yellow>Can't find guru-services.json on load...</color>");
|
||
|
|
// GuruSDKManager.Open();
|
||
|
|
EditorGuruServiceIO.LoadConfig();
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|