Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NJ_lite
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
middleLayer_for_NJ_lite
Commits
b9c7f3a1
Commit
b9c7f3a1
authored
Sep 28, 2022
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
6ae0dde6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
24 deletions
+62
-24
middleLayerBase.ts
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
+62
-24
No files found.
assets/middleLayer_for_NJ_lite/script/middleLayerBase.ts
View file @
b9c7f3a1
...
...
@@ -196,7 +196,8 @@ export abstract class middleLayerBase extends cc.Component {
console
.
log
(
'
喵喵喵3:
'
+
this
.
assetList
.
length
);
console
.
log
(
'
喵喵喵4:
'
+
this
.
textureList
.
length
);
// this.clearDragonDisplayAssetList2();
this
.
clearDragonDisplayAssetList3
();
await
asyncDelay
(
5
);
this
.
loadBundleLock
=
true
;
// 加锁
this
.
currentBundleInfo
=
{
sceneName
,
version
,
bondleUrl
};
...
...
@@ -474,41 +475,78 @@ export abstract class middleLayerBase extends cc.Component {
await
asyncDelay
(
0.001
);
for
(
let
i
=
0
;
i
<
this
.
atlasList
.
length
;
i
++
)
{
const
atlas
=
this
.
atlasList
[
i
];
const
asset
=
this
.
assetList
[
i
];
const
texture
=
this
.
textureList
[
i
];
const
node
=
this
.
nodeList
[
i
];
atlas
.
decRef
();
cc
.
assetManager
.
releaseAsset
(
atlas
);
atlas
.
destroy
();
asset
.
decRef
();
cc
.
assetManager
.
releaseAsset
(
asset
);
asset
.
destroy
();
node
.
active
=
false
;
node
.
removeFromParent
();
this
.
textureList
.
forEach
(
texture
=>
{
// console.log('texture_uuid: ', texture._uuid);
// console.log('texture: ', texture
);
texture
.
decRef
();
await
asyncDelay
(
0.001
);
// while (texture?.refCount > 0) {
}
// [ ...this.atlasList , ...this.assetList].forEach(asset => {
// asset.decRef();
// cc.assetManager.releaseAsset(asset);
// asset.destroy();
// });
// this.nodeList.forEach(node => {
// node.active = false;
// node.removeFromParent();
// });
// this.textureList.forEach(texture => {
// texture.decRef();
// }
// });
cc
.
assetManager
.
releaseAsset
(
texture
);
texture
.
destroy
();
});
[
...
this
.
atlasList
,
...
this
.
assetList
].
forEach
(
asset
=>
{
console
.
log
(
'
asset_uuid:
'
,
asset
.
_uuid
);
console
.
log
(
'
asset:
'
,
asset
);
// asset.decRef();
// while (asset?.refCount > 0) {
// asset.decRef();
// }
cc
.
assetManager
.
releaseAsset
(
asset
);
asset
.
destroy
();
// this.textureList.forEach(texture => {
// // console.log('texture_uuid: ', texture._uuid);
// // console.log('texture: ', texture);
// // while (texture?.refCount > 0) {
// // texture.decRef();
// // }
});
// cc.assetManager.releaseAsset(texture);
// texture.destroy();
// });
// [ ...this.atlasList, ...this.assetList ].forEach(asset => {
// console.log('asset_uuid: ', asset._uuid);
// console.log('asset: ', asset);
// // asset.decRef();
// // while (asset?.refCount > 0) {
// // asset.decRef();
// // }
// cc.assetManager.releaseAsset(asset);
// asset.destroy();
// });
await
asyncDelay
(
0.001
);
cc
.
sys
.
garbageCollect
();
}
...
...
@@ -541,7 +579,7 @@ export abstract class middleLayerBase extends cc.Component {
}
clearDragonDisplayAssetList
()
{
return
;
console
.
log
(
'
喵喵喵: clearDragonDisplayAssetList
'
);
console
.
log
(
'
喵喵喵:
'
+
this
.
nodeList
.
length
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment