Skip to content

Commit

Permalink
想通了一件事情:
Browse files Browse the repository at this point in the history
1.为什么Unity.Editor非得引用逻辑层呢?不引用行不行。
2.ET8引入了Fiber,那么假如表现层一个独立的Fiber,那么它是无法调用逻辑层任何东西的,表现层跟逻辑层完全通过消息来交互。
3.既然这样,编辑器可不可能一个编辑器一个独立的Fiber呢?我觉得是可行的。
4.编辑器主要分为Play时跟非Play时,非Play时运行的Editor肯定是不需要用到逻辑代码的。
  Play时运行的Editor创建一个Fiber来跟逻辑代码交互,这样很合理。
5.如果实在需要同步调用到逻辑层,那么可以通过Invoke来操作。

根据上面的想法,我就干脆直接去掉了非ENABLE_DLL模式了。抛弃这个Editor需要引用逻辑层的负担,
现在只使用ENABLE_DLL模式,因为只有ENABLE_DLL模式,那么我把代码也做了些调整,跟ET7比较相似。

这个改动太大不会合到ET8中
  • Loading branch information
egametang committed Nov 27, 2023
1 parent 28e8136 commit 359a7aa
Show file tree
Hide file tree
Showing 974 changed files with 238 additions and 362 deletions.
6 changes: 3 additions & 3 deletions DotNet/Hotfix/DotNet.Hotfix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
</PropertyGroup>
<ItemGroup>

<Compile Include="..\..\Unity\Assets\Scripts\Hotfix\Client\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Hotfix\Client\**\*.cs">
<Link>Client\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>

<Compile Include="..\..\Unity\Assets\Scripts\Hotfix\Server\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Hotfix\Server\**\*.cs">
<Link>Server\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>

<Compile Include="..\..\Unity\Assets\Scripts\Hotfix\Share\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Hotfix\Share\**\*.cs">
<Link>Share\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions DotNet/Model/DotNet.Model.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@
</PropertyGroup>
<ItemGroup>

<Compile Include="..\..\Unity\Assets\Scripts\Model\Server\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Model\Server\**\*.cs">
<Link>Server\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>

<Compile Include="..\..\Unity\Assets\Scripts\Model\Client\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Model\Client\**\*.cs">
<Link>Client\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>

<Compile Include="..\..\Unity\Assets\Scripts\Model\Share\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Model\Share\**\*.cs">
<Link>Share\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>

<Compile Include="..\..\Unity\Assets\Scripts\Model\Generate\Server\**\*.cs">
<Compile Include="..\..\Unity\Assets\Scripts\Codes\Model\Generate\Server\**\*.cs">
<Link>Generate\%(RecursiveDir)%(FileName)%(Extension)</Link>
</Compile>

