Table of Contents

Class AreaTargetSelector

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Selects all UnityEngine.GameObjects within a certain radius of the context object. Useful for area-of-effect abilities or detection.

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

Fields

MaxHits

Maximum number of hits to process in the area.

[Tooltip("Maximum number of hits to process in the area.")]
[Min(1)]
public int MaxHits

Field Value

int

Radius

Radius of the area effect.

[Tooltip("Radius of the area effect.")]
[Min(0)]
public float Radius

Field Value

float

TargetLayer

Layer mask to filter targets in the area.

[Tooltip("Layer mask to filter targets in the area.")]
public LayerMask TargetLayer

Field Value

LayerMask

Methods

SelectTargets(EventData)

Returns all UnityEngine.GameObjects within Radius of the context object, filtered by TargetLayer.

public override IEnumerable<GameObject> SelectTargets(EventData eventData)

Parameters

eventData EventData

The event driving the selection.

Returns

IEnumerable<GameObject>

An enumerable of UnityEngine.GameObjects within the area, or empty if context is null.