Targeting System 3
|
Class that shows up as a targeting system controller for the user. Main class for using the targeting system plugin. More...
Public Member Functions | |
int | CompareTo (GV_TargetingSystem other) |
Compares targeting systems group index to this system group index. | |
Target | GetClosestTarget (bool forceUpdate) |
Gets closest entity or gameObject as target according to parameters set by the user from GV_TargetingSystem component. | |
Target | GetClosestTargetFromSlot (int slot, bool forceUpdate, bool alsoShowIndicatorFromThisSlot) |
Gets closest entity or gameObject as target according to parameters set by the user from GV_TargetingSystem component. | |
GameObject | GetClosestTargetFromSlotAsGameObject (int slot, bool forceUpdate) |
Gets closest gameObject, if none return null. | |
GameObject | GetClosestTargetAsGameObject (bool forceUpdate) |
Gets closest gameObject. | |
NativeSlice< Target > | GetClosestTargets (bool forceUpdate) |
Gets targets for both entities and GameObject. Then sorts them. | |
NativeSlice< Target > | GetClosestTargets (bool forceUpdate, bool coldStart) |
Gets targets for both entities and GameObject. Then sorts them in case force update is used. Otherwise just returns the target list. | |
IEnumerator | DestroyTargetAfter (Target target, float time) |
Function coroutine that can be used to destroy game object or entity target. | |
void | DestroyGameObjectTargetAtDistanceToObject (Target target, Transform transform, float distanceToDestroyAt, float timeOut) |
Function that starts coroutine that can be used to destroy game object target after reaching given distance from targeting system. | |
void | TriggerTargetingActions (Target target) |
Spawn prefabs from actions template object. | |
TargetingSystemDataModels.GeometryInfo | GetGeoInfoBasedOnHashCode (int4 geoInfoHashCode) |
Gets you a GeoInfo of a target object based on the given hashcode. Does not care about if its seen or not. | |
TargetingSystemDataModels.GeometryInfo | GetSeenGeoInfoBasedOnHashCode (int4 geoInfoHashCode) |
Gets you a visible GeoInfo of a target object based on the given hashcode. | |
Target | GetTargetBasedOnHashCode (int4 geoInfoHashCode) |
Gets you a GeoInfo of a target object based on the hashCode inside it. | |
T | GetVisibilityProcessor< T > () |
Used to get the eye implementation for either game object or entities from hash set. | |
void | ChangeTargetingIndicatorsSlot (int slotToUse) |
Which target to show from the queue. Requires target indicating to be turned on. | |
void | SetGameObjectBasedProcessingOnOrOff (bool onOff) |
void | ChangeTargetingInstructionTag (string newTagForTheInstruction, int targetingInstructionIndex) |
void | AddTargetingInstruction (TargetingInstruction targetingInstruction) |
void | RemoveTargetingInstruction (TargetingInstruction targetingInstruction) |
void | ChangeTargetingInstructionTag (GeometryType geometryType, string newTag, string oldTag) |
void | OnBeforeSerialize () |
void | OnAfterDeserialize () |
void | ForceSetTargetingSystemIndex (int4 newTargetingSystemIndex) |
Vector3 | DirectionInWorldSpace () |
Calculates forward vector from systems position and its forward vector. | |
int | GetCullingModeAsInt () |
Properties | |
int | AdditionalTargetsCount [get, set] |
int4 | TargetingSystemIndex [get, set] |
bool | EntityBasedProcessing [get] |
TargetingSystemMemory | SystemsMemory [get, set] |
Target | ClosestTarget [get, set] |
int | TargetingIndicatorSlotToUse [get] |
bool | ClosestEdgeFetchedForCurrentFrame [get, set] |
EdgeDataModels.Edge | ClosestEdgeTarget [get, set] |
Transform | TargetingIndicatorObject [get, set] |
Targeting locator or indicator GameObject made to visualise the closest target, if wanted. | |
TargetingSystemDataModels.CullingBehaviour | CullingBehaviour [get, set] |
float | FieldOfView [get, set] |
List< TargetingInstruction > | TargetingInstructionsWithRefresh [get] |
Has refresh functionality added to the getter. Use this for adding new instruction in non performance critical scenarios. It re updates cache and fixes missing target processors if any. | |
List< TargetingInstruction > | TargetingInstructions [get] |
TargetVisibilityDebugger | VisibilityDebugger [get, set] |
bool | GameObjectProcessing [get, set] |
SortedList< ITargetVisibilityProcessor, ITargetVisibilityProcessor > | TargetVisibilityProcessors [get, set] |
TargetingSystemsRunner | TargetingSystemsRunner [get, set] |
Link to targetingSystemsRunner that is shared across all targeting systems. | |
NativeList< Target > | ClosestTargetsContainer [get, set] |
For direct access use memory as below. This returns temporary copy of the memory. | |
int | NumberOfTargets [get, set] |
int | PreviousNumberOfTargets [get, set] |
int | NumberOfLockedTargets [get, set] |
int | PreviousNumberOfLockedTargets [get, set] |
float | IndicatorVisibilityDistance [get, set] |
int | TargetingSystemGroupIndex [get, set] |
bool | BlockTargetsOutsideIndicatorVisibilityDistance [get, set] |
bool | TargetIndicatingEnabled [get, set] |
uint | NumberOfIndicatorsToShow [get, set] |
float | TargetSettingsBlendWeight [get, set] |
float | TargetingDistance [get, set] |
Class that shows up as a targeting system controller for the user. Main class for using the targeting system plugin.
Usage: Add to objects you want to act as a targeting system. The component will handle the rest. A lot of the settings are meant to be adjusted from the inspector UI. Do not add this to camera object since it creates its own camera and hides it from the user. Create empty gameobject instead and add that as a child object to the camera.
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.AddTargetingInstruction | ( | TargetingInstruction | targetingInstruction | ) |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.ChangeTargetingIndicatorsSlot | ( | int | slotToUse | ) |
Which target to show from the queue. Requires target indicating to be turned on.
slotToUse | Closest target indicator slot/index. For example slot 1 would the second closest target. |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.ChangeTargetingInstructionTag | ( | GeometryType | geometryType, |
string | newTag, | ||
string | oldTag ) |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.ChangeTargetingInstructionTag | ( | string | newTagForTheInstruction, |
int | targetingInstructionIndex ) |
int Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.CompareTo | ( | GV_TargetingSystem | other | ) |
Compares targeting systems group index to this system group index.
other | System to compare to. |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.DestroyGameObjectTargetAtDistanceToObject | ( | Target | target, |
Transform | transform, | ||
float | distanceToDestroyAt, | ||
float | timeOut ) |
Function that starts coroutine that can be used to destroy game object target after reaching given distance from targeting system.
target | Target to destroy |
distanceToDestroyAt | Distance from target to targetProcessorSystem component, if closer then the target gets destroyed |
timeOut | After time out the target gets destroyed no matter what happens. |
IEnumerator Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.DestroyTargetAfter | ( | Target | target, |
float | time ) |
Function coroutine that can be used to destroy game object or entity target.
target | Target wanted to be destroyed |
time | Time after target is destroyed |
Vector3 Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.DirectionInWorldSpace | ( | ) |
Calculates forward vector from systems position and its forward vector.
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.ForceSetTargetingSystemIndex | ( | int4 | newTargetingSystemIndex | ) |
Target Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetClosestTarget | ( | bool | forceUpdate | ) |
Gets closest entity or gameObject as target according to parameters set by the user from GV_TargetingSystem component.
Normally update is done every frame so calling this with forceUpdate set to true will impact performance when using multiple systems. Use case where this might be needed, is when something is destroyed on the main thread and the new target search is required immediately for next function or when measuring performance.
forceUpdate | Schedules a job to instantly update targets. |
GameObject Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetClosestTargetAsGameObject | ( | bool | forceUpdate | ) |
Gets closest gameObject.
forceUpdate | Schedules a job to instantly update targets. |
Target Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetClosestTargetFromSlot | ( | int | slot, |
bool | forceUpdate, | ||
bool | alsoShowIndicatorFromThisSlot ) |
Gets closest entity or gameObject as target according to parameters set by the user from GV_TargetingSystem component.
Normally update is done every frame so calling this with forceUpdate set to true will impact performance when using multiple systems. Use case where this might be needed, is when something is destroyed on the main thread and the new target search is required immediately for next function or when measuring performance changes.
slot | Index can be specified. Getting a target from slot 2 would mean getting the second closest target. |
forceUpdate | Schedules a job to instantly update targets. |
alsoShowIndicatorFromThisSlot | Changes the slot of the target indicator. For example 1 would be the second most closest. |
GameObject Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetClosestTargetFromSlotAsGameObject | ( | int | slot, |
bool | forceUpdate ) |
Gets closest gameObject, if none return null.
slot | Index can be specified. Getting a target from slot 2 would mean getting the second closest target. |
forceUpdate | Schedules a job to instantly update targets. |
NativeSlice< Target > Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetClosestTargets | ( | bool | forceUpdate | ) |
Gets targets for both entities and GameObject. Then sorts them.
Normally update is done every frame so manually calling this at the middle of frame with forceUpdate = true might impact performance. Case where this might be needed is when something is destroyed on the main thread and the new target search is required immediately for next function or when measuring performance.
forceUpdate | Schedules a job to instantly update targets instead of using chunkKeysForTargeting from the update loop. |
NativeSlice< Target > Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetClosestTargets | ( | bool | forceUpdate, |
bool | coldStart ) |
Gets targets for both entities and GameObject. Then sorts them in case force update is used. Otherwise just returns the target list.
Normally update is done every frame so manually calling this at the middle of frame with forceUpdate = true impacts performance. Case where this might be needed is when something is destroyed on the main thread and the new target search is required immediately for next function or when measuring performance
forceUpdate | Schedules a job to instantly update targets instead of using chunkKeysForTargeting from the update loop |
coldStart | Also initialize System. This enables the system to work before Start() is called. This means that you can ask the system to provide data during game object to entity conversion phase. For example to provide data for projectile authoring. |
int Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetCullingModeAsInt | ( | ) |
TargetingSystemDataModels.GeometryInfo Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetGeoInfoBasedOnHashCode | ( | int4 | geoInfoHashCode | ) |
Gets you a GeoInfo of a target object based on the given hashcode. Does not care about if its seen or not.
geoInfoHashCode | The hashcode from target struct. Target.geoInfoHashCode |
TargetingSystemDataModels.GeometryInfo Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetSeenGeoInfoBasedOnHashCode | ( | int4 | geoInfoHashCode | ) |
Gets you a visible GeoInfo of a target object based on the given hashcode.
geoInfoHashCode | The hashcode from target struct. Target.geoInfoHashCode |
Target Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetTargetBasedOnHashCode | ( | int4 | geoInfoHashCode | ) |
Gets you a GeoInfo of a target object based on the hashCode inside it.
geoInfoHashCode | The hashcode from target struct. Target.geoInfoHashCode |
T Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.GetVisibilityProcessor< T > | ( | ) |
Used to get the eye implementation for either game object or entities from hash set.
T | Implementation to get. If none exists return default T |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.OnAfterDeserialize | ( | ) |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.OnBeforeSerialize | ( | ) |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.RemoveTargetingInstruction | ( | TargetingInstruction | targetingInstruction | ) |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.SetGameObjectBasedProcessingOnOrOff | ( | bool | onOff | ) |
void Plugins.TargetingSystem.BaseCode.MainClasses.GV_TargetingSystem.TriggerTargetingActions | ( | Target | target | ) |
Spawn prefabs from actions template object.
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
For direct access use memory as below. This returns temporary copy of the memory.
|
getset |
|
get |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
Targeting locator or indicator GameObject made to visualise the closest target, if wanted.
Setter that also checks, if gameObject is in the scene and then spawns, if not.
|
get |
|
get |
|
get |
Has refresh functionality added to the getter. Use this for adding new instruction in non performance critical scenarios. It re updates cache and fixes missing target processors if any.
|
getset |
|
getset |
|
getset |
Link to targetingSystemsRunner that is shared across all targeting systems.
|
getset |
|
getset |
|
getset |