Explorar o código

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

lviguier hai 1 ano
pai
achega
02ab10a25d
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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 = {};