Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
guo450212436
et
提交
df614faf
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,发现更多精彩内容 >>
提交
df614faf
编写于
4月 28, 2019
作者:
T
tanghai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.热更层ObjectPool可视化池的名字修复
2.ABInfo改用池
上级
212109ee
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
37 deletion
+32
-37
Unity/Assets/Hotfix/Base/Object/ObjectPool.cs
Unity/Assets/Hotfix/Base/Object/ObjectPool.cs
+3
-0
Unity/Assets/Model/Base/Object/ObjectPool.cs
Unity/Assets/Model/Base/Object/ObjectPool.cs
+1
-1
Unity/Assets/Model/ILBinding/ETModel_IdGenerater_Binding.cs
Unity/Assets/Model/ILBinding/ETModel_IdGenerater_Binding.cs
+4
-4
Unity/Assets/Model/Module/AssetsBundle/ResourcesComponent.cs
Unity/Assets/Model/Module/AssetsBundle/ResourcesComponent.cs
+24
-32
未找到文件。
Unity/Assets/Hotfix/Base/Object/ObjectPool.cs
浏览文件 @
df614faf
...
...
@@ -96,6 +96,9 @@ namespace ETHotfix
{
queue
=
new
ComponentQueue
(
type
.
Name
);
queue
.
Parent
=
this
;
#if !SERVER
queue
.
GameObject
.
name
=
$"
{
type
.
Name
}
s"
;
#endif
this
.
dictionary
.
Add
(
type
,
queue
);
}
queue
.
Enqueue
(
obj
);
...
...
Unity/Assets/Model/Base/Object/ObjectPool.cs
浏览文件 @
df614faf
...
...
@@ -97,7 +97,7 @@ namespace ETModel
queue
=
new
ComponentQueue
(
type
.
Name
);
queue
.
Parent
=
this
;
#if !SERVER
queue
.
GameObject
.
name
=
type
.
Name
;
queue
.
GameObject
.
name
=
$"
{
type
.
Name
}
s"
;
#endif
this
.
dictionary
.
Add
(
type
,
queue
);
}
...
...
Unity/Assets/Model/ILBinding/ETModel_IdGenerater_Binding.cs
浏览文件 @
df614faf
...
...
@@ -23,20 +23,20 @@ namespace ILRuntime.Runtime.Generated
Type
[]
args
;
Type
type
=
typeof
(
ETModel
.
IdGenerater
);
args
=
new
Type
[]{};
method
=
type
.
GetMethod
(
"GenerateId"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
GenerateId_0
);
method
=
type
.
GetMethod
(
"GenerateI
nstanceI
d"
,
flag
,
null
,
args
,
null
);
app
.
RegisterCLRMethodRedirection
(
method
,
GenerateI
nstanceI
d_0
);
}
static
StackObject
*
GenerateId_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
static
StackObject
*
GenerateI
nstanceI
d_0
(
ILIntepreter
__intp
,
StackObject
*
__esp
,
IList
<
object
>
__mStack
,
CLRMethod
__method
,
bool
isNewObj
)
{
ILRuntime
.
Runtime
.
Enviorment
.
AppDomain
__domain
=
__intp
.
AppDomain
;
StackObject
*
__ret
=
ILIntepreter
.
Minus
(
__esp
,
0
);
var
result_of_this_method
=
ETModel
.
IdGenerater
.
GenerateId
();
var
result_of_this_method
=
ETModel
.
IdGenerater
.
GenerateI
nstanceI
d
();
__ret
->
ObjectType
=
ObjectTypes
.
Long
;
*(
long
*)&
__ret
->
Value
=
result_of_this_method
;
...
...
Unity/Assets/Model/Module/AssetsBundle/ResourcesComponent.cs
浏览文件 @
df614faf
...
...
@@ -10,33 +10,24 @@ using UnityEditor;
namespace
ETModel
{
public
class
ABInfo
:
Component
[
ObjectSystem
]
public
class
ABInfoAwakeSystem
:
AwakeSystem
<
ABInfo
,
string
,
AssetBundle
>
{
private
int
refCount
;
public
string
Name
{
get
;
}
public
int
RefCount
public
override
void
Awake
(
ABInfo
self
,
string
abName
,
AssetBundle
a
)
{
get
{
return
this
.
refCount
;
}
set
{
//Log.Debug($"{this.Name} refcount: {value}");
this
.
refCount
=
value
;
}
self
.
AssetBundle
=
a
;
self
.
Name
=
abName
;
self
.
RefCount
=
1
;
}
}
public
class
ABInfo
:
Component
{
public
string
Name
{
get
;
set
;
}
public
AssetBundle
AssetBundle
{
g
et
;
}
public
int
RefCount
{
get
;
s
et
;
}
public
ABInfo
(
string
name
,
AssetBundle
ab
)
{
this
.
Name
=
name
;
this
.
AssetBundle
=
ab
;
this
.
RefCount
=
1
;
//Log.Debug($"load assetbundle: {this.Name}");
}
public
AssetBundle
AssetBundle
;
public
override
void
Dispose
()
{
...
...
@@ -53,6 +44,9 @@ namespace ETModel
{
this
.
AssetBundle
.
Unload
(
true
);
}
this
.
RefCount
=
0
;
this
.
Name
=
""
;
}
}
...
...
@@ -191,7 +185,7 @@ namespace ETModel
foreach
(
var
abInfo
in
this
.
bundles
)
{
abInfo
.
Value
?.
AssetBundle
?.
Unload
(
true
);
abInfo
.
Value
.
Dispose
(
);
}
this
.
bundles
.
Clear
();
...
...
@@ -217,7 +211,7 @@ namespace ETModel
public
void
UnloadBundle
(
string
assetBundleName
)
{
assetBundleName
=
assetBundleName
.
ToLower
();
assetBundleName
=
assetBundleName
.
BundleName
ToLower
();
string
[]
dependencies
=
AssetBundleHelper
.
GetSortedDependencies
(
assetBundleName
);
...
...
@@ -230,7 +224,7 @@ namespace ETModel
private
void
UnloadOneBundle
(
string
assetBundleName
)
{
assetBundleName
=
assetBundleName
.
ToLower
();
assetBundleName
=
assetBundleName
.
BundleName
ToLower
();
ABInfo
abInfo
;
if
(!
this
.
bundles
.
TryGetValue
(
assetBundleName
,
out
abInfo
))
...
...
@@ -249,6 +243,7 @@ namespace ETModel
this
.
bundles
.
Remove
(
assetBundleName
);
this
.
resourceCache
.
Remove
(
assetBundleName
);
abInfo
.
Dispose
();
//Log.Debug($"cache count: {this.cacheDictionary.Count}");
}
...
...
@@ -307,7 +302,7 @@ namespace ETModel
AddResource
(
assetBundleName
,
assetName
,
resource
);
}
abInfo
=
new
ABInfo
(
assetBundleName
,
null
);
abInfo
=
ComponentFactory
.
CreateWithParent
<
ABInfo
,
string
,
AssetBundle
>(
this
,
assetBundleName
,
null
);
abInfo
.
Parent
=
this
;
this
.
bundles
[
assetBundleName
]
=
abInfo
;
#endif
...
...
@@ -341,8 +336,7 @@ namespace ETModel
}
}
abInfo
=
new
ABInfo
(
assetBundleName
,
assetBundle
);
abInfo
.
Parent
=
this
;
abInfo
=
ComponentFactory
.
CreateWithParent
<
ABInfo
,
string
,
AssetBundle
>(
this
,
assetBundleName
,
assetBundle
);
this
.
bundles
[
assetBundleName
]
=
abInfo
;
}
...
...
@@ -388,8 +382,7 @@ namespace ETModel
AddResource
(
assetBundleName
,
assetName
,
resource
);
}
abInfo
=
new
ABInfo
(
assetBundleName
,
null
);
abInfo
.
Parent
=
this
;
abInfo
=
ComponentFactory
.
CreateWithParent
<
ABInfo
,
string
,
AssetBundle
>(
this
,
assetBundleName
,
null
);
this
.
bundles
[
assetBundleName
]
=
abInfo
;
#endif
return
;
...
...
@@ -426,8 +419,7 @@ namespace ETModel
}
}
abInfo
=
new
ABInfo
(
assetBundleName
,
assetBundle
);
abInfo
.
Parent
=
this
;
abInfo
=
ComponentFactory
.
CreateWithParent
<
ABInfo
,
string
,
AssetBundle
>(
this
,
assetBundleName
,
assetBundle
);
this
.
bundles
[
assetBundleName
]
=
abInfo
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录