Expand Down
30 changes: 0 additions & 30 deletions ET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNet.Loader", "DotNet\Loa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Share.SourceGenerator", "Share\Share.SourceGenerator\Share.SourceGenerator.csproj", "{B29C9195-BEE7-4291-B57C-990425CDEF81}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.AllModel", "Unity\Unity.AllModel.csproj", "{FAD574B2-BE24-F20E-8374-77D88F882F8D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.AllHotfix", "Unity\Unity.AllHotfix.csproj", "{A0612015-F480-DA0A-C8E3-F8EAEC23405A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -261,30 +257,6 @@ Global
{B29C9195-BEE7-4291-B57C-990425CDEF81}.Release|x64.Build.0 = Release|Any CPU
{B29C9195-BEE7-4291-B57C-990425CDEF81}.Release|x86.ActiveCfg = Release|Any CPU
{B29C9195-BEE7-4291-B57C-990425CDEF81}.Release|x86.Build.0 = Release|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Debug|x64.ActiveCfg = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Debug|x64.Build.0 = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Debug|x86.ActiveCfg = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Debug|x86.Build.0 = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Release|Any CPU.Build.0 = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Release|x64.ActiveCfg = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Release|x64.Build.0 = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Release|x86.ActiveCfg = Debug|Any CPU
{FAD574B2-BE24-F20E-8374-77D88F882F8D}.Release|x86.Build.0 = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Debug|x64.ActiveCfg = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Debug|x64.Build.0 = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Debug|x86.ActiveCfg = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Debug|x86.Build.0 = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Release|Any CPU.ActiveCfg = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Release|Any CPU.Build.0 = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Release|x64.ActiveCfg = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Release|x64.Build.0 = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Release|x86.ActiveCfg = Debug|Any CPU
{A0612015-F480-DA0A-C8E3-F8EAEC23405A}.Release|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -307,8 +279,6 @@ Global
{986BB732-F4B8-64F8-D1F9-50CF255042D8} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
{1D5E890A-C9D5-45DF-B098-73DBE39EB311} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
{B29C9195-BEE7-4291-B57C-990425CDEF81} = {1272AF7B-A962-4BA4-8A9C-FFA7E131A0AC}
{FAD574B2-BE24-F20E-8374-77D88F882F8D} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
{A0612015-F480-DA0A-C8E3-F8EAEC23405A} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EABC01E3-3EB5-47EF-B46E-AAD8BB3585F1}
Expand Down
6 changes: 3 additions & 3 deletions Share/Tool/ExcelExporter/ExcelExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public static class ExcelExporter
{
private static string template;

private const string ClientClassDir = "../Unity/Assets/Scripts/Model/Generate/Client/Config";
private const string ClientClassDir = "../Unity/Assets/Scripts/Codes/Model/Generate/Client/Config";
// 服务端因为机器人的存在必须包含客户端所有配置,所以单独的c字段没有意义,单独的c就表示cs
private const string ServerClassDir = "../Unity/Assets/Scripts/Model/Generate/Server/Config";
private const string ServerClassDir = "../Unity/Assets/Scripts/Codes/Model/Generate/Server/Config";

private const string CSClassDir = "../Unity/Assets/Scripts/Model/Generate/ClientServer/Config";
private const string CSClassDir = "../Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Config";

private const string excelDir = "../Unity/Assets/Config/Excel/";

Expand Down
6 changes: 3 additions & 3 deletions Share/Tool/Proto2CS/Proto2CS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public static void Export()
public static class InnerProto2CS
{
private const string protoDir = "../Unity/Assets/Config/Proto";
private const string clientMessagePath = "../Unity/Assets/Scripts/Model/Generate/Client/Message/";
private const string serverMessagePath = "../Unity/Assets/Scripts/Model/Generate/Server/Message/";
private const string clientServerMessagePath = "../Unity/Assets/Scripts/Model/Generate/ClientServer/Message/";
private const string clientMessagePath = "../Unity/Assets/Scripts/Codes/Model/Generate/Client/Message/";
private const string serverMessagePath = "../Unity/Assets/Scripts/Codes/Model/Generate/Server/Message/";
private const string clientServerMessagePath = "../Unity/Assets/Scripts/Codes/Model/Generate/ClientServer/Message/";
private static readonly char[] splitChars = { ' ', '\t' };
private static readonly List<OpcodeInfo> msgOpcode = new List<OpcodeInfo>();

Expand Down
2 changes: 1 addition & 1 deletion Unity/Assets/Resources/GlobalConfig.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 36527db572638af47b03c805671cba75, type: 3}
m_Name: GlobalConfig
m_EditorClassIdentifier:
CodeMode: 3
CodeMode: 1
BuildType: 1
AppType: 7
EPlayMode: 0
1 change: 0 additions & 1 deletion Unity/Assets/Scripts/AllHotfix/Empty.cs

This file was deleted.

24 changes: 0 additions & 24 deletions Unity/Assets/Scripts/AllHotfix/Unity.AllHotfix.asmdef

This file was deleted.

1 change: 0 additions & 1 deletion Unity/Assets/Scripts/AllModel/Empty.cs

This file was deleted.

23 changes: 0 additions & 23 deletions Unity/Assets/Scripts/AllModel/Unity.AllModel.asmdef

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 359a7aa

Please sign in to comment.