Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
6813627e
E
et
项目概览
guo450212436
/
et
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
et
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6813627e
编写于
3月 15, 2018
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ILRuntime的异常ToString没有带StackTrace,增加热更层的Log,Log.Error(Exception)会打印出StackTrace
上级
87c40877
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
281 addition
and
83 deletion
+281
-83
Server/Model/Base/Log.cs
Server/Model/Base/Log.cs
+8
-1
Unity/Assets/Scripts/Base/Log.cs
Unity/Assets/Scripts/Base/Log.cs
+6
-2
Unity/Assets/Scripts/Module/FrameSync/ClientFrameComponent.cs
...y/Assets/Scripts/Module/FrameSync/ClientFrameComponent.cs
+18
-11
Unity/Assets/Scripts/Module/Message/Network/KCP/KService.cs
Unity/Assets/Scripts/Module/Message/Network/KCP/KService.cs
+45
-37
Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs
Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs
+3
-2
Unity/Assets/ThirdParty/ILRuntime/Generated/ETModel_Log_Binding.cs
...ets/ThirdParty/ILRuntime/Generated/ETModel_Log_Binding.cs
+25
-8
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_IDictionary_Binding.cs
...ntime/Generated/System_Collections_IDictionary_Binding.cs
+59
-0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_IDictionary_Binding.cs.meta
.../Generated/System_Collections_IDictionary_Binding.cs.meta
+12
-0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Exception_Binding.cs
...hirdParty/ILRuntime/Generated/System_Exception_Binding.cs
+23
-0
Unity/Assets/ThirdParty/ILRuntime/Generated/System_String_Binding.cs
...s/ThirdParty/ILRuntime/Generated/System_String_Binding.cs
+11
-11
Unity/Hotfix/Base/Helper/ExceptionHelper.cs
Unity/Hotfix/Base/Helper/ExceptionHelper.cs
+17
-0
Unity/Hotfix/Base/Helper/Log.cs
Unity/Hotfix/Base/Helper/Log.cs
+32
-0
Unity/Hotfix/Init.cs
Unity/Hotfix/Init.cs
+3
-3
Unity/Hotfix/Module/FrameSync/OperaComponent.cs
Unity/Hotfix/Module/FrameSync/OperaComponent.cs
+12
-4
Unity/Hotfix/UI/UILobby/Component/UILobbyComponent.cs
Unity/Hotfix/UI/UILobby/Component/UILobbyComponent.cs
+3
-3
Unity/Hotfix/UI/UILogin/Component/UILoginComponent.cs
Unity/Hotfix/UI/UILogin/Component/UILoginComponent.cs
+1
-1
Unity/Hotfix/Unity.Hotfix.csproj
Unity/Hotfix/Unity.Hotfix.csproj
+2
-0
Unity/Unity.csproj
Unity/Unity.csproj
+1
-0
未找到文件。
Server/Model/Base/Log.cs
浏览文件 @
6813627e
namespace
ETModel
using
System
;
namespace
ETModel
{
public
static
class
Log
{
...
...
@@ -24,6 +26,11 @@
globalLog
.
Debug
(
message
);
}
public
static
void
Error
(
Exception
e
)
{
globalLog
.
Error
(
e
.
ToString
());
}
public
static
void
Error
(
string
message
)
{
globalLog
.
Error
(
message
);
...
...
Unity/Assets/Scripts/Base/Log.cs
浏览文件 @
6813627e
using
System.Diagnostics
;
using
ILRuntime.Runtime
;
using
System
;
namespace
ETModel
{
...
...
@@ -20,6 +19,11 @@ namespace ETModel
UnityEngine
.
Debug
.
Log
(
msg
);
}
public
static
void
Error
(
Exception
e
)
{
UnityEngine
.
Debug
.
LogError
(
e
.
ToString
());
}
public
static
void
Error
(
string
msg
)
{
UnityEngine
.
Debug
.
LogError
(
msg
);
...
...
Unity/Assets/Scripts/Module/FrameSync/ClientFrameComponent.cs
浏览文件 @
6813627e
...
...
@@ -41,18 +41,25 @@ namespace ETModel
public
async
void
UpdateAsync
()
{
TimerComponent
timerComponent
=
Game
.
Scene
.
GetComponent
<
TimerComponent
>();
while
(
true
)
{
await
timerComponent
.
WaitAsync
(
waitTime
);
try
{
TimerComponent
timerComponent
=
Game
.
Scene
.
GetComponent
<
TimerComponent
>();
while
(
true
)
{
await
timerComponent
.
WaitAsync
(
waitTime
);
if
(
this
.
IsDisposed
)
{
return
;
}
this
.
UpdateFrame
();
}
if
(
this
.
IsDisposed
)
{
return
;
}
this
.
UpdateFrame
();
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
);
}
}
private
void
UpdateFrame
()
...
...
Unity/Assets/Scripts/Module/Message/Network/KCP/KService.cs
浏览文件 @
6813627e
...
...
@@ -90,47 +90,55 @@ namespace ETModel
continue
;
}
int
messageLength
=
udpReceiveResult
.
Buffer
.
Length
;
// 长度小于4,不是正常的消息
if
(
messageLength
<
4
)
{
continue
;
}
// accept
uint
conn
=
BitConverter
.
ToUInt32
(
udpReceiveResult
.
Buffer
,
0
);
// conn从1000开始,如果为1,2,3则是特殊包
switch
(
conn
)
try
{
case
KcpProtocalType
.
SYN
:
// 长度!=8,不是accpet消息
if
(
messageLength
!=
8
)
{
int
messageLength
=
udpReceiveResult
.
Buffer
.
Length
;
// 长度小于4,不是正常的消息
if
(
messageLength
<
4
)
{
continue
;
}
// accept
uint
conn
=
BitConverter
.
ToUInt32
(
udpReceiveResult
.
Buffer
,
0
);
// conn从1000开始,如果为1,2,3则是特殊包
switch
(
conn
)
{
case
KcpProtocalType
.
SYN
:
// 长度!=8,不是accpet消息
if
(
messageLength
!=
8
)
{
break
;
}
this
.
HandleAccept
(
udpReceiveResult
);
break
;
case
KcpProtocalType
.
ACK
:
// 长度!=12,不是connect消息
if
(
messageLength
!=
12
)
{
break
;
}
this
.
HandleConnect
(
udpReceiveResult
);
break
;
}
this
.
HandleAccept
(
udpReceiveResult
);
break
;
case
KcpProtocalType
.
ACK
:
// 长度!=12,不是connect消息
if
(
messageLength
!=
12
)
{
case
KcpProtocalType
.
FIN
:
// 长度!=12,不是DisConnect消息
if
(
messageLength
!=
12
)
{
break
;
}
this
.
HandleDisConnect
(
udpReceiveResult
);
break
;
}
this
.
HandleConnect
(
udpReceiveResult
);
break
;
case
KcpProtocalType
.
FIN
:
// 长度!=12,不是DisConnect消息
if
(
messageLength
!=
12
)
{
default
:
this
.
HandleRecv
(
udpReceiveResult
,
conn
);
break
;
}
this
.
HandleDisConnect
(
udpReceiveResult
);
break
;
default
:
this
.
HandleRecv
(
udpReceiveResult
,
conn
);
break
;
}
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
);
continue
;
}
}
}
...
...
Unity/Assets/ThirdParty/ILRuntime/Generated/CLRBindings.cs
浏览文件 @
6813627e
...
...
@@ -13,7 +13,10 @@ namespace ILRuntime.Runtime.Generated
{
System_NotImplementedException_Binding
.
Register
(
app
);
System_String_Binding
.
Register
(
app
);
System_Exception_Binding
.
Register
(
app
);
System_Collections_IDictionary_Binding
.
Register
(
app
);
LitJson_JsonMapper_Binding
.
Register
(
app
);
ETModel_Log_Binding
.
Register
(
app
);
UnityEngine_LayerMask_Binding
.
Register
(
app
);
UnityEngine_Input_Binding
.
Register
(
app
);
UnityEngine_Camera_Binding
.
Register
(
app
);
...
...
@@ -26,7 +29,6 @@ namespace ILRuntime.Runtime.Generated
System_Runtime_CompilerServices_AsyncVoidMethodBuilder_Binding
.
Register
(
app
);
System_Threading_Tasks_Task_1_ILTypeInstance_Binding
.
Register
(
app
);
System_Runtime_CompilerServices_TaskAwaiter_1_ILTypeInstance_Binding
.
Register
(
app
);
ETModel_Log_Binding
.
Register
(
app
);
ETModel_Game_Binding
.
Register
(
app
);
ETModel_Entity_Binding
.
Register
(
app
);
ETModel_ResourcesComponent_Binding
.
Register
(
app
);
...
...
@@ -50,7 +52,6 @@ namespace ILRuntime.Runtime.Generated
System_Type_Binding
.
Register
(
app
);
System_Reflection_MemberInfo_Binding
.
Register
(
app
);
System_Activator_Binding
.
Register
(
app
);
System_Exception_Binding
.
Register
(
app
);
ETModel_GameObjectHelper_Binding
.
Register
(
app
);
UnityEngine_TextAsset_Binding
.
Register
(
app
);
//UnityEngine_Resources_Binding.Register(app);
...
...
Unity/Assets/ThirdParty/ILRuntime/Generated/ETModel_Log_Binding.cs
浏览文件 @
6813627e
...
...
@@ -23,20 +23,23 @@ namespace ILRuntime.Runtime.Generated
Type
[]
args
;
Type
type
=
typeof
(
ETModel
.
Log
);
args
=
new
Type
[]{
typeof
(
System
.
String
)};
method
=
type
.
GetMethod
(
"
Info
"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Info
_0
);
method
=
type
.
GetMethod
(
"
Warning
"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Warning
_0
);
args
=
new
Type
[]{
typeof
(
System
.
String
)};
method
=
type
.
GetMethod
(
"
Debug
"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Debug
_1
);
method
=
type
.
GetMethod
(
"
Info
"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Info
_1
);
args
=
new
Type
[]{
typeof
(
System
.
String
)};
method
=
type
.
GetMethod
(
"Error"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Error_2
);
args
=
new
Type
[]{
typeof
(
System
.
String
)};
method
=
type
.
GetMethod
(
"Debug"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Debug_3
);
}
static
StackObject
*
Info
_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
static
StackObject
*
Warning
_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
...
...
@@ -45,12 +48,12 @@ namespace ILRuntime.Runtime.Generated
System
.
String
msg
=
(
System
.
String
)
typeof
(
System
.
String
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ETModel
.
Log
.
Info
(
msg
);
ETModel
.
Log
.
Warning
(
msg
);
return
__ret
;
}
static
StackObject
*
Debug
_1
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
static
StackObject
*
Info
_1
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
...
...
@@ -59,7 +62,7 @@ namespace ILRuntime.Runtime.Generated
System
.
String
msg
=
(
System
.
String
)
typeof
(
System
.
String
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ETModel
.
Log
.
Debug
(
msg
);
ETModel
.
Log
.
Info
(
msg
);
return
__ret
;
}
...
...
@@ -78,6 +81,20 @@ namespace ILRuntime.Runtime.Generated
return
__ret
;
}
static
StackObject
*
Debug_3
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
1
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
1
);
System
.
String
msg
=
(
System
.
String
)
typeof
(
System
.
String
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ETModel
.
Log
.
Debug
(
msg
);
return
__ret
;
}
}
...
...
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_IDictionary_Binding.cs
0 → 100644
浏览文件 @
6813627e
using
System
;
using
System.Collections.Generic
;
using
System.Reflection
;
using
System.Runtime.InteropServices
;
using
ILRuntime.CLR.TypeSystem
;
using
ILRuntime.CLR.Method
;
using
ILRuntime.Runtime.Enviorment
;
using
ILRuntime.Runtime.Intepreter
;
using
ILRuntime.Runtime.Stack
;
using
ILRuntime.Reflection
;
using
ILRuntime.CLR.Utils
;
namespace
ILRuntime.Runtime.Generated
{
unsafe
class
System_Collections_IDictionary_Binding
{
public
static
void
Register
(
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
app
)
{
BindingFlags
flag
=
BindingFlags
.
Public
|
BindingFlags
.
Instance
|
BindingFlags
.
Static
|
BindingFlags
.
DeclaredOnly
;
MethodBase
method
;
FieldInfo
field
;
Type
[]
args
;
Type
type
=
typeof
(
System
.
Collections
.
IDictionary
);
args
=
new
Type
[]{
typeof
(
System
.
Object
)};
method
=
type
.
GetMethod
(
"get_Item"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
get_Item_0
);
}
static
StackObject
*
get_Item_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
2
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
1
);
System
.
Object
key
=
(
System
.
Object
)
typeof
(
System
.
Object
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
2
);
System
.
Collections
.
IDictionary
instance_of_this_method
;
instance_of_this_method
=
(
System
.
Collections
.
IDictionary
)
typeof
(
System
.
Collections
.
IDictionary
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
var
result_of_this_method
=
instance_of_this_method
[
key
];
object
obj_result_of_this_method
=
result_of_this_method
;
if
(
obj_result_of_this_method
is
CrossBindingAdaptorType
)
{
return
ILIntepreter
.
PushObject
(
__ret
,
__mStack
,
((
CrossBindingAdaptorType
)
obj_result_of_this_method
).
ILInstance
,
true
);
}
return
ILIntepreter
.
PushObject
(
__ret
,
__mStack
,
result_of_this_method
,
true
);
}
}
}
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Collections_IDictionary_Binding.cs.meta
0 → 100644
浏览文件 @
6813627e
fileFormatVersion: 2
guid: 1962228e73e623142b4f08dd76b6e606
timeCreated: 1521084474
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Unity/Assets/ThirdParty/ILRuntime/Generated/System_Exception_Binding.cs
浏览文件 @
6813627e
...
...
@@ -22,6 +22,9 @@ namespace ILRuntime.Runtime.Generated
FieldInfo
field
;
Type
[]
args
;
Type
type
=
typeof
(
System
.
Exception
);
args
=
new
Type
[]{};
method
=
type
.
GetMethod
(
"get_Data"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
get_Data_0
);
args
=
new
Type
[]{
typeof
(
System
.
String
)};
method
=
type
.
GetConstructor
(
flag
,
null
,
args
,
null
);
...
...
@@ -33,6 +36,26 @@ namespace ILRuntime.Runtime.Generated
}
static
StackObject
*
get_Data_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
1
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
1
);
System
.
Exception
instance_of_this_method
;
instance_of_this_method
=
(
System
.
Exception
)
typeof
(
System
.
Exception
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
var
result_of_this_method
=
instance_of_this_method
.
Data
;
object
obj_result_of_this_method
=
result_of_this_method
;
if
(
obj_result_of_this_method
is
CrossBindingAdaptorType
)
{
return
ILIntepreter
.
PushObject
(
__ret
,
__mStack
,
((
CrossBindingAdaptorType
)
obj_result_of_this_method
).
ILInstance
);
}
return
ILIntepreter
.
PushObject
(
__ret
,
__mStack
,
result_of_this_method
);
}
static
StackObject
*
Ctor_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
...
...
Unity/Assets/ThirdParty/ILRuntime/Generated/System_String_Binding.cs
浏览文件 @
6813627e
...
...
@@ -25,10 +25,10 @@ namespace ILRuntime.Runtime.Generated
args
=
new
Type
[]{
typeof
(
System
.
Int32
),
typeof
(
System
.
Int32
)};
method
=
type
.
GetMethod
(
"Substring"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Substring_0
);
args
=
new
Type
[]{
typeof
(
System
.
String
),
typeof
(
System
.
Object
)};
args
=
new
Type
[]{
typeof
(
System
.
String
),
typeof
(
System
.
Object
)
,
typeof
(
System
.
Object
)
};
method
=
type
.
GetMethod
(
"Format"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Format_1
);
args
=
new
Type
[]{
typeof
(
System
.
String
),
typeof
(
System
.
Object
)
,
typeof
(
System
.
Object
)
};
args
=
new
Type
[]{
typeof
(
System
.
String
),
typeof
(
System
.
Object
)};
method
=
type
.
GetMethod
(
"Format"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
Format_2
);
args
=
new
Type
[]{
typeof
(
System
.
String
[]),
typeof
(
System
.
StringSplitOptions
)};
...
...
@@ -70,15 +70,18 @@ namespace ILRuntime.Runtime.Generated
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
2
);
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
3
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
1
);
System
.
Object
arg
0
=
(
System
.
Object
)
typeof
(
System
.
Object
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
System
.
Object
arg
1
=
(
System
.
Object
)
typeof
(
System
.
Object
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
2
);
System
.
Object
arg0
=
(
System
.
Object
)
typeof
(
System
.
Object
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
3
);
System
.
String
format
=
(
System
.
String
)
typeof
(
System
.
String
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
var
result_of_this_method
=
System
.
String
.
Format
(
format
,
arg0
);
var
result_of_this_method
=
System
.
String
.
Format
(
format
,
arg0
,
arg1
);
return
ILIntepreter
.
PushObject
(
__ret
,
__mStack
,
result_of_this_method
);
}
...
...
@@ -87,18 +90,15 @@ namespace ILRuntime.Runtime.Generated
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
ptr_of_this_method
;
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
3
);
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
2
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
1
);
System
.
Object
arg1
=
(
System
.
Object
)
typeof
(
System
.
Object
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
2
);
System
.
Object
arg0
=
(
System
.
Object
)
typeof
(
System
.
Object
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
3
);
ptr_of_this_method
=
ILIntepreter
.
Minus
(
__esp
,
2
);
System
.
String
format
=
(
System
.
String
)
typeof
(
System
.
String
).
CheckCLRTypes
(
StackObject
.
ToObject
(
ptr_of_this_method
,
__domain
,
__mStack
));
__intp
.
Free
(
ptr_of_this_method
);
var
result_of_this_method
=
System
.
String
.
Format
(
format
,
arg0
,
arg1
);
var
result_of_this_method
=
System
.
String
.
Format
(
format
,
arg0
);
return
ILIntepreter
.
PushObject
(
__ret
,
__mStack
,
result_of_this_method
);
}
...
...
Unity/Hotfix/Base/Helper/ExceptionHelper.cs
0 → 100644
浏览文件 @
6813627e
using
System
;
using
ETModel
;
namespace
ETHotfix
{
public
static
class
ExceptionHelper
{
public
static
string
ToStr
(
this
Exception
exception
)
{
#if ILRuntime
return
$"
{
exception
.
Data
[
"StackTrace"
]}
\n\n
{
exception
}
"
;
#else
return
exception
.
ToString
();
#endif
}
}
}
\ No newline at end of file
Unity/Hotfix/Base/Helper/Log.cs
0 → 100644
浏览文件 @
6813627e
using
System
;
namespace
ETHotfix
{
public
static
class
Log
{
public
static
void
Warning
(
string
msg
)
{
ETModel
.
Log
.
Warning
(
msg
);
}
public
static
void
Info
(
string
msg
)
{
ETModel
.
Log
.
Info
(
msg
);
}
public
static
void
Error
(
Exception
e
)
{
ETModel
.
Log
.
Error
(
e
.
ToStr
());
}
public
static
void
Error
(
string
msg
)
{
ETModel
.
Log
.
Error
(
msg
);
}
public
static
void
Debug
(
string
msg
)
{
ETModel
.
Log
.
Debug
(
msg
);
}
}
}
\ No newline at end of file
Unity/Hotfix/Init.cs
浏览文件 @
6813627e
...
...
@@ -32,7 +32,7 @@ namespace ETHotfix
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
...
...
@@ -44,7 +44,7 @@ namespace ETHotfix
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
...
...
@@ -56,7 +56,7 @@ namespace ETHotfix
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
...
...
Unity/Hotfix/Module/FrameSync/OperaComponent.cs
浏览文件 @
6813627e
using
ETModel
;
using
System
;
using
ETModel
;
using
UnityEngine
;
namespace
ETHotfix
...
...
@@ -51,9 +52,16 @@ namespace ETHotfix
public
async
void
TestActor
()
{
M2C_TestActorResponse
response
=
(
M2C_TestActorResponse
)
await
SessionWrapComponent
.
Instance
.
Session
.
Call
(
new
C2M_TestActorRequest
()
{
Info
=
"actor rpc request"
});
Log
.
Info
(
response
.
Info
);
try
{
M2C_TestActorResponse
response
=
(
M2C_TestActorResponse
)
await
SessionWrapComponent
.
Instance
.
Session
.
Call
(
new
C2M_TestActorRequest
()
{
Info
=
"actor rpc request"
});
Log
.
Info
(
response
.
Info
);
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
);
}
}
}
}
Unity/Hotfix/UI/UILobby/Component/UILobbyComponent.cs
浏览文件 @
6813627e
...
...
@@ -54,7 +54,7 @@ namespace ETHotfix
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
...
...
@@ -67,7 +67,7 @@ namespace ETHotfix
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
...
...
@@ -86,7 +86,7 @@ namespace ETHotfix
}
catch
(
Exception
e
)
{
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
}
...
...
Unity/Hotfix/UI/UILogin/Component/UILoginComponent.cs
浏览文件 @
6813627e
...
...
@@ -61,7 +61,7 @@ namespace ETHotfix
catch
(
Exception
e
)
{
sessionWrap
?.
Dispose
();
Log
.
Error
(
e
.
ToString
()
);
Log
.
Error
(
e
);
}
}
}
...
...
Unity/Hotfix/Unity.Hotfix.csproj
浏览文件 @
6813627e
...
...
@@ -53,7 +53,9 @@
<Compile
Include=
"Base\Event\IEvent.cs"
/>
<Compile
Include=
"Base\Helper\ArrayHelper.cs"
/>
<Compile
Include=
"Base\Helper\AssetBundleHelper.cs"
/>
<Compile
Include=
"Base\Helper\ExceptionHelper.cs"
/>
<Compile
Include=
"Base\Helper\JsonHelper.cs"
/>
<Compile
Include=
"Base\Helper\Log.cs"
/>
<Compile
Include=
"Base\Object\IStart.cs"
/>
<Compile
Include=
"Module\FrameSync\OperaComponent.cs"
/>
<Compile
Include=
"Entity\Config\UnitConfig.cs"
/>
...
...
Unity/Unity.csproj
浏览文件 @
6813627e
...
...
@@ -412,6 +412,7 @@
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_List_1_UnitInfo_Binding.cs"
/>
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_List_1_UnitInfo_Binding_Enumerator__t.cs"
/>
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_Collections_Generic_Queue_1_ILTypeInstance_Binding.cs"
/>
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_Collections_IDictionary_Binding.cs"
/>
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_Exception_Binding.cs"
/>
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_IDisposable_Binding.cs"
/>
<Compile
Include=
"Assets\ThirdParty\ILRuntime\Generated\System_Linq_Enumerable_Binding.cs"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录