فهرست منبع

[shgraph] disable editor light icons in references

Clément Espeute 6 ماه پیش
والد
کامیت
b91c1b35de
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      hrt/prefab/Light.hx

+ 3 - 1
hrt/prefab/Light.hx

@@ -179,7 +179,9 @@ class Light extends Object3D {
 		}
 
 		#if editor
-		icon = hrt.impl.EditorTools.create3DIcon(object, hide.Ide.inst.getHideResPath("icons/PointLight.png"), 0.5, Light);
+		if (shared.parentPrefab == null || Std.downcast(shared.parentPrefab, Reference)?.editMode) {
+			icon = hrt.impl.EditorTools.create3DIcon(object, hide.Ide.inst.getHideResPath("icons/PointLight.png"), 0.5, Light);
+		}
 		#end
 
 		cookieTex = initTexture(cookiePath);