Table of Contents

Class AllCharactersTargetSelector

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Selects every scene UnityEngine.GameObject with a component that implements ICharacter.

[Serializable]
public class AllCharactersTargetSelector : TargetSelector
Inheritance
AllCharactersTargetSelector
Inherited Members

Fields

IncludeInactive

True to include inactive GameObjects when collecting scene characters.

[Tooltip("True to include inactive GameObjects when collecting scene characters.")]
public bool IncludeInactive

Field Value

bool

IncludeUnspawned

True to include characters that are not currently spawned.

[Tooltip("True to include characters that are not currently spawned.")]
public bool IncludeUnspawned

Field Value

bool

Methods

SelectTargets(EventData)

Returns all GameObjects in the context's scene that have a component implementing ICharacter.

public override IEnumerable<GameObject> SelectTargets(EventData eventData)

Parameters

eventData EventData

The event data driving the selection.

Returns

IEnumerable<GameObject>

An enumerable of character GameObjects, ordered by network identity.

Remarks

Server only. This feeds gameplay — it is the fan-out behind "everyone in the zone" effects — so it resolves where those effects are authoritative, for the same reason the physics selectors do.

Ordered. FindObjectsByType is called with FindObjectsSortMode.None, which returns whatever order the scene's object registry happens to hold — not the hierarchy order, and not the same order twice. Anything downstream that caps the set, stops at the first match, or rolls against it was choosing arbitrarily. Sorting by network identity costs one pass and makes the fan-out reproducible.