Table of Contents

Class PortalActivation

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Makes a portal — a same-scene Teleporter or a cross-scene SceneTeleporter — dormant until something activates it.

[DisallowMultipleComponent]
public class PortalActivation : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
PortalActivation
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.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.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.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.ToString()
Object.name
Object.hideFlags

Remarks

The rules (2026-10-10). A portal is inactive until activated. A player activates it by using it while meeting ANY of its Conditions (an ability known, an item held, the placeholder HasProfessionCondition) or holding its Key; the key is designer-assigned and generated portals leave it empty. Who it then opens for is Scope, chosen per portal: the activating character only, everyone for DurationSeconds, or everyone for good. The rules are PortalActivationRules; the use is PortalGate, called by TeleportAction and SceneTeleporter before they move anyone.

Identity is (scene, PortalIndex). The index is the bit a character's activation record stores and the key of the world row, so it must be unique in its scene and never change once the scene ships — the waypoint contract, in its own index space (a waypoint and a portal may both be 0).

Look. On a client, ActiveVisual / InactiveVisual are switched from what the server reported (PortalClientStates). Both optional.

Fields

DefaultLockedMessage

The generic refusal when LockedMessage is empty.

public const string DefaultLockedMessage = "The portal is dormant. Something must awaken it."

Field Value

string

Properties

ActiveVisual

public GameObject ActiveVisual { get; }

Property Value

GameObject

Conditions

public List<BaseCondition> Conditions { get; }

Property Value

List<BaseCondition>

ConsumeKey

public bool ConsumeKey { get; }

Property Value

bool

DurationSeconds

public float DurationSeconds { get; }

Property Value

float

HasRequirements

Whether the portal names any condition or a key.

public bool HasRequirements { get; }

Property Value

bool

InactiveVisual

public GameObject InactiveVisual { get; }

Property Value

GameObject

Key

public BaseItemTemplate Key { get; }

Property Value

BaseItemTemplate

LockedMessage

public string LockedMessage { get; }

Property Value

string

PortalIndex

public int PortalIndex { get; }

Property Value

int

SceneName

The scene the portal stands in (the scene asset's name, the same in every instance).

public string SceneName { get; }

Property Value

string

Scope

public PortalActivationScope Scope { get; }

Property Value

PortalActivationScope

Methods

AnyConditionMet(ICharacter, EventData)

Whether at least one condition passes for the player. Null entries are skipped.

public bool AnyConditionMet(ICharacter character, EventData eventData)

Parameters

character ICharacter
eventData EventData

Returns

bool

Configure(int, PortalActivationScope, float)

Sets the authored fields. The point-of-interest generator's seam; a designer edits them in the inspector.

public void Configure(int index, PortalActivationScope activationScope, float timedSeconds)

Parameters

index int
activationScope PortalActivationScope
timedSeconds float

HoldsKey(ICharacter)

Whether the player carries at least one key in their inventory.

public bool HoldsKey(ICharacter character)

Parameters

character ICharacter

Returns

bool