Pārlūkot izejas kodu

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

lviguier 1 gadu atpakaļ
vecāks
revīzija
02ab10a25d
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  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 = {};