Преглед на файлове

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 = {};