This commit is contained in:
陈思海 2025-03-24 13:16:51 +08:00
parent 583140efdf
commit 7ecd5f3c2d
139 changed files with 336 additions and 3251 deletions

View File

@ -1,5 +1,5 @@
using System.IO; using System.IO;
using AlicizaX.Runtime; using AlicizaX;
using UnityEditor; using UnityEditor;
namespace AlicizaX.Editor namespace AlicizaX.Editor

View File

@ -3,7 +3,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using AlicizaX.Runtime;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

@ -4,7 +4,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using AlicizaX.Runtime;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using AlicizaX.Runtime; using AlicizaX;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

@ -1,7 +1,6 @@
using AlicizaX; using AlicizaX;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using AlicizaX.Runtime;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

@ -1,108 +1,194 @@
using System; // using System;
using UnityEditor; // using System.Reflection;
using System.Reflection; // using AlicizaX.Runtime;
using System.Text.RegularExpressions; // using UnityEditor;
using UnityEditor.Callbacks; // using UnityEngine;
using UnityEditorInternal; //
using UnityEngine; // namespace AlicizaX.Editor
// {
namespace AlicizaX.Editor // public static class LogEditor
{ // {
public static class OpenAssetLogLine // private class LogEditorConfig
{ // {
[OnOpenAsset(0)] // public string logScriptPath = "";
private static bool OnOpenAsset(int instanceID, int line) // public string logTypeName = "";
{ // public int instanceID = 0;
if (line <= 0) //
{ // public LogEditorConfig(string logScriptPath, System.Type logType)
return false; // {
} // this.logScriptPath = logScriptPath;
// 获取资源路径 // this.logTypeName = logType.FullName;
string assetPath = AssetDatabase.GetAssetPath(instanceID); // }
// }
// 判断资源类型 //
if (!assetPath.EndsWith(".cs")) //
{ // private static LogEditorConfig[] _logEditorConfig = new LogEditorConfig[]
return false; // {
} // new LogEditorConfig("Packages/com.alicizax.unity/Runtime/Base/Log/Log.cs", typeof(Log))
// };
bool autoFirstMatch = assetPath.Contains("Log.cs"); //
//
var stackTrace = GetStackTrace(); // [UnityEditor.Callbacks.OnOpenAssetAttribute(-1)]
if (!string.IsNullOrEmpty(stackTrace) && stackTrace.Contains("Log.cs")) // private static bool OnOpenAsset(int instanceID, int line)
// {
{ // for (int i = _logEditorConfig.Length - 1; i >= 0; --i)
if (!autoFirstMatch) // {
{ // var configTmp = _logEditorConfig[i];
var fullPath = Application.dataPath.Substring(0, Application.dataPath.LastIndexOf("Assets", StringComparison.Ordinal)); // UpdateLogInstanceID(configTmp);
fullPath = $"{fullPath}{assetPath}"; // if (instanceID == configTmp.instanceID)
// 跳转到目标代码的特定行 // {
InternalEditorUtility.OpenFileAtLineExternal(fullPath.Replace('/', '\\'), line); // var statckTrack = GetStackTrace();
return true; // if (!string.IsNullOrEmpty(statckTrack))
} // {
// var fileNames = statckTrack.Split('\n');
// 使用正则表达式匹配at的哪个脚本的哪一行 // var fileName = GetCurrentFullFileName(fileNames);
var matches = Regex.Match(stackTrace, @"\(at (.+)\)", // var fileLine = LogFileNameToFileLine(fileName);
RegexOptions.IgnoreCase); // fileName = GetRealFileName(fileName);
while (matches.Success) //
{ // AssetDatabase.OpenAsset(AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(fileName), fileLine);
var pathLine = matches.Groups[1].Value; // return true;
// }
if (!pathLine.Contains("Log.cs")) //
{ // break;
var splitIndex = pathLine.LastIndexOf(":", StringComparison.Ordinal); // }
// 脚本路径 // }
var path = pathLine.Substring(0, splitIndex); //
// 行号 // return false;
line = Convert.ToInt32(pathLine.Substring(splitIndex + 1)); // }
var fullPath = Application.dataPath.Substring(0, Application.dataPath.LastIndexOf("Assets", StringComparison.Ordinal)); //
fullPath = $"{fullPath}{path}"; // private static string GetStackTrace()
// 跳转到目标代码的特定行 // {
InternalEditorUtility.OpenFileAtLineExternal(fullPath.Replace('/', '\\'), line); // var consoleWindowType = typeof(EditorWindow).Assembly.GetType("UnityEditor.ConsoleWindow");
break; // var fieldInfo = consoleWindowType.GetField("ms_ConsoleWindow", BindingFlags.Static | BindingFlags.NonPublic);
} // var consoleWindowInstance = fieldInfo.GetValue(null);
//
matches = matches.NextMatch(); // if (null != consoleWindowInstance)
} // {
// if ((object)EditorWindow.focusedWindow == consoleWindowInstance)
return true; // {
} // // Get ListViewState in ConsoleWindow
// // var listViewStateType = typeof(EditorWindow).Assembly.GetType("UnityEditor.ListViewState");
return false; // // fieldInfo = consoleWindowType.GetField("m_ListView", BindingFlags.Instance | BindingFlags.NonPublic);
} // // var listView = fieldInfo.GetValue(consoleWindowInstance);
//
/// <summary> // // Get row in listViewState
/// 获取当前日志窗口选中的日志的堆栈信息。 // // fieldInfo = listViewStateType.GetField("row", BindingFlags.Instance | BindingFlags.Public);
/// </summary> // // int row = (int)fieldInfo.GetValue(listView);
/// <returns>选中日志的堆栈信息实例。</returns> //
private static string GetStackTrace() // // Get m_ActiveText in ConsoleWindow
{ // fieldInfo = consoleWindowType.GetField("m_ActiveText", BindingFlags.Instance | BindingFlags.NonPublic);
// 通过反射获取ConsoleWindow类 // string activeText = fieldInfo.GetValue(consoleWindowInstance).ToString();
var consoleWindowType = typeof(EditorWindow).Assembly.GetType("UnityEditor.ConsoleWindow"); //
// 获取窗口实例 // return activeText;
var fieldInfo = consoleWindowType.GetField("ms_ConsoleWindow", // }
BindingFlags.Static | // }
BindingFlags.NonPublic); //
if (fieldInfo != null) // return "";
{ // }
var consoleInstance = fieldInfo.GetValue(null); //
if (consoleInstance != null) // private static void UpdateLogInstanceID(LogEditorConfig config)
if (EditorWindow.focusedWindow == (EditorWindow)consoleInstance) // {
{ // if (config.instanceID > 0)
// 获取m_ActiveText成员 // {
fieldInfo = consoleWindowType.GetField("m_ActiveText", // return;
BindingFlags.Instance | // }
BindingFlags.NonPublic); //
// 获取m_ActiveText的值 // var assetLoadTmp = AssetDatabase.LoadAssetAtPath<UnityEngine.Object>(config.logScriptPath);
if (fieldInfo != null) // if (null == assetLoadTmp)
{ // {
var activeText = fieldInfo.GetValue(consoleInstance).ToString(); // throw new System.Exception("not find asset by path=" + config.logScriptPath);
return activeText; // }
} //
} // config.instanceID = assetLoadTmp.GetInstanceID();
} // }
//
return null; // private static string GetCurrentFullFileName(string[] fileNames)
} // {
} // string retValue = "";
} // int findIndex = -1;
//
// for (int i = fileNames.Length - 1; i >= 0; --i)
// {
// bool isCustomLog = false;
// for (int j = _logEditorConfig.Length - 1; j >= 0; --j)
// {
// if (fileNames[i].Contains(_logEditorConfig[j].logTypeName))
// {
// isCustomLog = true;
// break;
// }
// }
//
// if (isCustomLog)
// {
// findIndex = i;
// break;
// }
// }
//
// if (findIndex >= 0 && findIndex < fileNames.Length - 1)
// {
// retValue = fileNames[findIndex + 1];
// }
//
// return retValue;
// }
//
// private static string GetRealFileName(string fileName)
// {
// int indexStart = fileName.IndexOf("(at ") + "(at ".Length;
// int indexEnd = ParseFileLineStartIndex(fileName) - 1;
//
// fileName = fileName.Substring(indexStart, indexEnd - indexStart);
// return fileName;
// }
//
// private static int LogFileNameToFileLine(string fileName)
// {
// int findIndex = ParseFileLineStartIndex(fileName);
// string stringParseLine = "";
// for (int i = findIndex; i < fileName.Length; ++i)
// {
// var charCheck = fileName[i];
// if (!IsNumber(charCheck))
// {
// break;
// }
// else
// {
// stringParseLine += charCheck;
// }
// }
//
// return int.Parse(stringParseLine);
// }
//
// private static int ParseFileLineStartIndex(string fileName)
// {
// int retValue = -1;
// for (int i = fileName.Length - 1; i >= 0; --i)
// {
// var charCheck = fileName[i];
// bool isNumber = IsNumber(charCheck);
// if (isNumber)
// {
// retValue = i;
// }
// else
// {
// if (retValue != -1)
// {
// break;
// }
// }
// }
//
// return retValue;
// }
//
// private static bool IsNumber(char c)
// {
// return c >= '0' && c <= '9';
// }
// }
// }

