From a3d66675c3672c295ff710053ef8ea0abda1334f Mon Sep 17 00:00:00 2001 From: ale Date: Fri, 13 Jan 2023 17:47:23 +0800 Subject: [PATCH] =?UTF-8?q?MacEditor=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaProfiler/Runtime/Common/Setting/LuaDeepProfilerSetting.cs | 2 +- .../Runtime/Common/Setting/LuaProfilerPrecompileSetting.cs | 2 +- LuaProfiler/Runtime/Common/Struct/List.cs | 2 +- LuaProfiler/Runtime/Common/Struct/ObjectPool.cs | 2 +- LuaProfiler/Runtime/Common/Struct/Sample.cs | 2 +- .../Core/Driver/Hook/AndroidHook/AndroidNativeHooker.cs | 2 +- LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/LDasm.cs | 2 +- .../Runtime/Core/Driver/Hook/WindowsHook/NativeHelper.cs | 2 +- .../Core/Driver/Hook/WindowsHook/WindowsNativeHooker.cs | 2 +- LuaProfiler/Runtime/Core/Driver/LuaDLL.cs | 2 +- LuaProfiler/Runtime/Core/Driver/LuaProfiler.cs | 2 +- .../Runtime/Core/Driver/NativeHelper/INativeHooker.cs | 2 +- LuaProfiler/Runtime/Core/Driver/Parse/Common.cs | 2 +- LuaProfiler/Runtime/Core/Driver/Parse/LLex.cs | 2 +- LuaProfiler/Runtime/Core/Driver/Parse/Parse.cs | 2 +- LuaProfiler/Runtime/Core/Driver/Parse/Util.cs | 2 +- LuaProfiler/Runtime/Core/LuaHookSetup.cs | 5 ++++- LuaProfiler/Runtime/Core/NetWork/MBinaryReader.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/MBinaryWriter.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.Server.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/Packet/LuaRefInfo.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/Packet/PKGDisconnect.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/Packet/PKGHeartBeat.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/Packet/PacketBase.cs | 2 +- LuaProfiler/Runtime/Core/NetWork/Packet/Sample.cs | 2 +- 26 files changed, 29 insertions(+), 26 deletions(-) diff --git a/LuaProfiler/Runtime/Common/Setting/LuaDeepProfilerSetting.cs b/LuaProfiler/Runtime/Common/Setting/LuaDeepProfilerSetting.cs index b6ad7456..3a79cc93 100644 --- a/LuaProfiler/Runtime/Common/Setting/LuaDeepProfilerSetting.cs +++ b/LuaProfiler/Runtime/Common/Setting/LuaDeepProfilerSetting.cs @@ -36,7 +36,7 @@ using System; using System.IO; -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER namespace MikuLuaProfiler { using System.Collections.Generic; diff --git a/LuaProfiler/Runtime/Common/Setting/LuaProfilerPrecompileSetting.cs b/LuaProfiler/Runtime/Common/Setting/LuaProfilerPrecompileSetting.cs index ffa64562..5c520eb9 100644 --- a/LuaProfiler/Runtime/Common/Setting/LuaProfilerPrecompileSetting.cs +++ b/LuaProfiler/Runtime/Common/Setting/LuaProfilerPrecompileSetting.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN +#if UNITY_EDITOR namespace MikuLuaProfiler { using System; diff --git a/LuaProfiler/Runtime/Common/Struct/List.cs b/LuaProfiler/Runtime/Common/Struct/List.cs index fb86d2e1..4918e261 100644 --- a/LuaProfiler/Runtime/Common/Struct/List.cs +++ b/LuaProfiler/Runtime/Common/Struct/List.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.Linq; diff --git a/LuaProfiler/Runtime/Common/Struct/ObjectPool.cs b/LuaProfiler/Runtime/Common/Struct/ObjectPool.cs index 06643061..94629efd 100644 --- a/LuaProfiler/Runtime/Common/Struct/ObjectPool.cs +++ b/LuaProfiler/Runtime/Common/Struct/ObjectPool.cs @@ -36,7 +36,7 @@ /* * 对象池 */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; diff --git a/LuaProfiler/Runtime/Common/Struct/Sample.cs b/LuaProfiler/Runtime/Common/Struct/Sample.cs index c34bddef..1a2e0b78 100644 --- a/LuaProfiler/Runtime/Common/Struct/Sample.cs +++ b/LuaProfiler/Runtime/Common/Struct/Sample.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.IO; diff --git a/LuaProfiler/Runtime/Core/Driver/Hook/AndroidHook/AndroidNativeHooker.cs b/LuaProfiler/Runtime/Core/Driver/Hook/AndroidHook/AndroidNativeHooker.cs index 21bc95ce..75c69ea2 100644 --- a/LuaProfiler/Runtime/Core/Driver/Hook/AndroidHook/AndroidNativeHooker.cs +++ b/LuaProfiler/Runtime/Core/Driver/Hook/AndroidHook/AndroidNativeHooker.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || (USE_LUA_PROFILER && UNITY_ANDROID) +#if UNITY_EDITOR || (USE_LUA_PROFILER && UNITY_ANDROID) using System; using System.Runtime.InteropServices; using UnityEngine; diff --git a/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/LDasm.cs b/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/LDasm.cs index af302203..e76525ac 100644 --- a/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/LDasm.cs +++ b/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/LDasm.cs @@ -1,6 +1,6 @@ using System; -#if UNITY_EDITOR_WIN || (USE_LUA_PROFILER && UNITY_STANDALONE_WIN) +#if UNITY_EDITOR || (USE_LUA_PROFILER && UNITY_STANDALONE_WIN) namespace MikuLuaProfiler { /// diff --git a/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/NativeHelper.cs b/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/NativeHelper.cs index 36d2dedd..13070530 100644 --- a/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/NativeHelper.cs +++ b/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/NativeHelper.cs @@ -32,7 +32,7 @@ * Purpose: * ============================================================================== */ -#if UNITY_EDITOR_WIN || (USE_LUA_PROFILER && UNITY_STANDALONE_WIN) +#if UNITY_EDITOR || (USE_LUA_PROFILER && UNITY_STANDALONE_WIN) namespace MikuLuaProfiler { using System; diff --git a/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/WindowsNativeHooker.cs b/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/WindowsNativeHooker.cs index 6ea6330e..a2540647 100644 --- a/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/WindowsNativeHooker.cs +++ b/LuaProfiler/Runtime/Core/Driver/Hook/WindowsHook/WindowsNativeHooker.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || (USE_LUA_PROFILER && UNITY_STANDALONE_WIN) +#if UNITY_EDITOR || (USE_LUA_PROFILER && UNITY_STANDALONE_WIN) using System; using System.Runtime.InteropServices; diff --git a/LuaProfiler/Runtime/Core/Driver/LuaDLL.cs b/LuaProfiler/Runtime/Core/Driver/LuaDLL.cs index 4ad38736..5681d6ee 100644 --- a/LuaProfiler/Runtime/Core/Driver/LuaDLL.cs +++ b/LuaProfiler/Runtime/Core/Driver/LuaDLL.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Diagnostics; using System.Runtime.InteropServices; diff --git a/LuaProfiler/Runtime/Core/Driver/LuaProfiler.cs b/LuaProfiler/Runtime/Core/Driver/LuaProfiler.cs index cfdc9615..7d3c6b45 100644 --- a/LuaProfiler/Runtime/Core/Driver/LuaProfiler.cs +++ b/LuaProfiler/Runtime/Core/Driver/LuaProfiler.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.IO; diff --git a/LuaProfiler/Runtime/Core/Driver/NativeHelper/INativeHooker.cs b/LuaProfiler/Runtime/Core/Driver/NativeHelper/INativeHooker.cs index 41966004..564c3718 100644 --- a/LuaProfiler/Runtime/Core/Driver/NativeHelper/INativeHooker.cs +++ b/LuaProfiler/Runtime/Core/Driver/NativeHelper/INativeHooker.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; namespace MikuLuaProfiler diff --git a/LuaProfiler/Runtime/Core/Driver/Parse/Common.cs b/LuaProfiler/Runtime/Core/Driver/Parse/Common.cs index 24eac395..6417e84d 100644 --- a/LuaProfiler/Runtime/Core/Driver/Parse/Common.cs +++ b/LuaProfiler/Runtime/Core/Driver/Parse/Common.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER namespace MikuLuaProfiler { public static class LuaConf diff --git a/LuaProfiler/Runtime/Core/Driver/Parse/LLex.cs b/LuaProfiler/Runtime/Core/Driver/Parse/LLex.cs index 69f89f02..f33156df 100644 --- a/LuaProfiler/Runtime/Core/Driver/Parse/LLex.cs +++ b/LuaProfiler/Runtime/Core/Driver/Parse/LLex.cs @@ -32,7 +32,7 @@ * Purpose: * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.Text; diff --git a/LuaProfiler/Runtime/Core/Driver/Parse/Parse.cs b/LuaProfiler/Runtime/Core/Driver/Parse/Parse.cs index 7e066d1e..97722292 100644 --- a/LuaProfiler/Runtime/Core/Driver/Parse/Parse.cs +++ b/LuaProfiler/Runtime/Core/Driver/Parse/Parse.cs @@ -32,7 +32,7 @@ * Purpose: * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; diff --git a/LuaProfiler/Runtime/Core/Driver/Parse/Util.cs b/LuaProfiler/Runtime/Core/Driver/Parse/Util.cs index f8795ab4..ae2100bd 100644 --- a/LuaProfiler/Runtime/Core/Driver/Parse/Util.cs +++ b/LuaProfiler/Runtime/Core/Driver/Parse/Util.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER #define API_CHECK #define UNILUA_ASSERT diff --git a/LuaProfiler/Runtime/Core/LuaHookSetup.cs b/LuaProfiler/Runtime/Core/LuaHookSetup.cs index d610fea7..c67803b5 100644 --- a/LuaProfiler/Runtime/Core/LuaHookSetup.cs +++ b/LuaProfiler/Runtime/Core/LuaHookSetup.cs @@ -33,7 +33,7 @@ * ============================================================================== */ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.Text; @@ -71,6 +71,9 @@ public static void RegisterAction(Action a) #endif public static void OnStartGame() { +#if UNITY_EDITOR_OSX + return; +#endif #if UNITY_EDITOR if (!Application.isPlaying) return; #endif diff --git a/LuaProfiler/Runtime/Core/NetWork/MBinaryReader.cs b/LuaProfiler/Runtime/Core/NetWork/MBinaryReader.cs index 16363b64..3a99a569 100644 --- a/LuaProfiler/Runtime/Core/NetWork/MBinaryReader.cs +++ b/LuaProfiler/Runtime/Core/NetWork/MBinaryReader.cs @@ -2,7 +2,7 @@ using System.IO; using System.Text; -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER namespace MikuLuaProfiler { public class MBinaryReader : BinaryReader diff --git a/LuaProfiler/Runtime/Core/NetWork/MBinaryWriter.cs b/LuaProfiler/Runtime/Core/NetWork/MBinaryWriter.cs index b5df45f9..de099951 100644 --- a/LuaProfiler/Runtime/Core/NetWork/MBinaryWriter.cs +++ b/LuaProfiler/Runtime/Core/NetWork/MBinaryWriter.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System.Collections.Generic; using System.IO; using System.Text; diff --git a/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.Server.cs b/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.Server.cs index 50011baa..2ddf4276 100644 --- a/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.Server.cs +++ b/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.Server.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Net; diff --git a/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.cs b/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.cs index dfd1e59d..1c4413e4 100644 --- a/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.cs +++ b/LuaProfiler/Runtime/Core/NetWork/NetWorkMgr.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; diff --git a/LuaProfiler/Runtime/Core/NetWork/Packet/LuaRefInfo.cs b/LuaProfiler/Runtime/Core/NetWork/Packet/LuaRefInfo.cs index 20a47c28..3927ec58 100644 --- a/LuaProfiler/Runtime/Core/NetWork/Packet/LuaRefInfo.cs +++ b/LuaProfiler/Runtime/Core/NetWork/Packet/LuaRefInfo.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.IO; diff --git a/LuaProfiler/Runtime/Core/NetWork/Packet/PKGDisconnect.cs b/LuaProfiler/Runtime/Core/NetWork/Packet/PKGDisconnect.cs index 2de4c38c..730dd12f 100644 --- a/LuaProfiler/Runtime/Core/NetWork/Packet/PKGDisconnect.cs +++ b/LuaProfiler/Runtime/Core/NetWork/Packet/PKGDisconnect.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER namespace MikuLuaProfiler { [PacketMsg(MsgHead.DisConnect)] diff --git a/LuaProfiler/Runtime/Core/NetWork/Packet/PKGHeartBeat.cs b/LuaProfiler/Runtime/Core/NetWork/Packet/PKGHeartBeat.cs index 656fd76c..02f8fec3 100644 --- a/LuaProfiler/Runtime/Core/NetWork/Packet/PKGHeartBeat.cs +++ b/LuaProfiler/Runtime/Core/NetWork/Packet/PKGHeartBeat.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER namespace MikuLuaProfiler { [PacketMsg(MsgHead.HeartBeat)] diff --git a/LuaProfiler/Runtime/Core/NetWork/Packet/PacketBase.cs b/LuaProfiler/Runtime/Core/NetWork/Packet/PacketBase.cs index 218f630e..88bff2ba 100644 --- a/LuaProfiler/Runtime/Core/NetWork/Packet/PacketBase.cs +++ b/LuaProfiler/Runtime/Core/NetWork/Packet/PacketBase.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.IO; diff --git a/LuaProfiler/Runtime/Core/NetWork/Packet/Sample.cs b/LuaProfiler/Runtime/Core/NetWork/Packet/Sample.cs index 60e61fd0..3f57ad2f 100644 --- a/LuaProfiler/Runtime/Core/NetWork/Packet/Sample.cs +++ b/LuaProfiler/Runtime/Core/NetWork/Packet/Sample.cs @@ -1,4 +1,4 @@ -#if UNITY_EDITOR_WIN || USE_LUA_PROFILER +#if UNITY_EDITOR || USE_LUA_PROFILER using System; using System.Collections.Generic; using System.IO;