Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi scene script error and GC problem #1724

Merged

Conversation

GuoLei1990
Copy link
Member

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

@GuoLei1990 GuoLei1990 added the bug Something isn't working label Aug 31, 2023
for (let i = scripts.length - 1; i >= 0; --i) {
const script = scripts.get(i);
script._waitHandlingInValid || script.onBeginRender(camera);
script?.onBeginRender(camera);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts.get(i)?.onBeginRender(camera);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@cptbtptpbcptdtptp cptbtptpbcptdtptp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@GuoLei1990 GuoLei1990 changed the title Fix multi scene script error Fix multi scene script error and GC problem Sep 1, 2023
@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Patch coverage: 75.55% and project coverage change: +0.08% 🎉

Comparison is base (ef443a3) 61.37% compared to head (9090e16) 61.46%.
Report is 27 commits behind head on dev/1.1.

❗ Current head 9090e16 differs from pull request most recent head b01ba89. Consider uploading reports for the commit b01ba89 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           dev/1.1    #1724      +/-   ##
===========================================
+ Coverage    61.37%   61.46%   +0.08%     
===========================================
  Files          410      430      +20     
  Lines        21834    22541     +707     
  Branches      3140     3201      +61     
===========================================
+ Hits         13401    13854     +453     
- Misses        7244     7471     +227     
- Partials      1189     1216      +27     
Files Changed Coverage Δ
packages/core/src/asset/Loader.ts 83.33% <ø> (ø)
packages/core/src/material/Material.ts 94.59% <0.00%> (-2.63%) ⬇️
...ckages/core/src/shadow/CascadedShadowCasterPass.ts 31.97% <ø> (ø)
.../loader/src/gltf/extensions/GLTFExtensionParser.ts 55.55% <ø> (-4.45%) ⬇️
...ader/src/gltf/extensions/KHR_materials_variants.ts 20.00% <0.00%> (ø)
...s/loader/src/gltf/extensions/KHR_texture_basisu.ts 7.40% <ø> (+0.26%) ⬆️
packages/loader/src/gltf/parser/GLTFParser.ts 81.57% <ø> (+3.00%) ⬆️
.../physics-lite/src/shape/LiteSphereColliderShape.ts 21.05% <0.00%> (ø)
.../src/gltf/extensions/KHR_draco_mesh_compression.ts 4.67% <20.00%> (-0.05%) ⬇️
packages/core/src/asset/ResourceManager.ts 57.89% <35.71%> (-3.80%) ⬇️
... and 26 more

... and 46 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuoLei1990 GuoLei1990 merged commit 9849405 into galacean:dev/1.1 Sep 1, 2023
5 checks passed
GuoLei1990 added a commit to GuoLei1990/galacean-engine that referenced this pull request Sep 2, 2023
* dev/1.1:
  Fix delay add scene can't fire `onEnbaleInScene` bug (galacean#1725)
  Fix multi scene script error and GC problem (galacean#1724)
  fix: glTF parser error and test case (galacean#1723)
  fix: Script onDisable error (galacean#1719)
  "v1.1.0-alpha.2"
  Add physic unit test timeout (galacean#1717)
  "v1.0.0-beta.20"
  Fix `PhysicManager`  fixedTimeStep less than 0 bug (galacean#1715)
  Fix physx unit test (galacean#1714)
  Fix a series of physical system problems (galacean#1712)
  Fix avoid destroyed material error (galacean#1705)

# Conflicts:
#	packages/core/package.json
#	packages/design/package.json
#	packages/draco/package.json
#	packages/galacean/package.json
#	packages/loader/package.json
#	packages/math/package.json
#	packages/physics-lite/package.json
#	packages/physics-physx/package.json
#	packages/rhi-webgl/package.json
@GuoLei1990 GuoLei1990 deleted the pr/fix-multi-scene-script-error branch September 18, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants