Class DungeonEntrance
Interactable representing a dungeon entrance. Displays a title and optional image in the UI.
[RequireComponent(typeof(MapMarker))]
public class DungeonEntrance : Interactable, ISpawnable, IDungeonEntrance, IInteractable, ISceneObject, IMapMarkerIconSource
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourNetworkBehaviourDungeonEntrance
- Implements
- Inherited Members
-
NetworkBehaviour.IsSpawnedNetworkBehaviour.ComponentIndexNetworkBehaviour.NetworkObjectNetworkBehaviour.MAXIMUM_NETWORKBEHAVIOURSNetworkBehaviour.UNSET_NETWORKBEHAVIOUR_IDNetworkBehaviour.ToString()NetworkBehaviour.Reset()NetworkBehaviour.OnValidate()NetworkBehaviour.IsBehaviourReconcilingNetworkBehaviour.ClearReplicateCache()NetworkBehaviour.RequestReconcileSends()NetworkBehaviour.CreateReconcile()NetworkBehaviour.Reconcile_Reader_Remote<T>(PooledReader, ref T)NetworkBehaviour.ClearBuffedRpcs()NetworkBehaviour.IsClientOnlyNetworkBehaviour.IsServerOnlyNetworkBehaviour.IsHostNetworkBehaviour.IsClientNetworkBehaviour.IsServerNetworkBehaviour.IsDeinitializingNetworkBehaviour.NetworkManagerNetworkBehaviour.ServerManagerNetworkBehaviour.ClientManagerNetworkBehaviour.ObserverManagerNetworkBehaviour.TransportManagerNetworkBehaviour.TimeManagerNetworkBehaviour.SceneManagerNetworkBehaviour.PredictionManagerNetworkBehaviour.RollbackManagerNetworkBehaviour.NetworkObserverNetworkBehaviour.IsClientInitializedNetworkBehaviour.IsClientStartedNetworkBehaviour.IsClientOnlyInitializedNetworkBehaviour.IsClientOnlyStartedNetworkBehaviour.IsServerInitializedNetworkBehaviour.IsServerStartedNetworkBehaviour.IsServerOnlyInitializedNetworkBehaviour.IsServerOnlyStartedNetworkBehaviour.IsHostInitializedNetworkBehaviour.IsHostStartedNetworkBehaviour.IsOfflineNetworkBehaviour.IsNetworkedNetworkBehaviour.GetIsNetworked()NetworkBehaviour.IsManagerReconcilingNetworkBehaviour.ObserversNetworkBehaviour.IsOwnerNetworkBehaviour.IsControllerNetworkBehaviour.HasAuthorityNetworkBehaviour.OwnerNetworkBehaviour.OwnerIdNetworkBehaviour.ObjectIdNetworkBehaviour.LocalConnectionNetworkBehaviour.OwnerMatches(NetworkConnection)NetworkBehaviour.Despawn(GameObject, DespawnType?)NetworkBehaviour.Despawn(NetworkObject, DespawnType?)NetworkBehaviour.Despawn(DespawnType?)NetworkBehaviour.Spawn(GameObject, NetworkConnection, Scene)NetworkBehaviour.Spawn(NetworkObject, NetworkConnection, Scene)NetworkBehaviour.RemoveOwnership()NetworkBehaviour.GiveOwnership(NetworkConnection)NetworkBehaviour.GetInstance<T>()NetworkBehaviour.TryRegisterInstance<T>(T)NetworkBehaviour.UnregisterInstance<T>()NetworkBehaviour.CanLog(LoggingType)NetworkBehaviour.OnStartServerCalledNetworkBehaviour.OnStartClientCalledNetworkBehaviour.OnStartNetwork()NetworkBehaviour.OnStopNetwork()NetworkBehaviour.OnStopServer()NetworkBehaviour.OnOwnershipServer(NetworkConnection)NetworkBehaviour.OnSpawnServer(NetworkConnection)NetworkBehaviour.OnDespawnServer(NetworkConnection)NetworkBehaviour.OnStartClient()NetworkBehaviour.OnStopClient()NetworkBehaviour.OnOwnershipClient(NetworkConnection)MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.destroyCancellationTokenMonoBehaviour.useGUILayoutMonoBehaviour.didStartMonoBehaviour.didAwakeMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.GetComponentIndex()Component.CompareTag(TagHandle)Component.transformComponent.transformHandleComponent.gameObjectComponent.tagObject.GetEntityId()Object.MemberwiseClone()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.nameObject.hideFlags
Remarks
Also the thing that puts the entrance on the minimap and the world map: it requires a MapMarker and fills it in on awake, so an entrance is mapped without any authoring beyond placing it. It appears once the player has explored the chunk it stands in — see Discovered — which for a fixture the player has to walk to is the same thing as appearing on approach, and it stays on the map afterwards.
Fields
AchievementTemplate
Achievement to increment when a player enters this dungeon.
public AchievementTemplate AchievementTemplate
Field Value
DungeonImage
The image representing the dungeon entrance in the UI (client only).
public Sprite DungeonImage
Field Value
- Sprite
DungeonName
The name of the dungeon associated with this entrance.
public string DungeonName
Field Value
Template
The dungeon this entrance leads to: its description, artwork and difficulty list.
public DungeonTemplate Template
Field Value
Remarks
Optional. An entrance without one leads to a dungeon with a single unnamed difficulty and default rules, which is exactly how every entrance behaved before difficulties existed — so leaving it unset is a working configuration, not a broken one.
Properties
ResolvedDungeonName
The name drawn beside the entrance's map marker.
public string ResolvedDungeonName { get; }
Property Value
Remarks
The template's player-facing name wins over the field the entrance was authored with: that field is the dungeon scene name — an internal identifier — while the template carries what the dungeon is actually called, which is also what the dungeon finder shows.
Title
Gets the display title for the dungeon entrance.
public override string Title { get; }
Property Value
Methods
OnAwake()
Fills in the marker that puts this entrance on both maps.
public override void OnAwake()
Remarks
Only the three fields that describe what this object is are written: its type, the rule that decides when it may be drawn, and a label when the marker has none. Icon, IconSize, Priority, ClampToEdge and the two ShowOn flags are left alone, so an author who wants to override any of them on a particular entrance still can.
The marker is created if it is missing. RequireComponentAttribute is an editor-time guarantee — it adds the component when this one is added, and to existing objects when the scene is next opened — so a build taken from a scene that was never re-saved in the editor would otherwise have an entrance with no marker at all, and the only symptom would be an entrance that silently never appears on the map.