Ver código fonte

ModelLibrary Signature: fix signature mismatch when material prefab is outdated

Yuxiao Mao 1 mês atrás
pai
commit
97ac5e8d0d
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      hrt/prefab/l3d/modellibrary/Signature.hx

+ 2 - 0
hrt/prefab/l3d/modellibrary/Signature.hx

@@ -100,6 +100,8 @@ class Signature {
 			return null;
 		if( props.__ref != null ) {
 			var lib = hxd.res.Loader.currentInstance.load(props.__ref).toPrefab().load();
+			// Prefab file might be outdated, call make to be sure
+			lib.make();
 			var m = lib.getOpt(hrt.prefab.Material, props.name);
 			sig.diffuseMapPath = m.diffuseMap;
 			sig.normalMapPath = m.normalMap;