diff --git a/Assets/Prefabs/RPG/Wormhole 1.prefab b/Assets/Prefabs/RPG/Wormhole 1.prefab index 24737191b..9ed281430 100644 --- a/Assets/Prefabs/RPG/Wormhole 1.prefab +++ b/Assets/Prefabs/RPG/Wormhole 1.prefab @@ -128,7 +128,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!4 &7100000000000000014 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/Zone Display/ZoneRenderer.cs b/Assets/Scripts/Zone Display/ZoneRenderer.cs index 216b5f0b1..0a257811d 100644 --- a/Assets/Scripts/Zone Display/ZoneRenderer.cs +++ b/Assets/Scripts/Zone Display/ZoneRenderer.cs @@ -342,6 +342,8 @@ public class ZoneRenderer : MonoBehaviour _clouds.Add(cloud, instance); } + private const string BeaconChildName = "Anchor Beacon"; + public void AddWormhole(Wormhole wormhole) { var instance = Instantiate(WormholePrefab); @@ -349,6 +351,10 @@ public class ZoneRenderer : MonoBehaviour // Its local +z points away from the zone centre, so the beacon prefab child stands beyond the wormhole. if (wormhole.Position.x != 0 || wormhole.Position.y != 0) instance.rotation = Quaternion.LookRotation(new Vector3(wormhole.Position.x, 0, wormhole.Position.y)); + // The prefab ships the beacon inactive so menu dressing instances stay bare; a zone wormhole turns it on. + var beacon = instance.Find(BeaconChildName); + if (beacon == null) throw new InvalidOperationException($"Wormhole prefab has no '{BeaconChildName}' child"); + beacon.gameObject.SetActive(true); var icon = CompassIconPrototype.Instantiate(); icon.Icon.sprite = WormholeIcon; WormholeInstances.Add(wormhole, (instance.gameObject, icon));