Struct KinematicCharacterUpdateContext
The context struct holding global data that needs to be accessed during the character update.
Inherited Members
Namespace: Unity.CharacterController
Syntax
public struct KinematicCharacterUpdateContext
Fields
PhysicsWorld
The physics world this character is part of
Declaration
[ReadOnly]
public PhysicsWorld PhysicsWorld
Field Value
Type | Description |
---|---|
PhysicsWorld |
StoredCharacterBodyPropertiesLookup
Lookup for the StoredKinematicCharacterData component
Declaration
[ReadOnly]
public ComponentLookup<StoredKinematicCharacterData> StoredCharacterBodyPropertiesLookup
Field Value
Type | Description |
---|---|
ComponentLookup<StoredKinematicCharacterData> |
Time
Global time data
Declaration
public TimeData Time
Field Value
Type | Description |
---|---|
TimeData |
TmpColliderCastHits
Temporary collider cast hits list
Declaration
[NativeDisableContainerSafetyRestriction]
public NativeList<ColliderCastHit> TmpColliderCastHits
Field Value
Type | Description |
---|---|
NativeList<ColliderCastHit> |
TmpDistanceHits
Temporary distance hits list
Declaration
[NativeDisableContainerSafetyRestriction]
public NativeList<DistanceHit> TmpDistanceHits
Field Value
Type | Description |
---|---|
NativeList<DistanceHit> |
TmpRaycastHits
Temporary raycast hits list
Declaration
[NativeDisableContainerSafetyRestriction]
public NativeList<RaycastHit> TmpRaycastHits
Field Value
Type | Description |
---|---|
NativeList<RaycastHit> |
TmpRigidbodyIndexesProcessed
Temporary rigidbody indexes list used for keeping track of unique rigidbodies collided with
Declaration
[NativeDisableContainerSafetyRestriction]
public NativeList<int> TmpRigidbodyIndexesProcessed
Field Value
Type | Description |
---|---|
NativeList<Int32> |
TrackedTransformLookup
Lookup for the TrackedTransform component
Declaration
[ReadOnly]
public ComponentLookup<TrackedTransform> TrackedTransformLookup
Field Value
Type | Description |
---|---|
ComponentLookup<TrackedTransform> |
Methods
EnsureCreationOfTmpCollections()
Ensures that the temporary collections held in this struct are created. This should normally be called within a job, before the character update
Declaration
public void EnsureCreationOfTmpCollections()
OnSystemCreate(ref SystemState)
Provides an opportunity to get and store global data at the moment of a system's creation
Declaration
public void OnSystemCreate(ref SystemState state)
Parameters
Type | Name | Description |
---|---|---|
SystemState | state | The state of the system calling this method |
OnSystemUpdate(ref SystemState, TimeData, PhysicsWorldSingleton)
Provides an opportunity to update stored data during a system's update
Declaration
public void OnSystemUpdate(ref SystemState state, TimeData time, PhysicsWorldSingleton physicsWorldSingleton)
Parameters
Type | Name | Description |
---|---|---|
SystemState | state | The state of the system calling this method |
TimeData | time | The time data passed on by the system calling this method |
PhysicsWorldSingleton | physicsWorldSingleton | The physics world singleton passed on by the system calling this method |