瀏覽代碼

materials: fix preview sphere with multiple shaders

lviguier 1 年之前
父節點
當前提交
0ead5acaf0
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      hrt/prefab/Material.hx

+ 3 - 0
hrt/prefab/Material.hx

@@ -63,6 +63,9 @@ class Material extends Prefab {
 		var mats = findFirstLocal3d().getMaterials();
 
 		#if editor
+		if (this.previewSphere != null)
+			mats = previewSphere.getMaterials();
+
 		if (!includePreviewMats && mats != null) {
 			var idx = mats.length - 1;
 			while (idx >= 0) {