View File

@ -1,6 +1,5 @@
using AlicizaX; using AlicizaX;
using System.Diagnostics; using System.Diagnostics;
using AlicizaX.Runtime;
using UnityEditor; using UnityEditor;
using UnityEngine; using UnityEngine;

View File

@ -1,5 +1,5 @@
using System; using System;
using AlicizaX.Runtime; using AlicizaX;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Editor namespace AlicizaX.Editor

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.Editor namespace AlicizaX.Editor
{ {

BIN
Plugins/XLog.dll Normal file

Binary file not shown.

2
Plugins/XLog.dll.meta Normal file
View File

@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: d54020f8ad5378144bdeef5bb9b7a769

View File

@ -3,7 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架链表类。 /// 游戏框架链表类。

View File

@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架链表范围。 /// 游戏框架链表范围。

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架单例 /// 游戏框架单例
@ -44,4 +44,4 @@ namespace AlicizaX.Runtime
} }
} }
} }
} }

View File

@ -2,7 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架多值字典类。 /// 游戏框架多值字典类。

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架序列化器基类。 /// 游戏框架序列化器基类。

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架单例 /// 游戏框架单例

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 标记物体对象为不可销毁 /// 标记物体对象为不可销毁

View File

@ -2,7 +2,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 类型和名称的组合值。 /// 类型和名称的组合值。

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public interface IEvent public interface IEvent
{ {

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 事件基类。 /// 事件基类。

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public sealed partial class EventPool<T> where T : BaseEventArgs public sealed partial class EventPool<T> where T : BaseEventArgs
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 事件池。 /// 事件池。
@ -283,7 +283,7 @@ namespace AlicizaX.Runtime
} }
catch (Exception exception) catch (Exception exception)
{ {
Log.Fatal(exception); Log.Exception(exception);
} }
current = _cachedNodes[e]; current = _cachedNodes[e];
@ -299,7 +299,7 @@ namespace AlicizaX.Runtime
} }
catch (Exception exception) catch (Exception exception)
{ {
Log.Fatal(exception); Log.Exception(exception);
} }
} }
else if ((_eventPoolMode & EventPoolMode.AllowNoHandler) == 0) else if ((_eventPoolMode & EventPoolMode.AllowNoHandler) == 0)

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 事件池模式。 /// 事件池模式。

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架中包含事件数据的类的基类。 /// 游戏框架中包含事件数据的类的基类。

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Runtime.Serialization; using System.Runtime.Serialization;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架异常类。 /// 游戏框架异常类。

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏框架异常静态方法 /// 游戏框架异常静态方法

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 916bb4a512dc940daa99fa6c51b4179e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,34 +0,0 @@

