Table of Contents

Class SceneNavMeshes

Namespace
FishMMO.Server.Implementation.World.SceneServer.Navigation
Assembly
FishMMO.Server.dll

Adds a world scene's NavMesh while any instance of the scene is loaded, from SceneNavMeshCatalogue.

public sealed class SceneNavMeshes
Inheritance
SceneNavMeshes
Inherited Members

Remarks

Once per scene, not per instance. The Unity NavMesh is global, not per physics scene, and a scene server can run several stacked instances of one world scene at the same coordinates. Their NavMeshes would be identical and overlap exactly, so the first instance adds it and the last one to unload removes it.

And its climbables' links. Each of the scene's ladders, rope ladders and ropes (Climbables) becomes a two-way link from its foot on the lower floor to its landing on the upper one (LinkEnds(in SceneClimbable, out Vector3, out Vector3)), in the "Climb" area so only archetypes that climb path over them (ClimbArea). Links are global like the NavMesh, so they too are added once per scene and go with it. Made at load from the same list the players' climbing reads, so the two never disagree and no bake is needed for them.

A plain class rather than part of NavMeshSystem, so tests can drive it without FishNet.

Constructors

SceneNavMeshes(SceneNavMeshCatalogue)

public SceneNavMeshes(SceneNavMeshCatalogue catalogue)

Parameters

catalogue SceneNavMeshCatalogue

Properties

Catalogue

Where the NavMeshes come from.

public SceneNavMeshCatalogue Catalogue { get; set; }

Property Value

SceneNavMeshCatalogue

Count

How many scenes' NavMeshes are in the world.

public int Count { get; }

Property Value

int

Methods

Add(string, IReadOnlyList<SceneClimbable>)

An instance of sceneName loaded, with its climbables (null for none): the first instance adds the NavMesh and links it. Returns false when the scene has no NavMesh.

public bool Add(string sceneName, IReadOnlyList<SceneClimbable> climbables = null)

Parameters

sceneName string
climbables IReadOnlyList<SceneClimbable>

Returns

bool

Clear()

Takes every NavMesh out.

public void Clear()

IsLoaded(string)

True while sceneName's NavMesh is in the world.

public bool IsLoaded(string sceneName)

Parameters

sceneName string

Returns

bool

LinkCount(string)

How many climb links sceneName's NavMesh has in the world.

public int LinkCount(string sceneName)

Parameters

sceneName string

Returns

int

LinkFor(Vector3, Vector3, int, int)

The link a climbable is given: a point at each end, both ways, costed by its area (the "Climb" area when the project has one).

public static NavMeshLinkData LinkFor(Vector3 lower, Vector3 upper, int agentTypeID, int area)

Parameters

lower Vector3
upper Vector3
agentTypeID int
area int

Returns

NavMeshLinkData

Remove(string)

An instance of sceneName unloaded; the last one takes its NavMesh out.

public void Remove(string sceneName)

Parameters

sceneName string