Base class for spatial (Position/Rotation/Scale/Parent) synchronization component, such as NetworkTransform. Provides the base logic for render interpolation, parenting synchronization, and teleport, that can be used in components derived from this class.
More...
|
virtual void | SetAreaOfInterestOverride (NetworkObject obj) |
| Manually set the NetworkObject used as the AreaOfInterestOverride. More...
|
|
virtual void | CopyBackingFieldsToState (bool firstTime) |
| Copies the backing fields to the state. This method is meant to be overridden in derived classes. More...
|
|
void | CopyStateFrom (NetworkBehaviour source) |
| Copies entire state of passed in source NetworkBehaviour More...
|
|
virtual void | CopyStateToBackingFields () |
| Copies the state to the backing fields. This method is meant to be overridden in derived classes. More...
|
|
virtual void | Despawned (NetworkRunner runner, bool hasState) |
| Called before the network object is despawned More...
|
|
override void | FixedUpdateNetwork () |
| Fixed update callback for networked behaviours. More...
|
|
ArrayReader< T > | GetArrayReader< T > (string property) |
| Gets an ArrayReader for a network array of type T. More...
|
|
BehaviourReader< T > | GetBehaviourReader< T > (string property) |
| Gets a BehaviourReader for a network behaviour of type T. More...
|
|
ChangeDetector | GetChangeDetector (ChangeDetector.Source source, bool copyInitial=true) |
| Creates a ChangeDetector for this network behaviour. More...
|
|
DictionaryReader< K, V > | GetDictionaryReader< K, V > (string property) |
| Gets a DictionaryReader for a network dictionary with keys of type K and values of type V. More...
|
|
T? | GetInput< T > () |
|
bool | GetInput< T > (out T input) |
| Returns true if it a valid INetworkInput can be found for the current simulation tick (Typically this is used in FixedUpdateNetwork). More...
|
|
LinkListReader< T > | GetLinkListReader< T > (string property) |
| Gets a LinkListReader for a network linked list of type T. More...
|
|
int | GetLocalAuthorityMask () |
| Gets a bitmask of AuthorityMasks flags, representing the current local authority over this NetworkObject. More...
|
|
PropertyReader< T > | GetPropertyReader< T > (string property) |
| Gets a PropertyReader for a property of type T in this network behaviour. More...
|
|
ref T | ReinterpretState< T > (int offset=0) |
| Allows read and write access to the internal state buffer More...
|
|
void | ReplicateTo (PlayerRef player, bool replicate) |
| Controls if this network behaviours state is replicated to a player or not More...
|
|
void | ReplicateToAll (bool replicate) |
| Sets the default replicated state for this behaviour, this by default is true so calling ReplicateToAll(true) does nothing if ReplicateToAll(false) hasn't been called before
More...
|
|
void | ResetState () |
| Resets the state of the object to the original state More...
|
|
virtual void | Spawned () |
| Post spawn callback. More...
|
|
bool | TryGetSnapshotsBuffers (out NetworkBehaviourBuffer from, out NetworkBehaviourBuffer to, out float alpha) |
| Tries to get the snapshot buffers for this network behaviour. More...
|
|
virtual void | Render () |
| Post simulation frame rendering callback. Runs after all simulations have finished. Use in place of Unity's Update when Fusion is handling Physics. More...
|
|
T | AddBehaviour< T > () |
| Wrapper for Unity's GameObject.AddComponent() More...
|
|
T | GetBehaviour< T > () |
| Wrapper for Unity's GameObject.GetComponentInChildren() More...
|
|
bool | TryGetBehaviour< T > (out T behaviour) |
| Wrapper for Unity's GameObject.TryGetComponent() More...
|
|
int | GetElementHashCode (T element) |
| Calculate the hash code of an element. More...
|
|
int | GetElementWordCount () |
| Gets the word count of an element. More...
|
|
T | Read (byte *data, int index) |
| Reads an element from the specified index in the byte array. More...
|
|
ref T | ReadRef (byte *data, int index) |
| Reads a reference to an element from the specified index in the byte array. More...
|
|
void | Write (byte *data, int index, T element) |
| Writes an element to the specified index in the byte array. More...
|
|
int | GetElementHashCode (T element) |
| Calculate the hash code of an element. More...
|
|
int | GetElementWordCount () |
| Gets the word count of an element. More...
|
|
T | Read (byte *data, int index) |
| Reads an element from the specified index in the byte array. More...
|
|
ref T | ReadRef (byte *data, int index) |
| Reads a reference to an element from the specified index in the byte array. More...
|
|
void | Write (byte *data, int index, T element) |
| Writes an element to the specified index in the byte array. More...
|
|
|
static void | Render (NetworkTRSP behaviour, Transform transform, bool syncScale, bool syncParent, bool local, ref Tick initial) |
| Default Render handling for NetworkTRSP derived classes. More...
|
|
static void | ResolveAOIOverride (NetworkTRSP behaviour, Transform parent) |
| Recursively attempts to find nested parent NetworkObject, and if found assigns that NetworkObject as the AreaOfInterestOverride. More...
|
|
static void | SetParentTransform (NetworkTRSP behaviour, Transform transform, NetworkBehaviourId parentId) |
| Default handling for setting a NetworkTRSP's parent using a NetworkBehaviourId value. More...
|
|
static void | Teleport (NetworkTRSP behaviour, Transform transform, Vector3? position=null, Quaternion? rotation=null) |
| The default Teleport implementation for NetworkTRSP derived classes. More...
|
|
|
static ArrayReader< T > | GetArrayReader< T > (Type behaviourType, string property, IElementReaderWriter< T > readerWriter=null) |
| Gets an ArrayReader for a network array of type T in a network behaviour of a specific type. More...
|
|
static BehaviourReader< T > | GetBehaviourReader< T > (NetworkRunner runner, Type behaviourType, string property) |
| Gets a BehaviourReader for a network behaviour of type T. More...
|
|
static BehaviourReader< TProperty > | GetBehaviourReader< TBehaviour, TProperty > (NetworkRunner runner, string property) |
| Gets a BehaviourReader for a network behaviour with a specific property of type TProperty. More...
|
|
static DictionaryReader< K, V > | GetDictionaryReader< K, V > (Type behaviourType, string property, IElementReaderWriter< K > keyReaderWriter=null, IElementReaderWriter< V > valueReaderWriter=null) |
| Gets a DictionaryReader for a network dictionary with keys of type K and values of type V in a network behaviour of a specific type. More...
|
|
static LinkListReader< T > | GetLinkListReader< T > (Type behaviourType, string property, IElementReaderWriter< T > readerWriter=null) |
| Gets a LinkListReader for a network linked list of type T in a network behaviour of a specific type. More...
|
|
static PropertyReader< T > | GetPropertyReader< T > (Type behaviourType, string property) |
| Gets a PropertyReader for a property of type T in a network behaviour of a specific type. More...
|
|
static PropertyReader< TProperty > | GetPropertyReader< TBehaviour, TProperty > (string property) |
| Gets a PropertyReader for a property of type TProperty in a network behaviour of type TBehaviour. More...
|
|
static NetworkBehaviourUtils.DictionaryInitializer< K, V > | MakeInitializer< K, V > (Dictionary< K, V > dictionary) |
| This is a special method that is meant to be used only for [Networked] properties inline initialization. More...
|
|
static NetworkBehaviourUtils.ArrayInitializer< T > | MakeInitializer< T > (T[] array) |
| This is a special method that is meant to be used only for [Networked] properties inline initialization. More...
|
|
static T * | MakePtr< T > () |
| Creates a pointer to a value of type T. This method is meant to be used only for [Networked] properties inline initialization. More...
|
|
static T * | MakePtr< T > (T defaultValue) |
| Creates a pointer to a value of type T, initializing it with the provided default value. This method is meant to be used only for [Networked] properties inline initialization. More...
|
|
static ref T | MakeRef< T > () |
| Creates a reference to a value of type T. This method is meant to be used only for [Networked] properties inline initialization. More...
|
|
static ref T | MakeRef< T > (T defaultValue) |
| Creates a reference to a value of type T, initializing it with the provided default value. This method is meant to be used only for [Networked] properties inline initialization. More...
|
|
static int | NetworkDeserialize (NetworkRunner runner, byte *data, ref NetworkBehaviour result) |
| Deserializes a NetworkBehaviour from a byte array. More...
|
|
static int | NetworkSerialize (NetworkRunner runner, NetworkBehaviour obj, byte *data) |
| Serializes a NetworkBehaviour into a byte array. More...
|
|
static NetworkBehaviour | NetworkUnwrap (NetworkRunner runner, NetworkBehaviourId wrapper) |
| Converts a NetworkBehaviourId to a NetworkBehaviour. More...
|
|
static NetworkBehaviourId | NetworkWrap (NetworkBehaviour obj) |
| Converts a NetworkBehaviour to a NetworkBehaviourId. More...
|
|
static NetworkBehaviourId | NetworkWrap (NetworkRunner runner, NetworkBehaviour obj) |
| Converts a NetworkBehaviour to a NetworkBehaviourId. More...
|
|
static implicit | operator NetworkBehaviourId (NetworkBehaviour behaviour) |
| Converts NetworkBehaviour to NetworkBehaviourId More...
|
|
static void | DestroyBehaviour (Behaviour behaviour) |
| Wrapper for Unity's GameObject.Destroy() More...
|
|
int | offset |
| Gives access to the offset (in 32 bit words) and count (in 32 bit words) of this behaviour backing data More...
|
|
virtual bool | ReplicateTo (PlayerRef player) |
| Determines whether to replicate the network behaviour to the specified player. This method can be overridden in derived classes to implement custom replication logic. More...
|
|
Base class for spatial (Position/Rotation/Scale/Parent) synchronization component, such as NetworkTransform. Provides the base logic for render interpolation, parenting synchronization, and teleport, that can be used in components derived from this class.