Browse Source

materials: fix preview sphere with multiple shaders

lviguier 1 year ago
parent
commit
0ead5acaf0
1 changed files with 3 additions and 0 deletions
  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) {