namespace AlicizaX.Runtime
{
/// <summary>
/// 游戏框架日志等级。
/// </summary>
public enum GameFrameworkLogLevel : byte
{
/// <summary>
/// 调试。
/// </summary>
Debug = 0,
/// <summary>
/// 信息。
/// </summary>
Info,
/// <summary>
/// 警告。
/// </summary>
Warning,
/// <summary>
/// 错误。
/// </summary>
Error,
/// <summary>
/// 严重错误。
/// </summary>
Fatal
}
}

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: 60514273a67bf47f19bc57d0a81e5d5b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: dea5e7b095c6d3b4ea334c381fcd16fb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,135 +0,0 @@
using Cysharp.Text;
using UnityEngine;
namespace AlicizaX.Runtime
{
public static class LogReportUtil
{
private static LogDetails LastReportedDetails = new LogDetails();
public static bool ForceDisableReport = true;
internal static void RedirectLog()
{
Application.logMessageReceived += HandleLog;
}
internal static void UnRedirectLog()
{
Application.logMessageReceived -= HandleLog;
}
private static void HandleLog(string logMessage, string stackTrace, LogType logType)
{
GameFrameworkLogLevel logLevel = GameFrameworkLogLevel.Info;
switch (logType)
{
case LogType.Error:
logLevel = GameFrameworkLogLevel.Error;
break;
case LogType.Assert:
case LogType.Exception:
logLevel = GameFrameworkLogLevel.Fatal;
break;
case LogType.Warning:
logLevel = GameFrameworkLogLevel.Warning;
break;
case LogType.Log:
logLevel = GameFrameworkLogLevel.Info;
break;
}
ProcessLogMessage(logLevel, logMessage, stackTrace);
}
private static void ProcessLogMessage(GameFrameworkLogLevel logLevel, string message, string stackTrace)
{
if (logLevel == GameFrameworkLogLevel.Fatal || logLevel == GameFrameworkLogLevel.Error)
{
string formattedMessage = "";
using (var sb = ZString.CreateStringBuilder())
{
sb.Append(message);
sb.Append(GetStackTrace(stackTrace));
formattedMessage = sb.ToString();
}
if (!ForceDisableReport && ShouldReport(logLevel, formattedMessage))
{
_ = WebHookUtils.SendLogToServerAsync(formattedMessage);
}
}
}
private static string GetStackTrace(string stackTrace)
{
return string.IsNullOrEmpty(stackTrace) ? string.Empty : $"\nStackTrace:\n{SimplifyStackTrace(stackTrace)}";
}
private static string SimplifyStackTrace(string stackTrace)
{
var sb = ZString.CreateStringBuilder();
var lines = stackTrace.Split('\n');
bool skipLine = false;
foreach (var line in lines)
{
if (line.Contains("Log") || line.Contains("Sirenix"))
{
skipLine = true;
}
else
{
if (skipLine)
{
if (!string.IsNullOrWhiteSpace(line) && !line.Contains("Log") && !line.Contains("Sirenix"))
{
skipLine = false;
}
else
{
continue;
}
}
if (!string.IsNullOrWhiteSpace(line))
{
sb.Append(line);
sb.Append('\n');
}
}
}
string result = sb.ToString().Trim();
return !string.IsNullOrEmpty(result) ? result : "Stack trace not available.";
}
private static bool ShouldReport(GameFrameworkLogLevel logLevel, string message)
{
if (LastReportedDetails.Level == logLevel && LastReportedDetails.Message.Equals(message))
{
return false;
}
LastReportedDetails.Update(logLevel, message);
return true;
}
private struct LogDetails
{
public GameFrameworkLogLevel Level;
public string Message;
public void Update(GameFrameworkLogLevel level, string message)
{
Level = level;
Message = message;
}
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 8b7127ce6c394c43844105d9affeed71
timeCreated: 1737509620

View File

@ -1,45 +0,0 @@
using System;
using System.Net.Http;
using System.Text;
using Cysharp.Threading.Tasks;
using UnityEngine;
namespace AlicizaX.Runtime
{
public static class WebHookUtils
{
private static readonly HttpClient httpClient = new HttpClient();
private static readonly string WebHookKey = "https://open.feishu.cn/open-apis/bot/v2/hook/e9cdddcb-8ae0-4390-98d7-42e2c29efc00";
public static async UniTask SendLogToServerAsync(string logMessage)
{
string at = @"<at user_id=""all"">所有人</at> ";
try
{
// 创建请求体
var payload = new
{
msg_type = "text",
content = new
{
text = at+logMessage
}
};
string json = Utility.Json.ToJson(payload);
using (var content = new StringContent(json, Encoding.UTF8, "application/json"))
{
HttpResponseMessage response = await httpClient.PostAsync(WebHookKey, content).AsUniTask();
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
}
}
catch (Exception ex)
{
Debug.LogError($"Failed to send log to server: {ex.Message}");
}
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: 506344a3b774413e85a054a93741fe32
timeCreated: 1737461451

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 内存对象Interface。 /// 内存对象Interface。

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class MemoryPool public static partial class MemoryPool
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 内存池。 /// 内存池。

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 内存池对象基类。 /// 内存池对象基类。

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 内存池信息。 /// 内存池信息。

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 内存强制检查类型。 /// 内存强制检查类型。

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public interface IModule public interface IModule
{ {
@ -95,4 +95,4 @@
{ {
protected internal void OnGUI(); protected internal void OnGUI();
} }
} }

View File

@ -2,7 +2,7 @@
using System.Buffers; using System.Buffers;
using System.Collections.Generic; using System.Collections.Generic;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static class ModuleSystem public static class ModuleSystem
{ {

View File

@ -3,7 +3,7 @@ using AlicizaX.ObjectPool;
using Cysharp.Threading.Tasks; using Cysharp.Threading.Tasks;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 基础组件。 /// 基础组件。
@ -138,9 +138,10 @@ namespace AlicizaX.Runtime
{ {
_instance = this; _instance = this;
DontDestroyOnLoad(this); DontDestroyOnLoad(this);
Utility.Unity.MakeEntity(transform); Utility.Unity.MakeEntity(transform);
Log.Init();
Log.Info("Game Version: {0}, Unity Version: {1}", AppVersion.GameVersion, Application.unityVersion); Log.Info("Game Version: {0}, Unity Version: {1}", AppVersion.GameVersion, Application.unityVersion);
Utility.Converter.ScreenDpi = Screen.dpi; Utility.Converter.ScreenDpi = Screen.dpi;

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 变量。 /// 变量。

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 变量。 /// 变量。

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 版本号类。 /// 版本号类。

View File

@ -1,7 +1,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
[Serializable] [Serializable]
public class AppBuilderSetting public class AppBuilderSetting
@ -37,6 +37,6 @@ namespace AlicizaX.Runtime
public bool DebugMode = false; public bool DebugMode = false;
public int ResMode = 0; public int ResMode = 0;
public Language Language = Runtime.Language.ChineseSimplified; public Language Language = Language.ChineseSimplified;
} }
} }

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 常用设置相关常量。 /// 常用设置相关常量。
@ -19,4 +19,4 @@
public const string UISoundVolume = "Setting.UISoundVolume"; public const string UISoundVolume = "Setting.UISoundVolume";
} }
} }
} }

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 本地化语言。 /// 本地化语言。

