![]() |
SpaceRTS - Starter Pack
1.3
|
Act as a Manager for the spatial Navigation of the map. Can be overrided to allow different Navigation methods like the Unity's built-in NavMesh system or A* Pathfinding project. More...
Public Member Functions | |
virtual string [] | GetAreaNames () |
Returns the list of area names (useful for editor classes to display an int field mask with the proper layer names). Returning null implies that the current NavMesh layer names must be used. More... | |
virtual bool | SamplePosition (Vector3 pingPosition, out Vector3 closestPoint, int masks) |
Finds the closest point into the navigation area. More... | |
virtual bool | GetClosestEdgeDistance (Vector3 pingPosition, out float distance, int masks) |
Locate the closest edge distance from a point on the Navigation spatial areas. More... | |
virtual bool | GetClosestEdgePosition (Vector3 pingPosition, out Vector3 edgePosition, int masks) |
Locate the closest edge position from a point on the Navigation spatial areas. More... | |
void | Rebuild () |
Forces to rebuild the entire spatial system. This method only marks the system as a rebuild required, the actual rebuild will be done at the of the frame so multiple calls to this function can be made without overhead penalty. More... | |
bool | IsRebuilding () |
void | StopRebuild () |
virtual void | AddVolumeModifiers (IEnumerable< SpatialModifier > addedModifiers) |
Registers a bunch of SpatialModifiers that will shape the navigation areas of this SpatialSystem after a rebuild. More... | |
virtual void | RemoveVolumeModifiers (IEnumerable< SpatialModifier > removedModifiers) |
Unregisters a bunch of SpatialModifiers from the SpatialSystem. More... | |
![]() | |
virtual void | GenerateDefaultValues () |
Public Attributes | |
Action< SpatialModifier > | OnSpatialModifierAdded |
Action delegate called every time a SpatialModifier is registered More... | |
Action< SpatialModifier > | OnSpatialModifierRemoved |
Action delegate called every time a SpatialModifier is unregistered More... | |
Action | OnRebuildCompleted |
Action dellegate called every time a rebuild is completed. More... | |
Protected Member Functions | |
virtual IEnumerator | OnRebuild () |
Called along with the rebuild process. Should be overriden to implement a custon rebuild process. More... | |
![]() | |
virtual void | OnValidate () |
Finds the GameScene in the current hierarchy going from parent to parent. Also registers the scene system in that GameScene. More... | |
virtual void | Reset () |
virtual void | ValidateSceneSystem () |
Protected Attributes | |
List< SpatialModifier > | modifiers = new List<SpatialModifier>() |
Properties | |
virtual int | DefaultAllAreasMask [get] |
Default value when all areas must be marked in a AreaMask More... | |
IEnumerable< SpatialModifier > | Modifiers [get] |
Creates an enumeration of each SpatialModifier that should shape the navigation areas of the spatial system. TODO: I'm pretty sure that a lot of optimizations can be done here. I'll mark it as a big TODO and come back later to this. More... | |
![]() | |
GameScene | gameScene [get] |
Additional Inherited Members | |
![]() | |
static bool | ValidateExists< T > (UnityEngine.Object context) |
static void | CreateDefault< T > (UnityEngine.Object context) |
static T | Find< T > (UnityEngine.Object context) |
static T | GetValid< T > (UnityEngine.Object context) |
Act as a Manager for the spatial Navigation of the map. Can be overrided to allow different Navigation methods like the Unity's built-in NavMesh system or A* Pathfinding project.
|
virtual |
Registers a bunch of SpatialModifiers that will shape the navigation areas of this SpatialSystem after a rebuild.
addedModifiers | An enumeration of the SpatialModifiers that need to be registered. |
Reimplemented in NullPointerGame.NavMeshIntegration.NavMeshSpatialSystem.
|
virtual |
Returns the list of area names (useful for editor classes to display an int field mask with the proper layer names). Returning null implies that the current NavMesh layer names must be used.
|
virtual |
Locate the closest edge distance from a point on the Navigation spatial areas.
pingPosition | The origin of the distance query. |
distance | Holds the resulting distance. |
masks | A bitfield mask specifying which areas can be passed when finding the nearest edge. |
Reimplemented in NullPointerGame.NavMeshIntegration.NavMeshSpatialSystem.
|
virtual |
Locate the closest edge position from a point on the Navigation spatial areas.
pingPosition | The origin of the distance query. |
edgePosition | Holds the resulting position. |
masks | A bitfield mask specifying which areas can be passed when finding the nearest edge. |
Reimplemented in NullPointerGame.NavMeshIntegration.NavMeshSpatialSystem.
bool NullPointerGame.Spatial.SpatialSystem.IsRebuilding | ( | ) |
|
protectedvirtual |
Called along with the rebuild process. Should be overriden to implement a custon rebuild process.
Reimplemented in NullPointerGame.NavMeshIntegration.NavMeshSpatialSystem.
void NullPointerGame.Spatial.SpatialSystem.Rebuild | ( | ) |
Forces to rebuild the entire spatial system. This method only marks the system as a rebuild required, the actual rebuild will be done at the of the frame so multiple calls to this function can be made without overhead penalty.
|
virtual |
Unregisters a bunch of SpatialModifiers from the SpatialSystem.
removedModifiers | The enumeration of SpatialModifiers that need to be unregistered. |
Reimplemented in NullPointerGame.NavMeshIntegration.NavMeshSpatialSystem.
|
virtual |
Finds the closest point into the navigation area.
pingPosition | The origin of the sample query. |
closestPoint | the resulting location. |
masks | A mask specifying which areas are allowed when finding the nearest point. |
Reimplemented in NullPointerGame.NavMeshIntegration.NavMeshSpatialSystem.
void NullPointerGame.Spatial.SpatialSystem.StopRebuild | ( | ) |
|
protected |
Action NullPointerGame.Spatial.SpatialSystem.OnRebuildCompleted |
Action dellegate called every time a rebuild is completed.
Action<SpatialModifier> NullPointerGame.Spatial.SpatialSystem.OnSpatialModifierAdded |
Action delegate called every time a SpatialModifier is registered
Action<SpatialModifier> NullPointerGame.Spatial.SpatialSystem.OnSpatialModifierRemoved |
Action delegate called every time a SpatialModifier is unregistered
|
get |
Default value when all areas must be marked in a AreaMask
|
get |
Creates an enumeration of each SpatialModifier that should shape the navigation areas of the spatial system. TODO: I'm pretty sure that a lot of optimizations can be done here. I'll mark it as a big TODO and come back later to this.