UnityExplorer/src/Loader/Standalone/Editor/ExplorerEditorLoader.cs

41 lines
1.2 KiB
C#
Raw Normal View History

2022-03-21 21:25:51 +11:00
#if STANDALONE
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEngine;
namespace UnityExplorer.Loader.Standalone
{
public class ExplorerEditorLoader : ExplorerStandalone
{
public static void Initialize()
{
Instance = new ExplorerEditorLoader();
OnLog += LogHandler;
Instance.configHandler = new StandaloneConfigHandler();
ExplorerCore.Init(Instance);
}
static void LogHandler(string message, LogType logType)
{
switch (logType)
{
case LogType.Assert: Debug.LogError(message); break;
case LogType.Error: Debug.LogError(message); break;
case LogType.Exception: Debug.LogError(message); break;
case LogType.Log: Debug.Log(message); break;
case LogType.Warning: Debug.LogWarning(message); break;
}
}
protected override void CheckExplorerFolder()
{
if (explorerFolder == null)
explorerFolder = Path.Combine(Application.dataPath, "UnityExplorer~");
}
}
}
#endif