View File

@ -1,7 +1,6 @@
using AlicizaX; using AlicizaX;
using System; using System;
using System.IO; using System.IO;
using AlicizaX.Runtime;
/// <summary> /// <summary>
/// 对 BinaryReader 和 BinaryWriter 的扩展方法。 /// 对 BinaryReader 和 BinaryWriter 的扩展方法。

View File

@ -10,7 +10,7 @@ using System.Buffers;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public ref partial struct SequenceReader<T> where T : unmanaged, IEquatable<T> public ref partial struct SequenceReader<T> where T : unmanaged, IEquatable<T>
{ {

View File

@ -11,7 +11,7 @@ using System.Diagnostics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class SequenceReaderExtensions public static partial class SequenceReaderExtensions
{ {

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 应用帮助类 /// 应用帮助类

View File

@ -2,7 +2,7 @@ using System;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 相机帮助类 /// 相机帮助类

View File

@ -3,7 +3,7 @@ using ICSharpCode.SharpZipLib.GZip;
using System; using System;
using System.IO; using System.IO;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 默认压缩解压缩辅助器。 /// 默认压缩解压缩辅助器。
@ -203,4 +203,4 @@ namespace AlicizaX.Runtime
} }
} }
} }
} }

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 去重。帮助类 /// 去重。帮助类

