浏览代码

material library : fix overrides applied when there's no override

lviguier 1 年之前
父节点
当前提交
02ab10a25d
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      hrt/prefab/Material.hx

+ 3 - 0
hrt/prefab/Material.hx

@@ -144,6 +144,9 @@ class Material extends Prefab {
 	}
 
 	function applyOverrides() {
+		if (this.overrides == null || this.overrides.length == 0)
+			return;
+
 		// We want to break the reference between props of the current material and props of the material we loaded
 		var newProps = {};
 		var newMaterialSetupObj = {};