Skip to content

Commit

Permalink
[bug] 修复 383 以后设置属性,材质效果无法同步的问题 (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
knoxHuang authored Dec 30, 2024
1 parent 1b167ed commit 8538d8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions extensions/shader-graph/src/importer/shader-graph-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ const ShaderGraphHandler = {

// @ts-expect-error
async before(asset: Asset) {
if (!shaderGraph.existsCacheEffect(asset)) {
await shaderGraph.generateEffectByAsset(asset);
}
await shaderGraph.generateEffectByAsset(asset);
shaderGraph.cacheSourceMap.set(asset.uuid, asset._source);
// @ts-ignore
asset._source = shaderGraph.getTempEffectCodePath(asset);
Expand Down
5 changes: 0 additions & 5 deletions extensions/shader-graph/src/importer/shader-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@ export class ShaderGraph {
return code;
}

// @ts-expect-error
public existsCacheEffect(asset: Asset) {
return existsSync(this.getTempEffectCodePath(asset));
}

/**
* 获取存储 effect code 文件夹
*/
Expand Down

0 comments on commit 8538d8e

Please sign in to comment.