View File

@ -4,7 +4,7 @@ using System.IO;
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 文件帮助类 /// 文件帮助类

View File

@ -2,7 +2,7 @@ using UnityEngine;
using UnityEngine.Rendering; using UnityEngine.Rendering;
using UnityEngine.SceneManagement; using UnityEngine.SceneManagement;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏对象帮助类 /// 游戏对象帮助类

View File

@ -1,7 +1,6 @@
using AlicizaX; using UnityEngine;
using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 辅助器创建器相关的实用函数。 /// 辅助器创建器相关的实用函数。

View File

@ -1,7 +1,7 @@
using System; using System;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 数学帮助类 /// 数学帮助类

View File

@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.Net; using System.Net;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 网络帮助类 /// 网络帮助类

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
[UnityEngine.Scripting.Preserve] [UnityEngine.Scripting.Preserve]
public static class ObjectHelper public static class ObjectHelper

View File

@ -1,7 +1,7 @@
using System.Text; using System.Text;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static class PathHelper public static class PathHelper
{ {

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 坐标帮助类 /// 坐标帮助类

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 随机数帮助类 /// 随机数帮助类

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 游戏时间帮助类 /// 游戏时间帮助类

View File

@ -1,6 +1,6 @@
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// Unity 渲染帮助类 /// Unity 渲染帮助类

View File

@ -5,7 +5,7 @@ using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Zip.Compression; using ICSharpCode.SharpZipLib.Zip.Compression;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 压缩帮助类 /// 压缩帮助类

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.ObjectPool namespace AlicizaX.ObjectPool
{ {

View File

@ -1,5 +1,5 @@
using System; using System;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.ObjectPool namespace AlicizaX.ObjectPool
{ {

View File

@ -1,5 +1,5 @@
using System; using System;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.ObjectPool namespace AlicizaX.ObjectPool
{ {

View File

@ -1,7 +1,7 @@
using AlicizaX.ObjectPool; using AlicizaX.ObjectPool;
using UnityEngine; using UnityEngine;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
/// <summary> /// <summary>
/// 对象池组件。 /// 对象池组件。
@ -23,7 +23,7 @@ namespace AlicizaX.Runtime
_mObjectPoolModule = ModuleSystem.RegisterModule<IObjectPoolModule>(typeof(ObjectPoolModule)); _mObjectPoolModule = ModuleSystem.RegisterModule<IObjectPoolModule>(typeof(ObjectPoolModule));
if (_mObjectPoolModule == null) if (_mObjectPoolModule == null)
{ {
Log.Fatal("Object pool manager is invalid."); Log.Error("Object pool manager is invalid.");
return; return;
} }
} }

View File

@ -1,5 +1,5 @@
using System; using System;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.ObjectPool namespace AlicizaX.ObjectPool
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.ObjectPool namespace AlicizaX.ObjectPool
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using AlicizaX.Runtime; using AlicizaX;
namespace AlicizaX.ObjectPool namespace AlicizaX.ObjectPool
{ {
@ -1286,4 +1286,4 @@ namespace AlicizaX.ObjectPool
return a.Priority.CompareTo(b.Priority); return a.Priority.CompareTo(b.Priority);
} }
} }
} }

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public sealed class BindableProperty<T> public sealed class BindableProperty<T>
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.IO; using System.IO;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {
@ -303,4 +303,4 @@ namespace AlicizaX.Runtime
} }
} }
} }
} }

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -3,7 +3,7 @@ using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -3,7 +3,7 @@ using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {
@ -26,7 +26,7 @@
return size + UnitList[0]; return size + UnitList[0];
} }
public static string GetLengthString(long length) public static string GetLengthString(long length)
{ {
if (length < 1024) if (length < 1024)

View File

@ -3,7 +3,7 @@ using System.IO;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -2,7 +2,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -2,7 +2,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -2,7 +2,7 @@ using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Text; using System.Text;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -5,7 +5,7 @@ using Cysharp.Threading.Tasks;
using UnityEngine; using UnityEngine;
using UnityEngine.Networking; using UnityEngine.Networking;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {
@ -111,4 +111,4 @@ namespace AlicizaX.Runtime
} }
} }
} }
} }

View File

@ -1,7 +1,7 @@
using System; using System;
using System.Threading; using System.Threading;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,7 +1,7 @@
using System; using System;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {
@ -84,4 +84,4 @@ namespace AlicizaX.Runtime
} }
} }
} }
} }

View File

@ -1,6 +1,6 @@
using System; using System;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -4,7 +4,7 @@ using System.Net;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using System.Net.Sockets; using System.Net.Sockets;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,4 +1,4 @@
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

View File

@ -1,6 +1,6 @@
using System.IO; using System.IO;
namespace AlicizaX.Runtime namespace AlicizaX
{ {
public static partial class Utility public static partial class Utility
{ {

Some files were not shown because too many files have changed in this diff Show More