浏览代码

RP: Fix render props disposed and reapplied

lviguier 5 月之前
父节点
当前提交
aafc36025d
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      hrt/prefab/RenderProps.hx

+ 4 - 1
hrt/prefab/RenderProps.hx

@@ -100,8 +100,11 @@ class RenderProps extends Object3D {
 
 					if (fxAnim.effects == null || visible == false)
 						continue;
-					for (e in fxAnim.effects)
+					for (e in fxAnim.effects) {
+						if (@:privateAccess e.instance == null)
+							continue;
 						renderer.effects.push(cast @:privateAccess e.instance);
+					}
 				}
 			}
 		}