Class HitShapeContainer
[ExecutionOrder(1400)]
public class HitShapeContainer : NetworkBehaviour, INetickNetworkScript, INetickScript
- Inheritance
-
HitShapeContainer
- Implements
- Inherited Members
Constructors
HitShapeContainer()
public HitShapeContainer()
Fields
HitShapes
public List<HitShape> HitShapes
Field Value
Properties
LagCompensation
public LagCompensation LagCompensation { get; }
Property Value
Methods
AddHitShape(HitShape)
Adds a HitShape to this container at runtime. LOCAL call only - this change is NOT synced over the network. For server/client hit detection to agree, you MUST call this on BOTH the server and the client at the same logical moment (e.g. driven by a synced network property, RPC, etc). Calling on only one side will cause server/client hit divergence.
public void AddHitShape(HitShape shape)
Parameters
shapeHitShape
GetBounds()
The current tight world-space bounds enclosing all enabled HitShapes in this container (the latest captured tick's aggregate AABB).
public Bounds GetBounds()
Returns
- Bounds
NetworkAwake()
public override void NetworkAwake()
NetworkDestroy()
Called when this behaviour has been removed from the simulation.
public override void NetworkDestroy()
NetworkFixedUpdate()
Called every fixed-time network step. Any changes to the networked state should happen here.
On the client, if you are the Input Source or if this Object.PredictionMode is set to Everyone, it will be called several times in one update/tick during resimulations. To check for resimulations, use [IsResimulating].
public override void NetworkFixedUpdate()
NetworkStart()
Called when this behaviour has been added to the simulation.
public override void NetworkStart()
OnBecameInterested()
Called in the client when the client becomes interested in this object.
public override void OnBecameInterested()
OnBecameUninterested()
Called in the client when the client becomes uninterested in this object.
public override void OnBecameUninterested()
RemoveHitShape(HitShape)
Removes a HitShape from this container at runtime. LOCAL call only - this change is NOT synced over the network. For server/client hit detection to agree, you MUST call this on BOTH the server and the client at the same logical moment. Calling on only one side will cause server/client hit divergence.
public void RemoveHitShape(HitShape shape)
Parameters
shapeHitShape