diff --git a/.idea/.idea.HALLUCINATE/.idea/workspace.xml b/.idea/.idea.HALLUCINATE/.idea/workspace.xml
index d52babcd..b0fea62f 100644
--- a/.idea/.idea.HALLUCINATE/.idea/workspace.xml
+++ b/.idea/.idea.HALLUCINATE/.idea/workspace.xml
@@ -6,18 +6,24 @@
-
+
+
+
+
+
-
-
-
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+
@@ -70,6 +76,16 @@
}
}
+
+
+
+
+
+
+
+
+
+
@@ -126,6 +142,9 @@
+
+
+
diff --git a/Assets/Photon.meta b/Assets/Photon.meta
new file mode 100644
index 00000000..77f5e7ad
--- /dev/null
+++ b/Assets/Photon.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cb3038710ebdb584b92682fee3d58c63
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion.meta b/Assets/Photon/Fusion.meta
new file mode 100644
index 00000000..d8eee399
--- /dev/null
+++ b/Assets/Photon/Fusion.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: bafa2422cf58b4644a715c84eace4afb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies.meta b/Assets/Photon/Fusion/Assemblies.meta
new file mode 100644
index 00000000..8220c588
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9948d0a8df1aa5f48a3d08e3cb0730fb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Debug.meta b/Assets/Photon/Fusion/Assemblies/Debug.meta
new file mode 100644
index 00000000..0a3f953d
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Debug.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 418b228c754fd71489425cd7e0b1f4a8
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Common.dll.debug b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Common.dll.debug
new file mode 100644
index 00000000..dc0c80f8
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Common.dll.debug differ
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Common.dll.debug.meta b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Common.dll.debug.meta
new file mode 100644
index 00000000..1329df44
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Common.dll.debug.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 318382aa889ac534caef844842014a97
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Log.dll.debug b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Log.dll.debug
new file mode 100644
index 00000000..c948ff01
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Log.dll.debug differ
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Log.dll.debug.meta b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Log.dll.debug.meta
new file mode 100644
index 00000000..8bd5b536
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Log.dll.debug.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 07c5108e22d44a940a193b472beec2ce
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Realtime.dll.debug b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Realtime.dll.debug
new file mode 100644
index 00000000..69029644
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Realtime.dll.debug differ
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Realtime.dll.debug.meta b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Realtime.dll.debug.meta
new file mode 100644
index 00000000..698d427a
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Realtime.dll.debug.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 8fbdaf13e9028e2428aef5554b1e2f8d
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Runtime.dll.debug b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Runtime.dll.debug
new file mode 100644
index 00000000..1328e544
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Runtime.dll.debug differ
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Runtime.dll.debug.meta b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Runtime.dll.debug.meta
new file mode 100644
index 00000000..c67cfb2f
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Runtime.dll.debug.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 1de2cc5af22faff4cae32c122f06a2ef
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Sockets.dll.debug b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Sockets.dll.debug
new file mode 100644
index 00000000..622c04e6
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Sockets.dll.debug differ
diff --git a/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Sockets.dll.debug.meta b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Sockets.dll.debug.meta
new file mode 100644
index 00000000..450b6db0
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Debug/Fusion.Sockets.dll.debug.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 747050e10a802ed489a60d778ee07713
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Common.dll b/Assets/Photon/Fusion/Assemblies/Fusion.Common.dll
new file mode 100644
index 00000000..dc0c80f8
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Fusion.Common.dll differ
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Common.dll.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Common.dll.meta
new file mode 100644
index 00000000..e02e4f2e
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Common.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: a4d1b22b416816f4a830209a6058fe35
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Common.xml b/Assets/Photon/Fusion/Assemblies/Fusion.Common.xml
new file mode 100644
index 00000000..b4dabe89
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Common.xml
@@ -0,0 +1,3127 @@
+
+
+
+ Fusion.Common
+
+
+
+
+ Abstract Async Operation Handler
+
+ Built around the
+
+ Result Type of the Async Operation
+
+
+
+ Default Operation Timeout
+
+
+
+
+ Internal Task
+
+
+
+
+ Create a new Operation Handler
+
+ Optional External Cancellation Token
+ Optional Custom Operation Timeout
+ Optional Custom Timeout Message
+
+
+
+ Set the result of Async Operation
+
+ Result to be set on the Operation
+
+
+
+ Set the Async Operation as faulted using the Exception
+
+ Exception to be set on the Operation
+
+
+
+ Cancel the Async Operation via a
+
+
+
+
+ Cancel the Async Operation via a
+
+
+
+
+ Task Factory is used to create new Tasks and Schedule long running Tasks
+
+
+
+
+ Stores a Task Factory ready made to be used with Unity
+
+
+
+
+ Setup a new TaskFactory tailored to work with Unity
+
+
+
+
+ Starts a service task that will invoke a recurring action at specified intervals.
+
+ The action to be invoked at each interval.
+ The cancellation token used to stop the service.
+ The interval in milliseconds between each invocation of the action.
+ An optional custom name for the service.
+ A task representing the service.
+
+
+
+ Start a Service Task that will invoke a Recurring Action every each interval in millis
+
+ Action invoked every interval. It can return false to stop the service
+ CancellationToken used to stop the service
+ Interval between action invoke
+ Custom id name for the Service
+ Service Task
+
+
+
+ Run an Action asynchronously
+
+ Action to be invoked
+ CancellationToken used to stop the Action
+ Extra Task Creation options
+ Async Task based on the Action
+
+
+
+ Run a continuation Task after all other Tasks have completed
+
+ List of pending tasks to wait
+ Action to run after the Tasks
+ ellationToken used to stop the Action
+ Async Task based on the Action
+
+
+
+ Custom Task Delay method as Task.Delay is not supported by WebGL Builds
+
+ Delay in milliseconds to wait
+ Cancellation Token used to stop the Delay
+ Awaitable Task
+
+
+
+ Represents an atomic integer that provides thread-safe operations.
+
+
+
+
+ The underlying value of the atomic integer.
+
+
+
+
+ Initializes a new instance of the struct with the specified value.
+
+ The initial value of the atomic integer.
+
+
+
+ Gets the current value of the atomic integer.
+
+
+
+
+ Atomically increments the current value by one and returns the original value.
+
+ The original value before the increment.
+
+
+
+ Atomically increments the current value by one and returns the incremented value.
+
+ The incremented value.
+
+
+
+ Atomically decrements the current value by one and returns the decremented value.
+
+ The decremented value.
+
+
+
+ Atomically sets the value to the specified value and returns the original value.
+
+ The value to set.
+ The original value before the exchange.
+
+
+
+ Compares the current value with a specified value and, if they are equal, replaces the current value.
+
+ The value to set if the comparison succeeds.
+ The value to compare to the current value.
+ The original value before the comparison.
+
+
+
+ Utility class for binary data.
+
+
+
+
+ Converts a byte value to its hexadecimal string representation.
+
+ The byte value to convert.
+ A string representing the hexadecimal value of the byte.
+
+
+
+ Converts a buffer of bytes to a hexadecimal string representation.
+
+ A pointer to the buffer containing the bytes to convert.
+ The number of bytes in the buffer.
+ The number of columns to format the output. Default is 16.
+ The string to use as a row separator. Default is newline.
+ The string to use as a column separator. Default is a space.
+ A string representing the hexadecimal values of the bytes in the buffer.
+
+
+
+ Converts a buffer of 32-bit integers to a hexadecimal string representation.
+
+ A pointer to the buffer containing the 32-bit integers to convert.
+ The number of 32-bit integers in the buffer.
+ The number of columns to format the output. Default is 4.
+ The string to use as a row separator. Default is newline.
+ The string to use as a column separator. Default is a space.
+ A string representing the hexadecimal values of the 32-bit integers in the buffer.
+
+
+
+ Converts a buffer of 32-bit unsigned integers to a hexadecimal string representation.
+
+ A pointer to the buffer containing the 32-bit unsigned integers to convert.
+ The number of 32-bit unsigned integers in the buffer.
+ The number of columns to format the output. Default is 4.
+ The string to use as a row separator. Default is newline.
+ The string to use as a column separator. Default is a space.
+ A string representing the hexadecimal values of the 32-bit unsigned integers in the buffer.
+
+
+
+ Converts a buffer of 32-bit integers to a hexadecimal string representation.
+
+
+
+
+ Converts a buffer of 32-bit unsigned integers to a hexadecimal string representation.
+
+
+
+
+ Converts a hexadecimal string to a byte array.
+
+ The hexadecimal string to convert.
+ A pointer to the buffer where the bytes will be stored.
+ The maximum number of bytes to store in the buffer.
+ The number of characters processed from the input string.
+
+
+
+ Converts a hexadecimal string to an array of 32-bit integers.
+
+ The hexadecimal string to convert.
+ A pointer to the buffer where the 32-bit integers will be stored.
+ The maximum number of 32-bit integers to store in the buffer.
+ A tuple containing the number of characters processed from the input string and the number of 32-bit integers stored in the buffer.
+
+
+
+ Converts a byte array to its hexadecimal string representation.
+
+ The byte array to convert.
+ The number of columns to format the output. Default is 16.
+ A string representing the hexadecimal values of the bytes in the array.
+
+
+
+ Converts a byte array to its hexadecimal string representation.
+
+ The byte array to convert.
+ The number of columns to format the output. Default is 16.
+ A string representing the hexadecimal values of the bytes in the array.
+
+
+
+ Reads a value of type T from the given byte span.
+
+ The type of the value to read.
+ The span of bytes to read from.
+ The value of type T read from the span.
+
+
+
+ Reads a value of type T from the given int span.
+
+ The type of the value to read.
+ The span of ints to read from.
+ The value of type T read from the span.
+
+
+
+ Returns a managed pointer to a value of type T.
+
+
+
+
+ Returns a managed pointer to a value of type T.
+
+
+
+
+ Returns a pointer to a value of type T from the given byte span.
+
+ The type of the value to point to.
+ The span of bytes to get the pointer from.
+ A pointer to the value of type T.
+
+
+
+ Returns a pointer to a value of type T from the given int span.
+
+ The type of the value to point to.
+ The span of ints to get the pointer from.
+ A pointer to the value of type T.
+
+
+
+ Compress the byte array uisng GZip
+
+ Original byte array
+ Compressed byte array
+
+
+
+ Decompress the byte array using GZip
+
+ Compressed byte array
+ Decompressed byte array
+
+
+
+ Provides methods to compute CRC64 checksums.
+
+
+
+
+ Computes the CRC64 checksum for the given data.
+
+ A pointer to the data to compute the checksum for.
+ The length of the data.
+ The computed CRC64 checksum.
+
+
+
+ Computes the CRC64 checksum for the given data.
+
+ A pointer to the data to compute the checksum for.
+ The computed CRC64 checksum.
+
+
+
+ Computes the CRC64 checksum for the given data with an initial CRC value and offset.
+
+ The initial CRC value.
+ A pointer to the data to compute the checksum for.
+ The offset in the data to start computing the checksum from.
+ The length of the data.
+ The computed CRC64 checksum.
+
+
+
+ Provides a set of methods to profile the engine.
+
+
+
+
+ Callback for round trip time profiling.
+
+
+
+
+ Callback for resimulations profiling.
+
+
+
+
+ Callback for world snapshot size profiling.
+
+
+
+
+ Callback for input size profiling.
+
+
+
+
+ Callback for input queue profiling.
+
+
+
+
+ Callback for RPC in profiling.
+
+
+
+
+ Callback for RPC out profiling.
+
+
+
+
+ Callback for state receive delta profiling.
+
+
+
+
+ Callback for state receive delta deviation profiling.
+
+
+
+
+ Callback for interpolation speed profiling.
+
+
+
+
+ Callback for interpolation offset profiling.
+
+
+
+
+ Callback for interpolation offset deviation profiling.
+
+
+
+
+ Callback for input receive delta profiling.
+
+
+
+
+ Callback for simulation speed profiling.
+
+
+
+
+ Callback for input receive delta deviation profiling.
+
+
+
+
+ Callback for simulation offset profiling.
+
+
+
+
+ Callback for simulation offset deviation profiling.
+
+
+
+
+ Callback for simulation offset deviation profiling.
+
+
+
+
+ Callback for simulation offset deviation profiling.
+
+
+
+
+ Begins a profiling sample with the specified name.
+
+ The name of the profiling sample.
+
+
+
+ Ends the current profiling sample.
+
+
+
+
+ Invokes the round trip time callback with the specified value.
+
+ The round trip time value.
+
+
+
+ Invokes the resimulations callback with the specified value.
+
+ The resimulations value.
+
+
+
+ Invokes the world snapshot size callback with the specified value.
+
+ The world snapshot size value.
+
+
+
+ Invokes the input size callback with the specified value.
+
+ The input size value.
+
+
+
+ Invokes the input queue callback with the specified value.
+
+ The input queue value.
+
+
+
+ Invokes the RPC in callback with the specified value.
+
+ The RPC in value.
+
+
+
+ Invokes the RPC out callback with the specified value.
+
+ The RPC out value.
+
+
+
+ Invokes the state receive delta callback with the specified value.
+
+ The state receive delta value.
+
+
+
+ Invokes the state receive delta deviation callback with the specified value.
+
+ The state receive delta deviation value.
+
+
+
+ Invokes the interpolation speed callback with the specified value.
+
+ The interpolation speed value.
+
+
+
+ Invokes the interpolation offset callback with the specified value.
+
+ The interpolation offset value.
+
+
+
+ Invokes the interpolation offset deviation callback with the specified value.
+
+ The interpolation offset deviation value.
+
+
+
+ Invokes the input receive delta callback with the specified value.
+
+ The input receive delta value.
+
+
+
+ Invokes the input receive delta deviation callback with the specified value.
+
+ The input receive delta deviation value.
+
+
+
+ Invokes the simulation speed callback with the specified value.
+
+ The simulation speed value.
+
+
+
+ Invokes the simulation offset callback with the specified value.
+
+ The simulation offset value.
+
+
+
+ Invokes the simulation offset deviation callback with the specified value.
+
+ The simulation offset deviation value.
+
+
+
+ Invokes the simulation offset deviation callback with the specified value.
+
+
+
+
+ Invokes the simulation offset deviation callback with the specified value.
+
+
+
+
+ Enum representing internal simulation types. To be used with EngineProfiler callbacks.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Interface for a Communicator
+
+
+
+
+ Represents the current ID of the communicator.
+
+
+
+
+ Sends a package data using the communication system
+
+ Event Code used to send the Package
+ Target Actor of the Package
+ Flag if this Package should be sent reliably
+ Data Buffer
+ Buffer Length
+
+
+
+ Retrieve a Data Package
+
+ Data Package Sender
+ Buffer to be filled with the Data
+ Buffer length
+ Total number of bytes written to buffer
+
+
+
+ Check if there are data package to be retrieved
+
+ True if the internal buffer has pendind data
+
+
+
+ Push a new Package into the communicator queues
+
+ Data Sender Actor
+ Event Code of the Package
+ Package
+
+
+
+ Register a callback for a specific Message Type
+
+ Message Type
+ Callback to be invoked when a Message of type T is received
+
+
+
+ Send a Protocol Message using the communicator system
+
+ Target Actor of the Protocol Message
+ Protocol Message to be sent
+
+
+
+ Step the Communicator internals
+
+
+
+
+ Represents a Protocol Message
+
+ Used to tag the Messages in .
+
+
+
+
+ Hold Exception Key used to attach extra data to exception within the SDK
+
+
+
+
+ Used to associate a unique ID to an Exception
+ It must contain a long value
+
+
+
+
+ Editor attribute for selecting the minimum and maximum length constraints for an array field.
+
+
+
+
+ Initializes a new instance of the class with the specified length.
+
+ The length of the array.
+
+
+
+ Initializes a new instance of the class with the specified minimum and maximum lengths.
+
+ The minimum length of the array.
+ The maximum length of the array.
+
+
+
+ Gets the minimum length of the array.
+
+
+
+
+ Gets the maximum length of the array.
+
+
+
+
+ Specifies that the attributed field represents the name of an assembly.
+
+
+
+
+ Gets or sets a value indicating whether the assembly requires unsafe code.
+
+
+
+
+ Specifies that the field represents binary data.
+
+
+
+
+
+
+
+ Represents an attribute that specifies the number of bits in a bit set.
+
+
+
+
+ Initializes a new instance of the class with the specified number of bits.
+
+ The number of bits in the bit set.
+
+
+
+ Gets the number of bits in the bit set.
+
+
+
+
+ A base class for property attributes that decorate other property attributes.
+
+
+
+
+ The default order of the attribute.
+
+
+
+
+ Initializes a new instance with the default order.
+
+
+
+
+ Initializes a new instance with the specified order.
+
+
+
+
+ Specifies that the string field represents a path to directory.
+
+
+
+
+ Casts an enum or int value in the inspector to specific enum type for rendering of its popup list.
+ Supplying a method name rather than a type allows a property with the type Type to be used to dynamically get the enum type.
+
+
+
+
+ Initializes a new instance of the class with the specified enum type.
+
+ The type of the enum.
+
+
+
+ Initializes a new instance of the class with the specified enum type member name.
+
+ The name of the member that returns the enum type.
+
+
+
+ Gets the type of the enum.
+
+
+
+
+ Gets the name of the member that returns the enum type.
+
+
+
+
+ Specifies the display name for a field.
+
+
+
+
+ Field name to display.
+
+
+
+
+ Initializes a new instance of the class with the specified name.
+
+ The display name.
+
+
+
+ Comparison method for evaluating condition member value against compareToValues.
+
+
+
+
+ if condition member value equals compareToValue.
+
+
+
+
+ if condition member value is not equal to compareToValue.
+
+
+
+
+ if condition member value is less than compareToValue.
+
+
+
+
+ if condition member value is less than or equal to compareToValue.
+
+
+
+
+ if condition member value is greater than or equal to compareToValue.
+
+
+
+
+ if condition member value is greater than compareToValue.
+
+
+
+
+ Returns if the condition member evaluates to anything other than zero.
+ In the case of object references, this means for any non- value.
+
+
+
+
+ Returns if the condition member evaluates to zero.
+ In the case of object references, this means for any value.
+
+
+
+
+ Returns if the bitwise AND of the condition member and compareToValue is not zero.
+
+
+
+
+ Editor attribute for selective editor rendering. Condition member can be a property, field or method (with a
+ return value).
+ Value of condition method is converted to a long or a double. = 0, = 0, = 1, Unity Object = InstanceId
+
+
+
+
+ The double value to compare against.
+
+
+
+
+ Is the value to compare against a double?
+
+
+
+
+ The long value to compare against.
+
+
+
+
+ The comparison operator to use.
+
+
+
+
+ Condition member to evaluate.
+
+
+
+
+ If , an error will be thrown if the condition member is not found.
+
+
+
+
+ Initializes a new instance with a double value to compare against.
+
+
+
+
+
+
+
+ Initializes a new instance with a long value to compare against.
+
+
+
+
+
+
+
+ Initializes a new instance with a boolean value to compare against.
+
+
+
+
+
+
+
+ A base class for property attributes that are used to draw properties in the inspector.
+
+
+
+
+
+
+
+ Mode for the DrawIf attribute. If the condition is not met, should the field be hidden or just read-only?
+
+
+
+
+ Field is read-only if the condition is not met.
+
+
+
+
+ Field is hidden if the condition is not met.
+
+
+
+
+ Editor attribute for selectively drawing/hiding fields. Condition member can be a property, field or method
+ (with a return value).
+ Value of condition method is converted to a long. = 0, = 0, = 1, Unity Object = InstanceId
+
+
+
+
+ Instructs the attribute completely hide the field if not draw, rather than the default of just disabling it.
+
+
+
+
+ Should the field be hidden if the condition is not met?
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Initializes a new instance that will hide the field if the condition member is not equal to zero.
+
+
+
+
+
+ Specifies that a field should be drawn inline in the inspector.
+
+
+
+
+ Specifies that a method should be displayed as a button in the Unity editor.
+
+
+
+
+ The label text to display on the button.
+
+
+
+
+ The visibility of the button in the Unity editor.
+
+
+
+
+ The priority of the button. Buttons with higher priority are displayed first.
+
+
+
+
+ Determines whether multiple targets are supported.
+
+
+
+
+ Determines whether the object should be marked as dirty after clicking the button.
+
+
+
+
+ Initializes a new instance of the class with the specified label, visibility, priority, and dirty object flag.
+
+ The label text to display on the button.
+ The visibility of the button in the Unity editor.
+ The priority of the button. Buttons with higher priority are displayed first.
+ Determines whether the object should be marked as dirty after clicking the button.
+
+
+
+ Initializes a new instance of the class with the specified visibility, priority, and dirty object flag.
+
+ The visibility of the button in the Unity editor.
+ The priority of the button. Buttons with higher priority are displayed first.
+ Determines whether the object should be marked as dirty after clicking the button.
+
+
+
+ Specifies the visibility options for an editor button.
+
+
+
+
+ The button is only visible in Play Mode.
+
+
+
+
+ The button is only visible in Edit Mode.
+
+
+
+
+ The button is always visible.
+
+
+
+
+ Editor attribute for adding notices to fields if the condition member evaluates as .
+ Condition member can be a property, field or method (with a return value).
+
+
+
+
+ The default error text, when an error is shown.
+
+
+
+
+ Should the error be shown as a box?
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Editor attribute that shows an enum as an expandable list of options in the inspector.
+
+
+
+
+ Always expand the enum in the inspector (no foldout)
+
+
+
+
+ Show the enum flags as buttons in the inspector.
+
+
+
+
+ Show inline help for enum values in the inspector.
+
+
+
+
+ Editor attribute to add a button that invokes a custom method in the inspector.
+
+
+
+
+ Button label.
+
+
+
+
+ Is it allowed to select multiple targets for the button?
+
+
+
+
+ The method to invoke when the button is clicked.
+
+
+
+
+ Initializes a new instance class with the specified label and target method.
+
+ The label of the button
+ The method to invoke when the button is clicked
+
+
+
+ Attribute used to hide the label of an array element in the inspector.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ If applied to a field, checks if there is a help text for the field or the field's type and shows it in the inspector.
+
+
+
+
+ Gets or sets a value indicating whether to show help for the type.
+
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Marks the last version that supports the attributed type/method/property/field.
+
+
+
+
+ Initializes a new instance of the class with the specified version.
+
+ The last supported version.
+
+
+
+ Specifies that an int field should be drawn as a layer field in the inspector.
+
+
+
+
+ Specifies that the integer array field should be drawn as a layer matrix in the inspector.
+
+
+
+
+
+
+
+ Specifies that the string field should be drawn as a text field with a maximum byte count for given encoding.
+
+
+
+
+ Initializes a new instance of the class with the specified byte count and encoding.
+
+
+
+
+
+
+ Maximum byte count for the string.
+
+
+
+
+ The encoding of the string.
+
+
+
+
+ Represents an attribute that specifies a range of values for a field or property.
+
+
+
+
+ Gets the maximum value of the range.
+
+
+
+
+ Gets the minimum value of the range.
+
+
+
+
+ Gets or sets a value indicating whether the minimum value should be clamped.
+
+
+
+
+ Gets or sets a value indicating whether the maximum value should be clamped.
+
+
+
+
+ Gets or sets a value indicating whether a slider should be used for the range.
+
+
+
+
+ Initializes a new instance of the class with the specified minimum and maximum values.
+
+ The minimum value of the range.
+ The maximum value of the range.
+
+
+
+ Possible values.
+
+
+
+
+ Attribute used to mark a field as read-only.
+
+
+
+
+ Should the field be read-only in play mode?
+
+
+
+
+ Should the field be read-only in edit mode?
+
+
+
+
+
+
+
+ Specifies that a string field represents a scene path.
+
+
+
+
+ Defines the appearance of the script header in the Unity inspector.
+
+
+
+
+ Hide the script header in the Unity inspector.
+
+
+
+
+
+
+
+
+ Color of the inspector header for this component type. None indicates no header graphic should be used.
+
+
+
+
+
+
+
+
+
+ Style of the script header in the Unity inspector.
+
+
+
+
+ Use the default Unity header style.
+
+
+
+
+ Use the Photon header style.
+
+
+
+
+ Icon to be rendered on the component graphic header in the Unity inspector.
+
+
+
+
+ Color of the component graphic header in the Unity inspector. None indicates no header graphic should be used.
+
+
+
+
+ Specifies that either a string field represents a type name or sets additional options for field.
+
+
+
+
+ The base type of the picked type.
+
+
+
+
+ Should the type be stored as a full assembly qualified name.
+
+
+
+
+ Should a warning be shown if the field does not have a PreserveAttribute.
+
+
+
+
+ Attribute used to show a type picker for a field with [SerializeReference].
+
+
+
+
+ Should the types be grouped by namespace?
+
+
+
+
+ Should the full name be shown?
+
+
+
+
+ Initializes a new instance of the class.
+
+ The types to be picked.
+
+
+
+ Gets the types to be picked.
+
+
+
+
+ Similar to UnityEngine.SpaceAttribute, but adds space after the property.
+
+
+
+
+ The default order for this attribute.
+
+
+
+
+
+
+
+ Height of the space.
+
+
+
+
+ Specifies that the bool field should be drawn as the toggle on the left side of the label.
+
+
+
+
+ Unit Type for a certain field.
+ This helps to identify the unit that a certain value represents, like Seconds or Percentage
+
+
+
+
+
+
+ ticks
+
+
+ seconds - secs
+
+
+ millisecs - ms
+
+
+ kilobytes - kB
+
+
+ megabytes - MB
+
+
+ normalized - norm
+
+
+ multiplier - mult
+
+
+ %
+
+
+ normalized % - n%
+
+
+ degrees - \u00B0
+
+
+ per sec - /sec
+
+
+ \u00B0 / sec - \u00B0/sec
+
+
+ radians - rad
+
+
+ radian / sec - rad/s
+
+
+ ticks / sec - tck/s
+
+
+ units - units
+
+
+ bytes - bytes
+
+
+ count - count
+
+
+ packets - packets
+
+
+ frames - frames
+
+
+ fps - fps
+
+
+ sqrMagnitude - sqrMag
+
+
+
+ Unit Attribute class.
+ Used to mark a field with the respective
+
+
+
+
+ Selected Unit for the field.
+
+
+
+
+ Initializes a new instance of the class with the specified unit.
+
+
+
+
+
+ Specifies that the string field represents a key for Unity Addressables.
+
+
+
+
+ Specifies that the string field represents a GUID of an asset.
+
+
+
+
+ A replacement for UnityEngine.PropertyAttribute.
+
+
+
+
+ Specifies that the string field represents a path to a Unity resource.
+
+
+
+
+ Initializes a new instance of the class with the specified resource type.
+
+
+
+
+
+ The type of the resource.
+
+
+
+
+ Editor attribute for adding notices to fields if the condition member evaluates as .
+ Condition member can be a property, field or method (with a return value).
+
+
+
+
+ The default warning text, when a warning is shown.
+
+
+
+
+ Should the warning be shown as a box?
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Initializes a new instance that will hide the field if the condition member is not equal to zero.
+
+
+
+
+
+
+ Base class for .
+
+
+
+
+ The internal mask value.
+
+
+
+
+ Constructor for .
+
+
+
+
+ Constructor for .
+
+
+
+
+ Constructor for .
+
+
+
+
+ Implicitly convert to its long mask value.
+
+
+
+
+ Associates and displays a 64 bit mask which represents the field members of a struct. Makes it possible to treat a Struct like an Flags Enum.
+ NOTE: A attribute is required for proper rendering in the Inspector.
+
+
+
+
+ Constructor for .
+
+
+
+
+ Constructor for .
+
+
+
+
+ Constructor for .
+
+
+
+
+ Constructor for .
+
+
+
+
+ Mask256 is a 256-bit mask that can be used to store 256 boolean values.
+
+
+
+
+ Returns selected 64-bit value from the mask.
+
+
+
+
+
+ Sets all bits to 0.
+
+
+
+
+ Sets a specific bit in the mask.
+
+
+
+
+ Returns a specific bit from the mask.
+
+
+
+
+ Creates a new mask with specified initial values.
+
+
+
+
+ Equivalent to mask[0]
+
+
+
+
+ Converts a long value to a mask.
+
+
+
+
+ Performs a logical-AND operation.
+
+
+
+
+ Performs a logical-OR operation.
+
+
+
+
+ Performs a logical-NOT operation.
+
+
+
+
+ Returns if the masks are equal.
+
+
+
+
+ Calculates the hash code of the mask.
+
+
+
+
+ Returns if the masks are equal.
+
+
+
+
+ Returns if the mask is empty.
+
+
+
+
+
+ Converts the mask to a string in the form of "a:b:c:d".
+
+
+
+
+ A System.Type wrapper that can be serialized.
+
+
+
+
+ Type's assembly qualified name.
+
+
+
+
+ Is the type valid.
+
+
+
+
+ Create a new instance and stores full . To use shorter form, use .
+
+ Type to store. Can be .
+
+
+
+ Create a new instance and stores as .
+
+ Type name.
+
+
+
+ Retrieve the type. The value is obtained using and cached in a static
+
+
+
+
+ Converts and returns a short form, without version, culture etc.
+
+
+
+
+ Implicitly convert a to a .
+
+
+
+
+ Implicitly convert a to a .
+
+
+
+
+ Returns if the is the same.
+
+
+
+
+ Returns if is and the is the same.
+
+
+
+
+ Returns the hash code of the .
+
+
+
+
+ Converts the to a shorter form, without version, culture etc.
+
+
+
+
+ A generic version of that can be used to store types that inherit from a specific base type.
+
+ The base type of the type stored
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A base class for ScriptableObjects that are meant to be globally accessible, at edit-time and runtime. The way such objects
+ are loaded is driven by usages of attributes.
+
+
+
+
+
+
+
+ Is this instance a global instance.
+
+
+
+
+ Invoked when the instance is loaded as global.
+
+
+
+
+ Invoked when the instance is unloaded as global.
+
+
+
+
+
+ If the current instance is global, unsets and calls
+
+
+
+
+ A singleton instance-like property. Loads or returns the current global instance. Derived classes can package it in a property
+ with a different name. Throws if loading an instance failed.
+
+
+
+
+
+ Returns true if a global instance is loaded. Compared to , it does not attempt to load an instance.
+
+
+
+
+ Loads or returns the current global instance. Returns if loading an instance failed.
+
+
+
+
+
+
+ Unloads the global instance if it is loaded.
+
+ if an instance was unloaded
+
+
+
+ Provides additional information for a global scriptable object.
+
+
+
+
+ Creates a new instance.
+
+ The default path for the asset.
+
+
+
+ The default path for the asset.
+
+
+
+
+ The default contents for the asset, if it is a TextAsset.
+
+
+
+
+ Name of the method that is used to generate the default contents for the asset.
+
+
+
+
+ Base class for all attributes that can be used to load .
+ Attributes need to be registered at the assembly level. For instance, this snippet is used to register a default loader,
+ that attempts to load from Resources based on :
+
+ [assembly: Fusion.FusionGlobalScriptableObjectResource(typeof(Fusion.FusionGlobalScriptableObject), Order = 2000, AllowFallback = true)]
+
+
+
+
+ Type or the base type of that this loader supports.
+
+
+
+ Type or the base type of that this loader supports.
+
+
+
+
+ Order in which this loader will be executed. Lower values are executed first.
+
+
+
+
+ Can this loader be used in edit mode.
+
+
+
+
+ Does this loader allow fallback to the next loader?
+
+
+
+
+ Attempt to load the object of the specified type. Return if the object cannot be loaded.
+
+ The requested type
+
+
+
+ A delegate that can be used to unload a .
+
+
+
+
+ The result of . Contains the loaded object and an optional
+ unloader delegate.
+
+
+
+
+ Object instance.
+
+
+
+
+ An optional delegate that is used to unload .
+
+
+
+ Object instance.
+ An optional delegate that is used to unload .
+
+
+
+ Implicitly converts a to a .
+
+
+
+
+ Base class for all Fusion MonoBehaviours.
+
+
+
+
+ Base class for all Fusion scriptable objects.
+
+
+
+
+ Collection of simple JSON Utility methods
+
+
+
+
+ Removes from a JSON serialized by Unity Serializer the "referenes" field.
+ This aims to reduce the JSON size when sending accross the network
+
+ JSON output of "JsonUtility.ToJson" call
+ Same JSON but without the "referenes" object
+
+
+
+ Math utility methods.
+
+
+
+ Uses fieldoffset to allow quick setting of the sign bit of floats.
+
+
+
+ Primary Compression Method. Converts a quaternion into a ulong buffer. Depending on size most of the top bits will be 0.
+
+ The quaternion to be compressed
+ A ulong buffer of the compressed quat.
+
+
+
+ Primary Decompression Method. Decompress the 3 channels and missing channel ID from the serialized ULong buffer.
+
+ The ulong that represents the compressed quaternion.
+ The restored Quaternion.
+
+
+
+ Represents a structure that allows quick setting of the sign bit of floats using field offsets.
+
+
+
+
+ The mask used to clear the sign bit of a float.
+
+
+
+
+ The unsigned integer representation of the float.
+
+
+
+
+ The single-precision floating-point number.
+
+
+
+
+ Returns the size of the specified unmanaged type in bits.
+
+ The unmanaged type.
+ The size of the type in bits.
+
+
+
+ Calculates the number of bytes required to store the specified number of bits.
+
+ The number of bits.
+ The number of bytes required.
+
+
+
+ Calculates the number of integers required to store the specified number of bits.
+
+ The number of bits.
+ The number of integers required.
+
+
+
+ Calculates the number of bytes required to store the specified number of bits.
+
+ The number of bits.
+ The number of bytes required.
+
+
+
+ Converts a byte array to a string representation of its bits.
+
+ Pointer to the byte array.
+ The number of bytes to convert.
+ A string representation of the bits.
+
+
+
+ Determines the number of bits required to represent the specified integer.
+
+ The integer to evaluate.
+ The number of bits required to represent the integer.
+
+
+
+ Rounds a double value down to the nearest integer.
+
+ The double value to round down.
+ The largest integer less than or equal to the specified value.
+
+
+
+ Rounds a double value up to the nearest integer.
+
+ The double value to round up.
+ The smallest integer greater than or equal to the specified value.
+
+
+
+ Counts the number of bits set to 1 in a uint value, minus one.
+
+ The uint value to count bits in.
+ The number of bits set to 1, minus one.
+
+
+
+ Determines the number of bits required to represent a uint value.
+
+ The uint value to evaluate.
+ The number of bits required to represent the value.
+
+
+
+ Calculates the next power of two greater than or equal to a given uint value.
+
+ The uint value to evaluate.
+ The next power of two greater than or equal to the value.
+
+
+
+ Counts the number of bits set to 1 in a ulong value.
+
+ The ulong value to count bits in.
+ The number of bits set to 1.
+
+
+
+ Converts milliseconds to seconds.
+
+ The time in milliseconds.
+ The time in seconds.
+
+
+
+ Converts seconds to milliseconds.
+
+ The time in seconds.
+ The time in milliseconds.
+
+
+
+ Converts seconds to microseconds.
+
+ The time in seconds.
+ The time in microseconds.
+
+
+
+ Converts microseconds to seconds.
+
+ The time in microseconds.
+ The time in seconds.
+
+
+
+ Converts milliseconds to microseconds.
+
+ The time in milliseconds.
+ The time in microseconds.
+
+
+
+ Performs cosine interpolation between two values.
+
+ The start value.
+ The end value.
+ The interpolation factor, typically between 0 and 1.
+ The interpolated value.
+
+
+
+ Clamps an integer value to the range [0, 255] and returns it as a byte.
+
+ The value to clamp.
+ The clamped value as a byte.
+
+
+
+ Encodes an integer using ZigZag encoding.
+
+ The integer to encode.
+ The ZigZag encoded integer.
+
+
+
+ Decodes a ZigZag encoded integer.
+
+ The ZigZag encoded integer to decode.
+ The decoded integer.
+
+
+
+ Encodes a long integer using ZigZag encoding.
+
+ The long integer to encode.
+ The ZigZag encoded long integer.
+
+
+
+ Decodes a ZigZag encoded long integer.
+
+ The ZigZag encoded long integer to decode.
+ The decoded long integer.
+
+
+
+ Clamps an integer value to the specified range.
+
+ The value to clamp.
+ The minimum value of the range.
+ The maximum value of the range.
+ The clamped value.
+
+
+
+ Clamps an unsigned integer value to the specified range.
+
+ The value to clamp.
+ The minimum value of the range.
+ The maximum value of the range.
+ The clamped value.
+
+
+
+ Clamps a double value to the specified range.
+
+ The value to clamp.
+ The minimum value of the range.
+ The maximum value of the range.
+ The clamped value.
+
+
+
+ Clamps a float value to the specified range.
+
+ The value to clamp.
+ The minimum value of the range.
+ The maximum value of the range.
+ The clamped value.
+
+
+
+ Clamps a double value to the range [0, 1].
+
+ The value to clamp.
+ The clamped value.
+
+
+
+ Clamps a float value to the range [0, 1].
+
+ The value to clamp.
+ The clamped value.
+
+
+
+ Linearly interpolates between two float values.
+
+ The start value.
+ The end value.
+ The interpolation factor, typically between 0 and 1.
+ The interpolated value.
+
+
+
+ Linearly interpolates between two double values.
+
+ The start value.
+ The end value.
+ The interpolation factor, typically between 0 and 1.
+ The interpolated value.
+
+
+
+ Returns the minimum of two unsigned integer values.
+
+ The first value.
+ The second value.
+ The minimum value.
+
+
+
+ Finds the index of the most significant set bit (1-bit) in a 32-bit integer.
+
+ The 32-bit integer to scan.
+ The index of the most significant set bit.
+
+
+
+ Finds the index of the most significant set bit (1-bit) in a 32-bit unsigned integer.
+
+ The 32-bit unsigned integer to scan.
+ The index of the most significant set bit.
+
+
+
+ Finds the index of the most significant set bit (1-bit) in a 64-bit integer.
+
+ The 64-bit integer to scan.
+ The index of the most significant set bit.
+
+
+
+ Finds the index of the most significant set bit (1-bit) in a 64-bit unsigned integer.
+
+ The 64-bit unsigned integer to scan.
+ The index of the most significant set bit.
+
+
+
+ Native Memory Allocator
+
+
+
+
+ The alignment size in bytes.
+
+
+
+
+ The size of the cache line in bytes.
+
+
+
+
+ Moves a block of memory from the source to the destination.
+
+ The destination pointer.
+ The source pointer.
+ The number of bytes to move.
+
+
+
+ Copies a block of memory from the source to the destination.
+
+ The destination pointer.
+ The source pointer.
+ The number of bytes to copy.
+
+
+
+ Clears a block of memory by setting it to zero.
+
+ The pointer to the memory block.
+ The number of bytes to clear.
+
+
+
+ Clears a block of memory by setting it to zero.
+
+
+
+
+ Compares two blocks of memory.
+
+ The first memory block pointer.
+ The second memory block pointer.
+ The number of bytes to compare.
+ An integer that indicates the relative order of the memory blocks being compared.
+
+
+
+ Allocates a block of memory.
+
+ The number of bytes to allocate.
+ A pointer to the allocated memory block.
+ Thrown when the size is less than or equal to zero or exceeds the maximum allowed size.
+
+
+
+ Frees a block of memory.
+
+ The pointer to the memory block to free.
+
+
+
+ Gets the size of the specified type.
+
+ The type to get the size of.
+ The size of the specified type in bytes.
+
+
+
+ Gets the offset of the specified field.
+
+ The field information.
+ The offset of the specified field in bytes.
+
+
+
+ Frees a block of memory.
+
+ The pointer to the memory block to free.
+
+
+
+ Frees a block of memory.
+
+ The pointer to the memory block to free.
+
+
+
+ Frees a block of memory.
+
+ The pointer to the memory block to free.
+
+
+
+ Allocates and clears a block of memory.
+
+ The number of bytes to allocate and clear.
+ A pointer to the allocated and cleared memory block.
+
+
+
+ Allocates and clears a block of memory for a specified type.
+
+ The type of the memory block to allocate and clear.
+ A pointer to the allocated and cleared memory block.
+
+
+
+ Allocates a block of memory for a specified type.
+
+ The type of the memory block to allocate.
+ A pointer to the allocated memory block.
+
+
+
+ Allocates and clears an array of memory blocks.
+
+ The size of each element in the array.
+ The number of elements in the array.
+ A pointer to the allocated and cleared array of memory blocks.
+
+
+
+ Allocates and clears an array of memory blocks for a specified type.
+
+ The type of the elements in the array.
+ The number of elements in the array.
+ A pointer to the allocated and cleared array of memory blocks.
+
+
+
+ Allocates and clears an array of memory blocks for a specified type, ensuring a minimum length of 1.
+
+ The type of the elements in the array.
+ The number of elements in the array.
+ A pointer to the allocated and cleared array of memory blocks.
+
+
+
+ Allocates and clears an array of pointers for a specified type.
+
+ The type of the elements in the array.
+ The number of elements in the array.
+ A pointer to the allocated and cleared array of pointers.
+
+
+
+ Allocates and clears an array of pointers for a specified type, ensuring a minimum length of 1.
+
+ The type of the elements in the array.
+ The number of elements in the array.
+ A pointer to the allocated and cleared array of pointers.
+
+
+
+ Copies a range of elements from one array to another.
+
+ The source array pointer.
+ The zero-based index in the source array at which copying begins.
+ The destination array pointer.
+ The zero-based index in the destination array at which storing begins.
+ The number of elements to copy.
+ The size of each element in bytes.
+
+
+
+ Clears a range of elements in an array by setting them to zero.
+
+ The type of the elements in the array.
+ The pointer to the array.
+ The number of elements to clear.
+
+
+
+ Compares two arrays for equality.
+
+ The type of the elements in the arrays.
+ The pointer to the first array.
+ The pointer to the second array.
+ The number of elements to compare.
+ An integer that indicates the relative order of the arrays being compared.
+
+
+
+ Doubles the size of an array by expanding it to twice its current length.
+
+ The type of the elements in the array.
+ The pointer to the array to double.
+ The current length of the array.
+ A pointer to the new array with doubled size.
+
+
+
+ Expands an array to a new specified length.
+
+ The type of the elements in the array.
+ The pointer to the array to expand.
+ The current length of the array.
+ The new length of the array.
+ A pointer to the new expanded array.
+
+
+
+ Doubles the size of an array of pointers by expanding it to twice its current length.
+
+ The type of the elements in the array.
+ The pointer to the array of pointers to double.
+ The current length of the array.
+ A pointer to the new array of pointers with doubled size.
+
+
+
+ Expands an array of pointers to a new specified length.
+
+ The type of the elements in the array.
+ The pointer to the array of pointers to expand.
+ The current length of the array.
+ The new length of the array.
+ A pointer to the new expanded array of pointers.
+
+
+
+ Expands a buffer to a new specified size.
+
+ The pointer to the buffer to expand.
+ The current size of the buffer.
+ The new size of the buffer.
+ A pointer to the new expanded buffer.
+
+
+
+ Copies memory quickly for specific sizes.
+
+ The destination pointer.
+ The source pointer.
+ The number of bytes to copy.
+
+
+
+ Copies elements from a managed array to an unmanaged memory location.
+
+ The type of the elements in the array.
+ The destination pointer.
+ The source array.
+ The number of bytes copied.
+
+
+
+ Copies elements from an unmanaged memory location to a managed array.
+
+ The type of the elements in the array.
+ The destination array.
+ The source pointer.
+ The number of bytes copied.
+
+
+
+ Gets the byte count of a UTF-8 encoded string with a length prefix.
+
+ The string to encode.
+ The byte count of the encoded string with the length prefix.
+
+
+
+ Writes a length-prefixed UTF-8 encoded string to a memory location.
+
+ The destination pointer.
+ The string to encode and write.
+ The number of bytes written.
+
+
+
+ Reads a length-prefixed UTF-8 encoded string from a memory location.
+
+ The source pointer.
+ The resulting string.
+ The number of bytes read.
+
+
+
+ Checks if a pointer is aligned to a specified alignment.
+
+ The pointer to check.
+ The alignment to check against.
+ True if the pointer is aligned, otherwise false.
+
+
+
+ Aligns a pointer to a specified alignment.
+
+ The pointer to align.
+ The alignment to apply.
+ The aligned pointer.
+
+
+
+ Rounds a stride to the maximum alignment.
+
+ The stride to round.
+ The rounded stride.
+
+
+
+ Calculates the word count for a given stride and word size.
+
+ The stride to calculate.
+ The size of each word.
+ The word count.
+
+
+
+ Checks if a stride is aligned to a specified alignment.
+
+ The stride to check.
+ The alignment to check against.
+ True if the stride is aligned, otherwise false.
+
+
+
+ Rounds a stride to a specified alignment.
+
+ The stride to round.
+ The alignment to apply.
+ The rounded stride.
+ Thrown when the alignment is invalid.
+
+
+
+ Rounds a stride to a specified alignment.
+
+ The stride to round.
+ The alignment to apply.
+ The rounded stride.
+ Thrown when the alignment is invalid.
+
+
+
+ Returns an empty instance of the specified unmanaged type.
+
+ The type of the instance to return.
+ An empty instance of the specified type.
+
+
+
+ Rounds the given number of bits up to the nearest multiple of 64.
+
+ The number of bits to round up.
+ The rounded number of bits.
+
+
+
+ Rounds the given number of bits up to the nearest multiple of 32.
+
+ The number of bits to round up.
+ The rounded number of bits.
+
+
+
+ Gets the alignment of the specified unmanaged type.
+
+ The type to get the alignment of.
+ The alignment of the specified type.
+
+
+
+ Gets the alignment of the specified stride.
+
+ The stride to get the alignment of.
+ The alignment of the specified stride.
+
+
+
+ Gets the maximum alignment of two given strides.
+
+ The first stride.
+ The second stride.
+ The maximum alignment of the two strides.
+
+
+
+ Gets the maximum alignment of three given strides.
+
+ The first stride.
+ The second stride.
+ The third stride.
+ The maximum alignment of the three strides.
+
+
+
+ Gets the maximum alignment of four given strides.
+
+ The first stride.
+ The second stride.
+ The third stride.
+ The fourth stride.
+ The maximum alignment of the four strides.
+
+
+
+ Gets the maximum alignment of five given strides.
+
+ The first stride.
+ The second stride.
+ The third stride.
+ The fourth stride.
+ The fifth stride.
+ The maximum alignment of the five strides.
+
+
+
+ Converts a reference to an unmanaged type to a pointer.
+
+ The type of the object.
+ The reference to the object.
+ A pointer to the object.
+
+
+
+ Validates the block sentinels to ensure memory integrity.
+
+ The pointer to the memory block.
+ The size of the memory block.
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Allocates a block of memory and clears it.
+
+
+
+
+ Attribute to mark a static field with a reset mode.
+
+
+
+
+ Initializes a new instance of the class with the specified reset mode.
+
+ The reset mode for the static field.
+
+
+
+ Initializes a new instance of the class with the default reset mode.
+
+
+
+
+ Gets the reset mode for the static field.
+
+
+
+
+ Attribute to mark a method as a static field reset method.
+
+
+
+
+ Initializes a new instance of the class with the specified automatic call flag.
+
+ Indicates whether the method is called automatically.
+
+
+
+ Initializes a new instance of the class.
+
+
+
+
+ Attribute to mark a constructor as a static constructor.
+
+
+
+
+ Specifies the reset mode for a static field.
+
+
+
+
+ No reset mode.
+
+
+
+
+ Manual reset mode.
+
+
+
+
+ Reset method mode.
+
+
+
+
+ Provides a set of methods to work with prime numbers.
+
+
+
+
+ Determines whether the specified value is a prime number.
+
+ The value to check for primality.
+ true if the specified value is a prime number; otherwise, false.
+
+
+
+ Gets the next prime number greater than the specified value.
+
+ The value to find the next prime number for.
+ The next prime number greater than the specified value.
+ Thrown when there is no larger prime number in the table.
+
+
+
+ Gets the next prime number greater than the specified unsigned value.
+
+ The unsigned value to find the next prime number for.
+ The next prime number greater than the specified unsigned value.
+ Thrown when there is no larger prime number in the table.
+
+
+
+ Represents a high-resolution timer.
+
+
+
+
+ Creates and starts a new timer.
+
+ A new instance of the struct.
+
+
+
+ Gets the elapsed time in ticks.
+
+
+
+
+ Gets the elapsed time in milliseconds.
+
+
+
+
+ Gets the elapsed time in seconds.
+
+
+
+
+ Gets a value indicating whether the timer is running.
+
+
+
+
+ Starts the timer if it is not already running.
+
+
+
+
+ Stops the timer if it is running and updates the elapsed time.
+
+
+
+
+ Resets the timer to its initial state.
+
+
+
+
+ Restarts the timer, setting the elapsed time to zero and starting it.
+
+
+
+
+ Contains methods to setup runtime flags for Unity.
+
+
+
+
+ Flags for BuildFlags
+
+
+
+
+ Checks if the UNITY_WEBGL flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the UNITY_XBOXONE flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the UNITY_GAMECORE flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the UNITY_EDITOR flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the UNITY_SWITCH flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the UNITY_2019_4_OR_NEWER flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Flags for BuildTypes
+
+
+
+
+ Checks if the ENABLE_MONO flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the ENABLE_IL2CPP flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Flags for DotNetVersion
+
+
+
+
+ Checks if the NET_4_6 flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the NETFX_CORE flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Checks if the NET_STANDARD_2_0 flag is set and updates the flagsDotNetVersion accordingly.
+
+
+
+
+ Resets all runtime flags to their default values.
+
+
+
+
+ Provides substitution for missing System.Runtime.CompilerServices.Unsafe
+
+
+
+
+ Casts the given object to the specified type.
+
+
+
+
+ Returns an unmanaged pointer corresponding to the original source pointer.
+
+
+
+
+ Returns a managed pointer to a value of type T.
+
+
+
+
+ Returns a managed pointer to a value of type T.
+
+
+
+
+ Writes a value of type T to the given location.
+
+
+
+
+ Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
+
+
+
+
+ Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
+
+
+
+
+ Writes a value of type T to the given location.
+
+
+
+
+ Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
+
+
+
+
+ Writes a value of type T to the given location without assuming architecture dependent alignment of the destination address.
+
+
+
+
+ UTF32Tools provides a set of methods to work with UTF32 encoded strings.
+
+
+
+
+ Converts a UTF-16 encoded string to a UTF-32 encoded representation.
+
+ The UTF-16 encoded string to convert.
+ A pointer to the destination buffer where the UTF-32 encoded result will be stored.
+ The capacity of the destination buffer.
+ A ConversionResult containing the number of characters and code points processed.
+
+
+
+ Converts a UTF-16 encoded string to a UTF-32 encoded representation.
+
+ A pointer to the UTF-16 encoded string to convert.
+ The length of the UTF-16 encoded string.
+ A pointer to the destination buffer where the UTF-32 encoded result will be stored.
+ The capacity of the destination buffer.
+ A ConversionResult containing the number of characters and code points processed.
+
+
+
+ Gets the length of a UTF-32 encoded string.
+
+ The UTF-16 encoded string to measure.
+ The length of the UTF-32 encoded string.
+
+
+
+ Enumerates the characters in a UTF-32 encoded string.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ A pointer to the UTF-32 encoded string.
+ The length of the UTF-32 encoded string.
+
+
+
+ Gets the current character in the enumeration.
+
+
+
+
+ Releases all resources used by the .
+
+
+
+
+ Advances the enumerator to the next character in the UTF-32 encoded string.
+
+ true if the enumerator was successfully advanced to the next character; false if the enumerator has passed the end of the string.
+
+
+
+ Sets the enumerator to its initial position, which is before the first character in the UTF-32 encoded string.
+
+
+
+
+ Represents the result of a conversion operation, containing the number of characters and code points processed.
+
+
+
+
+ Gets the number of characters processed.
+
+
+
+
+ Gets the number of code points processed.
+
+
+
+
+ Initializes a new instance of the struct.
+
+ The number of code points processed.
+ The number of characters processed.
+
+
+
+ The Versioning class provides methods and properties related to versioning.
+
+
+
+
+ Represents an invalid version with all components set to zero.
+
+
+
+
+ Gets the current version of the assembly.
+
+
+
+
+ Get the short version of the version.
+
+ The version to get the short version of.
+
+
+
+ Gets the assembly version as a string.
+
+ The assembly version as a string.
+
+
+
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Common.xml.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Common.xml.meta
new file mode 100644
index 00000000..8a66ae20
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Common.xml.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 48752d1ef11e570418fbe363abf3a8f6
+labels:
+- FusionCodeDoc
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Log.dll b/Assets/Photon/Fusion/Assemblies/Fusion.Log.dll
new file mode 100644
index 00000000..c948ff01
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Fusion.Log.dll differ
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Log.dll.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Log.dll.meta
new file mode 100644
index 00000000..db53e993
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Log.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 641f841cbef022e4f90b206df4a1f40c
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Log.xml b/Assets/Photon/Fusion/Assemblies/Fusion.Log.xml
new file mode 100644
index 00000000..b61d74a2
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Log.xml
@@ -0,0 +1,1553 @@
+
+
+
+ Fusion.Log
+
+
+
+
+ A proxy log streams that allows for filtering messages. Note that filtering is applied after the message is formatted,
+ so it is really mostly suitable for Unit tests.
+
+
+
+ If a message contains this, it will not be logged
+ The actual log stream that will consume filtered messages
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A logger that writes logs to the Unity console with the purpose of being used in the Unity Editor.
+
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE is defined. Use in the Config context.
+
+ A message
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined. Use in the Config context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined. Use in the Config context.
+
+ A message
+
+
+
+ Logs an errpr to the Unity console if UNITY_EDITOR is defined. Use in the Config context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE is defined. Use in the Installer context.
+
+ A message
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined. Use in the Installer context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined. Use in the Installer context.
+
+ A message
+
+
+
+ Logs an errpr to the Unity console if UNITY_EDITOR is defined. Use in the Installer context.
+
+ A message
+
+
+
+ Sets the color of the prefix.
+
+
+
+
+
+ Ensures the logger is initialized. Call in the main thread if you want to log from a different thread.
+
+
+
+
+ Logs an assertion with a message if the condition is > and UNITY_ASSERTIONS is defined.
+
+ Value to check
+ An error message
+
+
+
+ Logs an assertion if the condition is > and UNITY_ASSERTIONS is defined.
+
+ Value to check
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE is defined. Used in the import process.
+
+ Asset being imported
+ A message
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined. Used in the import process.
+
+ Asset being imported
+ A message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined. Used in the import process.
+
+ Asset being imported
+ A message
+
+
+
+ Logs an error to the Unity console if UNITY_EDITOR is defined. Used in the import process.
+
+ Asset being imported
+ A message
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE is defined. Used in the import process.
+
+ A message
+ Asset being imported
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined. Used in the import process.
+
+ A message
+ Asset being imported
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined. Used in the import process.
+
+ A message
+ Asset being imported
+
+
+
+ Logs an error to the Unity console if UNITY_EDITOR is defined. Used in the import process.
+
+ A message
+ Asset being imported
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined.
+
+ A message
+ The source of the message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined.
+
+ A message
+ The source of the message
+
+
+
+ Logs an error to the Unity console if UNITY_EDITOR is defined.
+
+ A message
+ The source of the message
+
+
+
+ Logs an exception to the Unity console if UNITY_EDITOR is defined.
+
+ A message to log before the exception.
+ The exception to log
+
+
+
+ Logs an exception to the Unity console if UNITY_EDITOR is defined.
+
+ The exception to log
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE is defined.
+
+ A message
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined.
+
+ A message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined.
+
+ A message
+
+
+
+ Logs an errpr to the Unity console if UNITY_EDITOR is defined.
+
+ A message
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE_IMPORT is defined. Use in the Import context.
+
+ A message
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined. Use in the Import context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined. Use in the Import context.
+
+ A message
+
+
+
+ Logs an errpr to the Unity console if UNITY_EDITOR is defined. Use in the Import context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE_INSPECTOR is defined. Use in the Inspector context.
+
+ A message
+
+
+
+ Logs a warning to the Unity console if UNITY_EDITOR is defined. Use in the Inspector context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if UNITY_EDITOR is defined. Use in the Inspector context.
+
+ A message
+
+
+
+ Logs an errpr to the Unity console if UNITY_EDITOR is defined. Use in the Inspector context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE_TEST is defined. Use in the Test context.
+
+ A message
+
+
+
+ Logs a message to the Unity console if FUSION_EDITOR_TRACE_MPPM is defined. Use in the Mppm context.
+
+ A message
+
+
+
+ An exception that is thrown when an assertion fails.
+
+
+
+
+ Creates a new instance of the exception.
+
+
+
+
+ Creates a new instance of the exception with a message.
+
+ A message
+
+
+
+ Provides methods for asserting conditions. Throws an AssertException when a condition is not met. Methods are only invoked in DEBUG builds unless otherwise specified.
+
+
+
+
+ Always throws an AssertException.
+
+
+
+
+
+ Always throws an AssertException with a message.
+
+ An error message
+
+
+
+
+ Always throws an AssertException with a message.
+
+ An error message format
+
+
+
+
+
+ Throws an AssertException if the is null
+
+ Value to check
+ An error message
+
+
+
+
+ Throws an AssertException if the is null
+
+ Value to check
+ An error message
+
+
+
+
+ Throws an AssertException with a message if the is
+
+ Value to check
+ An error message
+
+
+
+
+ Throws an AssertException with a message if the is
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if the is
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if the is
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if the is
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if the is . The message is composed from additional arguments.
+
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is . The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is . The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is . The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is . The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException, even in non-DEBUG builds.
+
+
+
+
+ Throws an AssertException with a message, even in non-DEBUG builds.
+
+ An error message
+
+
+
+
+ Throws an AssertException with a message, even in non-DEBUG builds.
+
+ An error message
+
+
+
+
+ Throws an AssertException with a message, even in non-DEBUG builds.
+
+ An error message
+
+
+
+
+ Throws an AssertException with a message if is , even in non-DEBUG builds.
+
+ Value to check
+ An error message
+
+
+
+
+ Throws an AssertException with a message if is , even in non-DEBUG builds.
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if is , even in non-DEBUG builds.
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if is , even in non-DEBUG builds.
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if is , even in non-DEBUG builds.
+
+ Value to check
+ An error message format
+
+
+
+
+ Throws an AssertException with a message if the is , even in non-DEBUG builds. The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is , even in non-DEBUG builds. The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is , even in non-DEBUG builds. The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Throws an AssertException with a message if the is , even in non-DEBUG builds. The message is composed from additional arguments.
+
+ Value to check
+
+
+
+
+ Logs an assertion if the is . For Unity builds, log goes straight to UnityEngine.Debug. Otherwise, log goes to LogError stream.
+
+ Value to check
+
+
+
+
+ Logs an assertion if the is . For Unity builds, log goes straight to UnityEngine.Debug. Otherwise, log goes to LogError stream.
+
+ Value to check
+
+
+
+ Logs an assertion if the is . For Unity builds, log goes straight to UnityEngine.Debug. Otherwise, log goes to LogError stream.
+
+ Value to check
+
+
+
+
+ Logs an assertion if the is . For Unity builds, log goes straight to UnityEngine.Debug. Otherwise, log goes to LogError stream.
+
+ Value to check
+
+
+
+
+ Logs an assertion if the is . For Unity builds, log goes straight to UnityEngine.Debug. Otherwise, log goes to LogError stream.
+
+ Value to check
+
+
+
+
+ A log stream that writes log messages to the console with a specified color.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The console color to use for log messages.
+ An optional prefix to prepend to each log message.
+
+
+
+ Logs a message with a source.
+
+ The source of the log message.
+ The log message.
+
+
+
+ Logs a message with a source and an exception.
+
+ The source of the log message.
+ The log message.
+ The exception to log.
+
+
+
+ Represents a debug log stream that supports logging to different streams.
+
+
+
+ Stream for logging informational messages.
+
+
+ Stream for logging warning messages.
+
+
+ Stream for logging error messages.
+
+
+
+ Initializes a new instance of the DebugLogStream class.
+
+ The stream for informational messages.
+ The stream for warning messages.
+ The stream for error messages.
+
+
+ Logs a message with a source to the InfoStream.
+
+
+ Logs a message to the InfoStream.
+
+
+ Logs an info message with a source to the InfoStream.
+
+
+ Logs an info message to the InfoStream.
+
+
+ Logs an error message with a source to the ErrorStream.
+
+
+ Logs an error message to the ErrorStream.
+
+
+ Logs an exception to the ErrorStream.
+
+
+ Logs an exception to the ErrorStream.
+
+
+ Logs a warning message with a source to the WarnStream.
+
+
+ Logs a warning message to the WarnStream.
+
+
+
+ Returns self if is true.
+
+
+
+
+ Returns self if is false and then sets it to true.
+
+
+
+ Disposes the DebugLogStream and its underlying streams.
+
+
+
+ An interface for log sources. Implement this interface to be able to pass a custom context to Log methods.
+
+
+
+
+ Unity object that is the source of the log message.
+
+
+
+
+
+ Provides static log streams for different log levels.
+
+ Internal log streams
+
+
+ Debug log stream.
+
+
+ Info log stream.
+
+
+ Warning log stream.
+
+
+ Error log stream.
+
+
+ Exception log stream.
+
+
+ LogTrace stream
+
+
+ LogTraceStun stream
+
+
+ LogTraceObject stream
+
+
+ LogTraceNetwork stream
+
+
+ LogTracePrefab stream
+
+
+ LogTraceSceneInfo stream
+
+
+ LogTraceSceneManager stream
+
+
+ LogTraceSimulationMessage stream
+
+
+ LogTraceHostMigration stream
+
+
+ LogTraceEncryption stream
+
+
+ LogTraceDummyTraffic stream
+
+
+ LogTraceRealtime stream
+
+
+ LogTraceMemoryTrack stream
+
+
+ LogTraceSnapshots stream
+
+
+ LogTraceTime stream
+
+
+
+ Global logging class. Needs to be initialized before use. When in Unity, "FusionLogInitializer" takes care of that.
+ All static methods have conditional compilation directives:
+
+ FUSION_LOGLEVEL_DEBUG enables "Debug" methods
+ FUSION_LOGLEVEL_INFO enables all the above and Info methods
+ FUSION_LOGLEVEL_WARN enables all the above and Warn methods
+ FUSION_LOGLEVEL_ERROR enables all the above and Error methods
+
+ Trace channels are enabled separately with FUSION_TRACE_* directives.
+
+
+
+
+ Uninitializes the logger. All log streams are disposed.
+
+
+
+
+ A delegate to create a log stream.
+
+
+
+
+ Whether the logger is initialized.
+
+
+
+
+ Current log settings.
+
+
+
+
+ Initializes the logger with the specified log level and trace channels.
+
+ The minimal log level. All messages with lower level are not going to be reported, regardless
+ of FUSION_LOGLEVEL defines.
+ Trace channels to activate. Trace channels not included will not get reported, regardless
+ of FUSION_TRACE defines.
+
+
+
+
+
+
+
+
+
+ Initializes the logger to log to the console.
+
+
+
+
+
+ Initializes the logger to log to the console.
+
+
+
+ Logs a debug message. At least FUSION_LOGLEVEL_DEBUG needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs a debug warning message. At least FUSION_LOGLEVEL_DEBUG needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs a debug error message. At least FUSION_LOGLEVEL_DEBUG needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs a message. At least FUSION_LOGLEVEL_INFO needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs a message. At least FUSION_LOGLEVEL_INFO needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs a warning message. At least FUSION_LOGLEVEL_WARN needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs a warning message. At least FUSION_LOGLEVEL_WARN needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs an error message. At least FUSION_LOGLEVEL_ERROR needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs an error message. At least FUSION_LOGLEVEL_ERROR needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs an exception message. At least FUSION_LOGLEVEL_ERROR needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs an exception message. At least FUSION_LOGLEVEL_ERROR needs to be defined and at least must have been used to initialize the logger.
+
+
+ Logs an exception message. At least FUSION_LOGLEVEL_ERROR needs to be defined and at least must have been used to initialize the logger.
+
+
+
+ Use instead.
+
+
+
+
+ Use instead.
+
+
+
+
+ Use instead.
+
+
+
+
+ Use instead.
+
+
+
+ Logs a message if TRACE is defined.
+ The message to log.
+
+
+ Logs a warning if TRACE is defined.
+ The message to log.
+
+
+ Logs an error if TRACE is defined.
+ The message to log.
+
+
+ Logs a message if TRACE is defined.
+ The message source.
+ The message to log.
+
+
+ Logs a warning if TRACE is defined.
+ The message source.
+ The message to log.
+
+
+ Logs an error if TRACE is defined.
+ The message source.
+ The message to log.
+
+
+ Logs a message if DEBUG is defined.
+ The message to log.
+
+
+ Logs a warning if DEBUG is defined.
+ The message to log.
+
+
+ Logs an error if DEBUG is defined.
+ The message to log.
+
+
+ Logs a message if DEBUG is defined.
+ The message source.
+ The message to log.
+
+
+ Logs a warning if DEBUG is defined.
+ The message source.
+ The message to log.
+
+
+ Logs an error if DEBUG is defined.
+ The message source.
+ The message to log.
+
+
+ Logs a message of Info type.
+ The message to log.
+
+
+ Logs a message of Warn type.
+ The message to log.
+
+
+ Logs a message of Error type.
+ The message to log.
+
+
+ Enabled by FUSION_TRACE_GLOBAL
+
+
+ Enabled by FUSION_TRACE_GLOBAL
+
+
+ Enabled by FUSION_TRACE_GLOBAL
+
+
+ Enabled by FUSION_TRACE_GLOBAL
+
+
+ Enabled by FUSION_TRACE_GLOBAL
+
+
+ Enabled by FUSION_TRACE_GLOBAL
+
+
+ Enabled by FUSION_TRACE_SCENEMANAGER
+
+
+ Enabled by FUSION_TRACE_SCENEMANAGER
+
+
+ Enabled by FUSION_TRACE_SCENEMANAGER
+
+
+ Enabled by FUSION_TRACE_SCENEMANAGER
+
+
+ Enabled by FUSION_TRACE_SCENEMANAGER
+
+
+ Enabled by FUSION_TRACE_SCENEMANAGER
+
+
+
+ Log type.
+
+
+
+
+ Error log type.
+
+
+
+
+ Warning log type.
+
+
+
+
+ Information log type.
+
+
+
+
+ Debug log type.
+
+
+
+
+ Trace log type.
+
+
+
+
+ Flags for logging.
+
+
+
+
+ This is a debug stream.
+
+
+
+
+ This is a trace stream.
+
+
+
+
+ The log level. Messages with a lower level than the current LogLevel will be ignored.
+
+
+
+
+ Debug messages. Dlls will only output Debug messages if compiled with DEBUG symbol.
+
+
+
+
+ General info messages.
+
+
+
+
+ Warning messages.
+
+
+
+
+ Error messages.
+
+
+
+
+ No messages will be output.
+
+
+
+
+ Extensions for
+
+
+
+
+ Returns a define used for a given log level.
+
+
+
+
+ Settings for the logging system.
+
+
+
+
+ The minimum log level to output.
+
+
+
+
+ Mask of log channels to output.
+
+
+
+
+ Creates a new instance of LogSettings.
+
+
+
+
+ Interface for logging streams.
+
+
+
+
+ Logs a message with a source.
+
+ The source of the log message.
+ The log message.
+
+
+
+ Logs a message.
+
+ The log message.
+
+
+
+ Logs a message with a source and an exception.
+
+ The source of the log message.
+ The log message.
+ The exception to log.
+
+
+
+ Logs a message with an exception.
+
+ The source of the log message.
+ The exception to log.
+
+
+
+ Logs a message with an exception.
+
+ The log message.
+ The exception to log.
+
+
+
+ Logs an exception.
+
+ The exception to log.
+
+
+
+ Returns self if is true.
+
+
+
+
+ Returns self if is false and then sets it to true.
+
+
+
+
+
+
+
+ A logger that outputs messages to the Unity console.
+
+
+
+
+ If true, each log message that has a source parameter will be prefixed with a hash code of the source object.
+
+
+
+
+ A prefix tag added to each log.
+
+
+
+
+ Color of the global prefix (see ).
+
+
+
+
+ Max Random Color
+
+
+
+
+ Min Random Color
+
+
+
+
+ Customize logged object names from other threads.
+
+
+
+
+ Customize logged object names for destroyed objects.
+
+
+
+
+ If true, some parts of messages will be enclosed with <color> tags.
+
+
+
+
+ If true, all messages will be prefixed with [Fusion] tag
+
+
+
+
+ Create unity logger instance.
+
+
+ The thread used by or to use the current
+ thread.
+
+ Should the logger use colors suited for Unity Editor dark mode
+
+
+
+ Clean up resources.
+
+
+
+
+ Create a log stream using Unity logger.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Append prefix to the log message.
+
+
+
+
+
+
+
+ Append object name to the log message in a thread-safe way.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Default prefix color for light theme.
+
+
+
+
+ Default prefix color for dark theme.
+
+
+
+
+ Prefix for debug messages.
+
+
+
+
+ Prefix for trace messages.
+
+
+
+
+ A log stream that writes log messages to a .
+
+
+
+
+ Initializes a new instance of the class.
+
+ The to write log messages to.
+ If set to true, the writer will be disposed when this instance is disposed.
+ An optional prefix to prepend to each log message.
+ Thrown if is null.
+
+
+
+ Logs a message with a source.
+
+ The source of the log message.
+ The log message.
+
+
+
+ Logs a message.
+
+ The log message.
+
+
+
+ Logs a message with a source and an exception.
+
+ The source of the log message.
+ The log message.
+ The exception to log.
+
+
+
+ Logs a message with an exception.
+
+ The log message.
+ The exception to log.
+
+
+
+ Logs an exception.
+
+ The exception to log.
+
+
+
+ Disposes the instance and optionally disposes the underlying .
+
+
+
+
+ Represents a trace log stream that supports logging to different streams.
+
+
+
+ Stream for logging informational messages.
+
+
+ Stream for logging warning messages.
+
+
+ Stream for logging error messages.
+
+
+
+ Initializes a new instance of the TraceLogStream class.
+
+ The stream for informational messages.
+ The stream for warning messages.
+ The stream for error messages.
+
+
+ Logs a message with a source to the InfoStream.
+
+
+ Logs a message to the InfoStream.
+
+
+ Logs an info message with a source to the InfoStream.
+
+
+ Logs an info message to the InfoStream.
+
+
+ Logs an error message with a source to the ErrorStream.
+
+
+ Logs an error message to the ErrorStream.
+
+
+ Logs an exception to the ErrorStream.
+
+
+ Logs an exception to the ErrorStream.
+
+
+ Logs a warning message with a source to the WarnStream.
+
+
+ Logs a warning message to the WarnStream.
+
+
+
+ Returns self if is true.
+
+
+
+
+ Returns self if is false and then sets it to true.
+
+
+
+ Disposes the TraceLogStream and its underlying streams.
+
+
+
+ Interface for objects that can be dumped to a StringBuilder.
+
+
+
+
+ Dumps the object to the provided StringBuilder.
+
+ The StringBuilder to dump the object to.
+
+
+ Console logger
+
+
+ Constructor
+
+
+ Logs a message with the specified log type and context.
+
+
+ Logs an exception with the specified context.
+
+
+ Obsolete interface for logging operations.
+
+
+ Logs a message with the specified log type and context.
+
+
+ Logs an exception with the specified context.
+
+
+ Obsolete interface for log source proxy.
+
+
+ Gets the log source.
+
+
+ Obsolete struct for log context information.
+
+
+ The prefix for the log message.
+
+
+ The source of the log message.
+
+
+ Initializes a new instance of the struct.
+
+
+ Obsolete class for logging to a TextWriter.
+
+
+ Initializes a new instance of the class.
+
+
+ Disposes the TextWriterLogger instance.
+
+
+ Logs a message with the specified log type and context.
+
+
+ Logs an exception with the specified context.
+
+
+ Trace channels
+
+
+ Global
+
+
+ Stun
+
+
+ Object
+
+
+ Network
+
+
+ Prefab
+
+
+ SceneInfo
+
+
+ SceneManager
+
+
+ SimulationMessage
+
+
+ HostMigration
+
+
+ Encryption
+
+
+ DummyTraffic
+
+
+ Realtime
+
+
+ MemoryTrack
+
+
+ Snapshots
+
+
+ Time
+
+
+
+ Utility class for logging operations.
+
+
+
+
+ Gets a deferred dump of a pointer to an unmanaged object.
+
+ The type of the unmanaged object.
+ Pointer to the unmanaged object.
+ A deferred dump of the pointer.
+
+
+
+ Gets a deferred dump of a class object.
+
+ The type of the class object.
+ The class object.
+ A deferred dump of the class object.
+
+
+
+ Represents a deferred dump of a pointer to an unmanaged object.
+
+ The type of the unmanaged object.
+
+
+
+ Represents a deferred dump of a pointer to an unmanaged object.
+
+ The type of the unmanaged object.
+
+
+ ToString
+
+
+
+ Represents a deferred dump of an unmanaged object.
+
+ The type of the unmanaged object.
+
+
+
+ Represents a deferred dump of an unmanaged object.
+
+ The type of the unmanaged object.
+
+
+ ToString
+
+
+
+ Represents a deferred dump of a class object.
+
+
+
+
+ Represents a deferred dump of a class object.
+
+
+
+
+ Object to dump.
+
+
+
+ ToString
+
+
+
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Log.xml.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Log.xml.meta
new file mode 100644
index 00000000..5795fa80
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Log.xml.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: ab0587b705cfcf7429767247d605fa5e
+labels:
+- FusionCodeDoc
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.dll b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.dll
new file mode 100644
index 00000000..69029644
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.dll differ
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.dll.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.dll.meta
new file mode 100644
index 00000000..ac114ab1
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 7de3b8b9e1263ad479e2d0c4261b7646
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.xml b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.xml
new file mode 100644
index 00000000..4e010e79
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.xml
@@ -0,0 +1,5003 @@
+
+
+
+ Fusion.Realtime
+
+
+
+
+ Wrapper for realtime region information.
+
+
+
+
+ The code of the region.
+
+
+
+
+ The ping of the region.
+
+
+
+
+ Class to provide access to some realtime operations and API.
+
+
+
+
+ Time the cache will be available in seconds since the last request.
+
+
+
+
+ Responsible for running a thread that will keep the LoadBalancingClient connected to the Cloud
+ when the application is in the background
+
+
+ Fusion Realtime Client
+
+ This will deal with all communication done with the Photon Cloud
+
+
+ Fusion Realtime Client
+
+ This will deal with all communication done with the Photon Cloud
+
+
+
+
+ Reference to the background connection handler
+
+
+
+
+ Starts a new thread to send ACK to Cloud
+
+
+
+
+ Stops the currently running background thread.
+
+
+
+
+ Handles all received events from the Photon Cloud
+
+ Event Data
+
+
+
+ Send data to another Actor on the Room
+
+ Target Actor of the Event
+ Event Code
+ Data to be sent
+ Buffer Length
+ Flag to set reliability on the Event
+ True if the event was sent, false otherwise
+
+
+
+ Utility method used to extract the content of a from a object holder.
+ This is necessary so there are no references of Photon Lib DLLs other than on the Fusion.Realtime project
+
+ Data Object Holder, this must be a reference of a
+ Buffer to write the content of the array slice
+ Output size of the written buffer
+ True if the extraction was done correctly, false otherwise
+
+
+
+ Fusion Plugin Name for request
+
+
+
+
+ Alternative Name Server for CN Region
+
+
+
+
+ Flag to signal if the Client is Ready to perform cloud action and it is in a Room
+
+
+
+
+ Flag to signal if the Photon Cloud connection is encrypted by default
+
+
+
+
+ Signal if some room property has changed
+
+
+
+
+ Set if the Client should use the Default or Alternative Photon Cloud Ports
+
+
+
+
+
+
+
+
+
+ Try to load the first implementation of found in the current AppDomain
+
+ Type of the first implementation of found
+
+
+
+ Change the Custom Properties of the current Room
+
+ New set of Custom Properties
+ True if the change was made, false otherwise
+
+
+
+ Change the IsVisible Property of the current Room
+
+ New value of IsVisible
+ True if the change was made, false otherwise
+
+
+
+ Change the IsOpen Property of the current Room
+
+ New value of IsOpen
+ True if the change was made, false otherwise
+
+
+
+ Used to keep the client communication
+
+
+
+
+ Build a new EnterRoomParams ref using the default configs and optional Room Name
+
+ Which lobby the Room should exits
+ Room Name, if not set, a Random Name will be used
+ Set the max number of players per Session
+ Optional Room Custom Properties
+ Signal if the Session should be Open/Closed
+ Signal if the Session should Visible/Invisible
+ Signal fi the Default EmptyRoomTTL (0) should be used or a custom one
+ Signal if the Session should have an extended Time To Live
+ EnterRoomParams reference.
+
+
+
+ Build a new OpJoinRandomRoomParams that will be used to setup which Room the local peer wants to join
+
+ Type of Lobby to search rooms
+ Optional list of filter parameters
+ Optional Matchmaking Mode
+ OpJoinRandomRoomParams reference
+
+
+
+ Convert a into a pair of and respectively
+ representing the custom properties of a session and the property names that will be published on the Lobby
+
+ Dictionary to be converted
+ Hashtable with all allowed Custom Properties
+ String array with all public key names
+
+
+
+ Settings for Photon application(s) and the server to connect to.
+
+
+ This is Serializable for Unity, so it can be included in ScriptableObject instances.
+
+
+
+ AppId for Realtime or PUN.
+
+
+ AppId for Photon Fusion.
+
+
+ AppId for Photon Chat.
+
+
+ AppId for Photon Voice.
+
+
+ The AppVersion can be used to identify builds and will split the AppId distinct "Virtual AppIds" (important for matchmaking).
+
+
+ If false, the app will attempt to connect to a Master Server (which is obsolete but sometimes still necessary).
+ if true, Server points to a NameServer (or is null, using the default), else it points to a MasterServer.
+
+
+ Can be set to any of the Photon Cloud's region names to directly connect to that region.
+ if this IsNullOrEmpty() AND UseNameServer == true, use BestRegion. else, use a server
+
+
+ Set to a previous BestRegionSummary value before connecting.
+
+ This is a value used when the client connects to the "Best Region".
+ If this is null or empty, all regions gets pinged. Providing a previous summary on connect,
+ speeds up best region selection and makes the previously selected region "sticky".
+
+ Unity clients should store the BestRegionSummary in the PlayerPrefs.
+ You can store the new result by implementing .
+ If is not null, store this string.
+ To avoid storing the value multiple times, you could set SummaryToCache to null.
+
+
+
+ The address (hostname or IP) of the server to connect to.
+
+
+ If not null, this sets the port of the first Photon server to connect to (that will "forward" the client as needed).
+
+
+ The address (hostname or IP and port) of the proxy server.
+
+
+ The network level protocol to use.
+
+
+ Enables a fallback to another protocol in case a connect to the Name Server fails.
+ See: LoadBalancingClient.EnableProtocolFallback.
+
+
+ Defines how authentication is done. On each system, once or once via a WSS connection (safe).
+
+
+ If true, the client will request the list of currently available lobbies.
+
+
+ Log level for the network lib.
+
+
+ If true, the Server field contains a Master Server address (if any address at all).
+
+
+ If true, the client should fetch the region list from the Name Server and find the one with best ping.
+ See "Best Region" in the online docs.
+
+
+ If true, the default nameserver address for the Photon Cloud should be used.
+
+
+ If true, the default ports for a protocol will be used.
+
+
+ ToString but with more details.
+
+
+ Checks if a string is a Guid by attempting to create one.
+ The potential guid to check.
+ True if new Guid(val) did not fail.
+
+
+
+ Copy the values of the current instance into another instance.
+
+ The destination instance.
+ The destination instance with the copied values.
+
+
+
+ Get a Copy from the into a new instance.
+
+ Copy of
+
+
+
+ Photon client to log information and statistics from.
+
+
+
+ Option to let the fallback thread call Disconnect after the KeepAliveInBackground time. Default: false.
+
+ If set to true, the thread will disconnect the client regularly, should the client not call SendOutgoingCommands / Service.
+ This may happen due to an app being in background (and not getting a lot of CPU time) or when loading assets.
+
+ If false, a regular timeout time will have to pass (on top) to time out the client.
+
+
+
+ Defines for how long the Fallback Thread should keep the connection, before it may time out as usual.
+ We want to the Client to keep it's connection when an app is in the background (and doesn't call Update / Service Clients should not keep their connection indefinitely in the background, so after some milliseconds, the Fallback Thread should stop keeping it up.
+
+
+ Counts how often the Fallback Thread called SendAcksOnly, which is purely of interest to monitor if the game logic called SendOutgoingCommands as intended.
+
+
+ True if a fallback thread is running. Will call the client's SendAcksOnly() method to keep the connection up.
+
+
+ Keeps the ConnectionHandler, even if a new scene gets loaded.
+
+
+ Indicates that the app is closing. Set in OnApplicationQuit().
+
+
+ Indicates that the (Unity) app is Paused. This means the main thread is not running.
+
+
+ Indicates that the app was paused within the last 5 seconds.
+
+
+ Indicates that the app is not in focus.
+
+
+ Indicates that the app was out of focus within the last 5 seconds.
+
+
+
+ Resets statics for Domain Reload
+
+
+
+
+
+
+ Called by Unity when the application gets closed. Disconnects if OnApplicationQuit() was called before.
+
+
+ Called by Unity when the application gets closed. The UnityEngine will also call OnDisable, which disconnects.
+
+
+ Called by Unity when the application gets paused or resumed.
+
+
+ Called by Unity when the application changes focus.
+
+
+
+ When run in Unity, this returns Application.internetReachability != NetworkReachability.NotReachable.
+
+ Application.internetReachability != NetworkReachability.NotReachable
+
+
+ Starts periodic calls of RealtimeFallbackThread.
+
+
+ Stops the periodic calls of RealtimeFallbackThread.
+
+
+ Used in WebGL builds which can't call RealtimeFallback(object state = null) with the state context parameter.
+
+
+ A thread which runs independently of the Update() calls. Keeps connections online while loading or in background. See .
+
+
+
+ Internally used class, containing de/serialization methods for various Unity-specific classes.
+ Adding those to the Photon serialization protocol allows you to send them in events, etc.
+
+
+
+ Register de/serializer methods for Unity specific types. Makes the types usable in RaiseEvent and PUN.
+
+
+
+ This static class defines some useful extension methods for several existing classes (e.g. Vector3, float and others).
+
+
+
+
+ Merges all keys from addHash into the target. Adds new keys and updates the values of existing keys in target.
+
+ The IDictionary to update.
+ The IDictionary containing data to merge into target.
+
+
+
+ Merges keys of type string to target Hashtable.
+
+
+ Does not remove keys from target (so non-string keys CAN be in target if they were before).
+
+ The target IDictionary passed in plus all string-typed keys from the addHash.
+ A IDictionary that should be merged partly into target to update it.
+
+
+ Helper method for debugging of IDictionary content, including type-information. Using this is not performant.
+ Should only be used for debugging as necessary.
+ Some Dictionary or Hashtable.
+ String of the content of the IDictionary.
+
+
+ Helper method for debugging of content. Using this is not performant.
+ Should only be used for debugging as necessary.
+ Any where T implements .ToString().
+ A comma-separated string containing each value's ToString().
+
+
+ Helper method for debugging of object[] content. Using this is not performant.
+ Should only be used for debugging as necessary.
+ Any object[].
+ A comma-separated string containing each value's ToString().
+
+
+
+ This method copies all string-typed keys of the original into a new Hashtable.
+
+
+ Does not recurse (!) into hashes that might be values in the root-hash.
+ This does not modify the original.
+
+ The original IDictonary to get string-typed keys from.
+ New Hashtable containing only string-typed keys of the original.
+
+
+
+ This method copies all string-typed keys of the original into a new Hashtable.
+
+
+ Does not recurse (!) into hashes that might be values in the root-hash.
+ This does not modify the original.
+
+ The original IDictonary to get string-typed keys from.
+ New Hashtable containing only string-typed keys of the original.
+
+
+ Used by StripKeysWithNullValues.
+
+ By making keysWithNullValue a static variable to clear before using, allocations only happen during the warm-up phase
+ as the list needs to grow. Once it hit the high water mark for keys you need to remove.
+
+
+
+ Removes all keys with null values.
+
+ Photon properties are removed by setting their value to null. Changes the original IDictionary!
+ Uses lock(keysWithNullValue), which should be no problem in expected use cases.
+
+ The IDictionary to strip of keys with null value.
+
+
+ Removes all keys with null values.
+
+ Photon properties are removed by setting their value to null. Changes the original IDictionary!
+ Uses lock(keysWithNullValue), which should be no problem in expected use cases.
+
+ The IDictionary to strip of keys with null value.
+
+
+
+ Checks if a particular integer value is in an int-array.
+
+ This might be useful to look up if a particular actorNumber is in the list of players of a room.
+ The array of ints to check.
+ The number to lookup in target.
+ True if nr was found in target.
+
+
+
+ Used to store info about a friend's online state and in which room he/she is.
+
+
+
+
+ State values for a client, which handles switching Photon server types, some operations, etc.
+
+ \ingroup publicApi
+
+
+ Peer is created but not used yet.
+
+
+ Transition state while connecting to a server. On the Photon Cloud this sends the AppId and AuthenticationValues (UserID).
+
+
+ Not Used.
+
+
+ The client sent an OpJoinLobby and if this was done on the Master Server, it will result in. Depending on the lobby, it gets room listings.
+
+
+ The client is in a lobby, connected to the MasterServer. Depending on the lobby, it gets room listings.
+
+
+ Transition from MasterServer to GameServer.
+
+
+ Transition to GameServer (client authenticates and joins/creates a room).
+
+
+ Connected to GameServer (going to auth and join game).
+
+
+ Transition state while joining or creating a room on GameServer.
+
+
+ The client entered a room. The CurrentRoom and Players are known and you can now raise events.
+
+
+ Transition state when leaving a room.
+
+
+ Transition from GameServer to MasterServer (after leaving a room/game).
+
+
+ Connecting to MasterServer (includes sending authentication values).
+
+
+ The client disconnects (from any server). This leads to state Disconnected.
+
+
+ The client is no longer connected (to any server). Connect to MasterServer to go on.
+
+
+ Connected to MasterServer. You might use matchmaking or join a lobby now.
+
+
+ Client connects to the NameServer. This process includes low level connecting and setting up encryption. When done, state becomes ConnectedToNameServer.
+
+
+ Client is connected to the NameServer and established encryption already. You should call OpGetRegions or ConnectToRegionMaster.
+
+
+ Clients disconnects (specifically) from the NameServer (usually to connect to the MasterServer).
+
+
+ Client was unable to connect to Name Server and will attempt to connect with an alternative network protocol (TCP).
+
+
+
+ Internal state, how this peer gets into a particular room (joining it or creating it).
+
+
+
+ This client creates a room, gets into it (no need to join) and can set room properties.
+
+
+ The room existed already and we join into it (not setting room properties).
+
+
+ Done on Master Server and (if successful) followed by a Join on Game Server.
+
+
+ Done on Master Server and (if successful) followed by a Join or Create on Game Server.
+
+
+ Client is either joining or creating a room. On Master- and Game-Server.
+
+
+ Enumeration of causes for Disconnects (used in LoadBalancingClient.DisconnectedCause).
+ Read the individual descriptions to find out what to do about this type of disconnect.
+
+
+ No error was tracked.
+
+
+ OnStatusChanged: The server is not available or the address is wrong. Make sure the port is provided and the server is up.
+
+
+ OnStatusChanged: Dns resolution for a hostname failed. The exception for this is being caught and logged with error level.
+
+
+ OnStatusChanged: The server address was parsed as IPv4 illegally. An illegal address would be e.g. 192.168.1.300. IPAddress.TryParse() will let this pass but our check won't.
+
+
+ OnStatusChanged: Some internal exception caused the socket code to fail. This may happen if you attempt to connect locally but the server is not available. In doubt: Contact Exit Games.
+
+
+ Send exception.
+
+
+ Receive exception.
+
+
+ OnStatusChanged: The server disconnected this client due to timing out (missing acknowledgement from the client).
+
+
+ OnStatusChanged: This client detected that the server's responses are not received in due time.
+
+
+ OnStatusChanged: The server disconnected this client from within the room's logic (the C# code).
+
+
+ OnStatusChanged: The server disconnected this client for unknown reasons.
+
+
+ OnOperationResponse: Authenticate in the Photon Cloud with invalid AppId. Update your subscription or contact Exit Games.
+
+
+ OnOperationResponse: Authenticate in the Photon Cloud with invalid client values or custom authentication setup in Cloud Dashboard.
+
+
+ The authentication ticket should provide access to any Photon Cloud server without doing another authentication-service call. However, the ticket expired.
+
+
+ OnOperationResponse: Authenticate (temporarily) failed when using a Photon Cloud subscription without CCU Burst. Update your subscription.
+
+
+ OnOperationResponse: Authenticate when the app's Photon Cloud subscription is locked to some (other) region(s). Update your subscription or master server address.
+
+
+ OnOperationResponse: Operation that's (currently) not available for this client (not authorized usually). Only tracked for op Authenticate.
+
+
+ OnStatusChanged: The client disconnected from within the logic (the C# code).
+
+
+ The client called an operation too frequently and got disconnected due to hitting the OperationLimit. This triggers a client-side disconnect, too.
+ To protect the server, some operations have a limit. When an OperationResponse fails with ErrorCode.OperationLimitReached, the client disconnects.
+
+
+ The client received a "Disconnect Message" from the server. Check the debug logs for details.
+
+
+ Used in case the application quits. Can be useful to not load new scenes or re-connect in OnDisconnected.
+ ConnectionHandler.OnDisable() will use this, if the Unity engine already called OnApplicationQuit (ConnectionHandler.AppQuits = true).
+
+
+ Available server (types) for internally used field: server.
+ Photon uses 3 different roles of servers: Name Server, Master Server and Game Server.
+
+
+ This server is where matchmaking gets done and where clients can get lists of rooms in lobbies.
+
+
+ This server handles a number of rooms to execute and relay the messages between players (in a room).
+
+
+ This server is used initially to get the address (IP) of a Master Server for a specific region. Not used for Photon OnPremise (self hosted).
+
+
+ Defines which sort of app the LoadBalancingClient is used for: Realtime or Voice.
+
+
+ Realtime apps are for gaming / interaction. Also used by PUN 2.
+
+
+ Voice apps stream audio.
+
+
+ Fusion clients are for matchmaking and relay in Photon Fusion.
+
+
+
+ Defines how the communication gets encrypted.
+
+
+
+
+ This is the default encryption mode: Messages get encrypted only on demand (when you send operations with the "encrypt" parameter set to true).
+
+
+
+
+ Datagram Encryption with GCM.
+
+
+
+ Container for port definitions.
+
+
+ Typical ports: UDP: 5058 or 27000, TCP: 4533, WSS: 19093 or 443.
+
+
+ Typical ports: UDP: 5056 or 27002, TCP: 4530, WSS: 19090 or 443.
+
+
+ Typical ports: UDP: 5055 or 27001, TCP: 4531, WSS: 19091 or 443.
+
+
+
+ This class implements the Photon LoadBalancing workflow by using a LoadBalancingPeer.
+ It keeps a state and will automatically execute transitions between the Master and Game Servers.
+
+
+ This class (and the Player class) should be extended to implement your own game logic.
+ You can override CreatePlayer as "factory" method for Players and return your own Player instances.
+ The State of this class is essential to know when a client is in a lobby (or just on the master)
+ and when in a game where the actual gameplay should take place.
+ Extension notes:
+ An extension of this class should override the methods of the IPhotonPeerListener, as they
+ are called when the state changes. Call base.method first, then pick the operation or state you
+ want to react to and put it in a switch-case.
+ We try to provide demo to each platform where this api can be used, so lookout for those.
+
+
+
+
+ The client uses a LoadBalancingPeer as API to communicate with the server.
+ This is public for ease-of-use: Some methods like OpRaiseEvent are not relevant for the connection state and don't need a override.
+
+
+
+
+ Gets or sets the binary protocol version used by this client
+
+
+ Use this always instead of setting it via
+ () directly, especially when WSS protocol is used.
+
+
+
+ The version of your client. A new version also creates a new "virtual app" to separate players from older client versions.
+
+
+ The AppID as assigned from the Photon Cloud. If you host yourself, this is the "regular" Photon Server Application Name (most likely: "LoadBalancing").
+
+
+ The ClientAppType defines which sort of AppId should be expected. The LoadBalancingClient supports Realtime and Voice app types. Default: Realtime.
+
+
+ User authentication values to be sent to the Photon server right after connecting.
+ Set this property or pass AuthenticationValues by Connect(..., authValues).
+
+
+ Enables the new Authentication workflow.
+
+
+ Defines how the communication gets encrypted.
+
+
+ Optionally contains a protocol which will be used on Master- and GameServer.
+
+ When using AuthMode = AuthModeOption.AuthOnceWss, the client uses a wss-connection on the NameServer but another protocol on the other servers.
+ As the NameServer sends an address, which is different per protocol, it needs to know the expected protocol.
+
+ This is nullable by design. In many cases, the protocol on the NameServer is not different from the other servers.
+ If set, the operation AuthOnce will contain this value and the OpAuth response on the NameServer will execute a protocol switch.
+
+
+
+ Simplifies getting the token for connect/init requests, if this feature is enabled.
+
+
+ Internally used cache for the server's token. Identifies a user/session and can be used to rejoin.
+
+
+ True if this client uses a NameServer to get the Master Server address.
+ This value is public, despite being an internal value, which should only be set by this client.
+
+
+ Name Server Host Name for Photon Cloud. Without port and without any prefix.
+
+
+ Name Server Address for Photon Cloud (based on current protocol). You can use the default values and usually won't have to set this value.
+
+
+ Name Server port per protocol (the UDP port is different than TCP, etc).
+
+
+ Replaced by ServerPortOverrides.
+
+
+ Defines overrides for server ports. Used per server-type if > 0. Important: You must change these when the protocol changes!
+
+ Typical ports are listed in PhotonPortDefinition.
+
+ Instead of using the port provided from the servers, the specified port is used (independent of the protocol).
+ If a value is 0 (default), the port is not being replaced.
+
+ Different protocols have different typical ports per server-type.
+ https://doc.photonengine.com/en-us/pun/current/reference/tcp-and-udp-port-numbers
+
+ In case of using the AuthMode AutOnceWss, the name server's protocol is wss, while udp or tcp will be used on the master server and game server.
+ Set the ports accordingly per protocol and server.
+
+
+
+ Enables the fallback to WSS, should the initial connect to the Name Server fail. Some exceptions apply.
+
+ For security reasons, a fallback to another protocol is not done when using WSS or AuthMode.AuthOnceWss.
+ That would compromise the expected security.
+
+ If the fallback is impossible or if that connection also fails, the app logic must handle the case.
+ It might even make sense to just try the same connection settings once more (or ask the user to do something about
+ the network connectivity, firewalls, etc).
+
+ The fallback will use the default Name Server port as defined by ProtocolToNameServerPort.
+
+
+
+ The currently used server address (if any). The type of server is defined by Server property.
+
+
+ Your Master Server address. In PhotonCloud, call ConnectToRegionMaster() to find your Master Server.
+
+ In the Photon Cloud, explicit definition of a Master Server Address is not best practice.
+ The Photon Cloud has a "Name Server" which redirects clients to a specific Master Server (per Region and AppId).
+
+
+
+ The game server's address for a particular room. In use temporarily, as assigned by master.
+
+
+ Provides a custom function to re-write server addresses in case the client must use a third party relay.
+
+ Discord Activities can only communicate with the domain discord.com.
+ A forwarding system based on paths is used to replace addresses that are not on that domain.
+
+
+
+ The server this client is currently connected or connecting to.
+
+ Each server (NameServer, MasterServer, GameServer) allow some operations and reject others.
+
+
+
+
+ Defines a proxy URL for WebSocket connections. Can be the proxy or point to a .pac file.
+
+
+ This URL supports various definitions:
+
+ "user:pass@proxyaddress:port"
+ "proxyaddress:port"
+ "system:"
+ "pac:"
+ "pac:http://host/path/pacfile.pac"
+
+ Important: Don't define a protocol, except to point to a pac file. the proxy address should not begin with http:// or https://.
+
+
+
+ Count of connections made to any server.
+ Statistical value. Increased by OnStatusChanged(StatusCode.Connect).
+
+
+ Backing field for property.
+
+
+ Current state this client is in. Careful: several states are "transitions" that lead to other states.
+
+
+ Returns if this client is currently connected or connecting to some type of server.
+ This is even true while switching servers. Use IsConnectedAndReady to check only for those states that enable you to send Operations.
+
+
+
+ A refined version of IsConnected which is true only if your connection is ready to send operations.
+
+
+ Not all operations can be called on all types of servers. If an operation is unavailable on the currently connected server,
+ this will result in a OperationResponse with ErrorCode != 0.
+
+ Examples: The NameServer allows OpGetRegions which is not available anywhere else.
+ The MasterServer does not allow you to send events (OpRaiseEvent) and on the GameServer you are unable to join a lobby (OpJoinLobby).
+
+ To check which server you are on, use: .
+
+
+
+ Register a method to be called when this client's ClientState gets set.
+ This can be useful to react to being connected, joined into a room, etc.
+
+
+ Register a method to be called when an event got dispatched. Gets called after the LoadBalancingClient handled the internal events first.
+
+ This is an alternative to extending LoadBalancingClient to override OnEvent().
+
+ Note that OnEvent is calling EventReceived after it handled internal events first.
+ That means for example: Joining players will already be in the player list but leaving
+ players will already be removed from the room.
+
+
+
+ Register a method to be called when an operation response is received.
+
+ This is an alternative to extending LoadBalancingClient to override OnOperationResponse().
+
+ Note that OnOperationResponse gets executed before your Action is called.
+ That means for example: The OpJoinLobby response already set the state to "JoinedLobby"
+ and the response to OpLeave already triggered the Disconnect before this is called.
+
+
+
+ Wraps up the target objects for a group of callbacks, so they can be called conveniently.
+ By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks.
+
+
+ Wraps up the target objects for a group of callbacks, so they can be called conveniently.
+ By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks.
+
+
+ Wraps up the target objects for a group of callbacks, so they can be called conveniently.
+ By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks.
+
+
+ Wraps up the target objects for a group of callbacks, so they can be called conveniently.
+ By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks.
+
+
+ Wraps up the target objects for a group of callbacks, so they can be called conveniently.
+ By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks.
+
+
+ Wraps up the target objects for a group of callbacks, so they can be called conveniently.
+ By using Add or Remove, objects can "subscribe" or "unsubscribe" for this group of callbacks.
+
+
+ Summarizes (aggregates) the different causes for disconnects of a client.
+
+ A disconnect can be caused by: errors in the network connection or some vital operation failing
+ (which is considered "high level"). While operations always trigger a call to OnOperationResponse,
+ connection related changes are treated in OnStatusChanged.
+ The DisconnectCause is set in either case and summarizes the causes for any disconnect in a single
+ state value which can be used to display (or debug) the cause for disconnection.
+
+
+
+ Defaults to null. Set when the client receives a disconnect info message with a debug string. Reset to null in connect methods.
+
+
+ Defines if this client sends telemetry / analytics about how the connection ends.
+
+
+ Tells us if "this session" was already reported. We want to send only one report in best case. Re-set on connect.
+
+
+
+ After a to a connection loss or timeout, this summarizes the most relevant system conditions which might have contributed to the loss.
+
+
+
+
+
+ Internal value if the client is in a lobby.
+ This is used to re-set this.State, when joining/creating a room fails.
+
+
+ The lobby this client currently uses. Defined when joining a lobby or creating rooms
+
+
+
+ If enabled, the client will get a list of available lobbies from the Master Server.
+
+
+ Set this value before the client connects to the Master Server. While connected to the Master
+ Server, a change has no effect.
+
+ Implement OptionalInfoCallbacks.OnLobbyStatisticsUpdate, to get the list of used lobbies.
+
+ The lobby statistics can be useful if your title dynamically uses lobbies, depending (e.g.)
+ on current player activity or such.
+ In this case, getting a list of available lobbies, their room-count and player-count can
+ be useful info.
+
+ ConnectUsingSettings sets this to the PhotonServerSettings value.
+
+
+
+ Internal lobby stats cache, used by LobbyStatistics.
+
+
+ The local player is never null but not valid unless the client is in a room, too. The ID will be -1 outside of rooms.
+
+
+
+ The nickname of the player (synced with others). Same as client.LocalPlayer.NickName.
+
+
+
+ An ID for this user. Sent in OpAuthenticate when you connect. If not set, the PlayerName is applied during connect.
+
+ On connect, if the UserId is null or empty, the client will copy the PlayName to UserId. If PlayerName is not set either
+ (before connect), the server applies a temporary ID which stays unknown to this client and other clients.
+
+ The UserId is what's used in FindFriends and for fetching data for your account (with WebHooks e.g.).
+
+ By convention, set this ID before you connect, not while being connected.
+ There is no error but the ID won't change while being connected.
+
+
+
+ The current room this client is connected to (null if none available).
+
+
+ Is true while being in a room (this.state == ClientState.Joined).
+
+ Aside from polling this value, game logic should implement IMatchmakingCallbacks in some class
+ and react when that gets called.
+ OpRaiseEvent, OpLeave and some other operations can only be used (successfully) when the client is in a room..
+
+
+
+ Statistic value available on master server: Players on master (looking for games).
+
+
+ Statistic value available on master server: Players in rooms (playing).
+
+
+ Statistic value available on master server: Rooms currently created.
+
+
+ Internally used to decide if a room must be created or joined on game server.
+
+
+ Used when the client arrives on the GS, to join the room with the correct values.
+
+
+ Used to cache a failed "enter room" operation on the Game Server, to return to the Master Server before calling a fail-callback.
+
+
+ Maximum of userIDs that can be sent in one friend list request.
+
+
+ Contains the list of names of friends to look up their state on the server.
+
+
+ Internal flag to know if the client currently fetches a friend list.
+
+
+ The cloud region this client connects to. Set by ConnectToRegionMaster(). Not set if you don't use a NameServer!
+
+
+ The cluster name provided by the Name Server.
+
+ The value is provided by the OpResponse for OpAuthenticate/OpAuthenticateOnce.
+ Default: null. This value only ever updates from the Name Server authenticate response.
+
+
+
+ Contains the list if enabled regions this client may use. Null, unless the client got a response to OpGetRegions.
+
+
+ Stores the best region summary of a previous session to speed up connecting.
+
+
+ Set when the best region pinging is done.
+
+
+ Internal connection setting/flag. If the client should connect to the best region or not.
+
+ It's set in the Connect...() methods. Only ConnectUsingSettings() sets it to true.
+ If true, client will ping available regions and select the best.
+ A bestRegionSummaryFromStorage can be used to cut the ping time short.
+
+
+
+ Definition of parameters for encryption data (included in Authenticate operation response).
+
+
+
+ Key for encryption mode
+
+
+
+
+ Key for first secret
+
+
+
+
+ Key for second secret
+
+
+
+ Add if true, remove if false.
+
+
+ Creates a LoadBalancingClient with UDP protocol or the one specified.
+ Specifies the network protocol to use for connections.
+
+
+ Creates a LoadBalancingClient, setting various values needed before connecting.
+ The Master Server's address to connect to. Used in Connect.
+ The AppId of this title. Needed for the Photon Cloud. Find it in the Dashboard.
+ A version for this client/build. In the Photon Cloud, players are separated by AppId, GameVersion and Region.
+ Specifies the network protocol to use for connections.
+
+
+
+ Gets the NameServer Address (with prefix and port), based on the set protocol (this.LoadBalancingPeer.TransportProtocol).
+
+ NameServer Address (with prefix and port).
+
+
+ Build URI from address, use Scheme, Host and Path but set the port as defined by port-field or default port. Calls AddressRewriter if set.
+
+
+
+ Starts the "process" to connect as defined by the appSettings (AppId, AppVersion, Transport Protocol, Port and more).
+
+ A typical connection process wraps up these steps:
+ - Low level connect and init (which establishes a connection that enables operations and responses for the Realtime API).
+ - GetRegions and select best (unless FixedRegion is being used).
+ - Authenticate user for a specific region (this provides a Master Server address to go to and a token).
+ - Disconnect Name Server and connect to Master Server (using the token).
+ - The callback OnConnectedToMaster gets called.
+
+ Connecting to the servers is a process and this is a non-blocking method.
+ Implement and register the IConnectionCallbacks interface to get callbacks about success or failing connects.
+
+ Basically all settings for the connection, AppId and servers can be done via the provided parameter.
+
+ Connecting to the Photon Cloud might fail due to:
+ - Network issues
+ - Region not available
+ - Subscription CCU limit
+
+
+
+ Collection of settings defining this app and how to connect.
+ True if the client can attempt to connect.
+
+
+
+ Starts the "process" to connect to a Master Server, using MasterServerAddress and AppId properties.
+
+
+ To connect to the Photon Cloud, use ConnectUsingSettings() or ConnectToRegionMaster().
+
+ The process to connect includes several steps: the actual connecting, establishing encryption, authentification
+ (of app and optionally the user) and connecting to the MasterServer
+
+ Users can connect either anonymously or use "Custom Authentication" to verify each individual player's login.
+ Custom Authentication in Photon uses external services and communities to verify users. While the client provides a user's info,
+ the service setup is done in the Photon Cloud Dashboard.
+ The parameter authValues will set this.AuthValues and use them in the connect process.
+
+ Connecting to the Photon Cloud might fail due to:
+ - Network issues (OnStatusChanged() StatusCode.ExceptionOnConnect)
+ - Region not available (OnOperationResponse() for OpAuthenticate with ReturnCode == ErrorCode.InvalidRegion)
+ - Subscription CCU limit reached (OnOperationResponse() for OpAuthenticate with ReturnCode == ErrorCode.MaxCcuReached)
+
+
+
+
+ Connects to the NameServer for Photon Cloud, where a region and server list can be obtained.
+
+
+ If the workflow was started or failed right away.
+
+
+
+ Connects you to a specific region's Master Server, using the Name Server to get the IP.
+
+
+ If the region is null or empty, no connection will be made.
+ If the region (code) provided is not available, the connection process will fail on the Name Server.
+ This method connects only to the region defined. Any "Best Region" pinging should get done beforehand.
+
+ To support "sharding", a region string may contain a "/*" to pick a random cluster or "/clustername"
+ to connect to a specific cluster.
+ With a "/" or no cluster postfix, the client connects to the default cluster (a specific one
+ for a region).
+
+ By default, the region string provided by the Name Server does not contain a cluster (and only the
+ default cluster is used).
+
+ If the operation could be sent. If false, no operation was sent.
+
+
+
+ Privately used only for reconnecting.
+
+
+
+ Can be used to reconnect to the master server after a disconnect.
+ Common use case: Press the Lock Button on a iOS device and you get disconnected immediately.
+
+
+
+ Can be used to return to a room quickly by directly reconnecting to a game server to rejoin a room.
+
+
+ Rejoining room will not send any player properties. Instead client will receive up-to-date ones from server.
+ If you want to set new player properties, do it once rejoined.
+
+ False, if the conditions are not met. Then, this client does not attempt the ReconnectAndRejoin.
+
+
+ Disconnects the peer from a server or stays disconnected. If the client / peer was connected, a callback will be triggered.
+
+ Disconnect will attempt to notify the server of the client closing the connection.
+
+ Clients that are in a room, will leave the room. If the room's playerTTL > 0, the player will just become inactive (and may rejoin).
+
+ This method will not change the current State, if this client State is PeerCreated, Disconnecting or Disconnected.
+ In those cases, there is also no callback for the disconnect. The DisconnectedCause will only change if the client was connected.
+
+
+
+ Disconnects the client / peer from a server or stays disconnected. Internal method that sets the DisconnectedCause as well.
+
+
+
+ Private Disconnect variant that sets the state, too.
+
+
+
+
+ Useful to test loss of connection which will end in a client timeout. This modifies LoadBalancingPeer.NetworkSimulationSettings. Read remarks.
+
+
+ Use with care as this sets LoadBalancingPeer.IsSimulationEnabled.
+ Read LoadBalancingPeer.IsSimulationEnabled to check if this is on or off, if needed.
+
+ If simulateTimeout is true, LoadBalancingPeer.NetworkSimulationSettings.IncomingLossPercentage and
+ LoadBalancingPeer.NetworkSimulationSettings.OutgoingLossPercentage will be set to 100.
+ Obviously, this overrides any network simulation settings done before.
+
+ If you want fine-grained network simulation control, use the NetworkSimulationSettings.
+
+ The timeout will lead to a call to , as usual in a client timeout.
+
+ You could modify this method (or use NetworkSimulationSettings) to deliberately run into a server timeout by
+ just setting the OutgoingLossPercentage = 100 and the IncomingLossPercentage = 0.
+
+ If true, a connection loss is simulated. If false, the simulation ends.
+
+
+
+ This method dispatches all available incoming commands and then sends this client's outgoing commands.
+ It uses DispatchIncomingCommands and SendOutgoingCommands to do that.
+
+
+ The Photon client libraries are designed to fit easily into a game or application. The application
+ is in control of the context (thread) in which incoming events and responses are executed and has
+ full control of the creation of UDP/TCP packages.
+
+ Sending packages and dispatching received messages are two separate tasks. Service combines them
+ into one method at the cost of control. It calls DispatchIncomingCommands and SendOutgoingCommands.
+
+ Call this method regularly (10..50 times a second).
+
+ This will Dispatch ANY received commands (unless a reliable command in-order is still missing) and
+ events AND will send queued outgoing commands. Fewer calls might be more effective if a device
+ cannot send many packets per second, as multiple operations might be combined into one package.
+
+
+ You could replace Service by:
+
+ while (DispatchIncomingCommands()); //Dispatch until everything is Dispatched...
+ SendOutgoingCommands(); //Send a UDP/TCP package with outgoing messages
+
+
+
+
+
+
+ While on the NameServer, this gets you the list of regional servers (short names and their IPs to ping them).
+
+ If the operation could be sent. If false, no operation was sent (e.g. while not connected to the NameServer).
+
+
+
+ Request the rooms and online status for a list of friends. All clients should set a unique UserId before connecting. The result is available in this.FriendList.
+
+
+ Used on Master Server to find the rooms played by a selected list of users.
+ The result will be stored in LoadBalancingClient.FriendList, which is null before the first server response.
+
+ Users identify themselves by setting a UserId in the LoadBalancingClient instance.
+ This will send the ID in OpAuthenticate during connect (to master and game servers).
+ Note: Changing a player's name doesn't make sense when using a friend list.
+
+ The list of usernames must be fetched from some other source (not provided by Photon).
+
+
+ Internal:
+ The server response includes 2 arrays of info (each index matching a friend from the request):
+ ParameterCode.FindFriendsResponseOnlineList = bool[] of online states
+ ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
+
+ The options may be used to define which state a room must match to be returned.
+
+ Array of friend's names (make sure they are unique).
+ Options that affect the result of the FindFriends operation.
+ If the operation could be sent (requires connection).
+
+
+ If already connected to a Master Server, this joins the specified lobby. This request triggers an OnOperationResponse() call and the callback OnJoinedLobby().
+ The lobby to join. Use null for default lobby.
+ If the operation could be sent. False, if the client is not IsConnectedAndReady or when it's not connected to a Master Server.
+
+
+ Opposite of joining a lobby. You don't have to explicitly leave a lobby to join another (client can be in one max, at any time).
+ If the operation could be sent (has to be connected).
+
+
+
+ Joins a random room that matches the filter. Will callback: OnJoinedRoom or OnJoinRandomFailed.
+
+
+ Used for random matchmaking. You can join any room or one with specific properties defined in opJoinRandomRoomParams.
+
+ You can use expectedCustomRoomProperties and expectedMaxPlayers as filters for accepting rooms.
+ If you set expectedCustomRoomProperties, a room must have the exact same key values set at Custom Properties.
+ You need to define which Custom Room Properties will be available for matchmaking when you create a room.
+ See: OpCreateRoom(string roomName, RoomOptions roomOptions, TypedLobby lobby)
+
+ This operation fails if no rooms are fitting or available (all full, closed or not visible).
+ It may also fail when actually joining the room which was found. Rooms may close, become full or empty anytime.
+
+ This method can only be called while the client is connected to a Master Server so you should
+ implement the callback OnConnectedToMaster.
+ Check the return value to make sure the operation will be called on the server.
+ Note: There will be no callbacks if this method returned false.
+
+
+ This client's State is set to ClientState.Joining immediately, when the operation could
+ be called. In the background, the client will switch servers and call various related operations.
+
+ When you're in the room, this client's State will become ClientState.Joined.
+
+
+ When entering a room, this client's Player Custom Properties will be sent to the room.
+ Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room.
+ Note that the player properties will be cached locally and are not wiped when leaving a room.
+
+ More about matchmaking:
+ https://doc.photonengine.com/en-us/realtime/current/reference/matchmaking-and-lobby
+
+ You can define an array of expectedUsers, to block player slots in the room for these users.
+ The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages.
+
+ Optional definition of properties to filter rooms in random matchmaking.
+ If the operation could be sent currently (requires connection to Master Server).
+
+
+
+ Attempts to join a room that matches the specified filter and creates a room if none found.
+
+
+ This operation is a combination of filter-based random matchmaking with the option to create a new room,
+ if no fitting room exists.
+ The benefit of that is that the room creation is done by the same operation and the room can be found
+ by the very next client, looking for similar rooms.
+
+ There are separate parameters for joining and creating a room.
+
+ Tickets: Both parameter types have a Ticket value. It is enough to set the opJoinRandomRoomParams.Ticket.
+ The createRoomParams.Ticket will not be used.
+
+ This method can only be called while connected to a Master Server.
+ This client's State is set to ClientState.Joining immediately.
+
+ For success, IMatchmakingCallbacks.OnJoinedRoom or IMatchmakingCallbacks.OnCreatedRoom get called.
+ In error cases IMatchmakingCallbacks.OnJoinRoomFailed or IMatchmakingCallbacks.OnJoinRandomRoomFailed get called.
+
+ More about matchmaking:
+ https://doc.photonengine.com/en-us/realtime/current/reference/matchmaking-and-lobby
+
+ Check the return value to make sure the operation will be called on the server.
+ Note: There will be no callbacks if this method returned false.
+
+ If the operation will be sent (requires connection to Master Server).
+
+
+
+ Creates a new room. Will callback: OnCreatedRoom and OnJoinedRoom or OnCreateRoomFailed.
+
+
+ When successful, the client will enter the specified room and callback both OnCreatedRoom and OnJoinedRoom.
+ In all error cases, OnCreateRoomFailed gets called.
+
+ Creating a room will fail if the room name is already in use or when the RoomOptions clashing
+ with one another. Check the EnterRoomParams reference for the various room creation options.
+
+
+ This method can only be called while the client is connected to a Master Server so you should
+ implement the callback OnConnectedToMaster.
+ Check the return value to make sure the operation will be called on the server.
+ Note: There will be no callbacks if this method returned false.
+
+
+ When you're in the room, this client's State will become ClientState.Joined.
+
+
+ When entering a room, this client's Player Custom Properties will be sent to the room.
+ Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room.
+ Note that the player properties will be cached locally and are not wiped when leaving a room.
+
+ You can define an array of expectedUsers, to block player slots in the room for these users.
+ The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages.
+
+ Definition of properties for the room to create.
+ If the operation could be sent currently (requires connection to Master Server).
+
+
+
+ Joins a specific room by name and creates it on demand. Will callback: OnJoinedRoom or OnJoinRoomFailed.
+
+
+ Useful when players make up a room name to meet in:
+ All involved clients call the same method and whoever is first, also creates the room.
+
+ When successful, the client will enter the specified room.
+ The client which creates the room, will callback both OnCreatedRoom and OnJoinedRoom.
+ Clients that join an existing room will only callback OnJoinedRoom.
+ In all error cases, OnJoinRoomFailed gets called.
+
+ Joining a room will fail, if the room is full, closed or when the user
+ already is present in the room (checked by userId).
+
+ To return to a room, use OpRejoinRoom.
+
+ This method can only be called while the client is connected to a Master Server so you should
+ implement the callback OnConnectedToMaster.
+ Check the return value to make sure the operation will be called on the server.
+ Note: There will be no callbacks if this method returned false.
+
+ This client's State is set to ClientState.Joining immediately, when the operation could
+ be called. In the background, the client will switch servers and call various related operations.
+
+ When you're in the room, this client's State will become ClientState.Joined.
+
+
+ If you set room properties in roomOptions, they get ignored when the room is existing already.
+ This avoids changing the room properties by late joining players.
+
+ When entering a room, this client's Player Custom Properties will be sent to the room.
+ Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room.
+ Note that the player properties will be cached locally and are not wiped when leaving a room.
+
+ You can define an array of expectedUsers, to block player slots in the room for these users.
+ The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages.
+
+ Definition of properties for the room to create or join.
+ If the operation could be sent currently (requires connection to Master Server).
+
+
+
+ Joins a room by name. Will callback: OnJoinedRoom or OnJoinRoomFailed.
+
+
+ Useful when using lobbies or when players follow friends or invite each other.
+
+ When successful, the client will enter the specified room and callback via OnJoinedRoom.
+ In all error cases, OnJoinRoomFailed gets called.
+
+ Joining a room will fail if the room is full, closed, not existing or when the user
+ already is present in the room (checked by userId).
+
+ To return to a room, use OpRejoinRoom.
+ When players invite each other and it's unclear who's first to respond, use OpJoinOrCreateRoom instead.
+
+ This method can only be called while the client is connected to a Master Server so you should
+ implement the callback OnConnectedToMaster.
+ Check the return value to make sure the operation will be called on the server.
+ Note: There will be no callbacks if this method returned false.
+
+ A room's name has to be unique (per region, appid and gameversion).
+ When your title uses a global matchmaking or invitations (e.g. an external solution),
+ keep regions and the game versions in mind to join a room.
+
+
+ This client's State is set to ClientState.Joining immediately, when the operation could
+ be called. In the background, the client will switch servers and call various related operations.
+
+ When you're in the room, this client's State will become ClientState.Joined.
+
+
+ When entering a room, this client's Player Custom Properties will be sent to the room.
+ Use LocalPlayer.SetCustomProperties to set them, even while not yet in the room.
+ Note that the player properties will be cached locally and are not wiped when leaving a room.
+
+ You can define an array of expectedUsers, to reserve player slots in the room for friends or party members.
+ The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages.
+
+ Definition of properties for the room to join.
+ If the operation could be sent currently (requires connection to Master Server).
+
+
+
+ Rejoins a room by roomName (using the userID internally to return). Will callback: OnJoinedRoom or OnJoinRoomFailed.
+
+
+ Used to return to a room, before this user was removed from the players list.
+ Internally, the userID will be checked by the server, to make sure this user is in the room (active or inactice).
+
+ In contrast to join, this operation never adds a players to a room. It will attempt to retake an existing
+ spot in the playerlist or fail. This makes sure the client doesn't accidentally join a room when the
+ game logic meant to re-activate an existing actor in an existing room.
+
+ This method will fail on the server, when the room does not exist, can't be loaded (persistent rooms) or
+ when the userId is not in the player list of this room. This will lead to a callback OnJoinRoomFailed.
+
+ Rejoining room will not send any player properties. Instead client will receive up-to-date ones from server.
+ If you want to set new player properties, do it once rejoined.
+
+ Tickets: If the server requires use of Tickets or if the room was entered with a Ticket initially,
+ you will have to provide a ticket as argument.
+
+
+
+
+ Leaves the current room, optionally telling the server that the user is just becoming inactive. Will callback: OnLeftRoom.
+
+
+
+ OpLeaveRoom skips execution when the room is null or the server is not GameServer or the client is disconnecting from GS already.
+ OpLeaveRoom returns false in those cases and won't change the state, so check return of this method.
+
+ In some cases, this method will skip the OpLeave call and just call Disconnect(),
+ which not only leaves the room but also the server. Disconnect also triggers a leave and so that workflow is is quicker.
+
+ If true, this player becomes inactive in the game and can return later (if PlayerTTL of the room is != 0).
+ WebFlag: Securely transmit the encrypted object AuthCookie to the web service in PathLeave webhook when available
+ If the current room could be left (impossible while not in a room).
+
+
+ Gets a list of rooms matching the (non empty) SQL filter for the given SQL-typed lobby.
+
+ Operation is only available for lobbies of type SqlLobby and the filter can not be empty.
+ It will check those conditions and fail locally, returning false.
+
+ This is an async request which triggers a OnOperationResponse() call.
+
+
+ The lobby to query. Has to be of type SqlLobby.
+ The sql query statement.
+ If the operation could be sent (has to be connected).
+
+
+
+ Updates and synchronizes a Player's Custom Properties. Optionally, expectedProperties can be provided as condition.
+
+
+ Custom Properties are a set of string keys and arbitrary values which is synchronized
+ for the players in a Room. They are available when the client enters the room, as
+ they are in the response of OpJoin and OpCreate.
+
+ Custom Properties either relate to the (current) Room or a Player (in that Room).
+
+ Both classes locally cache the current key/values and make them available as
+ property: CustomProperties. This is provided only to read them.
+ You must use the method SetCustomProperties to set/modify them.
+
+ Any client can set any Custom Properties anytime (when in a room).
+ It's up to the game logic to organize how they are best used.
+
+ You should call SetCustomProperties only with key/values that are new or changed. This reduces
+ traffic and performance.
+
+ Unless you define some expectedProperties, setting key/values is always permitted.
+ In this case, the property-setting client will not receive the new values from the server but
+ instead update its local cache in SetCustomProperties.
+
+ If you define expectedProperties, the server will skip updates if the server property-cache
+ does not contain all expectedProperties with the same values.
+ In this case, the property-setting client will get an update from the server and update it's
+ cached key/values at about the same time as everyone else.
+
+ The benefit of using expectedProperties can be only one client successfully sets a key from
+ one known value to another.
+ As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally.
+ When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their
+ actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to
+ take the item will have it (and the others fail to set the ownership).
+
+ Properties get saved with the game state for Turnbased games (which use IsPersistent = true).
+
+ Defines which player the Custom Properties belong to. ActorID of a player.
+ Hashtable of Custom Properties that changes.
+ Provide some keys/values to use as condition for setting the new values. Client must be in room.
+ Defines if the set properties should be forwarded to a WebHook. Client must be in room.
+
+ False if propertiesToSet is null or empty or have zero string keys.
+ If not in a room, returns true if local player and expectedProperties and webFlags are null.
+ False if actorNr is lower than or equal to zero.
+ Otherwise, returns if the operation could be sent to the server.
+
+
+
+ Internally used to cache and set properties (including well known properties).
+ Requires being in a room (because this attempts to send an operation which will fail otherwise).
+
+
+
+ Updates and synchronizes this Room's Custom Properties. Optionally, expectedProperties can be provided as condition.
+
+
+ Custom Properties are a set of string keys and arbitrary values which is synchronized
+ for the players in a Room. They are available when the client enters the room, as
+ they are in the response of OpJoin and OpCreate.
+
+ Custom Properties either relate to the (current) Room or a Player (in that Room).
+
+ Both classes locally cache the current key/values and make them available as
+ property: CustomProperties. This is provided only to read them.
+ You must use the method SetCustomProperties to set/modify them.
+
+ Any client can set any Custom Properties anytime (when in a room).
+ It's up to the game logic to organize how they are best used.
+
+ You should call SetCustomProperties only with key/values that are new or changed. This reduces
+ traffic and performance.
+
+ Unless you define some expectedProperties, setting key/values is always permitted.
+ In this case, the property-setting client will not receive the new values from the server but
+ instead update its local cache in SetCustomProperties.
+
+ If you define expectedProperties, the server will skip updates if the server property-cache
+ does not contain all expectedProperties with the same values.
+ In this case, the property-setting client will get an update from the server and update it's
+ cached key/values at about the same time as everyone else.
+
+ The benefit of using expectedProperties can be only one client successfully sets a key from
+ one known value to another.
+ As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally.
+ When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their
+ actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to
+ take the item will have it (and the others fail to set the ownership).
+
+ Properties get saved with the game state for Turnbased games (which use IsPersistent = true).
+
+ Hashtable of Custom Properties that changes.
+ Provide some keys/values to use as condition for setting the new values.
+ Defines web flags for an optional PathProperties webhook.
+
+ False if propertiesToSet is null or empty or have zero string keys.
+ Otherwise, returns if the operation could be sent to the server.
+
+
+
+ Internally used to cache and set properties (including well known properties).
+ Requires being in a room (because this attempts to send an operation which will fail otherwise).
+
+
+
+ Send an event with custom code/type and any content to the other players in the same room.
+
+ Identifies this type of event (and the content). Your game's event codes can start with 0.
+ Any serializable datatype (including Hashtable like the other OpRaiseEvent overloads).
+ Contains used send options. If you pass null, the default options will be used.
+ Send options for reliable, encryption etc
+ If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
+
+
+
+ Operation to handle this client's interest groups (for events in room).
+
+
+ Note the difference between passing null and byte[0]:
+ null won't add/remove any groups.
+ byte[0] will add/remove all (existing) groups.
+ First, removing groups is executed. This way, you could leave all groups and join only the ones provided.
+
+ Changes become active not immediately but when the server executes this operation (approximately RTT/2).
+
+ Groups to remove from interest. Null will not remove any. A byte[0] will remove all.
+ Groups to add to interest. Null will not add any. A byte[0] will add all current.
+ If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
+
+
+
+ Privately used to read-out properties coming from the server in events and operation responses (which might be a bit tricky).
+
+
+
+
+ Privately used only to read properties for a distinct actor (which might be the hashtable OR a key-pair value IN the actorProperties).
+
+
+
+ Internally used to set the LocalPlayer's actorNumber (from -1 to the actual in-room value) and optionally the userId.
+ New actorNr assigned when joining a room.
+ Set true for offline mode. If true the player.UserId is set to this.AuthValues.UserId or a new GUID (mimicking online mode).
+
+
+
+ Called internally, when a game was joined or created on the game server successfully.
+
+
+ This reads the response, finds out the local player's actorNumber (a.k.a. Player.ID) and applies properties of the room and players.
+ Errors for these operations are to be handled before this method is called.
+
+ Contains the server's response for an operation called by this peer.
+
+
+
+ Factory method to create a player instance - override to get your own player-type with custom features.
+
+ The name of the player to be created.
+ The player ID (a.k.a. actorNumber) of the player to be created.
+ Sets the distinction if the player to be created is your player or if its assigned to someone else.
+ The custom properties for this new player
+ The newly created player
+
+
+ Internal "factory" method to create a room-instance.
+
+
+ Debug output of low level api (and this client).
+ This method is not responsible to keep up the state of a LoadBalancingClient. Calling base.DebugReturn on overrides is optional.
+
+
+
+ Uses the OperationResponses provided by the server to advance the internal state and call ops as needed.
+
+
+ When this method finishes, it will call your OnOpResponseAction (if any). This way, you can get any
+ operation response without overriding this class.
+
+ To implement a more complex game/app logic, you should implement your own class that inherits the
+ LoadBalancingClient. Override this method to use your own operation-responses easily.
+
+ This method is essential to update the internal state of a LoadBalancingClient, so overriding methods
+ must call base.OnOperationResponse().
+
+ Contains the server's response for an operation called by this peer.
+
+
+
+ Uses the connection's statusCodes to advance the internal state and call operations as needed.
+
+ This method is essential to update the internal state of a LoadBalancingClient. Overriding methods must call base.OnStatusChanged.
+
+
+
+ Uses the photonEvent's provided by the server to advance the internal state and call ops as needed.
+
+ This method is essential to update the internal state of a LoadBalancingClient. Overriding methods must call base.OnEvent.
+
+
+ In Photon 4, "raw messages" will get their own callback method in the interface. Not used yet.
+
+
+ A callback of the RegionHandler, provided in OnRegionListReceived.
+ The regionHandler wraps up best region and other region relevant info.
+
+
+
+ This operation makes Photon call your custom web-service by path/name with the given parameters (converted into Json).
+ Use as a callback.
+
+
+ A WebRPC calls a custom, http-based function on a server you provide. The uriPath is relative to a "base path"
+ which is configured server-side. The sent parameters get converted from C# types to Json. Vice versa, the response
+ of the web-service will be converted to C# types and sent back as normal operation response.
+
+ To use this feature, you have to setup your server:
+
+ For a Photon Cloud application,
+ visit the Dashboard and setup "WebHooks". The BaseUrl is used for WebRPCs as well.
+
+ The class is a helper-class that extracts the most valuable content from the WebRPC
+ response.
+
+ The url path to call, relative to the baseUrl configured on Photon's server-side.
+ The parameters to send to the web-service method.
+ Defines if the authentication cookie gets sent to a WebHook (if setup).
+
+
+
+ Registers an object for callbacks for the implemented callback-interfaces.
+
+
+ Adding and removing callback targets is queued to not mess with callbacks in execution.
+ Internally, this means that the addition/removal is done before the LoadBalancingClient
+ calls the next callbacks. This detail should not affect a game's workflow.
+
+ The covered callback interfaces are: IConnectionCallbacks, IMatchmakingCallbacks,
+ ILobbyCallbacks, IInRoomCallbacks, IOnEventCallback and IWebRpcCallback.
+
+ See: DotNet Callbacks
+
+ The object that registers to get callbacks from this client.
+
+
+
+ Unregisters an object from callbacks for the implemented callback-interfaces.
+
+
+ Adding and removing callback targets is queued to not mess with callbacks in execution.
+ Internally, this means that the addition/removal is done before the LoadBalancingClient
+ calls the next callbacks. This detail should not affect a game's workflow.
+
+ The covered callback interfaces are: IConnectionCallbacks, IMatchmakingCallbacks,
+ ILobbyCallbacks, IInRoomCallbacks, IOnEventCallback and IWebRpcCallback.
+
+ See:
+
+ The object that unregisters from getting callbacks.
+
+
+
+ Applies queued callback cahnges from a queue to the actual containers. Will cause exceptions if used while callbacks execute.
+
+
+ There is no explicit check that this is not called during callbacks, however the implemented, private logic takes care of this.
+
+
+
+ Helper method to cast and apply a target per (interface) type.
+ Either of the interfaces for callbacks.
+ The queued change to apply (add or remove) some target.
+ The container that calls callbacks on it's list of targets.
+
+
+
+ Collection of "organizational" callbacks for the Realtime Api to cover: Connection and Regions.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+
+ Called to signal that the "low level connection" got established but before the client can call operation on the server.
+
+
+ After the (low level transport) connection is established, the client will automatically send
+ the Authentication operation, which needs to get a response before the client can call other operations.
+
+ Your logic should wait for either: OnRegionListReceived or OnConnectedToMaster.
+
+ This callback is useful to detect if the server can be reached at all (technically).
+ Most often, it's enough to implement OnDisconnected(DisconnectCause cause) and check for the cause.
+
+ This is not called for transitions from the masterserver to game servers.
+
+
+
+
+ Called when the client is connected to the Master Server and ready for matchmaking and other tasks.
+
+
+ The list of available rooms won't become available unless you join a lobby via LoadBalancingClient.OpJoinLobby.
+ You can join rooms and create them even without being in a lobby. The default lobby is used in that case.
+
+
+
+
+ Called after disconnecting from the Photon server. It could be a failure or an explicit disconnect call
+
+
+ The reason for this disconnect is provided as DisconnectCause.
+
+
+
+
+ Called when the Name Server provided a list of regions for your title.
+
+
+ This callback is called as soon as the list is available. No pings were sent for Best Region selection yet.
+ If the client is set to connect to the Best Region (lowest ping), one or more regions get pinged.
+ Not all regions are pinged. As soon as the results are final, the client will connect to the best region,
+ so you can check the ping results when connected to the Master Server.
+
+ Check the RegionHandler class description, to make use of the provided values.
+
+ The currently used RegionHandler.
+
+
+
+ Called when your Custom Authentication service responds with additional data.
+
+
+ Custom Authentication services can include some custom data in their response.
+ When present, that data is made available in this callback as Dictionary.
+ While the keys of your data have to be strings, the values can be either string or a number (in Json).
+ You need to make extra sure, that the value type is the one you expect. Numbers become (currently) int64.
+
+ Example: void OnCustomAuthenticationResponse(Dictionary<string, object> data) { ... }
+
+
+
+
+
+ Called when the custom authentication failed. Followed by disconnect!
+
+
+ Custom Authentication can fail due to user-input, bad tokens/secrets.
+ If authentication is successful, this method is not called. Implement OnJoinedLobby() or OnConnectedToMaster() (as usual).
+
+ During development of a game, it might also fail due to wrong configuration on the server side.
+ In those cases, logging the debugMessage is very important.
+
+ Unless you setup a custom authentication service for your app (in the [Dashboard](https://dashboard.photonengine.com)),
+ this won't be called!
+
+ Contains a debug message why authentication failed. This has to be fixed during development.
+
+
+
+ Collection of "organizational" callbacks for the Realtime Api to cover the Lobby.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+
+ Called on entering a lobby on the Master Server. The actual room-list updates will call OnRoomListUpdate.
+
+
+ While in the lobby, the roomlist is automatically updated in fixed intervals (which you can't modify in the public cloud).
+ The room list gets available via OnRoomListUpdate.
+
+
+
+
+ Called after leaving a lobby.
+
+
+ When you leave a lobby, [OpCreateRoom](@ref OpCreateRoom) and [OpJoinRandomRoom](@ref OpJoinRandomRoom)
+ automatically refer to the default lobby.
+
+
+
+
+ Called for any update of the room-listing while in a lobby (InLobby) on the Master Server.
+
+
+ Each item is a RoomInfo which might include custom properties (provided you defined those as lobby-listed when creating a room).
+ Not all types of lobbies provide a listing of rooms to the client. Some are silent and specialized for server-side matchmaking.
+
+ The list is sorted using two criteria: open or closed, full or not. So the list is composed of three groups, in this order:
+
+ first group: open and not full (joinable).
+ second group: full but not closed (not joinable).
+ third group: closed (not joinable, could be full or not).
+
+ In each group, entries do not have any particular order (random).
+
+ The list of rooms (or rooms' updates) is also limited in number, see Lobby Limits.
+
+
+
+
+ Called when the Master Server sent an update for the Lobby Statistics.
+
+
+ This callback has two preconditions:
+ EnableLobbyStatistics must be set to true, before this client connects.
+ And the client has to be connected to the Master Server, which is providing the info about lobbies.
+
+
+
+
+ Collection of "organizational" callbacks for the Realtime Api to cover Matchmaking.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+
+ Called when the server sent the response to a FindFriends request.
+
+
+ After calling OpFindFriends, the Master Server will cache the friend list and send updates to the friend
+ list. The friends includes the name, userId, online state and the room (if any) for each requested user/friend.
+
+ Use the friendList to update your UI and store it, if the UI should highlight changes.
+
+
+
+
+ Called when this client created a room and entered it. OnJoinedRoom() will be called as well.
+
+
+ This callback is only called on the client which created a room (see OpCreateRoom).
+
+ As any client might close (or drop connection) anytime, there is a chance that the
+ creator of a room does not execute OnCreatedRoom.
+
+ If you need specific room properties or a "start signal", implement OnMasterClientSwitched()
+ and make each new MasterClient check the room's state.
+
+
+
+
+ Called when the server couldn't create a room (OpCreateRoom failed).
+
+
+ Creating a room may fail for various reasons. Most often, the room already exists (roomname in use) or
+ the RoomOptions clash and it's impossible to create the room.
+
+ When creating a room fails on a Game Server:
+ The client will cache the failure internally and returns to the Master Server before it calls the fail-callback.
+ This way, the client is ready to find/create a room at the moment of the callback.
+ In this case, the client skips calling OnConnectedToMaster but returning to the Master Server will still call OnConnected.
+ Treat callbacks of OnConnected as pure information that the client could connect.
+
+ Operation ReturnCode from the server.
+ Debug message for the error.
+
+
+
+ Called when the LoadBalancingClient entered a room, no matter if this client created it or simply joined.
+
+
+ When this is called, you can access the existing players in Room.Players, their custom properties and Room.CustomProperties.
+
+ In this callback, you could create player objects. For example in Unity, instantiate a prefab for the player.
+
+ If you want a match to be started "actively", enable the user to signal "ready" (using OpRaiseEvent or a Custom Property).
+
+
+
+
+ Called when a previous OpJoinRoom call failed on the server.
+
+
+ Joining a room may fail for various reasons. Most often, the room is full or does not exist anymore
+ (due to someone else being faster or closing the room).
+
+ When joining a room fails on a Game Server:
+ The client will cache the failure internally and returns to the Master Server before it calls the fail-callback.
+ This way, the client is ready to find/create a room at the moment of the callback.
+ In this case, the client skips calling OnConnectedToMaster but returning to the Master Server will still call OnConnected.
+ Treat callbacks of OnConnected as pure information that the client could connect.
+
+ Operation ReturnCode from the server.
+ Debug message for the error.
+
+
+
+ Called when a previous OpJoinRandom (or OpJoinRandomOrCreateRoom etc.) call failed on the server.
+
+
+ The most common causes are that a room is full or does not exist (due to someone else being faster or closing the room).
+
+ This operation is only ever sent to the Master Server. Once a room is found by the Master Server, the client will
+ head off to the designated Game Server and use the operation Join on the Game Server.
+
+ When using multiple lobbies (via OpJoinLobby or a TypedLobby parameter), another lobby might have more/fitting rooms.
+
+ Operation ReturnCode from the server.
+ Debug message for the error.
+
+
+
+ Called when the local user/client left a room, so the game's logic can clean up it's internal state.
+
+
+ When leaving a room, the LoadBalancingClient will disconnect the Game Server and connect to the Master Server.
+ This wraps up multiple internal actions.
+
+ Wait for the callback OnConnectedToMaster, before you use lobbies and join or create rooms.
+
+ OnLeftRoom also gets called, when the application quits.
+ It makes sense to check static ConnectionHandler.AppQuits before loading scenes in OnLeftRoom().
+
+
+
+
+ Collection of "in room" callbacks for the Realtime Api to cover: Players entering or leaving, property updates and Master Client switching.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+
+ Called when a remote player entered the room. This Player is already added to the playerlist.
+
+
+ If your game starts with a certain number of players, this callback can be useful to check the
+ Room.playerCount and find out if you can start.
+
+
+
+
+ Called when a remote player left the room or became inactive. Check otherPlayer.IsInactive.
+
+
+ If another player leaves the room or if the server detects a lost connection, this callback will
+ be used to notify your game logic.
+
+ Depending on the room's setup, players may become inactive, which means they may return and retake
+ their spot in the room. In such cases, the Player stays in the Room.Players dictionary.
+
+ If the player is not just inactive, it gets removed from the Room.Players dictionary, before
+ the callback is called.
+
+
+
+
+ Called when room properties changed. The propertiesThatChanged contain only the keys that changed.
+
+
+ In most cases, this method gets called when some player changes the Room Properties.
+ However, there are also "Well Known Properties" (which use byte keys) and this callback may include them.
+ Especially when entering a room, the server will also send the required Well Known Properties and they
+ are not filtered out for the OnRoomPropertiesUpdate callback.
+
+ You can safely ignore the byte typed keys in propertiesThatChanged.
+
+ Changing properties is usually done by Room.SetCustomProperties.
+
+
+
+
+
+ Called when custom player-properties are changed.
+
+
+ Changing properties must be done by Player.SetCustomProperties, which causes this callback locally, too.
+
+ Contains Player that changed.
+ Contains the properties that changed.
+
+
+
+ Called after switching to a new MasterClient when the current one leaves.
+
+
+ This is not called when this client enters a room.
+ The former MasterClient is still in the player list when this method get called.
+
+
+
+
+ Event callback for the Realtime Api. Covers events from the server and those sent by clients via OpRaiseEvent.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+ Called for any incoming events.
+
+ To receive events, implement IOnEventCallback in any class and register it via AddCallbackTarget
+ (either in LoadBalancingClient or PhotonNetwork).
+
+ With the EventData.Sender you can look up the Player who sent the event.
+
+ It is best practice to assign an eventCode for each different type of content and action, so the Code
+ will be essential to read the incoming events.
+
+
+
+
+ Interface for "WebRpc" callbacks for the Realtime Api. Currently includes only responses for Web RPCs.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+
+ Called when the response to a WebRPC is available. See .
+
+
+ Important: The response.ReturnCode is 0 if Photon was able to reach your web-service.
+ The content of the response is what your web-service sent. You can create a WebRpcResponse from it.
+ Example: WebRpcResponse webResponse = new WebRpcResponse(operationResponse);
+
+ Please note: Class OperationResponse is in a namespace which needs to be "used":
+ using ExitGames.Client.Photon; // includes OperationResponse (and other classes)
+
+
+ public void OnWebRpcResponse(OperationResponse response)
+ {
+ Debug.LogFormat("WebRPC operation response {0}", response.ToStringFull());
+ switch (response.ReturnCode)
+ {
+ case ErrorCode.Ok:
+ WebRpcResponse webRpcResponse = new WebRpcResponse(response);
+ Debug.LogFormat("Parsed WebRPC response {0}", response.ToStringFull());
+ if (string.IsNullOrEmpty(webRpcResponse.Name))
+ {
+ Debug.LogError("Unexpected: WebRPC response did not contain WebRPC method name");
+ }
+ if (webRpcResponse.ResultCode == 0) // success
+ {
+ switch (webRpcResponse.Name)
+ {
+ // todo: add your code here
+ case GetGameListWebRpcMethodName: // example
+ // ...
+ break;
+ }
+ }
+ else if (webRpcResponse.ResultCode == -1)
+ {
+ Debug.LogErrorFormat("Web server did not return ResultCode for WebRPC method=\"{0}\", Message={1}", webRpcResponse.Name, webRpcResponse.Message);
+ }
+ else
+ {
+ Debug.LogErrorFormat("Web server returned ResultCode={0} for WebRPC method=\"{1}\", Message={2}", webRpcResponse.ResultCode, webRpcResponse.Name, webRpcResponse.Message);
+ }
+ break;
+ case ErrorCode.ExternalHttpCallFailed: // web service unreachable
+ Debug.LogErrorFormat("WebRPC call failed as request could not be sent to the server. {0}", response.DebugMessage);
+ break;
+ case ErrorCode.HttpLimitReached: // too many WebRPCs in a short period of time
+ // the debug message should contain the limit exceeded
+ Debug.LogErrorFormat("WebRPCs rate limit exceeded: {0}", response.DebugMessage);
+ break;
+ case ErrorCode.InvalidOperation: // WebRPC not configured at all OR not configured properly OR trying to send on name server
+ if (PhotonNetwork.Server == ServerConnection.NameServer)
+ {
+ Debug.LogErrorFormat("WebRPC not supported on NameServer. {0}", response.DebugMessage);
+ }
+ else
+ {
+ Debug.LogErrorFormat("WebRPC not properly configured or not configured at all. {0}", response.DebugMessage);
+ }
+ break;
+ default:
+ // other unknown error, unexpected
+ Debug.LogErrorFormat("Unexpected error, {0} {1}", response.ReturnCode, response.DebugMessage);
+ break;
+ }
+ }
+
+
+
+
+
+ Interface for event callback for the Realtime Api.
+
+
+ Classes that implement this interface must be registered to get callbacks for various situations.
+
+ To register for callbacks, call and pass the class implementing this interface
+ To stop getting callbacks, call and pass the class implementing this interface
+
+
+ \ingroup callbacks
+
+
+
+ Called when the client receives an event from the server indicating that an error happened there.
+
+
+ In most cases this could be either:
+ 1. an error from webhooks plugin (if HasErrorInfo is enabled), read more here:
+ https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks#options
+ 2. an error sent from a custom server plugin via PluginHost.BroadcastErrorInfoEvent, see example here:
+ https://doc.photonengine.com/en-us/server/current/plugins/manual#handling_http_response
+ 3. an error sent from the server, for example, when the limit of cached events has been exceeded in the room
+ (all clients will be disconnected and the room will be closed in this case)
+ read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/cached-events#special_considerations
+
+ If you implement or you will also get this event.
+
+ Object containing information about the error
+
+
+
+ Container type for callbacks defined by IConnectionCallbacks. See LoadBalancingCallbackTargets.
+
+
+ While the interfaces of callbacks wrap up the methods that will be called,
+ the container classes implement a simple way to call a method on all registered objects.
+
+
+
+
+ Container type for callbacks defined by IMatchmakingCallbacks. See MatchMakingCallbackTargets.
+
+
+ While the interfaces of callbacks wrap up the methods that will be called,
+ the container classes implement a simple way to call a method on all registered objects.
+
+
+
+
+ Container type for callbacks defined by IInRoomCallbacks. See InRoomCallbackTargets.
+
+
+ While the interfaces of callbacks wrap up the methods that will be called,
+ the container classes implement a simple way to call a method on all registered objects.
+
+
+
+
+ Container type for callbacks defined by ILobbyCallbacks. See LobbyCallbackTargets.
+
+
+ While the interfaces of callbacks wrap up the methods that will be called,
+ the container classes implement a simple way to call a method on all registered objects.
+
+
+
+
+ Container type for callbacks defined by IWebRpcCallback. See WebRpcCallbackTargets.
+
+
+ While the interfaces of callbacks wrap up the methods that will be called,
+ the container classes implement a simple way to call a method on all registered objects.
+
+
+
+
+ Container type for callbacks defined by . See .
+
+
+ While the interfaces of callbacks wrap up the methods that will be called,
+ the container classes implement a simple way to call a method on all registered objects.
+
+
+
+
+ Class wrapping the received event.
+
+
+ This is passed inside callback.
+ If you implement or you will also get but not parsed.
+
+ In most cases this could be either:
+ 1. an error from webhooks plugin (if HasErrorInfo is enabled), read more here:
+ https://doc.photonengine.com/en-us/realtime/current/gameplay/web-extensions/webhooks#options
+ 2. an error sent from a custom server plugin via PluginHost.BroadcastErrorInfoEvent, see example here:
+ https://doc.photonengine.com/en-us/server/current/plugins/manual#handling_http_response
+ 3. an error sent from the server, for example, when the limit of cached events has been exceeded in the room
+ (all clients will be disconnected and the room will be closed in this case)
+ read more here: https://doc.photonengine.com/en-us/realtime/current/gameplay/cached-events#special_considerations
+
+
+
+
+ String containing information about the error.
+
+
+
+
+ A LoadBalancingPeer provides the operations and enum definitions needed to use the LoadBalancing server application which is also used in Photon Cloud.
+
+
+ This class is internally used.
+ The LoadBalancingPeer does not keep a state, instead this is done by a LoadBalancingClient.
+
+
+
+ Obsolete accessor to the RegionHandler.PingImplementation.
+
+
+
+ Creates a Peer with specified connection protocol. You need to set the Listener before using the peer.
+
+ Each connection protocol has it's own default networking ports for Photon.
+ The preferred option is UDP.
+
+
+
+ Creates a Peer with specified connection protocol and a Listener for callbacks.
+
+
+
+
+ Joins the lobby on the Master Server, where you get a list of RoomInfos of currently open rooms.
+ This is an async request which triggers a OnOperationResponse() call.
+
+ The lobby join to.
+ If the operation could be sent (has to be connected).
+
+
+
+ Leaves the lobby on the Master Server.
+ This is an async request which triggers a OnOperationResponse() call.
+
+ If the operation could be sent (requires connection).
+
+
+ Used by OpJoinRoom and by OpCreateRoom alike.
+
+
+
+ Creates a room (on either Master or Game Server).
+ The OperationResponse depends on the server the peer is connected to:
+ Master will return a Game Server to connect to.
+ Game Server will return the joined Room's data.
+ This is an async request which triggers a OnOperationResponse() call.
+
+
+ If the room is already existing, the OperationResponse will have a returnCode of ErrorCode.GameAlreadyExists.
+
+
+
+
+ Joins a room by name or creates new room if room with given name not exists.
+ The OperationResponse depends on the server the peer is connected to:
+ Master will return a Game Server to connect to.
+ Game Server will return the joined Room's data.
+ This is an async request which triggers a OnOperationResponse() call.
+
+
+ If the room is not existing (anymore), the OperationResponse will have a returnCode of ErrorCode.GameDoesNotExist.
+ Other possible ErrorCodes are: GameClosed, GameFull.
+
+ If the operation could be sent (requires connection).
+
+
+
+ Operation to join a random, available room. Overloads take additional player properties.
+ This is an async request which triggers a OnOperationResponse() call.
+ If all rooms are closed or full, the OperationResponse will have a returnCode of ErrorCode.NoRandomMatchFound.
+ If successful, the OperationResponse contains a gameserver address and the name of some room.
+
+ If the operation could be sent currently (requires connection).
+
+
+
+ Only used on the Master Server. It will assign a game server and room to join-or-create.
+ On the Game Server, the OpJoin is used with option "create if not exists".
+
+
+
+
+ Leaves a room with option to come back later or "for good".
+
+ Async games can be re-joined (loaded) later on. Set to false, if you want to abandon a game entirely.
+ WebFlag: Securely transmit the encrypted object AuthCookie to the web service in PathLeave webhook when available
+ If the operation can be sent currently.
+
+
+ Gets a list of games matching a SQL-like where clause.
+
+ Operation is only available in lobbies of type SqlLobby.
+ This is an async request which triggers a OnOperationResponse() call.
+ Returned game list is stored in RoomInfoList.
+
+
+ The lobby to query. Has to be of type SqlLobby.
+ The sql query statement.
+ If the operation could be sent (has to be connected).
+
+
+
+ Request the rooms and online status for a list of friends (each client must set a unique username via OpAuthenticate).
+
+
+ Used on Master Server to find the rooms played by a selected list of users.
+ Users identify themselves by using OpAuthenticate with a unique user ID.
+ The list of user IDs must be fetched from some other source (not provided by Photon).
+
+ The server response includes 2 arrays of info (each index matching a friend from the request):
+ ParameterCode.FindFriendsResponseOnlineList = bool[] of online states
+ ParameterCode.FindFriendsResponseRoomIdList = string[] of room names (empty string if not in a room)
+
+ The options may be used to define which state a room must match to be returned.
+
+ Array of friend's names (make sure they are unique).
+ Options that affect the result of the FindFriends operation.
+ If the operation could be sent (requires connection).
+
+
+
+ Sets properties of a player / actor.
+ Internally this uses OpSetProperties, which can be used to either set room or player properties.
+
+ The payer ID (a.k.a. actorNumber) of the player to attach these properties to.
+ The properties to add or update.
+ If set, these must be in the current properties-set (on the server) to set actorProperties: CAS.
+ Set these to forward the properties to a WebHook as defined for this app (in Dashboard).
+ If the operation could be sent (requires connection).
+
+
+
+ Sets properties of a room.
+ Internally this uses OpSetProperties, which can be used to either set room or player properties.
+
+ The properties to add or update.
+ The properties expected when update occurs. (CAS : "Check And Swap")
+ WebFlag to indicate if request should be forwarded as "PathProperties" webhook or not.
+ If the operation could be sent (has to be connected).
+
+
+
+ Sends this app's appId and appVersion to identify this application server side.
+ This is an async request which triggers a OnOperationResponse() call.
+
+
+ This operation makes use of encryption, if that is established before.
+ See: EstablishEncryption(). Check encryption with IsEncryptionAvailable.
+ This operation is allowed only once per connection (multiple calls will have ErrorCode != Ok).
+
+ Your application's name or ID to authenticate. This is assigned by Photon Cloud (webpage).
+ The client's version (clients with differing client appVersions are separated and players don't meet).
+ Contains all values relevant for authentication. Even without account system (external Custom Auth), the clients are allowed to identify themselves.
+ Optional region code, if the client should connect to a specific Photon Cloud Region.
+ Set to true on Master Server to receive "Lobby Statistics" events.
+ If the operation could be sent (has to be connected).
+
+
+
+ Sends this app's appId and appVersion to identify this application server side.
+ This is an async request which triggers a OnOperationResponse() call.
+
+
+ This operation makes use of encryption, if that is established before.
+ See: EstablishEncryption(). Check encryption with IsEncryptionAvailable.
+ This operation is allowed only once per connection (multiple calls will have ErrorCode != Ok).
+
+ Your application's name or ID to authenticate. This is assigned by Photon Cloud (webpage).
+ The client's version (clients with differing client appVersions are separated and players don't meet).
+ Optional authentication values. The client can set no values or a UserId or some parameters for Custom Authentication by a server.
+ Optional region code, if the client should connect to a specific Photon Cloud Region.
+
+
+ If the operation could be sent (has to be connected).
+
+
+
+ Operation to handle this client's interest groups (for events in room).
+
+
+ Note the difference between passing null and byte[0]:
+ null won't add/remove any groups.
+ byte[0] will add/remove all (existing) groups.
+ First, removing groups is executed. This way, you could leave all groups and join only the ones provided.
+
+ Changes become active not immediately but when the server executes this operation (approximately RTT/2).
+
+ Groups to remove from interest. Null will not remove any. A byte[0] will remove all.
+ Groups to add to interest. Null will not add any. A byte[0] will add all current.
+ If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
+
+
+
+ Send an event with custom code/type and any content to the other players in the same room.
+
+ This override explicitly uses another parameter order to not mix it up with the implementation for Hashtable only.
+ Identifies this type of event (and the content). Your game's event codes can start with 0.
+ Any serializable datatype (including Hashtable like the other OpRaiseEvent overloads).
+ Contains (slightly) less often used options. If you pass null, the default options will be used.
+ Send options for reliable, encryption etc
+ If operation could be enqueued for sending. Sent when calling: Service or SendOutgoingCommands.
+
+
+
+ Internally used operation to set some "per server" settings. This is for the Master Server.
+
+ Set to true, to get Lobby Statistics (lists of existing lobbies).
+ False if the operation could not be sent.
+
+
+ Used in the RoomOptionFlags parameter, this bitmask toggles options in the room.
+
+
+
+ Options for OpFindFriends can be combined to filter which rooms of friends are returned.
+
+
+
+ Include a friend's room only if it is created and confirmed by the game server.
+
+
+ Include a friend's room only if it is visible (using Room.IsVisible).
+
+
+ Include a friend's room only if it is open (using Room.IsOpen).
+
+
+ Turns the bool options into an integer, which is sent as option flags for Op FindFriends.
+ The options applied to bits of an integer.
+
+
+
+ Parameters for the matchmaking of JoinRandomRoom and JoinRandomOrCreateRoom.
+
+
+ More about matchmaking: .
+
+
+
+ The custom room properties a room must have to fit. All key-values must be present to match. In SQL Lobby, use SqlLobbyFilter instead.
+
+
+ Filters by the MaxPlayers value of rooms.
+
+
+ The MatchmakingMode affects how rooms get filled. By default, the server fills rooms.
+
+
+ The lobby in which to match. The type affects how filters are applied.
+
+
+ SQL query to filter room matches. For default-typed lobbies, use ExpectedCustomRoomProperties instead.
+
+
+ The expected users list blocks player slots for your friends or team mates to join the room, too.
+ See: https://doc.photonengine.com/en-us/pun/v2/lobby-and-matchmaking/matchmaking-and-lobby#matchmaking_slot_reservation
+
+
+ Ticket for matchmaking. Provided by a plugin / server and contains a list of party members who should join the same room (among other things).
+
+
+ Parameters for creating rooms.
+
+
+ The name of the room to create. If null, the server generates a unique name. If not null, it must be unique and new or will cause an error.
+
+
+ The RoomOptions define the optional behaviour of rooms.
+
+
+ A lobby to attach the new room to. If set, this overrides a joined lobby (if any).
+
+
+ The custom player properties that describe this client / user. Keys must be strings.
+
+
+ Internally used value to skip some values when the operation is sent to the Master Server.
+
+
+ Internally used value to check which join mode we should call.
+
+
+ A list of users who are expected to join the room along with this client. Reserves slots for rooms with MaxPlayers value.
+
+
+ Ticket for matchmaking. Provided by a plugin / server and contains a list of party members who should join the same room (among other things).
+
+
+
+ ErrorCode defines the default codes associated with Photon client/server communication.
+
+
+
+ (0) is always "OK", anything else an error or specific situation.
+
+
+
+ (-3) Operation can't be executed yet (e.g. OpJoin can't be called before being authenticated, RaiseEvent cant be used before getting into a room).
+
+
+ Before you call any operations on the Cloud servers, the automated client workflow must complete its authorization.
+ Wait until State is: JoinedLobby or ConnectedToMasterServer
+
+
+
+ (-2) The operation you called is not implemented on the server (application) you connect to. Make sure you run the fitting applications.
+
+
+ (-2) The operation you called could not be executed on the server.
+
+ Make sure you are connected to the server you expect.
+
+ This code is used in several cases:
+ The arguments/parameters of the operation might be out of range, missing entirely or conflicting.
+ The operation you called is not implemented on the server (application). Server-side plugins affect the available operations.
+
+
+
+ (-1) Something went wrong in the server. Try to reproduce and contact Exit Games.
+
+
+ (32767) Authentication failed. Possible cause: AppId is unknown to Photon (in cloud service).
+
+
+ (32766) GameId (name) already in use (can't create another). Change name.
+
+
+ (32765) Game is full. This rarely happens when some player joined the room before your join completed.
+
+
+ (32764) Game is closed and can't be joined. Join another game.
+
+
+ (32762) All servers are busy. This is a temporary issue and the game logic should try again after a brief wait time.
+
+ This error may happen for all operations that create rooms. The operation response will contain this error code.
+
+ This error is very unlikely to happen as we monitor load on all servers and add them on demand.
+ However, it's good to be prepared for a shortage of machines or surge in CCUs.
+
+
+
+ (32761) Not in use currently.
+
+
+ (32760) Random matchmaking only succeeds if a room exists thats neither closed nor full. Repeat in a few seconds or create a new room.
+
+
+ (32758) Join can fail if the room (name) is not existing (anymore). This can happen when players leave while you join.
+
+
+ (32757) Authorization on the Photon Cloud failed because the concurrent users (CCU) limit of the app's subscription is reached.
+
+ Unless you have a plan with "CCU Burst", clients might fail the authentication step during connect.
+ Affected client are unable to call operations. Please note that players who end a game and return
+ to the master server will disconnect and re-connect, which means that they just played and are rejected
+ in the next minute / re-connect.
+ This is a temporary measure. Once the CCU is below the limit, players will be able to connect an play again.
+
+ OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen.
+ Self-hosted Photon servers with a CCU limited license won't let a client connect at all.
+
+
+
+ (32756) Authorization on the Photon Cloud failed because the app's subscription does not allow to use a particular region's server.
+
+ Some subscription plans for the Photon Cloud are region-bound. Servers of other regions can't be used then.
+ Check your master server address and compare it with your Photon Cloud Dashboard's info.
+ https://dashboard.photonengine.com
+
+ OpAuthorize is part of connection workflow but only on the Photon Cloud, this error can happen.
+ Self-hosted Photon servers with a CCU limited license won't let a client connect at all.
+
+
+
+
+ (32755) Custom Authentication of the user failed due to setup reasons (see Cloud Dashboard) or the provided user data (like username or token). Check error message for details.
+
+
+
+ (32753) The Authentication ticket expired. Usually, this is refreshed behind the scenes. Connect (and authorize) again.
+
+
+
+ (32752) A server-side plugin or WebHook failed and reported an error. Check the OperationResponse.DebugMessage.
+
+ A typical case is when a plugin prevents a user from creating or joining a room.
+ If this is prohibited, that reports to the client as a plugin error.
+ Same for WebHooks.
+
+
+
+ (32751) CreateGame/JoinGame/Join operation fails if expected plugin does not correspond to loaded one.
+
+
+
+
+ (32750) for join requests. Indicates the current peer already called join and is joined to the room.
+
+
+
+
+ (32749) for join requests. Indicates the list of InactiveActors already contains an actor with the requested ActorNr or UserId.
+
+
+
+
+ (32748) for join requests. Indicates the list of Actors (active and inactive) did not contain an actor with the requested ActorNr or UserId.
+
+
+
+
+ (32747) for join requests. Note: for future use - Indicates the requested UserId was found in the ExcludedList.
+
+
+
+
+ (32746) for join requests. Indicates the list of ActiveActors already contains an actor with the requested ActorNr or UserId.
+
+
+
+
+ (32745) for SetProperties and RaiseEvent (if flag HttpForward is true) requests. Indicates the maximum allowed http requests per minute was reached.
+
+
+
+
+ (32744) for WebRpc requests. Indicates the the call to the external service failed.
+
+
+
+
+ (32743) for operations with defined limits (as in calls per second, content count or size).
+
+
+
+
+ (32742) Server error during matchmaking with slot reservation. E.g. the reserved slots can not exceed MaxPlayers.
+
+
+
+
+ (32741) Server will react with this error if invalid encryption parameters provided by token
+
+
+
+
+ Class for constants. These (byte) values define "well known" properties for an Actor / Player.
+
+
+ These constants are used internally.
+ "Custom properties" have to use a string-type as key. They can be assigned at will.
+
+
+
+ (255) Name of a player/actor.
+
+
+ (254) Tells you if the player is currently in this game (getting events live).
+ A server-set value for async games, where players can leave the game and return later.
+
+
+ (253) UserId of the player. Sent when room gets created with RoomOptions.PublishUserId = true.
+
+
+
+ Class for constants. These (byte) values are for "well known" room/game properties used in Photon LoadBalancing.
+
+
+ These constants are used internally.
+ "Custom properties" have to use a string-type as key. They can be assigned at will.
+
+
+
+ (255) Max number of players that "fit" into this room. 0 is for "unlimited".
+
+
+ (243) Integer-typed max number of players that "fit" into a room. 0 is for "unlimited". Important: Code changed. See remarks.
+ This was code 244 for a brief time (Realtime v4.1.7.2 to v4.1.7.4) and those versions must be replaced or edited!
+
+
+ (254) Makes this room listed or not in the lobby on master.
+
+
+ (253) Allows more players to join a room (or not).
+
+
+ (252) Current count of players in the room. Used only in the lobby on master.
+
+
+ (251) True if the room is to be removed from room listing (used in update to room list in lobby on master)
+
+
+ (250) A list of the room properties to pass to the RoomInfo list in a lobby. This is used in CreateRoom, which defines this list once per room.
+
+
+ (249) Equivalent of Operation Join parameter CleanupCacheOnLeave.
+
+
+ (248) Code for MasterClientId, which is synced by server. When sent as op-parameter this is (byte)203. As room property this is (byte)248.
+ Tightly related to ParameterCode.MasterClientId.
+
+
+ (247) Code for ExpectedUsers in a room. Matchmaking keeps a slot open for the players with these userIDs.
+
+
+ (246) Player Time To Live. How long any player can be inactive (due to disconnect or leave) before the user gets removed from the playerlist (freeing a slot).
+
+
+ (245) Room Time To Live. How long a room stays available (and in server-memory), after the last player becomes inactive. After this time, the room gets persisted or destroyed.
+
+
+
+ Class for constants. These values are for events defined by Photon LoadBalancing.
+
+ They start at 255 and go DOWN. Your own in-game events can start at 0. These constants are used internally.
+
+
+ (230) Initial list of RoomInfos (in lobby on Master)
+
+
+ (229) Update of RoomInfos to be merged into "initial" list (in lobby on Master)
+
+
+ (228) Currently not used. State of queueing in case of server-full
+
+
+ (227) Currently not used. Event for matchmaking
+
+
+ (226) Event with stats about this application (players, rooms, etc)
+
+
+ (224) This event provides a list of lobbies with their player and game counts.
+
+
+ (210) Internally used in case of hosting by Azure
+
+
+ (255) Event Join: someone joined the game. The new actorNumber is provided as well as the properties of that actor (if set in OpJoin).
+
+
+ (254) Event Leave: The player who left the game can be identified by the actorNumber.
+
+
+ (253) When you call OpSetProperties with the broadcast option "on", this event is fired. It contains the properties being set.
+
+
+ (253) When you call OpSetProperties with the broadcast option "on", this event is fired. It contains the properties being set.
+
+
+ (252) When player left game unexpected and the room has a playerTtl != 0, this event is fired to let everyone know about the timeout.
+ Obsolete. Replaced by Leave. public const byte Disconnect = LiteEventCode.Disconnect;
+ (251) Sent by Photon Cloud when a plugin-call or webhook-call failed or events cache limit exceeded. Usually, the execution on the server continues, despite the issue. Contains: ParameterCode.Info.
+
+
+
+ (250) Sent by Photon whent he event cache slice was changed. Done by OpRaiseEvent.
+
+
+ (223) Sent by Photon to update a token before it times out.
+
+
+ Class for constants. Codes for parameters of Operations and Events.
+ These constants are used internally.
+
+
+ (237) A bool parameter for creating games. If set to true, no room events are sent to the clients on join and leave. Default: false (and not sent).
+
+
+ (236) Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds.
+
+
+ (235) Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds.
+
+
+ (234) Optional parameter of OpRaiseEvent and OpSetCustomProperties to forward the event/operation to a web-service.
+
+
+ (233) Optional parameter of OpLeave in async games. If false, the player does abandons the game (forever). By default players become inactive and can re-join.
+
+
+ (233) Used in EvLeave to describe if a user is inactive (and might come back) or not. In rooms with PlayerTTL, becoming inactive is the default case.
+
+
+ (232) Used when creating rooms to define if any userid can join the room only once.
+
+
+ (231) Code for "Check And Swap" (CAS) when changing properties.
+
+
+ (230) Address of a (game) server to use.
+
+
+ (229) Count of players in this application in a rooms (used in stats event)
+
+
+ (228) Count of games in this application (used in stats event)
+
+
+ (227) Count of players on the master server (in this app, looking for rooms)
+
+
+ (225) User's ID
+
+
+ (224) Your application's ID: a name on your own Photon or a GUID on the Photon Cloud
+
+
+ (223) Not used currently (as "Position"). If you get queued before connect, this is your position
+
+
+ (223) Modifies the matchmaking algorithm used for OpJoinRandom. Allowed parameter values are defined in enum MatchmakingMode.
+
+
+ (222) List of RoomInfos about open / listed rooms
+
+
+ (221) Internally used to establish encryption
+
+
+ (220) Version of your application
+
+
+ (210) Internally used in case of hosting by Azure
+
+
+ (209) Internally used in case of hosting by Azure
+
+
+ (208) Internally used in case of hosting by Azure
+
+
+ (255) Code for the gameId/roomName (a unique name per room). Used in OpJoin and similar.
+
+
+ (250) Code for broadcast parameter of OpSetProperties method.
+
+
+ (252) Code for list of players in a room.
+
+
+ (254) Code of the Actor of an operation. Used for property get and set.
+
+
+ (249) Code for property set (Hashtable).
+
+
+ (245) Code of data/custom content of an event. Used in OpRaiseEvent.
+
+
+ (245) Code of data of an event. Used in OpRaiseEvent.
+
+
+ (244) Code used when sending some code-related parameter, like OpRaiseEvent's event-code.
+ This is not the same as the Operation's code, which is no longer sent as part of the parameter Dictionary in Photon 3.
+
+
+ (248) Code for property set (Hashtable).
+
+
+
+ (251) Code for property-set (Hashtable). This key is used when sending only one set of properties.
+ If either ActorProperties or GameProperties are used (or both), check those keys.
+
+
+
+ (253) Code of the target Actor of an operation. Used for property set. Is 0 for game
+
+
+ (246) Code to select the receivers of events (used in Lite, Operation RaiseEvent).
+
+
+ (247) Code for caching events while raising them.
+
+
+ (241) Bool parameter of CreateGame Operation. If true, server cleans up roomcache of leaving players (their cached events get removed).
+
+
+ (240) Code for "group" operation-parameter (as used in Op RaiseEvent).
+
+
+ (239) The "Remove" operation-parameter can be used to remove something from a list. E.g. remove groups from player's interest groups.
+
+
+ (239) Used in Op Join to define if UserIds of the players are broadcast in the room. Useful for FindFriends and reserving slots for expected users.
+
+
+ (238) The "Add" operation-parameter can be used to add something to some list or set. E.g. add groups to player's interest groups.
+
+
+ (218) Content for EventCode.ErrorInfo and internal debug operations.
+
+
+ (217) This key's (byte) value defines the target custom authentication type/service the client connects with. Used in OpAuthenticate
+
+
+ (216) This key's (string) value provides parameters sent to the custom authentication type/service the client connects with. Used in OpAuthenticate
+
+
+ (215) The JoinMode enum defines which variant of joining a room will be executed: Join only if available, create if not exists or re-join.
+ Replaces CreateIfNotExists which was only a bool-value.
+
+
+ (214) This key's (string or byte[]) value provides parameters sent to the custom authentication service setup in Photon Dashboard. Used in OpAuthenticate
+
+
+ (203) Code for MasterClientId, which is synced by server. When sent as op-parameter this is code 203.
+ Tightly related to GamePropertyKey.MasterClientId.
+
+
+ (1) Used in Op FindFriends request. Value must be string[] of friends to look up.
+
+
+ (2) Used in Op FindFriends request. An integer containing option-flags to filter the results.
+
+
+ (1) Used in Op FindFriends response. Contains bool[] list of online states (false if not online).
+
+
+ (2) Used in Op FindFriends response. Contains string[] of room names ("" where not known or no room joined).
+
+
+ (213) Used in matchmaking-related methods and when creating a room to name a lobby (to join or to attach a room to).
+
+
+ (212) Used in matchmaking-related methods and when creating a room to define the type of a lobby. Combined with the lobby name this identifies the lobby.
+
+
+ (211) This (optional) parameter can be sent in Op Authenticate to turn on Lobby Stats (info about lobby names and their user- and game-counts).
+
+
+ (210) Used for region values in OpAuth and OpGetRegions.
+
+
+ (209) Path of the WebRPC that got called. Also known as "WebRpc Name". Type: string.
+
+
+ (208) Parameters for a WebRPC as: Dictionary<string, object>. This will get serialized to JSon.
+
+
+ (207) ReturnCode for the WebRPC, as sent by the web service (not by Photon, which uses ErrorCode). Type: byte.
+
+
+ (206) Message returned by WebRPC server. Analog to Photon's debug message. Type: string.
+
+
+ (205) Used to define a "slice" for cached events. Slices can easily be removed from cache. Type: int.
+
+
+ (204) Informs the server of the expected plugin setup.
+
+ The operation will fail in case of a plugin mismatch returning error code PluginMismatch 32751(0x7FFF - 16).
+ Setting string[]{} means the client expects no plugin to be setup.
+ Note: for backwards compatibility null omits any check.
+
+
+
+ (202) Used by the server in Operation Responses, when it sends the nickname of the client (the user's nickname).
+
+
+ (201) Informs user about name of plugin load to game
+
+
+ (200) Informs user about version of plugin load to game
+
+
+ (196) Cluster info provided in OpAuthenticate/OpAuthenticateOnce responses.
+
+
+ (195) Protocol which will be used by client to connect master/game servers. Used for nameserver.
+
+
+ (194) Set of custom parameters which are sent in auth request.
+
+
+ (193) How are we going to encrypt data.
+
+
+ (192) Parameter of Authentication, which contains encryption keys (depends on AuthMode and EncryptionMode).
+
+
+ (191) An int parameter summarizing several boolean room-options with bit-flags.
+
+
+ Matchmaking ticket (type object).
+
+
+ Used server side once the group is extracted from the ticket. Clients don't send this.
+
+
+ (188) Parameter key to let the server know it may queue the client in low-ccu matchmaking situations.
+
+
+ (187) This optional parameter from the server configures the client to send analytics or not.
+
+
+
+ Class for constants. Contains operation codes.
+
+ These constants are used internally.
+
+
+ (255) Code for OpJoin, to get into a room.
+
+
+ (231) Authenticates this peer and connects to a virtual application
+
+
+ (230) Authenticates this peer and connects to a virtual application
+
+
+ (229) Joins lobby (on master)
+
+
+ (228) Leaves lobby (on master)
+
+
+ (227) Creates a game (or fails if name exists)
+
+
+ (226) Join game (by name)
+
+
+ (225) Joins random game (on master)
+
+
+ (254) Code for OpLeave, to get out of a room.
+
+
+ (253) Raise event (in a room, for other actors/players)
+
+
+ (252) Set Properties (of room or actor/player)
+
+
+ (251) Get Properties
+
+
+ (248) Operation code to change interest groups in Rooms (Lite application and extending ones).
+
+
+ (222) Request the rooms and online status for a list of friends (by name, which should be unique).
+
+
+ (221) Request statistics about a specific list of lobbies (their user and game count).
+
+
+ (220) Get list of regional servers from a NameServer.
+
+
+ (219) WebRpc Operation.
+
+
+ (218) Operation to set some server settings. Used with different parameters on various servers.
+
+
+ (217) Get the game list matching a supplied sql filter (SqlListLobby only)
+
+
+ Defines possible values for OpJoinRoom and OpJoinOrCreate. It tells the server if the room can be only be joined normally, created implicitly or found on a web-service for Turnbased games.
+ These values are not directly used by a game but implicitly set.
+
+
+ Regular join. The room must exist.
+
+
+ Join or create the room if it's not existing. Used for OpJoinOrCreate for example.
+
+
+ The room might be out of memory and should be loaded (if possible) from a Turnbased web-service.
+
+
+ Only re-join will be allowed. If the user is not yet in the room, this will fail.
+
+
+
+ Options for matchmaking rules for OpJoinRandom.
+
+
+
+ Fills up rooms (oldest first) to get players together as fast as possible. Default.
+ Makes most sense with MaxPlayers > 0 and games that can only start with more players.
+
+
+ Distributes players across available rooms sequentially but takes filter into account. Without filter, rooms get players evenly distributed.
+
+
+ Joins a (fully) random room. Expected properties must match but aside from this, any available room might be selected.
+
+
+
+ Lite - OpRaiseEvent lets you chose which actors in the room should receive events.
+ By default, events are sent to "Others" but you can overrule this.
+
+
+
+ Default value (not sent). Anyone else gets my event.
+
+
+ Everyone in the current room (including this peer) will get this event.
+
+
+ The server sends this event only to the actor with the lowest actorNumber.
+ The "master client" does not have special rights but is the one who is in this room the longest time.
+
+
+
+ Lite - OpRaiseEvent allows you to cache events and automatically send them to joining players in a room.
+ Events are cached per event code and player: Event 100 (example!) can be stored once per player.
+ Cached events can be modified, replaced and removed.
+
+
+ Caching works only combination with ReceiverGroup options Others and All.
+
+
+
+ Default value (not sent).
+
+
+ Will merge this event's keys with those already cached.
+
+
+ Replaces the event cache for this eventCode with this event's content.
+
+
+ Removes this event (by eventCode) from the cache.
+
+
+ Adds an event to the room's cache
+
+
+ Adds this event to the cache for actor 0 (becoming a "globally owned" event in the cache).
+
+
+ Remove fitting event from the room's cache.
+
+
+ Removes events of players who already left the room (cleaning up).
+
+
+ Increase the index of the sliced cache.
+
+
+ Set the index of the sliced cache. You must set RaiseEventOptions.CacheSliceIndex for this.
+
+
+ Purge cache slice with index. Exactly one slice is removed from cache. You must set RaiseEventOptions.CacheSliceIndex for this.
+
+
+ Purge cache slices with specified index and anything lower than that. You must set RaiseEventOptions.CacheSliceIndex for this.
+
+
+
+ Flags for "types of properties", being used as filter in OpGetProperties.
+
+
+
+ (0x00) Flag type for no property type.
+
+
+ (0x01) Flag type for game-attached properties.
+
+
+ (0x02) Flag type for actor related propeties.
+
+
+ (0x01) Flag type for game AND actor properties. Equal to 'Game'
+
+
+ Wraps up common room properties needed when you create rooms. Read the individual entries for more details.
+ This directly maps to the fields in the Room class.
+
+
+ Defines if this room is listed in the lobby. If not, it also is not joined randomly.
+
+ A room that is not visible will be excluded from the room lists that are sent to the clients in lobbies.
+ An invisible room can be joined by name but is excluded from random matchmaking.
+
+ Use this to "hide" a room and simulate "private rooms". Players can exchange a roomname and create it
+ invisble to avoid anyone else joining it.
+
+
+
+ Defines if this room can be joined at all.
+
+ If a room is closed, no player can join this. As example this makes sense when 3 of 4 possible players
+ start their gameplay early and don't want anyone to join during the game.
+ The room can still be listed in the lobby (set isVisible to control lobby-visibility).
+
+
+
+ Max number of players that can be in the room at any time. 0 means "no limit".
+
+
+ Time To Live (TTL) for an 'actor' in a room. If a client disconnects, this actor is inactive first and removed after this timeout. In milliseconds.
+
+
+ Time To Live (TTL) for a room when the last player leaves. Keeps room in memory for case a player re-joins soon. In milliseconds.
+
+
+ Removes a user's events and properties from the room when a user leaves.
+
+ This makes sense when in rooms where players can't place items in the room and just vanish entirely.
+ When you disable this, the event history can become too long to load if the room stays in use indefinitely.
+ Default: true. Cleans up the cache and props of leaving users.
+
+
+
+ The room's custom properties to set. Use string keys!
+
+ Custom room properties are any key-values you need to define the game's setup.
+ The shorter your keys are, the better.
+ Example: Map, Mode (could be "m" when used with "Map"), TileSet (could be "t").
+
+
+
+ Defines the custom room properties that get listed in the lobby.
+
+ Name the custom room properties that should be available to clients that are in a lobby.
+ Use with care. Unless a custom property is essential for matchmaking or user info, it should
+ not be sent to the lobby, which causes traffic and delays for clients in the lobby.
+
+ Default: No custom properties are sent to the lobby.
+
+
+
+ Informs the server of the expected plugin setup.
+
+ The operation will fail in case of a plugin missmatch returning error code PluginMismatch 32757(0x7FFF - 10).
+ Setting string[]{} means the client expects no plugin to be setup.
+ Note: for backwards compatibility null omits any check.
+
+
+
+
+ Tells the server to skip room events for joining and leaving players.
+
+
+ Using this makes the client unaware of the other players in a room.
+ That can save some traffic if you have some server logic that updates players
+ but it can also limit the client's usability.
+
+
+
+ Disables events join and leave from the server as well as property broadcasts in a room (to minimize traffic)
+
+
+
+ Defines if the UserIds of players get "published" in the room. Useful for FindFriends, if players want to play another game together.
+
+
+ When you set this to true, Photon will publish the UserIds of the players in that room.
+ In that case, you can use PhotonPlayer.userId, to access any player's userID.
+ This is useful for FindFriends and to set "expected users" to reserve slots in a room.
+
+
+
+ Optionally, properties get deleted, when null gets assigned as value. Defaults to off / false.
+
+ When Op SetProperties is setting a key's value to null, the server and clients should remove the key/value from the Custom Properties.
+ By default, the server keeps the keys (and null values) and sends them to joining players.
+
+ Important: Only when SetProperties does a "broadcast", the change (key, value = null) is sent to clients to update accordingly.
+ This applies to Custom Properties for rooms and actors/players.
+
+
+
+ By default, property changes are sent back to the client that's setting them to avoid de-sync when properties are set concurrently.
+
+ This option is enables by default to fix this scenario:
+
+ 1) On server, room property ABC is set to value FOO, which triggers notifications to all the clients telling them that the property changed.
+ 2) While that notification is in flight, a client sets the ABC property to value BAR.
+ 3) Client receives notification from the server and changes its local copy of ABC to FOO.
+ 4) Server receives the set operation and changes the official value of ABC to BAR, but never notifies the client that sent the set operation that the value is now BAR.
+
+ Without this option, the client that set the value to BAR never hears from the server that the official copy has been updated to BAR, and thus gets stuck with a value of FOO.
+
+
+
+ Aggregates several less-often used options for operation RaiseEvent. See field descriptions for usage details.
+
+
+ Default options: CachingOption: DoNotCache, InterestGroup: 0, targetActors: null, receivers: Others, sequenceChannel: 0.
+
+
+ Defines if the server should simply send the event, put it in the cache or remove events that are like this one.
+
+ When using option: SliceSetIndex, SlicePurgeIndex or SlicePurgeUpToIndex, set a CacheSliceIndex. All other options except SequenceChannel get ignored.
+
+
+
+ The number of the Interest Group to send this to. 0 goes to all users but to get 1 and up, clients must subscribe to the group first.
+
+
+ A list of Player.ActorNumbers to send this event to. You can implement events that just go to specific users this way.
+
+
+ Sends the event to All, MasterClient or Others (default). Be careful with MasterClient, as the client might disconnect before it got the event and it gets lost.
+
+
+ Events are ordered per "channel". If you have events that are independent of others, they can go into another sequence or channel.
+
+
+ Optional flags to be used in Photon client SDKs with Op RaiseEvent and Op SetProperties.
+ Introduced mainly for webhooks 1.2 to control behavior of forwarded HTTP requests.
+
+
+ Types of lobbies define their behaviour and capabilities. Check each value for details.
+ Values of this enum must be matched by the server.
+
+
+ Standard type and behaviour: While joined to this lobby clients get room-lists and JoinRandomRoom can use a simple filter to match properties (perfectly).
+
+
+ This lobby type lists rooms like Default but JoinRandom has a parameter for SQL-like "where" clauses for filtering. This allows bigger, less, or and and combinations.
+
+
+ This lobby does not send lists of games. It is only used for OpJoinRandomRoom. It keeps rooms available for a while when there are only inactive users left.
+
+
+ Refers to a specific lobby on the server.
+
+ Name and Type combined are the unique identifier for a lobby.
+ The server will create lobbies "on demand", so no registration or setup is required.
+ An empty or null Name always points to the "default lobby" as special case.
+
+
+
+
+ Name of the lobby. Default: null, pointing to the "default lobby".
+
+
+ If Name is null or empty, a TypedLobby will point to the "default lobby". This ignores the Type value and always acts as .
+
+
+
+
+ Type (and behaviour) of the lobby.
+
+
+ An empty or null Name always points to the "default lobby" as special case.
+
+
+
+
+ A reference to the default lobby which is the unique lobby that uses null as name and is of type .
+
+
+ There is only a single lobby with an empty name on the server. It is always of type .
+ On the other hand, this is a shortcut and reusable reference to the default lobby.
+ Do not change Name or Type.
+
+
+
+
+ Returns whether or not this instance points to the "default lobby" ().
+
+
+ This comes up to checking if the Name is null or empty.
+ is not the same thing as the "default lobby" ().
+
+
+
+
+ Creates a TypedLobby instance. Unless Name is changed, this points to the "default lobby" ().
+
+
+
+
+ Sets Name and Type of the new instance. Make sure name is not empty or null, as that always points to the "default lobby" ().
+
+ Some string to identify a lobby.
+ The type of a lobby defines it's capabilities and behaviour.
+
+
+
+ Info for a lobby on the server. Used when is true.
+
+
+
+ Count of players that currently joined this lobby.
+
+
+ Count of rooms currently associated with this lobby.
+
+
+
+ Options for authentication modes. From "classic" auth on each server to AuthOnce (on NameServer).
+
+
+
+
+ Classic authentication mode.
+
+
+
+
+ Authenticate once on the NameServer.
+
+
+
+
+ Authenticate once on the NameServer using WebSocket Secure (WSS).
+
+
+
+
+ Options for optional "Custom Authentication" services used with Photon. Used by OpAuthenticate after connecting to Photon.
+
+
+
+ Use a custom authentication service. Currently the only implemented option.
+
+
+ Authenticates users by their Steam Account. Set Steam's ticket as "ticket" via AddAuthParameter().
+
+
+ Authenticates users by their Facebook Account. Set Facebooks's tocken as "token" via AddAuthParameter().
+
+
+ Authenticates users by their Oculus Account and token. Set Oculus' userid as "userid" and nonce as "nonce" via AddAuthParameter().
+
+
+ Authenticates users by their PSN Account and token on PS4. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter().
+
+
+
+
+
+ Authenticates users by their Xbox Account. Pass the XSTS token via SetAuthPostData().
+
+
+ Authenticates users by their HTC Viveport Account. Set userToken as "userToken" via AddAuthParameter().
+
+
+ Authenticates users by their NSA ID. Set token as "token" and appversion as "appversion" via AddAuthParameter(). The appversion is optional.
+
+
+ Authenticates users by their PSN Account and token on PS5. Set token as "token", env as "env" and userName as "userName" via AddAuthParameter().
+
+
+
+
+
+ Authenticates users with Epic Online Services (EOS). Set token as "token" and ownershipToken as "ownershipToken" via AddAuthParameter(). The ownershipToken is optional.
+
+
+ Authenticates users with Facebook Gaming api. Set token as "token" via AddAuthParameter().
+
+
+ Disables custom authentication. Same as not providing any AuthenticationValues for connect (more precisely for: OpAuthenticate).
+
+
+
+ Container for user authentication in Photon. Set AuthValues before you connect - all else is handled.
+
+
+ On Photon, user authentication is optional but can be useful in many cases.
+ If you want to FindFriends, a unique ID per user is very practical.
+
+ There are basically three options for user authentication: None at all, the client sets some UserId
+ or you can use some account web-service to authenticate a user (and set the UserId server-side).
+
+ Custom Authentication lets you verify end-users by some kind of login or token. It sends those
+ values to Photon which will verify them before granting access or disconnecting the client.
+
+ The AuthValues are sent in OpAuthenticate when you connect, so they must be set before you connect.
+ If the AuthValues.UserId is null or empty when it's sent to the server, then the Photon Server assigns a UserId!
+
+ The Photon Cloud Dashboard will let you enable this feature and set important server values for it.
+ https://dashboard.photonengine.com
+
+
+
+ See AuthType.
+
+
+ The type of authentication provider that should be used. Defaults to None (no auth whatsoever).
+ Several auth providers are available and CustomAuthenticationType.Custom can be used if you build your own service.
+
+
+ This string must contain any (http get) parameters expected by the used authentication service. By default, username and token.
+
+ Maps to operation parameter 216.
+ Standard http get parameters are used here and passed on to the service that's defined in the server (Photon Cloud Dashboard).
+
+
+
+ Data to be passed-on to the auth service via POST. Default: null (not sent). Either string or byte[] (see setters).
+ Maps to operation parameter 214.
+
+
+ Internal Photon token. After initial authentication, Photon provides a token for this client, subsequently used as (cached) validation.
+ Any token for custom authentication should be set via SetAuthPostData or AddAuthParameter.
+
+
+ The UserId should be a unique identifier per user. This is for finding friends, etc..
+ See remarks of AuthValues for info about how this is set and used.
+
+
+ Creates empty auth values without any info.
+
+
+ Creates minimal info about the user. If this is authenticated or not, depends on the set AuthType.
+ Some UserId to set in Photon.
+
+
+ Sets the data to be passed-on to the auth service via POST.
+ AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary.
+ String data to be used in the body of the POST request. Null or empty string will set AuthPostData to null.
+
+
+ Sets the data to be passed-on to the auth service via POST.
+ AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary.
+ Binary token / auth-data to pass on.
+
+
+ Sets data to be passed-on to the auth service as Json (Content-Type: "application/json") via Post.
+ AuthPostData is just one value. Each SetAuthPostData replaces any previous value. It can be either a string, a byte[] or a dictionary.
+ A authentication-data dictionary will be converted to Json and passed to the Auth webservice via HTTP Post.
+
+
+ Adds a key-value pair to the get-parameters used for Custom Auth (AuthGetParameters).
+ This method does uri-encoding for you.
+ Key for the value to set.
+ Some value relevant for Custom Authentication.
+
+
+
+ Transform this object into string.
+
+ String info about this object's values.
+
+
+
+ Make a copy of the current object.
+
+ The object to be copied into.
+ The copied object.
+
+
+
+ Abstract implementation of PhotonPing, ase for pinging servers to find the "Best Region".
+
+
+
+ Caches the last exception/error message, if any.
+
+
+ True of the ping was successful.
+
+
+ True if there was any result.
+
+
+ Length of a ping.
+
+
+ Bytes to send in a (Photon UDP) ping.
+
+
+ Randomized number to identify a ping.
+
+
+ Begins sending a ping.
+
+
+ Check if done.
+
+
+ Dispose of this ping.
+
+
+ Initialize this ping (GotResult, Successful, PingId).
+
+
+ Uses C# Socket class from System.Net.Sockets (as Unity usually does).
+ Incompatible with Windows 8 Store/Phone API.
+
+
+
+ Sends a "Photon Ping" to a server.
+
+ Address in IPv4 or IPv6 format. An address containing a '.' will be interpreted as IPv4.
+ True if the Photon Ping could be sent.
+
+
+ Check if done.
+
+
+ Dispose of this ping.
+
+
+
+ Summarizes a "player" within a room, identified (in that room) by ID (or "actorNumber").
+
+
+ Each player has a actorNumber, valid for that room. It's -1 until assigned by server (and client logic).
+
+
+
+
+ Used internally to identify the masterclient of a room.
+
+
+
+ Backing field for property.
+
+
+ Identifier of this player in current room. Also known as: actorNumber or actorNumber. It's -1 outside of rooms.
+ The ID is assigned per room and only valid in that context. It will change even on leave and re-join. IDs are never re-used per room.
+
+
+ Only one player is controlled by each client. Others are not local.
+
+
+ Background field for nickName.
+
+
+ Non-unique nickname of this player. Synced automatically in a room.
+
+ A player might change his own playername in a room (it's only a property).
+ Setting this value updates the server and other players (using an operation).
+
+
+
+ UserId of the player, available when the room got created with RoomOptions.PublishUserId = true.
+ Useful for and blocking slots in a room for expected players (e.g. in ).
+
+
+
+ True if this player is the Master Client of the current room.
+
+
+
+ If this player is active in the room (and getting events which are currently being sent).
+
+ Inactive players keep their spot in a room but otherwise behave as if offline (no matter what their actual connection status is).
+ The room needs a PlayerTTL != 0. If a player is inactive for longer than PlayerTTL, the server will remove this player from the room.
+ For a client "rejoining" a room, is the same as joining it: It gets properties, cached events and then the live events.
+
+
+
+ Read-only cache for custom properties of player. Set via Player.SetCustomProperties.
+
+ Don't modify the content of this Hashtable. Use SetCustomProperties and the
+ properties of this class to modify values. When you use those, the client will
+ sync values with the server.
+
+
+
+
+ Can be used to store a reference that's useful to know "by player".
+ Example: Set a player's character as Tag by assigning the GameObject on Instantiate.
+
+
+
+ Creates a player instance.
+ To extend and replace this Player, override LoadBalancingPeer.CreatePlayer().
+
+ NickName of the player (a "well known property").
+ ID or ActorNumber of this player in the current room (a shortcut to identify each player in room)
+ If this is the local peer's player (or a remote one).
+
+
+
+ Creates a player instance.
+ To extend and replace this Player, override LoadBalancingPeer.CreatePlayer().
+
+ NickName of the player (a "well known property").
+ ID or ActorNumber of this player in the current room (a shortcut to identify each player in room)
+ If this is the local peer's player (or a remote one).
+ A Hashtable of custom properties to be synced. Must use String-typed keys and serializable datatypes as values.
+
+
+
+ Get a Player by ActorNumber (Player.ID).
+
+ ActorNumber of the a player in this room.
+ Player or null.
+
+
+ Gets this Player's next Player, as sorted by ActorNumber (Player.ID). Wraps around.
+ Player or null.
+
+
+ Gets a Player's next Player, as sorted by ActorNumber (Player.ID). Wraps around.
+ Useful when you pass something to the next player. For example: passing the turn to the next player.
+ The Player for which the next is being needed.
+ Player or null.
+
+
+ Gets a Player's next Player, as sorted by ActorNumber (Player.ID). Wraps around.
+ Useful when you pass something to the next player. For example: passing the turn to the next player.
+ The ActorNumber (Player.ID) for which the next is being needed.
+ Player or null.
+
+
+ Caches properties for new Players or when updates of remote players are received. Use SetCustomProperties() for a synced update.
+
+ This only updates the CustomProperties and doesn't send them to the server.
+ Mostly used when creating new remote players, where the server sends their properties.
+
+
+
+
+ Brief summary string of the Player: ActorNumber and NickName
+
+
+
+
+ String summary of the Player: player.ID, name and all custom properties of this user.
+
+
+ Use with care and not every frame!
+ Converts the customProperties to a String on every single call.
+
+
+
+
+ If players are equal (by GetHasCode, which returns this.ID).
+
+
+
+
+ Accompanies Equals, using the ID (actorNumber) as HashCode to return.
+
+
+
+
+ Used internally, to update this client's playerID when assigned (doesn't change after assignment).
+
+
+
+
+ Updates and synchronizes this Player's Custom Properties. Optionally, expectedProperties can be provided as condition.
+
+
+ Custom Properties are a set of string keys and arbitrary values which is synchronized
+ for the players in a Room. They are available when the client enters the room, as
+ they are in the response of OpJoin and OpCreate.
+
+ Custom Properties either relate to the (current) Room or a Player (in that Room).
+
+ Both classes locally cache the current key/values and make them available as
+ property: CustomProperties. This is provided only to read them.
+ You must use the method SetCustomProperties to set/modify them.
+
+ Any client can set any Custom Properties anytime (when in a room).
+ It's up to the game logic to organize how they are best used.
+
+ You should call SetCustomProperties only with key/values that are new or changed. This reduces
+ traffic and performance.
+
+ Unless you define some expectedProperties, setting key/values is always permitted.
+ In this case, the property-setting client will not receive the new values from the server but
+ instead update its local cache in SetCustomProperties.
+
+ If you define expectedProperties, the server will skip updates if the server property-cache
+ does not contain all expectedProperties with the same values.
+ In this case, the property-setting client will get an update from the server and update it's
+ cached key/values at about the same time as everyone else.
+
+ The benefit of using expectedProperties can be only one client successfully sets a key from
+ one known value to another.
+ As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally.
+ When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their
+ actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to
+ take the item will have it (and the others fail to set the ownership).
+
+ Properties get saved with the game state for Turnbased games (which use IsPersistent = true).
+
+ Hashtable of Custom Properties to be set.
+ If non-null, these are the property-values the server will check as condition for this update.
+ Defines if this SetCustomProperties-operation gets forwarded to your WebHooks. Client must be in room.
+
+ False if propertiesToSet is null or empty or have zero string keys.
+ True in offline mode even if expectedProperties or webFlags are used.
+ If not in a room, returns true if local player and expectedValues and webFlags are null.
+ (Use this to cache properties to be sent when joining a room).
+ Otherwise, returns if this operation could be sent to the server.
+
+
+
+ If there is a nickname in the room props, but it's not the current (local) one, update the room when joining/joined.
+
+
+ Uses OpSetPropertiesOfActor to sync this player's NickName (server is being updated with this.NickName).
+
+
+ Unlike the CloudRegionCode, this may contain cluster information.
+
+
+ Weighted ping time.
+
+ Regions gets pinged 5 times (RegionPinger.Attempts).
+ Out of those, the worst rtt is discarded and the best will be counted two times for a weighted average.
+
+
+
+
+ Provides methods to work with Photon's regions (Photon Cloud) and can be use to find the one with best ping.
+
+
+ When a client uses a Name Server to fetch the list of available regions, the LoadBalancingClient will create a RegionHandler
+ and provide it via the OnRegionListReceived callback, as soon as the list is available. No pings were sent for Best Region selection yet.
+
+ Your logic can decide to either connect to one of those regional servers, or it may use PingMinimumOfRegions to test
+ which region provides the best ping. Alternatively the client may be set to connect to the Best Region (lowest ping), one or
+ more regions get pinged.
+ Not all regions will be pinged. As soon as the results are final, the client will connect to the best region,
+ so you can check the ping results when connected to the Master Server.
+
+ Regions gets pinged 5 times (RegionPinger.Attempts).
+ Out of those, the worst rtt is discarded and the best will be counted two times for a weighted average.
+
+ Usually UDP will be used to ping the Master Servers. In WebGL, WSS is used instead.
+
+ It makes sense to make clients "sticky" to a region when one gets selected.
+ This can be achieved by storing the SummaryToCache value, once pinging was done.
+ When the client connects again, the previous SummaryToCache helps limiting the number of regions to ping.
+ In best case, only the previously selected region gets re-pinged and if the current ping is not much worse, this one region is used again.
+
+
+
+ The implementation of PhotonPing to use for region pinging (Best Region detection).
+ Defaults to null, which means the Type is set automatically.
+
+
+ A list of region names for the Photon Cloud. Set by the result of OpGetRegions().
+
+ Implement ILoadBalancingCallbacks and register for the callbacks to get OnRegionListReceived(RegionHandler regionHandler).
+ You can also put a "case OperationCode.GetRegions:" into your OnOperationResponse method to notice when the result is available.
+
+
+
+
+ When PingMinimumOfRegions was called and completed, the BestRegion is identified by best ping.
+
+
+
+
+ This value summarizes the results of pinging currently available regions (after PingMinimumOfRegions finished).
+
+
+ This value should be stored in the client by the game logic.
+ When connecting again, use it as previous summary to speed up pinging regions and to make the best region sticky for the client.
+
+
+
+ Provides a list of regions and their pings as string.
+
+
+ Initializes the regions of this RegionHandler with values provided from the Name Server (as OperationResponse for OpGetRegions).
+
+
+ If non-zero, this port will be used to ping Master Servers on.
+
+
+ If the previous Best Region's ping is now higher by this much, ping all regions and find a new Best Region.
+
+
+ How much higher a region's ping can be from the absolute best, to be considered the Best Region (by ping and name).
+
+
+ If the region from a previous BestRegionSummary now has a ping higher than this limit, all regions get pinged again to find a better. Default: 90ms.
+
+ Pinging all regions takes time, which is why a BestRegionSummary gets stored.
+ If that is available, the Best Region becomes sticky and is used again.
+ This limit introduces an exception: Should the pre-defined best region have a ping worse than this, all regions are considered.
+
+
+
+ True if the available regions are being pinged currently.
+
+
+ True if the pinging of regions is being aborted.
+
+
+
+ Creates a new RegionHandler.
+ If non-zero, this port will be used to ping Master Servers on.
+
+
+ Starts the process of pinging of all available regions.
+ Provide a method to call when all ping results are available. Aborting the pings will also cancel the callback.
+ A BestRegionSummary from an earlier RegionHandler run. This makes a selected best region "sticky" and keeps ping times lower.
+ If pining the regions gets started now. False if the current state prevent this.
+
+
+ Calling this will stop pinging the regions and suppress the onComplete callback.
+
+
+ Privately used to ping regions if the current best one isn't as fast as earlier.
+ If pinging can be started.
+
+
+ Wraps the ping attempts and workflow for a single region.
+
+
+ How often to ping a region.
+
+
+ How long to wait maximum for a response.
+
+
+ Ping result when pinging failed.
+
+
+ Current ping attempt count.
+
+
+ True if all attempts are done or timed out.
+
+
+ Set to true to abort pining this region.
+
+
+ Initializes a RegionPinger for the given region.
+
+
+ Selects the best fitting ping implementation or uses the one set in RegionHandler.PingImplementation.
+ PhotonPing instance to use.
+
+
+
+ Starts the ping routine for the assigned region.
+
+
+ Pinging runs in a ThreadPool worker item or (if needed) in a Thread.
+ WebGL runs pinging on the Main Thread as coroutine.
+
+ True unless Aborted.
+
+
+ Calling this will stop pinging the regions and cancel the onComplete callback.
+
+
+ Pings the region. To be called by a thread.
+
+
+
+ Affected by frame-rate of app, as this Coroutine checks the socket for a result once per frame.
+
+
+
+ Gets this region's results as string summary.
+
+
+
+ Attempts to resolve a hostname into an IP string or returns empty string if that fails.
+
+
+ To be compatible with most platforms, the address family is checked like this:
+ if (ipAddress.AddressFamily.ToString().Contains("6")) // ipv6...
+
+ Hostname to resolve.
+ IP string or empty string if resolution fails
+
+
+
+ This class represents a room a client joins/joined.
+
+
+ Contains a list of current players, their properties and those of this room, too.
+ A room instance has a number of "well known" properties like IsOpen, MaxPlayers which can be changed.
+ Your own, custom properties can be set via SetCustomProperties() while being in the room.
+
+ Typically, this class should be extended by a game-specific implementation with logic and extra features.
+
+
+
+
+ A reference to the LoadBalancingClient which is currently keeping the connection and state.
+
+
+
+ The name of a room. Unique identifier (per region and virtual appid) for a room/match.
+ The name can't be changed once it's set by the server.
+
+
+
+ Defines if the room can be joined.
+
+
+ This does not affect listing in a lobby but joining the room will fail if not open.
+ If not open, the room is excluded from random matchmaking.
+ Due to racing conditions, found matches might become closed while users are trying to join.
+ Simply re-connect to master and find another.
+ Use property "IsVisible" to not list the room.
+
+ As part of RoomInfo this can't be set.
+ As part of a Room (which the player joined), the setter will update the server and all clients.
+
+
+
+
+ Defines if the room is listed in its lobby.
+
+
+ Rooms can be created invisible, or changed to invisible.
+ To change if a room can be joined, use property: open.
+
+ As part of RoomInfo this can't be set.
+ As part of a Room (which the player joined), the setter will update the server and all clients.
+
+
+
+
+ Sets a limit of players to this room. This property is synced and shown in lobby, too.
+ If the room is full (players count == maxplayers), joining this room will fail.
+
+
+ As part of RoomInfo this can't be set.
+ As part of a Room (which the player joined), the setter will update the server and all clients.
+
+
+
+ The count of players in this Room (using this.Players.Count).
+
+
+ While inside a Room, this is the list of players who are also in that room.
+
+
+ While inside a Room, this is the list of players who are also in that room.
+
+
+
+ List of users who are expected to join this room. In matchmaking, Photon blocks a slot for each of these UserIDs out of the MaxPlayers.
+
+
+ The corresponding feature in Photon is called "Slot Reservation" and can be found in the doc pages.
+ Define expected players in the methods: , and .
+
+
+
+ Player Time To Live. How long any player can be inactive (due to disconnect or leave) before the user gets removed from the playerlist (freeing a slot).
+
+
+ Room Time To Live. How long a room stays available (and in server-memory), after the last player becomes inactive. After this time, the room gets persisted or destroyed.
+
+
+
+ The ID (actorNumber, actorNumber) of the player who's the master of this Room.
+ Note: This changes when the current master leaves the room.
+
+
+
+
+ Gets a list of custom properties that are in the RoomInfo of the Lobby.
+ This list is defined when creating the room and can't be changed afterwards. Compare: LoadBalancingClient.OpCreateRoom()
+
+ You could name properties that are not set from the beginning. Those will be synced with the lobby when added later on.
+
+
+
+ Gets if this room cleans up the event cache when a player (actor) leaves.
+
+
+ This affects which events joining players get.
+
+ Set in room creation via RoomOptions.CleanupCacheOnLeave.
+
+ Within PUN, auto cleanup of events means that cached RPCs and instantiated networked objects are deleted from the room.
+
+
+
+ Define if the client who calls SetProperties should receive the properties update event or not.
+
+
+ Define if Join and Leave events should not be sent to clients in the room.
+
+
+ Extends SuppressRoomEvents: Define if Join and Leave events but also the actors' list and their respective properties should not be sent to clients.
+
+
+ Define if UserIds of the players are broadcast in the room. Useful for FindFriends and reserving slots for expected users.
+
+
+ Define if actor or room properties with null values are removed on the server or kept.
+
+
+ Creates a Room (representation) with given name and properties and the "listing options" as provided by parameters.
+ Name of the room (can be null until it's actually created on server).
+ Room options.
+ Signal if this room is only used locally.
+
+
+ Read (received) room option flags into related bool parameters.
+ This is for internal use. The operation response for join and create room operations is read this way.
+
+
+
+
+ Updates and synchronizes this Room's Custom Properties. Optionally, expectedProperties can be provided as condition.
+
+
+ Custom Properties are a set of string keys and arbitrary values which is synchronized
+ for the players in a Room. They are available when the client enters the room, as
+ they are in the response of OpJoin and OpCreate.
+
+ Custom Properties either relate to the (current) Room or a Player (in that Room).
+
+ Both classes locally cache the current key/values and make them available as
+ property: CustomProperties. This is provided only to read them.
+ You must use the method SetCustomProperties to set/modify them.
+
+ Any client can set any Custom Properties anytime (when in a room).
+ It's up to the game logic to organize how they are best used.
+
+ You should call SetCustomProperties only with key/values that are new or changed. This reduces
+ traffic and performance.
+
+ Unless you define some expectedProperties, setting key/values is always permitted.
+ In this case, the property-setting client will not receive the new values from the server but
+ instead update its local cache in SetCustomProperties.
+
+ If you define expectedProperties, the server will skip updates if the server property-cache
+ does not contain all expectedProperties with the same values.
+ In this case, the property-setting client will get an update from the server and update it's
+ cached key/values at about the same time as everyone else.
+
+ The benefit of using expectedProperties can be only one client successfully sets a key from
+ one known value to another.
+ As example: Store who owns an item in a Custom Property "ownedBy". It's 0 initally.
+ When multiple players reach the item, they all attempt to change "ownedBy" from 0 to their
+ actorNumber. If you use expectedProperties {"ownedBy", 0} as condition, the first player to
+ take the item will have it (and the others fail to set the ownership).
+
+ Properties get saved with the game state for Turnbased games (which use IsPersistent = true).
+
+ Hashtable of Custom Properties that changes.
+ Provide some keys/values to use as condition for setting the new values. Client must be in room.
+ Defines if this SetCustomProperties-operation gets forwarded to your WebHooks. Client must be in room.
+
+ False if propertiesToSet is null or empty or have zero string keys.
+ True in offline mode even if expectedProperties or webFlags are used.
+ Otherwise, returns if this operation could be sent to the server.
+
+
+
+
+ Enables you to define the properties available in the lobby if not all properties are needed to pick a room.
+
+
+ Limit the amount of properties sent to users in the lobby to improve speed and stability.
+
+ An array of custom room property names to forward to the lobby.
+ If the operation could be sent to the server.
+
+
+
+ Removes a player from this room's Players Dictionary.
+ This is internally used by the LoadBalancing API. There is usually no need to remove players yourself.
+ This is not a way to "kick" players.
+
+
+
+
+ Removes a player from this room's Players Dictionary.
+
+
+
+
+ Asks the server to assign another player as Master Client of your current room.
+
+
+ RaiseEvent has the option to send messages only to the Master Client of a room.
+ SetMasterClient affects which client gets those messages.
+
+ This method calls an operation on the server to set a new Master Client, which takes a roundtrip.
+ In case of success, this client and the others get the new Master Client from the server.
+
+ SetMasterClient tells the server which current Master Client should be replaced with the new one.
+ It will fail, if anything switches the Master Client moments earlier. There is no callback for this
+ error. All clients should get the new Master Client assigned by the server anyways.
+
+ See also: MasterClientId
+
+ The player to become the next Master Client.
+ False when this operation couldn't be done currently. Requires a v4 Photon Server.
+
+
+
+ Checks if the player is in the room's list already and calls StorePlayer() if not.
+
+ The new player - identified by ID.
+ False if the player could not be added (cause it was in the list already).
+
+
+
+ Updates a player reference in the Players dictionary (no matter if it existed before or not).
+
+ The Player instance to insert into the room.
+
+
+
+ Tries to find the player with given actorNumber (a.k.a. ID).
+ Only useful when in a Room, as IDs are only valid per Room.
+
+ ID to look for.
+ If true, the Master Client is returned for ID == 0.
+ The player with the ID or null.
+
+
+
+ Attempts to remove all current expected users from the server's Slot Reservation list.
+
+
+ Note that this operation can conflict with new/other users joining. They might be
+ adding users to the list of expected users before or after this client called ClearExpectedUsers.
+
+ This room's expectedUsers value will update, when the server sends a successful update.
+
+ Internals: This methods wraps up setting the ExpectedUsers property of a room.
+
+ If the operation could be sent to the server.
+
+
+
+ Attempts to update the expected users from the server's Slot Reservation list.
+
+
+ Note that this operation can conflict with new/other users joining. They might be
+ adding users to the list of expected users before or after this client called SetExpectedUsers.
+
+ This room's expectedUsers value will update, when the server sends a successful update.
+
+ Internals: This methods wraps up setting the ExpectedUsers property of a room.
+
+ The new array of UserIDs to be reserved in the room.
+ If the operation could be sent to the server.
+
+
+ Returns a summary of this Room instance as string.
+ Summary of this Room instance.
+
+
+ Returns a summary of this Room instance as longer string, including Custom Properties.
+ Summary of this Room instance.
+
+
+
+ A simplified room with just the info required to list and join, used for the room listing in the lobby.
+ The properties are not settable (IsOpen, MaxPlayers, etc).
+
+
+ This class resembles info about available rooms, as sent by the Master server's lobby.
+ Consider all values as readonly. None are synced (only updated by events by server).
+
+
+
+ Used in lobby, to mark rooms that are no longer listed (for being full, closed or hidden).
+
+
+ Backing field for property.
+
+
+ Backing field for property.
+
+
+ Backing field for property.
+
+
+ Backing field for property.
+
+
+ Backing field for property.
+
+
+ Backing field for property.
+
+
+ Backing field for property.
+
+
+ Backing field for property. False unless the GameProperty is set to true (else it's not sent).
+
+
+ Backing field for property.
+
+
+ Backing field for master client id (actorNumber). defined by server in room props and ev leave.
+
+
+ Backing field for property.
+
+
+ Read-only "cache" of custom properties of a room. Set via Room.SetCustomProperties (not available for RoomInfo class!).
+ All keys are string-typed and the values depend on the game/application.
+
+
+
+ The name of a room. Unique identifier for a room/match (per AppId + game-Version).
+
+
+
+ Count of players currently in room. This property is overwritten by the Room class (used when you're in a Room).
+
+
+
+
+ The limit of players for this room. This property is shown in lobby, too.
+ If the room is full (players count == maxplayers), joining this room will fail.
+
+
+ As part of RoomInfo this can't be set.
+ As part of a Room (which the player joined), the setter will update the server and all clients.
+
+
+
+
+ Defines if the room can be joined.
+ This does not affect listing in a lobby but joining the room will fail if not open.
+ If not open, the room is excluded from random matchmaking.
+ Due to racing conditions, found matches might become closed even while you join them.
+ Simply re-connect to master and find another.
+ Use property "IsVisible" to not list the room.
+
+
+ As part of RoomInfo this can't be set.
+ As part of a Room (which the player joined), the setter will update the server and all clients.
+
+
+
+
+ Defines if the room is listed in its lobby.
+ Rooms can be created invisible, or changed to invisible.
+ To change if a room can be joined, use property: open.
+
+
+ As part of RoomInfo this can't be set.
+ As part of a Room (which the player joined), the setter will update the server and all clients.
+
+
+
+
+ Constructs a RoomInfo to be used in room listings in lobby.
+
+ Name of the room and unique ID at the same time.
+ Properties for this room.
+
+
+
+ Makes RoomInfo comparable (by name).
+
+
+
+
+ Accompanies Equals, using the name's HashCode as return.
+
+
+
+
+ Returns most interesting room values as string.
+ Summary of this RoomInfo instance.
+
+
+ Returns most interesting room values as string, including custom properties.
+ Summary of this RoomInfo instance.
+
+
+ Copies "well known" properties to fields (IsVisible, etc) and caches the custom properties (string-keys only) in a local hashtable.
+ New or updated properties to store in this RoomInfo.
+
+
+
+ Helper class to debug log basic information about Photon client and vital traffic statistics.
+
+
+ Set SupportLogger.Client for this to work.
+
+
+
+
+ Toggle to enable or disable traffic statistics logging.
+
+
+
+ helps skip the initial OnApplicationPause call, which is not really of interest on start
+
+
+
+ Photon client to log information and statistics from.
+
+
+
+
+ Debug logs vital traffic statistics about the attached Photon Client.
+
+
+
+
+ Debug logs basic information (AppId, AppVersion, PeerID, Server address, Region) about the attached Photon Client.
+
+
+
+
+ The SystemConnectionSummary (SBS) is useful to analyze low level connection issues in Unity. This requires a ConnectionHandler in the scene.
+
+
+ A LoadBalancingClient automatically creates a SystemConnectionSummary on these disconnect causes:
+ DisconnectCause.ExceptionOnConnect, DisconnectCause.Exception, DisconnectCause.ServerTimeout and DisconnectCause.ClientTimeout.
+
+ The SBS can then be turned into an integer (ToInt()) or string to debug the situation or use in analytics.
+ Both, ToString and ToInt summarize the network-relevant conditions of the client at and before the connection fail, including the PhotonPeer.SocketErrorCode.
+
+ Important: To correctly create the SBS instance, a ConnectionHandler component must be present and enabled in the
+ Unity scene hierarchy. In best case, keep the ConnectionHandler on a GameObject which is flagged as
+ DontDestroyOnLoad.
+
+
+
+ 28 and up. 4 bits.
+
+
+ 25 and up. 3 bits.
+
+
+
+ Creates a SystemConnectionSummary for an incident of a local LoadBalancingClient. This gets used automatically by the LoadBalancingClient!
+
+
+ If the LoadBalancingClient.SystemConnectionSummary is non-null after a connection-loss, you can call .ToInt() and send this to analytics or log it.
+
+
+
+
+
+
+ Creates a SystemConnectionSummary instance from an int (reversing ToInt()). This can then be turned into a string again.
+
+ An int, as provided by ToInt(). No error checks yet.
+
+
+
+ Turns the SystemConnectionSummary into an integer, which can be be used for analytics purposes. It contains a lot of info and can be used to instantiate a new SystemConnectionSummary.
+
+ Compact representation of the context for a disconnect issue.
+
+
+
+ A readable debug log string of the context for network problems.
+
+ SystemConnectionSummary as readable string.
+
+
+ Applies bitval to bitpos (no matter value's initial bit value).
+
+
+ Applies bitvals via OR operation (expects bits in value to be 0 initially).
+
+
+ Reads an operation response of a WebRpc and provides convenient access to most common values.
+
+ See LoadBalancingClient.OpWebRpc.
+ Create a WebRpcResponse to access common result values.
+ The operationResponse.OperationCode should be: OperationCode.WebRpc.
+
+
+
+ Name of the WebRpc that was called.
+
+
+ ResultCode of the WebService that answered the WebRpc.
+
+ 0 is: "OK" for WebRPCs.
+ -1 is: No ResultCode by WebRpc service (check ).
+ Other ResultCode are defined by the individual WebRpc and service.
+
+
+
+ Might be empty or null.
+
+
+ Other key/values returned by the webservice that answered the WebRpc.
+
+
+ An OperationResponse for a WebRpc is needed to read it's values.
+
+
+ Turns the response into an easier to read string.
+ String resembling the result.
+
+
+
+ Optional flags to be used in Photon client SDKs with Op RaiseEvent and Op SetProperties.
+ Introduced mainly for webhooks 1.2 to control behavior of forwarded HTTP requests.
+
+
+
+
+ Indicates whether to forward HTTP request to web service or not.
+
+
+
+
+ Indicates whether to send AuthCookie of actor in the HTTP request to web service or not.
+
+
+
+
+ Indicates whether to send HTTP request synchronously or asynchronously to web service.
+
+
+
+
+ Indicates whether to send serialized game state in HTTP request to web service or not.
+
+
+
+
+ Asynchronously retrieves the list of regions from the NameServer.
+
+ The LoadBalancingClient instance.
+ Indicates whether to throw an exception on error. Defaults to true.
+ Indicates whether to run the client's service during the operation. Defaults to true.
+ An optional cancellation token that can be used to cancel the operation. Defaults to an empty cancellation token.
+ A task that represents the asynchronous operation. The task result the region handler after pinging the regions.
+
+
+
+ Connect to master server.
+
+ Client
+ App settings
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When connected to master server callback was called.
+ Is thrown when the connection terminated
+ Is thrown when the authentication failed
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Asynchronously reconnects and rejoins a room.
+
+ The client that is reconnecting and rejoining.
+ Indicates whether to throw an exception on error. Defaults to true.
+ Indicates whether to run the client's service during the operation. Defaults to true.
+ An optional cancellation token that can be used to cancel the operation. Defaults to an empty cancellation token.
+ A task that represents the asynchronous operation. The task result is a boolean indicating whether the operation was successful.
+ Thrown when the client is still connected or when the reconnecting operation fails to start.
+ Thrown when the connection is terminated during the operation.
+ Thrown when the operation completes unsuccessfully.
+ Thrown when the operation times out.
+
+
+
+ Disconnects the client.
+
+ Client.
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ Returns when the client has successfully disconnected
+ Is thrown when the connection terminated
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Create and join a room.
+
+ Client object
+ Enter room params
+ Set ErrorCode as result on RoomCreateFailed or RoomJoinFailed
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When the room has been entered
+ Is thrown when the connection terminated
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Create or Join a Room.
+
+ Client object
+ Enter room params
+ Set ErrorCode as result on RoomCreateFailed or RoomJoinFailed
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When the room has been entered
+ Is thrown when the connection terminated
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Join room.
+
+ Client object
+ Enter room params
+ Set ErrorCode as result when JoinRoomFailed
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When room has been entered
+ Is thrown when the connection terminated
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Join random or Create room
+
+ Client object
+ Join random room params
+ Enter room params
+ Set ErrorCode as result when operation fails with ErrorCode
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When inside a room
+ Is thrown when the connection terminated
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Join a Random Room
+
+ Client object
+ Join random room params
+ Set ErrorCode as result when operation fails with ErrorCode
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When inside a room
+ Is thrown when the connection terminated
+ Is thrown when the operation could not be started
+ Is thrown when the operation completed unsuccessfully
+ Is thrown when the operation timed out
+
+
+
+ Join a Lobby
+
+ Client object
+ Lobby to join
+ Set ErrorCode as result when operation fails with ErrorCode
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ When inside a Lobby
+
+
+
+ Create a instance, sets up the Photon callbacks, schedules removing them, create a connection service task.
+ The handler will monitor the Photon callbacks and complete, fault accordingly.
+ Use the callbacks to change the default handling.
+ can complete with ErrorCode.Ok, exception on errors and a timeout .
+
+ Client
+ The default implementation will throw an exception on every unexpected result, set this to false to return a result instead
+ Runs client.Service() during the operation
+ Optional external cancellation token
+ Photon Connection Handler object
+
+
+
+ Starts a task that calls every updateIntervalMs milliseconds.
+ The task is stopped by the cancellation token from .
+ It will set an exception on the TaskCompletionSource if after the timeout it is still not completed.
+
+ Client
+ Cancellation token to stop the update loop
+ Completion source is notified on an exception in Service()
+
+
+
+ Convert a into a
+
+
+
+
+ Convert a into a
+
+
+
+
+ Calculate the total size a would take when serialized
+
+ Hashtable to check the size
+ Total size of the Hashtable in serialized format
+
+
+
+ Convert the Room Custom Properties into a
+
+ RoomInfo to extract the custom properties
+ with the data
+
+
+
+ Calculate the total size a would take when serialized
+
+ Dictionary to check the size
+ Total size of the Dictionary in serialized format
+
+
+
+ Settings for Fusion application
+
+
+
+
+ Select the Relayed Connection Encryption Mode
+
+
+
+
+ Photon Session EmptyRoomTTL in milliseconds. Valid only in Shared Mode.
+
+
+
+
+ Returns a copy of the current object.
+
+ Copy of the current object
+
+
+
+ Returns a string that represents the current object.
+
+
+
+
+ Collection of connection-relevant settings, used internally by PhotonNetwork.ConnectUsingSettings.
+
+
+ Includes the AppSettings class from the Realtime APIs plus some other, PUN-relevant, settings.
+
+
+
+ The photon settings class, which is wrapped by this ScriptableObject.
+
+
+
+ Serialized server settings, written by the Setup Wizard for use in ConnectUsingSettings.
+
+
+
+ Try to get the global settings
+
+ Output settings
+ True if the settings are loaded, false otherwise
+
+
+
+ Check if the global settings are loaded
+
+
+
+
+ Holds a Custom Session Property value
+
+
+
+
+ Internal stored value
+
+
+
+
+ Get the Type of the internal stored value
+
+
+
+
+ Signal if this Session Property is a int value
+
+
+
+
+ Signal if this Session Property is a string value
+
+
+
+
+ Signal if this Session Property is a bool value
+
+
+
+
+ Convert a into int
+
+
+
+
+ Convert a int into a
+
+
+
+
+ Convert a into string
+
+
+
+
+ Convert a string into a
+
+
+
+
+ Convert a into bool
+
+
+
+
+ Convert a bool into a
+
+
+
+
+ Signal if a particular object is supported as a
+
+ Object ref to check
+ True if obj is of a supported type, false otherwise
+
+
+
+ Convert a particular object into a .
+ Check the object type support using .
+ If the object type is not supported, will be thrown.
+
+ Object reference to be converted
+ Instance of a if type is supported, null otherwise
+ If the object type passed as argument is not supported
+
+
+
+ String representation of the
+
+
+
+
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.xml.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.xml.meta
new file mode 100644
index 00000000..33ad520b
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Realtime.xml.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 0e69dcdf71bbf0a418c882b5a3e024e3
+labels:
+- FusionCodeDoc
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.dll b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.dll
new file mode 100644
index 00000000..1328e544
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.dll differ
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.dll.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.dll.meta
new file mode 100644
index 00000000..a67cab8c
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.dll.meta
@@ -0,0 +1,38 @@
+fileFormatVersion: 2
+guid: e725a070cec140c4caffb81624c8c787
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder:
+ Fusion.HitboxRoot: -2000
+ Fusion.NetworkMecanimAnimator: 600
+ Fusion.NetworkObject: 5000
+ Fusion.NetworkTransform: -1400
+ Fusion.NetworkObjectInactivityGuard: -10000
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.xml b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.xml
new file mode 100644
index 00000000..fbd3955e
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.xml
@@ -0,0 +1,17979 @@
+
+
+
+ Fusion.Runtime
+
+
+
+
+ Memory Allocator
+
+
+
+ Heap Alignment
+
+
+ Replicate Word Shift
+
+
+ Replicate Word Size
+
+
+ Replicate Word Align
+
+
+ Bucket Count
+
+
+ Bucket Invalid
+
+
+
+ LogPointerInfo
+
+
+
+
+ Returns the total size in bytes used by the allocator segments.
+
+
+
+
+ Fills the given MemoryStatisticsSnapshot object with memory allocation statistics.
+
+
+
+
+ Allocates a memory segment of the specified size from the allocator.
+
+ Size of the memory segment to allocate.
+ Pointer to the allocated memory segment.
+ Thrown if the size is less than 1 or greater than or equal to the block byte size.
+ Thrown if all buckets are full and memory cannot be allocated.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns a string representation of the block.
+
+
+
+
+ Memory Allocator Configuration
+
+
+
+
+ Config Size
+
+
+
+
+ Default Block Shift
+
+
+
+
+ Default Block Count
+
+
+
+
+ Block Shift Config value
+
+
+
+
+ Block Count Config value
+
+
+
+
+ Globals Size Config value
+
+
+
+
+ Block Size in Bytes
+
+
+
+
+ Block Size in Words
+
+
+
+
+ Heap Size in Bytes
+
+
+
+
+ Heap Size Allocated in Bytes
+
+
+
+
+ Config Constructor
+
+ Block Shift
+ Block Count
+ Globals Size
+
+
+
+ Check Config equality
+
+ Config Ref
+ True if has the same values
+
+
+
+ Check Config equality
+
+ Any object reference
+ True if obj is a and has the same values
+
+
+
+ Get Hash Code
+
+ Hash Code
+
+
+
+ Config ToString
+
+
+
+
+ Page Bit Shift Lookup Table
+
+
+
+
+ Ptr
+
+
+
+
+ Ptr Equality Comparer
+
+
+
+
+ Ptr Equality Comparer
+
+ Ptr X
+ Ptr Y
+ True if point to the same Address
+
+
+
+ Get Hash Code
+
+ Ptr
+ Ptr Address
+
+
+
+ Ptr Size
+
+
+
+
+ Null Ptr
+
+
+
+
+ Ptr Address
+
+
+
+
+ Check Ptr equality
+
+ Ptr Ref
+ True if points to the same Address
+
+
+
+ Check Ptr equality
+
+ Any object reference
+ True if obj is a and points to the same Address
+
+
+
+ Hash Code, same as
+
+
+
+
+
+ to String
+
+ in Hexadecimal format
+
+
+
+ Implicit Bool Operator
+ Check if is not 0
+
+
+ to check
+
+
+ True if is not 0
+
+
+
+
+ Implicit Ptr Equals Operator
+
+
+ A
+
+
+ B
+
+
+ True if is the same
+
+
+
+
+ Implicit Ptr Not Equals Operator
+
+
+ A
+
+
+ B
+
+
+ True if is not the same
+
+
+
+
+ Implicit Ptr Sum Operator
+
+
+ to add to
+
+
+ Value to add
+
+
+ with increased by
+
+
+
+
+ Implicit Ptr Subtraction Operator
+
+
+ to subtract from
+
+
+ Value to subtract
+
+
+ with decreased by
+
+
+
+
+ Capacity Attribute
+
+
+
+
+ Total Capacity
+
+
+
+
+ CapacityAttribute Constructor
+
+
+
+
+
+ Default For Property Attribute
+
+ For non-serialized properties
+
+
+
+
+ Property Name
+
+
+
+
+ Property Word Offset
+
+
+
+
+ Property Word Count
+
+
+
+
+ DefaultForPropertyAttribute Constructor
+
+
+
+
+
+
+
+ Fixed Buffer Property Attribute
+
+
+
+
+ Fixed Buffer Type
+
+
+
+
+ Fixed Buffer Surrogate Type
+
+
+
+
+ Fixed Buffer Capacity
+
+
+
+
+ FixedBufferPropertyAttribute Constructor
+
+
+
+
+
+
+
+ Network Assembly Ignore Attribute
+
+
+
+
+ Network Assembly Weaved Attribute
+
+
+
+
+ Network Behaviour Weaved Attribute
+
+
+
+
+ Word Count
+
+
+
+
+ NetworkBehaviourWeavedAttribute Constructor
+
+
+
+
+
+ Network Deserialize Method Attribute
+
+
+
+
+
+ Flags a property of for network state synchronization.
+ The property should have empty get and set defines, which will automatically be replaced with networking code via IL Weaving.
+
+
+ Inside of INetworkStruct, do not use AutoProperties (get; set;), as these will introduce managed types into the struct, which are not allowed. Instead use '=> default'.
+
+ | [Networked]
+ | public string StringProp { get => default; set { } }
+
+
+
+
+
+
+ Name of the field that holds the default value for this networked property.
+
+
+
+
+ Default constructor for NetworkedAttribute
+
+
+
+
+ OnChangedRender Attribute
+
+
+ This attribute is used to specify a method that should be called when the property changes.
+
+
+
+
+ Gets the name of the method to be called when the property changes.
+
+
+
+
+ Initializes a new instance of the class.
+
+ The name of the method to be called when the property changes.
+ Thrown when is null or empty.
+
+
+
+ Networked Weaved Attribute
+
+ Networked Property Attribute
+
+
+
+
+ Networked Property Word Offset
+
+
+
+
+ Networked Property Word Count
+
+
+
+
+ NetworkedWeavedAttribute Constructor
+
+
+
+
+
+
+ An attribute emitted by the weaver to mark a string field as networked.
+
+
+
+ Max capacity of the string (in characters)
+ Name of the field that servers as cache
+
+
+
+ Max capacity of the string (in characters)
+
+
+
+
+ Name of the field that servers as cache
+
+
+
+
+ Network Input Weaved Attribute
+
+
+
+
+ Word Count
+
+
+
+
+ NetworkInputWeavedAttribute Constructor
+
+
+
+
+
+ Network Prefab Attribute
+
+
+
+
+ Network Rpc Static Weaved Invoker Attribute
+ Contains info about a static weaved RPC Method
+
+
+
+
+ RPC Key
+
+
+
+
+ NetworkRpcStaticWeavedInvokerAttribute Constructor
+
+
+
+
+
+ Network Rpc Weaved Invoker Attribute
+ Contains info about a weaved RPC Method
+
+
+
+
+ RPC Key
+
+
+
+
+ RPC Sources
+
+
+
+
+ RPC Targets
+
+
+
+
+ NetworkRpcWeavedInvokerAttribute Constructor
+
+
+
+
+
+
+
+ Network Serialize Method Attribute
+
+
+
+
+ If set, this changes expected Wrap method signature to int Name(NetworkRunner, T, byte*) and Unwrap to int Name(NetworkRunner, byte*, ref T).
+ In both cases, the result is the number of bytes written/read and can not be greater than what's declared here.
+
+
+
+
+ Describes the total number of WORDs a uses.
+
+
+
+
+ Word Count
+
+
+
+
+ If the is Generic Composite
+
+
+
+
+ NetworkStructWeavedAttribute Constructor
+
+ word count
+
+
+
+ Enables a special inspector drawer for Unity Rect type, specially designed for editing RectTransforms using normalized values.
+
+
+
+
+ Signal if Y should be inverted
+
+
+
+
+ Set the Aspect Ratio
+
+
+
+
+ Constructor for . InvertY inverts Y handling, for RectTransforms which treat lowerRight as origin, rather than upper left.
+
+ Invert Y handling
+ Expressed as Width/Height, this defines the ratio of the box shown in the inspector. Value of 0 indicates game window resolution will be used.
+
+
+
+ Preserve In Plugin Attribute
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Override default render settings for [Networked] properties.
+
+
+
+
+
+ Force this property to be rendered in this .
+
+
+ This setting is prioritized over and overrides.
+
+
+
+
+
+
+ Force this property to be rendered using this (in the chosen ).
+
+
+ This setting is prioritized over and overrides.
+
+
+
+
+
+
+ Override the default interpolation method for this property. The method's signature must match:
+
+
+ static T MethodName(T from, T to, float alpha) { /* ... */ }
+
+
+
+
+
+ Default constructor for RenderAttribute
+
+
+
+
+ RenderAttribute Constructor
+
+ reference
+ reference
+
+
+
+ Render Weaved Attribute
+
+
+
+
+ RenderWeavedAttribute Constructor
+
+
+
+
+ Resolve Network Prefab Source Attribute
+
+
+
+
+ Unity ContextMenuItemAttribute
+
+
+
+
+ ContextMenuItemAttribute Order
+
+
+
+
+ ContextMenuItemAttribute Constructor
+
+
+
+
+ Unity DelayedAttribute
+
+
+
+
+ DelayedAttribute Order
+
+
+
+
+ Unity HeaderAttribute
+
+
+
+
+ HeaderAttribute Order
+
+
+
+
+ HeaderAttribute Constructor
+
+
+
+
+ Unity MinAttribute
+
+
+
+
+ MinAttribute Order
+
+
+
+
+ MinAttribute Constructor
+
+
+
+
+ Unity MultilineAttribute
+
+
+
+
+ MultilineAttribute Order
+
+
+
+
+ Unity NonReorderableAttribute
+
+
+
+
+ NonReorderableAttribute Order
+
+
+
+
+ Unity RangeAttribute
+
+
+
+
+ RangeAttribute Order
+
+
+
+
+ RangeAttribute Constructor
+
+
+
+
+ Unity SerializeField
+
+
+
+
+ Unity SerializeReference
+
+
+
+
+ Unity SpaceAttribute
+
+
+
+
+ SpaceAttribute Order
+
+
+
+
+ SpaceAttribute Constructor
+
+
+
+
+ Unity TooltipAttribute
+
+
+
+
+ TooltipAttribute Order
+
+
+
+
+ TooltipAttribute Constructor
+
+
+
+
+ Unity NonSerializedAttribute
+
+
+
+
+ Unity FormerlySerializedAsAttribute
+
+
+
+
+ FormerlySerializedAsAttribute Constructor
+
+
+
+
+ Weaver Generated Attribute
+
+
+
+
+ Wrapper around the Fusion LBC Implementation
+
+ It will control and manage the communication between Fusion and the Photon Cloud
+
+
+
+
+ Fusion LBC Client Reference
+
+
+
+
+ ID of this Communicator. This reflects the Actor Number of the Peer inside the Room
+
+
+
+
+ Flag to signal if this Communicator was extracted and will be reused
+
+
+
+
+ Responsible to deal with LoadBalancingClient Events
+
+
+ Responsible for dealing and managing the API used to communicate with the Photon Cloud.
+ This also includes:
+ - Send/Reply to Protocol Messages
+ - Query for Reflexive Information
+ - Perform NAT Punchthrough
+ - Manage the Realtime client
+ - Respond to/deal with Photon Cloud events
+
+
+
+
+ Signal if the local peer is connected to the Photon Cloud and can perform extra actions, like creating/joining a Room.
+
+
+
+
+ Photon Client UserID
+
+
+
+
+ Signal if the local peer is already inside a Room
+
+
+
+
+ Signal if the local peer is already inside a Lobby
+
+
+
+
+ Current Fusion Session Join Stage
+
+
+
+
+ Current ProtocolMessageVersion
+
+
+
+
+ Max Number of players a Session can handle
+
+
+
+
+ Signal if the local peer is also the Master Client of the Current Room
+
+
+
+
+ Get the internal used by the Client to perform the authentication
+
+
+
+
+ Reference to the current active communicator
+
+
+
+
+ Get the local client cached region summary
+
+
+
+
+ Signal if the local peer will try or accept connections using NAT Punch
+
+
+
+
+ Flag to signal if the Photon Cloud connection is encrypted by default
+
+
+
+
+ Custom STUN Server
+
+
+
+
+ Exposes the current NAT Type from the local Peer
+
+
+
+
+ player ref assigned by the cloud
+
+
+
+
+ Builds a new CloudService reference
+
+ Reference to the current active Runner
+ Custom Photon App Settings
+ Optional external Communicator
+
+
+
+ Extract the internal Communicator for later re-use
+
+ Current used by this instance with all resetted settings
+
+
+
+ Update and perform all pending actions related to the Photon Cloud communication
+
+
+
+
+ Connect the local peer to Photon Cloud using an async process.
+
+ Custom Authentication Values used to Auth the local peer
+ Custom Photon App Settings
+ External CancellationToken
+ Signal if the LoadBalancingClient should use the Default or Alternative Ports
+ Async Task of the connect to Photon Cloud process. Can be used to wait for the process to be finished
+
+
+
+ Join the Peer to a specific Lobby, either a prebuild or a custom one
+
+ Lobby Type to Join
+ Custom Lobby ID
+ Custom Lobby Type
+ True if the operation could be completed.
+
+
+
+ Make the local Peer Create/Join a Room based on Start Game Arguments
+
+ --------------------->Yes--->CreateOrJoin
+ SharedMode--->| Valid Room Name |
+ --------------------->No---->[RandomRoomName]-->JoinRandomOrCreate
+
+ --------------------->Yes--->CreateOrJoin
+ ClientMode--->| Valid Room Name |
+ --------------------->No---->[RandomRoomName]-->JoinRandom
+
+ ServerMode-- --------------------->Yes----------------------------|
+ |->| Valid Room Name | v
+ HostMode---- --------------------->No---->[RandomRoomName]-->CreateOrJoin
+
+
+ Start Game Args ref
+ External Cancellation Token
+ Task of the Join Room process
+
+
+
+ Disconnect the Local Peer from the Photon Cloud.
+
+ Async Task of the disconnect from Photon Cloud process. Can be used to wait for the process to be finished
+
+
+
+ Get the UserID of another Player Actor in the Room
+
+ ActorID of a Player inside the Room
+ Player UserID
+
+
+
+ Try to get the ActorId associated with a specific Client Unique Id
+
+ Client Unique Id to check
+ ActorId associated with that Client Unique Id
+ True if the ActorId can be found
+
+
+
+ Callback fire on every connection attempt with a remote Server.
+
+ It is used while trying to hole-punch the remote server and enables the manager to swap the target endpoint in between attempts.
+ This is necessary to maintain a flow of attempts even if we exchange the local/public/relay endpoints
+
+ Current attempt number
+ Max number of attempts
+ Flag if target EndPoint should change
+ New target EndPoint
+
+
+
+ Start the connection process with a Remote Server
+
+ Starting NAT Punch state, see for more info
+ Remote Server EndPoint to connect to
+
+
+
+ Disposes the current
+
+
+
+
+ Callback invoked when any Room Property has changed
+
+
+
+
+ Callback invoked when the Room list is updated with data from the Cloud
+
+ New List of
+
+
+
+ Send a Protocol Message to Fusion Plugin
+
+ Optional external cancellation token
+
+
+
+ Send a Protocol Message to the Fusion Plugin
+
+ Reference to the Project Config to be sent
+
+
+
+ Send a Protocol Message to the Fusion Plugin
+
+ Reference to StunResult used to build the Protocol Message
+
+
+
+ Build and send the latest Server Snapshot to the Fusion Plugin
+
+
+
+
+ Handles a Confirmation Protocol Message sent by the Fusion Plugin
+
+ Sender Actor Number
+ Join Protocol Message
+
+
+
+ Handles a Protocol Message sent by the Fusion Plugin
+
+ Sender Actor Number
+ Start Protocol Message
+
+
+
+ Handles a Protocol Message sent by the Fusion Plugin
+
+ Sender Actor Number
+ Disconnect Protocol Message
+
+
+
+ Handles a Protocol Message sent by the Fusion Plugin
+
+ Sender Actor Number
+ NetworkConfigSync Protocol Message
+
+
+
+ Handles a Protocol Message sent by the Fusion Plugin
+
+ Sender Actor Number
+ ReflexiveInfo Protocol Message
+
+
+
+ Confirms or waits for confirmation from the Plugin of the Join Message
+
+ True if the Join Confirmation was received, false otherwise
+
+
+
+ Send an empty message to Photon Cloud so the LBC Connection keeps alive
+
+
+
+
+ Periodically sends a host migration snapshot if the runner is in host mode and is currently running.
+
+
+ A task that represents the asynchronous operation. The task result is a boolean indicating whether the service should continue running.
+ Returns true if the runner is not running, indicating that the service should continue.
+ Returns false if the runner is not in host mode, indicating that the service should stop.
+
+ Thrown when the operation is cancelled.
+
+
+
+ Reverse ping will send Empty UDP Packets to the RemoteAddr in order to setup the Routing Table
+ on the current NAT of the Server, forcing it to allow packages from the remote client to be received
+
+ Remove EndPoint to ping
+
+
+
+ Run the STUN Service to retrieve the current Reflexive Addresses of the local peer
+
+ Running Task of the STUN Query Procedure
+
+
+
+ Update the internal used to start the Fusion Runner
+
+ New arguments
+
+
+
+ Check if Remote Private EndPoint appears to be in the same Subnet
+
+ True if in same Subnet
+
+
+
+ Converts a to a
+
+
+ ref
+ Room Region
+ ref
+
+
+
+ Holds information about the local peer used to Join/Start/Connect to a remote Peer
+ using the Photon Cloud as backend
+
+
+
+
+ Client Server Lobby
+
+
+
+
+ Shared Lobby
+
+
+
+
+ Reference to the initialization arguments set by the user.
+ They are used to start the Fusion Runner
+
+
+
+
+ Connection Stage related to the current EndPoint Type used by the client to connect a remote server
+
+
+
+
+ Describes the current state of the Join process
+
+
+
+
+ Describe the current protocol version we are using to communicate with the Plugin
+
+
+
+
+ Remote Server Reflexive Info. Stores private and public EndPoint of the remote server.
+
+
+
+
+ Local Reflexive Info. Stores private and public EndPoint of the local peer.
+
+
+
+
+ Stores the local peer Unique Id
+
+
+
+
+ Stores the local peer Unique Id
+
+
+
+
+ Stores the local Encryption Token
+
+
+
+
+ Stores requests sent by the plugin
+
+
+
+
+ Last Disconnect Msg Received from the Plugin
+
+
+
+
+ Mapping between Actor UniqueId and its ReflexiveInfo
+
+
+
+
+ Define a list of Requests that may be asked by the Plugin Server
+
+
+
+
+ No Request
+
+
+
+
+ Request for the Local Reflexive Info
+
+
+
+
+ Describes the current Target Address Type used in the NAT Punch procedure
+
+
+
+
+ No connection procedure is running
+
+
+
+
+ Trying to Connect to LAN EndPoint
+
+
+
+
+ Trying to Connect to WAN EndPoint
+
+
+
+
+ Trying to Connect to Relay EndPoint
+
+
+
+
+ Stage of the Join Process.
+
+ When starting the peer, the first thing we need to make sure is to have Joined the Room
+ with a confirmation from the Plugin, this will signal the current stage of this
+
+
+
+
+ Join Request not sent yet
+
+
+
+
+ Join Request Sent, waiting for confirmation
+
+
+
+
+ Join Confirmation Received, all good
+
+
+
+
+ Failed to receive Join Confirmation after a timeout
+
+
+
+
+ Stores the data of a "Request to Ping" used by the Server in Client-Server Mode
+ to send arbitrary "pings" to a connecting Client.
+
+ This allows the local NAT Table to be updated with the right mapping information
+ from the remote client, increasing the chance of the local Server to receive any
+ connect request from the remote peer.
+
+
+
+
+ Delay between pings
+
+
+
+
+ Total number of pings to send
+
+
+
+
+ Countdown for the next ping
+
+
+
+
+ Remote Client Reflexive Info, used to getter the Public EndPoint to send the ping
+
+
+
+
+ Extension methods to
+
+
+
+
+ Holds information about a Lobby
+
+
+
+
+ Flag to signal if the is ready for use.
+ This is only true if the peer is currently connected to a Lobby.
+
+
+
+
+ Lobby Name
+
+
+
+
+ Stores the current connected Region
+
+
+
+
+ Session Lobby Type
+
+
+
+
+ Invalid Session Lobby Type
+
+
+
+
+ ClientServer Lobby
+
+
+
+
+ Shared Lobby
+
+
+
+
+ Custom Lobby - works in conjuction with a Lobby Name/ID
+
+
+
+
+ Holds information about the Game Session
+
+
+
+
+ Flag to signal if the is ready for use
+
+
+
+
+ Stores the current Room Name
+
+
+
+
+ Stores the current connected Region
+
+
+
+
+ Signal if the current connected Room is visible
+
+
+
+
+ Signal if the current connected Room is open
+
+
+
+
+ Room Custom Properties
+
+
+
+
+ Current number of peers inside this Session, this includes the Server/Host and Clients
+
+
+
+
+ Max number of peer that can join this Session, this value always include an extra slot for the Server/Host
+
+
+
+
+ Check if the reference is not Null and is Valid.
+
+ Session Info
+
+
+
+ Update or change the Custom Properties of the current joined Room
+
+ New custom properties
+
+
+
+ String representation of a
+
+ Formatted
+
+
+
+ Interface for callback.
+ Called after the re-simulation loop (when applicable), and also after the forward simulation loop.
+ Implement this interface on and classes.
+
+
+
+
+ Called after the re-simulation loop (when applicable), and also after the forward simulation loop.
+ Only called on Updates where re-simulation or forward ticks are processed.
+
+ True if this is being called during the re-simulation loop. False if during the forward simulation loop.
+ How many re-simulation or forward ticks are going to be processed.
+
+
+
+ Callback interface for .
+ Called at the very start of the resimulation loop (on clients with prediction enabled),
+ immediately after state is set to the latest server snapshot.
+ Implement this interface on and classes.
+
+
+
+
+ Called at the very start of the resimulation loop (on clients with prediction enabled),
+ immediately after state is set to the latest server snapshot.
+
+
+
+
+ Used to mark NetworkBehaviors that need to be react after a Host Migration process
+
+
+
+
+ Invoked after the Host Migration happens in order to setup non-networked data on NetworkBehaviors
+
+
+
+
+ Interface for callback.
+ Called after the render loop.
+
+
+
+
+ Called after the render loop.
+
+
+
+
+ Interface for callback.
+ Called after the object is spawned.
+
+
+
+
+ Called after the object is spawned.
+
+
+
+
+ Interface for callback.
+ Called after each tick simulation completes.
+ Implement this interface on and classes.
+
+
+
+
+ Called after each tick simulation completes.
+
+
+
+
+ Interface for the callback, which is called at the end of each Fusion Update segment.
+ Implement this interface on and classes.
+
+
+
+
+ Called at the end of the Fusion Update loop, before all Unity MonoBehaviour.Update() callbacks.
+
+
+
+
+ Invoked after updating remote prefabs
+
+
+
+
+ Invoked after updating remote prefabs
+
+
+
+
+ Interface for callback.
+ Called before the re-simulation loop (when applicable), and also before the forward simulation loop.
+ Implement this interface on and classes.
+
+
+
+
+ Called before the re-simulation loop (when applicable), and also before the forward simulation loop.
+ Only called on Updates where re-simulation or forward ticks are processed.
+
+ True if this is being called during the re-simulation loop. False if during the forward simulation loop.
+ How many re-simulation or forward ticks are going to be processed.
+
+
+
+ Callback interface for .
+ Called at the very start of the re-simulation loop (on clients with prediction enabled),
+ before state is set to the latest server snapshot.
+ Implement this interface on and classes.
+
+
+
+
+ Called at the very start of the re-simulation loop (on clients with prediction enabled),
+ before state is set to the latest server snapshot.
+
+
+
+
+ Interface for callback.
+ Called before the copy of the previous state.
+
+
+
+
+ Called before the copy of the previous state.
+
+
+
+
+ Interface for callback.
+ Implement this interface on and classes.
+
+
+
+
+ Called immediately before the registers hitboxes in a snapshot.
+
+
+
+
+ Interface for callback.
+ Called before both the re-simulation (when applicable) and forward simulation loops.
+ Implement this interface on and classes.
+
+
+
+
+ Called before both the re-simulation (when applicable) and forward simulation loops.
+ Only called on updates that have forward ticks to process.
+
+ How many forward ticks are going to be processed.
+
+
+
+ Interface for callback.
+ Called before each tick is simulated.
+ Implement this interface on and classes.
+
+
+
+
+ Called before each tick is simulated.
+
+
+
+
+ Interface for the callback, which is called at the beginning of each Fusion Update segment.
+ Implement this interface on and classes.
+
+
+
+
+ Called at the start of the Fusion Update loop, before the Fusion simulation loop.
+
+
+
+
+ Invoked before updating remote prefabs
+
+
+
+
+ Invoked before updating remote prefabs
+
+
+
+
+ Interface for callback.
+ Called when a is despawned.
+
+
+
+
+ Called when a is despawned.
+
+ NetworkRunner that despawned the .
+ Whether the has state.
+
+
+
+ Interface for handling the event when a player enters the area of interest.
+
+
+
+
+ Method to be called when a player enters the area of interest.
+
+ The player who entered the area of interest.
+
+
+
+ Interface for handling the event when a player exits the area of interest.
+
+
+
+
+ Method to be called when a player exits the area of interest.
+
+ The player who exited the area of interest.
+
+
+
+ Interface for handling the event when a local prefab is created.
+
+
+
+
+ Method to be called when a local prefab is created.
+
+
+
+
+ Interface for handling the event when a player joins the game.
+
+
+
+
+ Method to be called when a player joins the game.
+
+ The player who joined the game.
+
+
+
+ Interface for handling the event when a player leaves the game.
+
+
+
+
+ Method to be called when a player leaves the game.
+
+ The player who left the game.
+
+
+
+ Tag Interface for all public facing Fusion interfaces
+
+
+
+
+ Interface for handling the event when a remote prefab is created.
+
+
+
+
+ Method to be called when a remote prefab is created.
+
+
+
+
+ Interface for handling the event when a scene load operation is completed.
+
+
+
+
+ Method to be called when a scene load operation is completed.
+
+ The information about the loaded scene.
+
+
+
+ Struct that contains information about a scene after it has been loaded.
+
+
+
+
+ Reference to the loaded scene.
+
+
+
+
+ Array of NetworkObjects present in the loaded scene.
+
+
+
+
+ The loaded Unity scene.
+
+
+
+
+ Array of root GameObjects present in the loaded Unity scene.
+
+
+
+
+ Constructs a new SceneLoadDoneArgs struct.
+
+ Reference to the loaded scene.
+ Array of NetworkObjects present in the loaded scene.
+ The loaded Unity scene.
+ Array of root GameObjects present in the loaded Unity scene.
+
+
+
+ Interface for handling the event when a scene load operation is started.
+
+
+
+
+ Method to be called when a scene load operation is started.
+
+ Reference to the scene that is being loaded.
+
+
+
+ Interface for callback.
+ Called when the joins AreaOfInterest.
+ Implement this interface on and classes.
+
+
+
+
+ Called when the joins AreaOfInterest.
+ Object is now receiving snapshot updates.
+ Object will execute FixedUpdateNetwork() and Render() methods until the object leaves simulation.
+
+
+
+
+ Interface for the callback.
+ Called when the leaves AreaOfInterest.
+ Implement this interface on and classes.
+
+
+
+
+ Called when the leaves AreaOfInterest.
+ Object is no longer receiving snapshot updates.
+ Object will stop executing FixedUpdateNetwork() and Render() methods until the object rejoins simulation.
+
+
+
+
+ Interface for handling the event when an object is spawned.
+
+
+
+
+ Method to be called when an object is spawned.
+
+
+
+
+ Interface for handling the event when the state authority changes.
+
+
+
+
+ Method to be called when the state authority changes.
+
+
+
+
+ Interface for handling the event when the input authority is gained.
+
+
+
+
+ Method to be called when the input authority is gained.
+
+
+
+
+ Interface for handling the event when the input authority is lost.
+
+
+
+
+ Method to be called when the input authority is lost.
+
+
+
+
+ Used in plugin. Indicates that is exported and can be assigned from
+ serialized data.
+
+
+
+
+ Word count read from serialized data.
+
+
+
+
+ Base class for Fusion network components, which are associated with a .
+ Derived from , components derived from this class are associated with a and .
+ Components derived from this class are associated with a parent .
+ and can use the on properties to automate state synchronization,
+ and can use the on methods, to automate messaging.
+
+
+
+
+ Gets a value indicating whether the state buffer is valid.
+
+
+
+
+ Gets the state buffer associated with the network behaviour.
+
+
+
+
+ On Render Default Change Detector instance
+
+
+
+
+ Gives access to the offset (in 32 bit words) and count (in 32 bit words) of this behaviour backing data
+
+
+
+
+ The tick the data on this networked behaviour changed
+
+
+
+
+ The unique identifier for this network behaviour.
+
+
+
+
+ Returns true if the of the associated is the designated as Input Source for this network entity.
+
+
+
+
+ Returns true if the associated is the State Source for this network entity.
+
+
+
+
+ Returns true if the associated is neither the Input nor State Authority for this network entity.
+ It is recommended to use ! or ! when possible instead,
+ as this check requires evaluating both authorities - and is therefore less performant than the individual checks.
+
+
+
+
+ Override this value for custom memory allocations.
+ This is for advanced use cases only, and cannot be used if is used in the derived class.
+
+
+
+
+ Returns true if the object is writable in the editor - i.e. when it is not attached
+ or has the state authority.
+
+
+
+
+ Gets a bitmask of flags, representing the current local authority over this .
+
+
+
+
+ Controls if this network behaviours state is replicated to a player or not
+
+ The player to change replication status for
+ true = replicate, false = don't 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
+
+ The default state of this behaviour
+
+
+
+ Copies entire state of passed in source
+
+ Source to copy data from
+
+
+
+ Fixed update callback for networked behaviours.
+
+
+
+
+ Resets the state of the object to the original state
+
+
+
+
+ Copies the backing fields to the state. This method is meant to be overridden in derived classes.
+
+ Indicates whether this is the first time the method is called.
+
+
+
+ Copies the state to the backing fields. This method is meant to be overridden in derived classes.
+
+
+
+
+ Post spawn callback.
+
+
+
+
+ Called before the network object is despawned
+
+ The runner that owns the object
+ If the state of the behaviour is still accessible
+
+
+
+ Allows read and write access to the internal state buffer
+
+ The offset to generate a ref for, in integer words
+ The type of the ref to generate
+ Reference to the location in memory defined by offset
+
+
+
+ Provides a reader for network arrays of type T.
+
+ The type of elements in the network array.
+
+
+
+ Contains data about the property to be read.
+
+
+
+
+ Contains the reader for the elements in the network array.
+
+
+
+
+ Reads a network array from the provided network behaviour buffer.
+
+ The network behaviour buffer to read the network array from.
+ A read-only view of the network array.
+
+
+
+ Provides a reader for network linked lists of type T.
+
+ The type of elements in the network linked list.
+
+
+
+ Contains data about the property to be read.
+
+
+
+
+ Contains the reader for the elements in the network array.
+
+
+
+
+ Reads a network linked list from the provided network behaviour buffer.
+
+ The network behaviour buffer to read the network linked list from.
+ A read-only view of the network linked list.
+
+
+
+ Provides a reader for network dictionaries with keys of type K and values of type V.
+
+ The type of keys in the network dictionary.
+ The type of values in the network dictionary.
+
+
+
+ Contains data about the property to be read.
+
+
+
+
+ Contains the reader for the keys in the network dictionary.
+
+
+
+
+ Contains the reader for the values in the network dictionary.
+
+
+
+
+ Reads a network dictionary from the provided network behaviour buffer.
+
+ The network behaviour buffer to read the network dictionary from.
+ A read-only view of the network dictionary.
+
+
+
+ Provides a reader for network behaviours of type T.
+
+ The type of the network behaviour.
+
+
+ The NetworkRunner associated with the network behaviour.
+
+
+ The reader for the network behaviour's ID.
+
+
+
+ Reads a network behaviour from the provided network behaviour buffer.
+
+ The network behaviour buffer to read the network behaviour from.
+ The network behaviour of type T read from the buffer. Returns null if the behaviour is not found.
+
+
+
+ Reads two network behaviours from the provided network behaviour buffers.
+
+ The first network behaviour buffer to read the network behaviour from.
+ The second network behaviour buffer to read the network behaviour from.
+ A tuple containing the two network behaviours of type T read from the buffers.
+
+
+
+ Provides a reader for properties of type T in a network behaviour.
+
+ The type of the property in the network behaviour. Must be unmanaged.
+
+
+
+ Contains data about the property to be read.
+
+
+
+
+ Constructs a new PropertyReader with the provided data.
+
+ The data about the property to be read.
+
+
+
+ Constructs a new PropertyReader with the provided offset.
+
+ The offset of the property in the network behaviour buffer.
+
+
+
+ Reads a property of type T from the provided network behaviour buffer.
+
+ The network behaviour buffer to read the property from.
+ The property of type T read from the buffer.
+
+
+
+ Reads a property of type T from the provided network behaviour buffers.
+
+ The first network behaviour buffer to read the property from.
+ The second network behaviour buffer to read the property from.
+ A tuple containing the property of type T read from the first and second buffers.
+
+
+
+ Gets a BehaviourReader for a network behaviour of type T.
+
+ The type of the network behaviour.
+ The name of the property to be read.
+ A BehaviourReader for the network behaviour of type T.
+
+
+
+ Gets an ArrayReader for a network array of type T.
+
+ The type of elements in the network array.
+ The name of the property to be read.
+ An ArrayReader for the network array of type T.
+
+
+
+ Gets a LinkListReader for a network linked list of type T.
+
+ The type of elements in the network linked list.
+ The name of the property to be read.
+ A LinkListReader for the network linked list of type T.
+
+
+
+ Gets a DictionaryReader for a network dictionary with keys of type K and values of type V.
+
+ The type of keys in the network dictionary.
+ The type of values in the network dictionary.
+ The name of the property to be read.
+ A DictionaryReader for the network dictionary with keys of type K and values of type V.
+
+
+
+ Gets a BehaviourReader for a network behaviour of type T.
+
+ The type of the network behaviour.
+ The NetworkRunner associated with the network behaviour.
+ The type of the behaviour to be read.
+ The name of the property to be read.
+ A BehaviourReader for the network behaviour of type T.
+
+
+
+ Gets a BehaviourReader for a network behaviour with a specific property of type TProperty.
+
+ The type of the network behaviour.
+ The type of the property in the network behaviour.
+ The NetworkRunner associated with the network behaviour.
+ The name of the property to be read.
+ A BehaviourReader for the network behaviour with the specific property of type TProperty.
+
+
+
+ Gets a PropertyReader for a property of type TProperty in a network behaviour of type TBehaviour.
+
+ The type of the network behaviour.
+ The type of the property in the network behaviour. Must be unmanaged.
+ The name of the property to be read.
+ A PropertyReader for the property of type TProperty in the network behaviour of type TBehaviour.
+
+
+
+ Gets a PropertyReader for a property of type T in a network behaviour of a specific type.
+
+ The type of the property in the network behaviour. Must be unmanaged.
+ The type of the network behaviour.
+ The name of the property to be read.
+ A PropertyReader for the property of type T in the network behaviour of the specified type.
+
+
+
+ Gets an ArrayReader for a network array of type T in a network behaviour of a specific type.
+
+ The type of elements in the network array.
+ The type of the network behaviour.
+ The name of the property to be read.
+
+ An ArrayReader for the network array of type T in the network behaviour of the specified type.
+
+
+
+ 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.
+
+ The type of keys in the network dictionary.
+ The type of values in the network dictionary.
+ The type of the network behaviour.
+ The name of the property to be read.
+
+
+ A DictionaryReader for the network dictionary with keys of type K and values of type V in the network behaviour of the specified type.
+
+
+
+ Gets a LinkListReader for a network linked list of type T in a network behaviour of a specific type.
+
+ The type of elements in the network linked list.
+ The type of the network behaviour.
+ The name of the property to be read.
+
+ A LinkListReader for the network linked list of type T in the network behaviour of the specified type.
+
+
+
+ Gets a PropertyReader for a property of type T in this network behaviour.
+
+ The type of the property in the network behaviour. Must be unmanaged.
+ The name of the property to be read.
+ A PropertyReader for the property of type T in this network behaviour.
+
+
+
+ Creates a ChangeDetector for this network behaviour.
+
+ The source of the change detector.
+ Indicates whether to copy the initial state of the network behaviour.
+ A ChangeDetector for this network behaviour.
+
+
+
+ Tries to get the snapshot buffers for this network behaviour.
+
+ The buffer representing the state of the network behaviour at the start of the render frame.
+ The buffer representing the state of the network behaviour at the end of the render frame.
+ The interpolation factor between the start and end of the render frame.
+ True if the snapshot buffers are valid, false otherwise.
+
+
+
+ Determines whether to replicate the network behaviour to the specified player.
+ This method can be overridden in derived classes to implement custom replication logic.
+
+ The player to potentially replicate the network behaviour to.
+ True if the network behaviour should be replicated to the player, false otherwise. The default implementation always returns true.
+
+
+
+
+
+
+
+
+
+ Returns true if it a valid can be found for the current simulation tick (Typically this is used in ).
+ The returned input struct originates from the ,
+ and if valid contains the inputs supplied by that for the current simulation tick.
+
+
+
+
+ Serializes a NetworkBehaviour into a byte array.
+
+
+ The NetworkBehaviour to be serialized.
+ The byte pointer to write the serialized data to.
+ The size of the serialized data in bytes.
+
+
+
+ Deserializes a NetworkBehaviour from a byte array.
+
+ The NetworkRunner associated with the NetworkBehaviour.
+ The byte pointer to read the serialized data from.
+ The NetworkBehaviour to store the deserialized data in.
+ The size of the deserialized data in bytes.
+
+
+
+ Converts a NetworkBehaviour to a NetworkBehaviourId.
+
+ The NetworkRunner associated with the NetworkBehaviour.
+ The NetworkBehaviour to be converted.
+ A NetworkBehaviourId representing the NetworkBehaviour. If the NetworkBehaviour is null or its NetworkObject's Id is default, returns a default NetworkBehaviourId.
+
+
+
+ Converts a NetworkBehaviour to a NetworkBehaviourId.
+
+ The NetworkBehaviour to be converted.
+ A NetworkBehaviourId representing the NetworkBehaviour. If the NetworkBehaviour is null or its NetworkObject's Id is default, returns a default NetworkBehaviourId.
+
+
+
+ Converts a NetworkBehaviourId to a NetworkBehaviour.
+
+ The NetworkRunner associated with the NetworkBehaviour.
+ The NetworkBehaviourId to be converted.
+ The NetworkBehaviour represented by the NetworkBehaviourId. If the NetworkBehaviourId is not valid or a NetworkBehaviour with the NetworkBehaviourId does not exist, returns null.
+
+
+
+ Converts NetworkBehaviour to NetworkBehaviourId
+
+ NetworkBehaviour to convert
+ NetworkBehaviourId representing the NetworkBehaviour
+
+
+
+ This method needs to be invoked in user overrides of:
+
+
+
+
+
+
+ Creates a reference to a value of type T. This method is meant to be used only for [Networked] properties inline initialization.
+
+ The type of the value. Must be unmanaged.
+ A reference to a value of type T.
+ Thrown because this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ 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.
+
+ The type of the value. Must be unmanaged.
+ The default value to initialize the value with.
+ A reference to a value of type T.
+ Thrown because this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ Creates a pointer to a value of type T. This method is meant to be used only for [Networked] properties inline initialization.
+
+ The type of the value. Must be unmanaged.
+ A pointer to a value of type T.
+ Thrown because this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ 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.
+
+ The type of the value. Must be unmanaged.
+ The default value to initialize the value with.
+ A pointer to a value of type T.
+ Thrown because this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ This is a special method that is meant to be used only for [Networked] properties inline initialization.
+
+
+
+
+ This is a special method that is meant to be used only for [Networked] properties inline initialization.
+
+
+
+
+ Change detector for a NetworkBehaviour
+
+
+ This class is used to detect changes in a NetworkBehaviour.
+ It can be used to detect changes in a NetworkBehaviour between two snapshots, or between the current state and a snapshot.
+
+
+
+ Enum representing the source of a NetworkBehaviour's state.
+
+
+ The state is the current simulation state of the NetworkBehaviour.
+
+
+ The state is from a previous snapshot of the NetworkBehaviour.
+
+
+ The state is from a future snapshot of the NetworkBehaviour.
+
+
+ Struct representing a collection of changes detected in a NetworkBehaviour.
+
+
+ Array of property names that have changed.
+
+
+ The number of properties that have changed.
+
+
+
+ Constructor for the Enumerable struct.
+
+ Array of property names that have changed.
+ The number of properties that have changed.
+
+
+
+ Gets an enumerator for the collection of changes.
+
+ An Enumerator for the collection of changes.
+
+
+
+ Checks if a property has changed.
+
+ The name of the property to check.
+ True if the property has changed, false otherwise.
+
+
+ Enumerator for the collection of changes detected in a NetworkBehaviour.
+
+
+ Array of property names that have changed.
+
+
+ The number of properties that have changed.
+
+
+ The current index in the array of changed properties.
+
+
+ Gets the current property name in the array of changed properties.
+
+
+
+ Constructor for the Enumerator struct.
+
+ Array of property names that have changed.
+ The number of properties that have changed.
+
+
+
+ Resets the enumerator to its initial state.
+
+
+
+
+ Advances the enumerator to the next property in the array of changed properties.
+
+ True if the enumerator was successfully advanced to the next property, false if the enumerator has passed the end of the array.
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Initializes the ChangeDetector for a given NetworkBehaviour.
+
+ The NetworkBehaviour instance to initialize the ChangeDetector for.
+ The source of the NetworkBehaviour's state.
+ Whether to copy the initial state of the NetworkBehaviour. Defaults to true.
+
+
+
+ Detects changes in a NetworkBehaviour and returns an Enumerable of the changes.
+
+ The NetworkBehaviour instance to detect changes in.
+ The previous state of the NetworkBehaviour.
+ The current state of the NetworkBehaviour.
+ Whether to copy the changes detected. Defaults to true.
+ An Enumerable of the changes detected in the NetworkBehaviour.
+
+
+
+ Detects changes in a NetworkBehaviour and returns an Enumerable of the changes.
+
+ The NetworkBehaviour instance to detect changes in.
+ Whether to copy the changes detected. Defaults to true.
+ An Enumerable of the changes detected in the NetworkBehaviour.
+
+
+
+ Provides low level accesss to data buffers that can be read using a NetworkBehaviour.Reader
+
+
+
+ Gets the tick at which the buffer was created.
+
+
+ Gets the length of the buffer.
+
+
+
+ Gets a value indicating whether the buffer is valid.
+ A buffer is considered valid if the pointer to the start of the buffer is not null and the length of the buffer is greater than 0.
+
+
+
+
+ Reinterprets the state of the buffer at a given offset as a specific type.
+
+ The type to reinterpret the state as. Must be unmanaged.
+ The offset at which to start reinterpreting. Defaults to 0.
+ The state of the buffer at the given offset, reinterpreted as the specified type.
+
+
+
+ Indexer to get the value at a specific index in the buffer.
+
+ The index to get the value from.
+ The value at the specified index in the buffer.
+
+
+
+ Reads a NetworkBehaviour from the buffer using the provided BehaviourReader.
+
+ The type of NetworkBehaviour to read. Must be a subclass of NetworkBehaviour.
+ The BehaviourReader to use for reading the NetworkBehaviour.
+ The read NetworkBehaviour.
+
+
+
+ Reads a property from the buffer using the provided PropertyReader.
+
+ The type of the property to read. Must be unmanaged.
+ The PropertyReader to use for reading the property.
+ The read property.
+
+
+
+ Reads a float property from the buffer using the provided PropertyReader.
+
+ The PropertyReader to use for reading the float property.
+ The read float property.
+
+
+
+ Reads a Vector2 property from the buffer using the provided PropertyReader.
+
+ The PropertyReader to use for reading the Vector2 property.
+ The read Vector2 property.
+
+
+
+ Reads a Vector3 property from the buffer using the provided PropertyReader.
+
+ The PropertyReader to use for reading the Vector3 property.
+ The read Vector3 property.
+
+
+
+ Reads a Vector4 property from the buffer using the provided PropertyReader.
+
+ The PropertyReader to use for reading the Vector4 property.
+ The read Vector4 property.
+
+
+
+ Reads a Quaternion property from the buffer using the provided PropertyReader.
+
+ The PropertyReader to use for reading the Quaternion property.
+ The read Quaternion property.
+
+
+
+ Implicit conversion operator to bool.
+ This allows a NetworkBehaviourBuffer instance to be used in conditions directly.
+
+ The NetworkBehaviourBuffer instance to convert.
+ True if the buffer is valid, false otherwise.
+
+
+
+ The NetworkBehaviourBufferInterpolator struct is used to interpolate between two NetworkBehaviourBuffer instances.
+ This is a read-only, ref struct, meaning it cannot be boxed and it can only be used on the stack.
+
+
+
+
+ The NetworkBehaviour instance that this interpolator is associated with.
+
+
+
+
+ The NetworkBehaviourBuffer instance representing the "from" state for interpolation.
+
+
+
+
+ The NetworkBehaviourBuffer instance representing the "to" state for interpolation.
+
+
+
+
+ The interpolation factor, ranging from 0 to 1.
+ This value is used to interpolate between the "from" and "to" states.
+
+
+
+
+ A value indicating whether this interpolator is valid.
+ An interpolator is considered valid if it has successfully retrieved the "from" and "to" buffers.
+
+
+
+
+ Constructor for the NetworkBehaviourBufferInterpolator struct.
+
+ The NetworkBehaviour instance that this interpolator is associated with.
+
+
+
+ Gets the interpolated angle of a property.
+
+ The name of the property to get the angle of.
+ The interpolated angle of the property.
+
+
+
+ Gets the interpolated angle of a property.
+
+ The PropertyReader for the property to get the angle of.
+ The interpolated angle of the property.
+
+
+
+ Gets the interpolated float value of a property.
+
+ The name of the property to get the float value of.
+ The interpolated float value of the property.
+
+
+
+ Gets the interpolated float value of a property.
+
+ The PropertyReader for the property to get the float value of.
+ The interpolated float value of the property.
+
+
+
+ Gets the interpolated integer value of a property.
+
+ The name of the property to get the integer value of.
+ The interpolated integer value of the property.
+
+
+
+ Gets the interpolated integer value of a property.
+
+ The PropertyReader for the property to get the integer value of.
+ The interpolated integer value of the property.
+
+
+
+ Gets the interpolated boolean value of a property.
+
+ The PropertyReader for the property to get the boolean value of.
+ The interpolated boolean value of the property.
+
+
+
+ Gets the interpolated boolean value of a property.
+
+ The name of the property to get the boolean value of.
+ The interpolated boolean value of the property.
+
+
+
+ Selects the interpolated value of a property by its name.
+
+ The type of the property to select. Must be unmanaged.
+ The name of the property to select.
+ The interpolated value of the property.
+
+
+
+ Selects the interpolated value of a property.
+
+ The type of the property to select. Must be unmanaged.
+ The PropertyReader for the property to select.
+ The interpolated value of the property.
+
+
+
+ Gets the interpolated Vector3 value of a property.
+
+ The name of the property to get the Vector3 value of.
+ The interpolated Vector3 value of the property.
+
+
+
+ Gets the interpolated Vector3 value of a property.
+
+ The PropertyReader for the property to get the Vector3 value of.
+ The interpolated Vector3 value of the property.
+
+
+
+ Gets the interpolated Vector2 value of a property.
+
+ The name of the property to get the Vector2 value of.
+ The interpolated Vector2 value of the property.
+
+
+
+ Gets the interpolated Vector2 value of a property.
+
+ The PropertyReader for the property to get the Vector2 value of.
+ The interpolated Vector2 value of the property.
+
+
+
+ Gets the interpolated Vector4 value of a property.
+
+ The name of the property to get the Vector4 value of.
+ The interpolated Vector4 value of the property.
+
+
+
+ Gets the interpolated Vector4 value of a property.
+
+ The PropertyReader for the property to get the Vector4 value of.
+ The interpolated Vector4 value of the property.
+
+
+
+ Gets the interpolated Quaternion value of a property.
+
+ The name of the property to get the Quaternion value of.
+ The interpolated Quaternion value of the property.
+
+
+
+ Gets the interpolated Quaternion value of a property.
+
+ The PropertyReader for the property to get the Quaternion value of.
+ The interpolated Quaternion value of the property.
+
+
+
+ Implicit conversion operator to bool.
+ This allows a NetworkBehaviourBufferInterpolator instance to be used in conditions directly.
+
+ The NetworkBehaviourBufferInterpolator instance to convert.
+ True if the interpolator is valid, false otherwise.
+
+
+
+ Represents the unique identifier for a NetworkBehaviour instance.
+
+
+
+ Size of the NetworkBehaviourId structure in bytes.
+
+
+
+ The NetworkId of the object this behaviour belongs to.
+
+
+
+
+ The identifier for the behaviour within the object.
+
+
+
+
+ Checks if the NetworkBehaviourId is valid.
+ A NetworkBehaviourId is valid if its Object is valid and its Behaviour is non-negative.
+
+
+
+
+ Returns a new NetworkBehaviourId with default values.
+
+
+
+
+ Checks if this NetworkBehaviourId is equal to another NetworkBehaviourId.
+ Two NetworkBehaviourIds are equal if their Objects and Behaviours are equal.
+
+ The other NetworkBehaviourId to compare with.
+ True if the NetworkBehaviourIds are equal, false otherwise.
+
+
+
+ Checks if this NetworkBehaviourId is equal to another object.
+ The object is considered equal if it is a NetworkBehaviourId and its Object and Behaviour are equal to this NetworkBehaviourId's.
+
+ The object to compare with.
+ True if the object is a NetworkBehaviourId and is equal to this, false otherwise.
+
+
+
+ Returns a hash code for this NetworkBehaviourId.
+ The hash code is computed based on the Object's hash code and the Behaviour.
+
+ A hash code for this NetworkBehaviourId.
+
+
+
+ Returns a string representation of the NetworkBehaviourId.
+ The string representation is in the format: [Object:{Object}, Behaviour:{Behaviour}].
+
+ A string representation of the NetworkBehaviourId.
+
+
+
+ Determines whether two NetworkBehaviourId instances are equal.
+ Two NetworkBehaviourId instances are considered equal if their Objects and Behaviours are equal.
+
+ The first NetworkBehaviourId to compare.
+ The second NetworkBehaviourId to compare.
+ True if the NetworkBehaviourId instances are equal, false otherwise.
+
+
+
+ Determines whether two NetworkBehaviourId instances are not equal.
+ Two NetworkBehaviourId instances are considered not equal if their Objects or Behaviours are not equal.
+
+ The first NetworkBehaviourId to compare.
+ The second NetworkBehaviourId to compare.
+ True if the NetworkBehaviourId instances are not equal, false otherwise.
+
+
+
+ This static class provides utility methods for working with NetworkBehaviour objects.
+
+
+
+
+ This structure holds metadata for a NetworkBehaviour object.
+
+
+
+
+ A static field that determines whether to invoke RPC (Remote Procedure Call).
+ When set to true, RPCs are invoked. When set to false, RPCs are not invoked.
+ Default value is false.
+
+
+
+
+ Retrieves the metadata for a given type.
+
+ The type for which to retrieve the metadata.
+ The metadata for the given type if it exists; otherwise, the default value.
+
+
+
+ Registers the metadata for a given type.
+ This method checks if the type has an override for the "ReplicateTo" method and stores this information in the metadata.
+ If the metadata for the type already exists, this method does nothing.
+
+ The type for which to register the metadata.
+
+
+
+ Retrieves the word count for a given NetworkBehaviour.
+ If the NetworkBehaviour has a dynamic word count, it is returned.
+ Otherwise, the static word count for the type of the NetworkBehaviour is returned.
+
+ The NetworkBehaviour for which to retrieve the word count.
+ The word count for the given NetworkBehaviour.
+ Thrown when the dynamic word count or the static word count is negative.
+
+
+
+ Checks if a given type has a static word count.
+ A type has a static word count if it is a subclass of NetworkBehaviour and its word count is non-negative.
+
+ The type to check.
+ True if the type has a static word count, false otherwise.
+ Thrown when the provided type is not a subclass of NetworkBehaviour.
+ Thrown when the provided type does not have a weaved attribute.
+
+
+
+ Retrieves the static word count for a given type.
+ If the word count for the type has not been computed yet, it is computed and stored.
+
+ The type for which to retrieve the static word count.
+ The static word count for the given type.
+ Thrown when the provided type is not a subclass of NetworkBehaviour.
+ Thrown when the provided type does not have a weaved attribute or its word count is negative.
+
+
+
+ Determines whether the RPC (Remote Procedure Call) invoke delegates should be registered for a given type.
+
+ The type for which to check the registration of RPC invoke delegates.
+ True if the RPC invoke delegates should be registered for the type, false otherwise.
+
+
+
+ Registers the RPC (Remote Procedure Call) invoke delegates for a given type.
+ This method is only available when the FUSION_UNITY compilation symbol is defined.
+
+ The type for which to register the RPC invoke delegates.
+ Thrown when the provided type is not a subclass of NetworkBehaviour.
+ Thrown when the provided type does not have a weaved attribute or its word count is negative.
+
+
+
+ Tries to get the RPC (Remote Procedure Call) invoke delegate array for a given type.
+
+ The type for which to get the RPC invoke delegate array.
+ When this method returns, contains the RPC invoke delegate array if the type has one; otherwise, null.
+
+ true if the type has an RPC invoke delegate array; otherwise, false.
+
+
+
+
+ Retrieves the index of a static RPC (Remote Procedure Call) based on its key.
+
+ The key of the static RPC.
+ The index of the static RPC if it exists.
+ Thrown when the static RPC does not exist.
+
+
+
+ Tries to get the static RPC (Remote Procedure Call) invoke delegate based on its index.
+
+ The index of the static RPC.
+ When this method returns, contains the static RPC invoke delegate if it exists; otherwise, default.
+ True if the static RPC invoke delegate exists; otherwise, false.
+
+
+
+ Logs an error message indicating that the target of a Remote Procedure Call (RPC) payload is too large.
+
+ Size of the payload.
+ The name of the RPC that was attempted.
+
+
+
+ Logs an error message indicating that the target of a Remote Procedure Call (RPC) is not reachable.
+
+ The player reference that is not reachable.
+ The name of the RPC that was attempted.
+
+
+
+ Logs an error message indicating that a local simulation is not allowed to send a specific RPC.
+
+ The name of the RPC that was attempted.
+ The network object on which the RPC was attempted.
+ The sources from which the RPC was attempted.
+
+
+
+ Logs a warning message indicating that a local targeted RPC was culled.
+
+ The player reference for which the RPC was culled.
+ The name of the method that was culled.
+
+
+
+ Checks if the NetworkBehaviour object is initialized and throws an exception if it is not.
+
+ The NetworkBehaviour object to check.
+ Thrown when the NetworkBehaviour object is not initialized.
+
+
+
+ Logs a warning message indicating that a network wrap operation failed.
+
+ The type of the value that failed to be wrapped.
+ The value that failed to be wrapped.
+
+
+
+ Logs a warning message indicating that a network wrap operation failed for a specific wrapper type.
+
+ The type of the value that failed to be wrapped.
+ The value that failed to be wrapped.
+ The type that was attempted to be used as a wrapper.
+
+
+
+ Logs a warning message indicating that a network unwrap operation failed.
+
+
+
+
+ Initializes a NetworkArray with the values from a source array.
+
+ The type of the elements in the NetworkArray and source array.
+ The NetworkArray to initialize.
+ The source array from which to copy the values.
+ The name of the NetworkArray for logging purposes.
+
+ If the length of the source array is greater than the length of the NetworkArray, a warning is logged and only the first elements up to the length of the NetworkArray are copied.
+
+
+
+
+ Copies the values from a NetworkArray to a destination array.
+
+ The type of the elements in the NetworkArray and destination array.
+ The NetworkArray from which to copy the values.
+ The destination array to which to copy the values.
+
+ If the length of the destination array is not equal to the length of the NetworkArray, a new array of the correct length is created and assigned to the destination array.
+
+
+
+
+ Creates a new array that is a clone of the specified array.
+
+ The type of the elements in the array.
+ The array to clone.
+ A new array that is a clone of the specified array. If the specified array is null, an empty array is returned.
+
+
+
+ Initializes a NetworkLinkedList with the values from a source array.
+
+ The type of the elements in the NetworkLinkedList and source array. Must be unmanaged.
+ The NetworkLinkedList to initialize.
+ The source array from which to copy the values.
+ The name of the NetworkLinkedList for logging purposes.
+
+ If the length of the source array is greater than the capacity of the NetworkLinkedList, a warning is logged and only the first elements up to the capacity of the NetworkLinkedList are copied.
+
+
+
+
+ Copies the values from a NetworkLinkedList to a destination array.
+
+ The type of the elements in the NetworkLinkedList and destination array.
+ The NetworkLinkedList from which to copy the values.
+ The destination array to which to copy the values. If the length of the destination array is not equal to the count of the NetworkLinkedList, a new array of the correct length is created and assigned to the destination array.
+
+
+
+ This method is not meant to be called directly. Calls are injected by the Weaver.
+
+ SimulationBehaviour object.
+
+
+
+ This method is not meant to be called directly. Calls are injected by the Weaver.
+
+ SimulationBehaviour object.
+
+
+
+ This method is not meant to be called directly. Calls are injected by the Weaver.
+
+ SimulationBehaviour object.
+
+
+
+ Initializes a NetworkDictionary with the values from a source dictionary.
+
+ The type of the source dictionary. Must implement IDictionary{K, V}.
+ The type of the keys in the NetworkDictionary and source dictionary. Must be unmanaged.
+ The type of the values in the NetworkDictionary and source dictionary. Must be unmanaged.
+ The NetworkDictionary to initialize.
+ The source dictionary from which to copy the values.
+ The name of the NetworkDictionary for logging purposes.
+
+ If the count of the source dictionary is greater than the capacity of the NetworkDictionary, a warning is logged and only the first elements up to the capacity of the NetworkDictionary are copied.
+
+
+
+
+ Copies the values from a NetworkDictionary to a destination dictionary.
+
+ The type of the destination dictionary. Must implement IDictionary{K, V} and have a parameterless constructor.
+ The type of the keys in the NetworkDictionary and destination dictionary. Must be unmanaged.
+ The type of the values in the NetworkDictionary and destination dictionary. Must be unmanaged.
+ The NetworkDictionary from which to copy the values.
+ The destination dictionary to which to copy the values. If the destination dictionary is null, a new dictionary of type D is created.
+
+
+
+ Wraps a Dictionary in a SerializableDictionary.
+
+ The type of the keys in the dictionary. Must be unmanaged.
+ The type of the values in the dictionary. Must be unmanaged.
+ The dictionary to wrap.
+ A SerializableDictionary that wraps the specified dictionary.
+
+
+
+ A utility structure for initializing NetworkArray and NetworkLinkedList with inline initialization.
+
+ The type of the elements in the NetworkArray and NetworkLinkedList.
+
+
+
+ Implicitly converts an ArrayInitializer to a NetworkArray.
+
+ The ArrayInitializer to convert.
+ A NetworkArray initialized with the values from the ArrayInitializer.
+ Thrown always as this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ Implicitly converts an ArrayInitializer to a NetworkLinkedList.
+
+ The ArrayInitializer to convert.
+ A NetworkLinkedList initialized with the values from the ArrayInitializer.
+ Thrown always as this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ A utility structure for initializing NetworkDictionary with inline initialization.
+
+ The type of the keys in the NetworkDictionary.
+ The type of the values in the NetworkDictionary.
+
+
+
+ Implicitly converts a DictionaryInitializer to a NetworkDictionary.
+
+ The DictionaryInitializer to convert.
+ A NetworkDictionary initialized with the values from the DictionaryInitializer.
+ Thrown always as this method is meant to be used only for [Networked] properties inline initialization.
+
+
+
+ A component for synchronizing the Animator controller state from the State Authority to network proxies.
+ Requires a Unity Animator component, and a component.
+ NOTE: Animator Root Motion is not compatible with re-simulation and prediction.
+
+
+
+
+ Gets the dynamic word count for the NetworkMecanimAnimator.
+
+
+ The dynamic word count, which is the maximum of the current total words and the runtime counts, if the application is playing.
+
+ Thrown when this property is accessed outside of playing.
+
+
+
+ The Animator being synced. If unset, will attempt to find one on this GameObject.
+
+
+
+
+ The source of the State which is applied in Render.
+
+
+
+
+ Flags controlling which Mecanim data will be synced.
+
+
+
+
+ States found in the current AnimatorController, converted to hashes.
+
+
+
+
+ Triggers found in the current AnimatorController, converted to hashes.
+
+
+
+
+ The number of words allocated per snapshot for serialization of the Animator. (One Word is 32 bits, or 4 bytes.)
+
+
+
+
+ Animator data captured on the first invocation of EnsureInitialized().
+
+
+
+
+ Have and been initialized?
+
+
+
+
+ To ensure triggers are synced consistently, 1 bit is used for true/false and 3 more are used
+ to differentiate the state (these are incremented with every change to the underlying bool).
+
+
+
+
+ Capture of Animator data.
+
+
+
+
+
+
+
+
+
+
+ Queues a SetTrigger() call for the associated Animator on the State Authority. Call this instead of Animator.SetTrigger() for the State Authority to ensure that triggers are captured.
+ On State Authority, this call will defer the SetTrigger() pass-through to the Animator until FixedUpdateNetwork() is called,
+ where all queued triggers will be executed (this is to ensure tick agreement between server and clients).
+
+ Trigger hash to set
+ Will call Animator.SetTrigger() immediately on the InputAuthority. If false, SetTrigger() will not be called on the Input Authority at all
+ and Animator.SetTrigger() should be called explicitly as needed.
+
+
+
+
+ Queues a SetTrigger() call for the associated Animator on the State Authority. Call this instead of Animator.SetTrigger() for the State Authority to ensure that triggers are captured.
+ On State Authority, this call will defer the SetTrigger() pass-through to the Animator until FixedUpdateNetwork() is called,
+ where all queued triggers will be executed (this is to ensure tick agreement between server and clients).
+
+ Trigger name to set
+ Will call Animator.SetTrigger() immediately on the InputAuthority. If false, SetTrigger() will not be called on the Input Authority at all
+ and Animator.SetTrigger() should be called explicitly as needed.
+
+
+
+
+ Base class for a Fusion aware Behaviour (derived from UnityEngine.MonoBehavour).
+ If a SimulationBehaviour is found on a game object during the runner initialisation, the SimulationBehaviour is automatically registered.
+ Objects derived from this object can be associated with a and using NetworkRunner.AddGlobal().
+
+
+
+
+ Gets a value indicating whether this instance can receive render callbacks.
+
+
+ true if this instance can receive render callbacks; otherwise, false.
+
+
+ This property checks the current flags of the instance against various conditions to determine if it can receive render callbacks.
+
+
+
+
+ Gets a value indicating whether this instance can receive simulation callbacks.
+
+
+ true if this instance can receive simulation callbacks; otherwise, false.
+
+
+ This property checks the current flags of the instance against various conditions to determine if it can receive simulation callbacks.
+
+
+
+
+ The this component is associated with.
+
+
+
+
+ The this component is associated with.
+ Not applicable to s as they cannot be associated with a .
+
+
+
+
+ Fusion FixedUpdate timing callback.
+
+
+
+
+ Post simulation frame rendering callback. Runs after all simulations have finished. Use in place of Unity's Update when Fusion is handling Physics.
+
+
+
+
+
+ This is intentionally private; sub classes can create their own overload
+ without worrying about matching visibility etc.
+ calls will be weaved in.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ String representation of this object for debugging purposes.
+
+ The builder to append to.
+
+
+
+ Attribute for specifying which and this will execute in.
+ Can be used to limit execution to only Host, Server or Client peers, or to only execute on Resimulation or Forward ticks.
+ Usage:
+
+ [SimulationBehaviour(Stages = SimulationStages.Forward, Modes = SimulationModes.Server | SimulationModes.Host)]
+
+
+
+
+
+ Flag for which stages of the simulation loop this component will execute this script.
+
+
+
+
+ Flag for which indicated peers in will execute this script.
+
+
+
+
+ Flag for which topologies this script will execute in
+
+
+
+
+ Provides a scope for a SimulationBehaviourUpdater.BehaviourList, incrementing its lock count on creation and decrementing it on disposal.
+ If the lock count reaches zero on disposal, all pending removals in the list are performed.
+
+
+
+
+ Dispose unmanaged resources.
+
+
+
+
+ The default behaviour interfaces
+
+
+
+
+ Get all simulation behaviours registered. Simulation Behaviours only.
+
+
+
+
+ Add to any Transform, or its associated child Transforms to automatically synchronize
+ TRSP (Position/Rotation/Scale/Parent).
+
+
+
+
+ Enables synchronization of LocalScale.
+
+
+
+
+ Enables synchronization of transform.parent.
+ NOTE: Parent GameObjects must have a derived component to be a valid parent,
+ parent must belong to a different than this Object.
+
+
+
+
+ Determines if parent changes should automatically call ,
+ and assign the parent as the override. Default is true, as you typically will want
+ player interest in this object to reflect player interest in the nested parent object. For example,
+ if a player is carrying an nested Object, players should only see that carried Object if they see the player.
+ Additionally, AOI works in world space, and NetworkTransform operates in local space, so any AOI position values of
+ nested Objects will ALWAYS be invalid, so nested Objects should always have their AOI Override set to a non-nested Object.
+
+
+
+
+ Automatically sets the Area Of Interest Override for this NetworkObject to the parent NetworkObject.
+
+
+
+
+ Disable interpolation on State Authority in Shared Mode. You should disable interpolation if your controller code moves an object inside of Update()
+ rather than FixedUpdateNetwork().
+
+
+
+
+ Set the transform position and rotation to the indicated values, and network the Teleport event.
+ This will suspend interpolation between the previous tick state and the current tick state in Render(),
+ on this peer and all remote peers.
+
+
+
+
+ Manually set the used as the AreaOfInterestOverride.
+
+ NetworkObject to use as the AreaOfInterestOverride.
+
+
+
+
+
+
+
+
+
+ Implement this interface on a implementation to indicate it can be teleported.
+
+
+
+
+ Teleports to the indicated values, and network the Teleport event.
+
+
+
+
+ Base class for spatial (Position/Rotation/Scale/Parent) synchronization component, such as .
+ Provides the base logic for render interpolation, parenting synchronization, and teleport, that can be used in components derived from this class.
+
+
+
+
+ The main is at the root of the
+ and it will be used for area of interest operations and parenting of the .
+
+
+
+
+ The networked data of this .
+
+
+
+
+ A reference to the networked data of this .
+
+
+
+
+ Specify the delta used to smoothly correct the render error when state authority changes.
+ When the state authority changes, the render position and rotation will have an error on the previous authority due to the discarded prediction.
+ This error will be smoothed out over time by this delta.
+ Keep it 0 to disable it.
+
+
+
+ The tick on which this was last re-enabled (right after Spawned doesn't count).
+ Used to override interpolation alpha for the tick after being re-enabled.
+
+
+
+ Manually set the used as the AreaOfInterestOverride.
+
+ NetworkObject to use as the AreaOfInterestOverride.
+
+
+
+ The default Teleport implementation for derived classes.
+
+
+
+
+ Default handling for setting a 's parent using a NetworkBehaviourId value.
+
+
+
+
+ Recursively attempts to find nested parent NetworkObject, and if found assigns that NetworkObject as the AreaOfInterestOverride.
+
+ Only pass a NetworkTRSP derived class that is on the same Transform as its associated ,
+ as AreaOfInterestOverride is only applicable when is true..
+ The direct parent of the
+
+
+
+
+
+
+
+
+ Default Render handling for derived classes.
+
+
+
+
+ Data structure storing spatial (Position/Rotation/Scale/Parent) synchronization data for spatial synchronization components, and its subclass .
+
+
+
+
+ Special NetworkBehaviourId value, used as a flag to tell the parent is a non-networked object
+
+
+
+
+ Networked properties word count for the base
+
+
+
+
+ The actual size for the networked properties in bytes
+
+
+
+
+ Offset to point at the position values on the data buffer
+
+
+
+
+ Id of a NetworkBehaviour on the parent of the component's transform.
+
+
+
+
+ Position relevant for the spatial synchronization component (can be used to either store a local position or a world position, depending on the component)
+
+
+
+
+ Rotation relevant for the spatial synchronization component (can be used to either store a local rotation or a world rotation, depending on the component)
+
+
+
+
+ Scale relevant for the spatial synchronization component
+
+
+
+
+ Key used to differentiate between several teleports
+
+
+
+
+ Id of a behaviour used as the reference point for this component during area of interest operations
+ The behaviour should be a derived class, that is on the same Transform as its associated
+
+
+
+
+ Tools to replace GetComponent variants that respects nested objects.
+ These are used to find components of a NetworkedObjects without also finding components that belong to parent or child NetworkedObjects.
+
+
+
+
+ Ensures that a component of type T exists on the root object of the provided transform.
+ If a component of type T does not exist, it is added.
+ The search for the root object stops if a component of type TStopOn is found.
+
+ The type of component to ensure exists on the root object.
+ The type of component that stops the search for the root object.
+ The transform to start the search from.
+ The component of type T on the root object. Returns null if no root object is found.
+
+
+
+ Find T on supplied transform or any parent. Unlike GetComponentInParent, GameObjects do not need to be active to be found.
+
+
+
+
+ Returns all T found between the child transform and its root. Order in List from child to parent, with the root/parent most being last.
+
+
+
+
+ Finds the first component of type T in the children of the provided transform, stopping the search if a component of type TStopOn is found.
+
+ The type of component to find.
+ The type of component that stops the search.
+ The transform to start the search from.
+ Whether to include inactive game objects in the search.
+ The first component of type T found. Returns null if no component is found.
+
+
+
+ Same as GetComponentInParent, but will always include inactive objects in search.
+ Will also stop recursing up the hierarchy when the StopOnT is found.
+
+
+
+
+ Finds the first component of type T in the parents of the provided transform, stopping the search if a component of type TStopOn is found.
+
+ The type of component to find.
+ The type of component that stops the search.
+ The transform to start the search from.
+ The first component of type T found in the parents. Returns null if no component is found or a component of type TStopOn is found.
+
+
+
+ Finds components of type T on supplied transform, and every parent above that node, inclusively stopping on node StopT component.
+
+
+
+
+ Same as GetComponentsInChildren, but will not recurse into children with component of the StopT type.
+
+
+
+
+ Same as GetComponentsInChildren, but will not recurse into children with any component of the types in the stopOn array.
+
+
+
+
+ Same as GetComponentsInChildren, but will not recurse into children with component of the StopT type.
+
+ Cast found components to this type. Typically Component, but any other class/interface will work as long as they are assignable from SearchT.
+ Find components of this class or interface type.
+ When this component is found, no further recursing will be performed on that node.
+
+
+
+ Find All instances of Component type in a scene. Attempts to respect the hierarchy of the scene objects to produce a more deterministic order.
+ This is a slower operation, and does produce garbage collection.
+
+
+
+
+ Find All instances of Component type in a scene. Attempts to respect the hierarchy of the scene objects to produce a more deterministic order.
+ This is a slower operation which should not be run every update.
+
+ The type being searched for.
+ Scene to search.
+ Supplied list that will be populated by this find.
+ Whether results should include inactive components.
+
+
+
+ Find All instances of Component type in a scene. Attempts to respect the hierarchy of the scene objects to produce a more deterministic order.
+ This is a slow operation, and does produce garbage collection.
+
+ The type being searched for.
+ Casts all found objects to this type, and returns collection of this type. Objects that fail cast are excluded.
+ Scene to search.
+ Whether results should include inactive components.
+
+
+
+ Find All instances of Component type in a scene. Attempts to respect the hierarchy of the scene objects to produce a more deterministic order.
+ This is a slower operation and should not be run every update.
+
+ Type being searched for.
+ Type to cast found objects to.
+ Scene to search.
+ Supplied list that will be filled with found objects.
+ Whether results should include inactive components.
+
+
+
+ A dynamic heap for allocating and tracking unmanaged objects.
+
+
+
+
+ Mark an object with
+
+ Pointer Object to mark
+ Type of object
+ Pointer to object
+
+
+
+ Free up an object
+
+ Heap to free from
+ Pointer to object
+ Thrown if is not a tracked object
+
+
+ Collect garbage delegate
+
+
+
+ Collect garbage
+
+ Dynamic heap to collect from
+ Dynamic roots
+ Dynamic roots length
+
+
+
+ Ignore this field when scanning for pointers.
+
+
+
+
+ Dynamic heap instance.
+
+
+
+
+ Create a dynamic heap instance.
+
+ Types to allocate.
+
+
+
+ Finalizes an instance of the class.
+
+
+
+
+ Free a pointer.
+
+ Pointer to free.
+
+
+
+ Allocate a pointer.
+
+ Size to allocate.
+ Pointer to allocated memory.
+
+
+
+ Allocate a pointer array.
+
+ Length of array.
+ Type of array.
+ Pointer to allocated memory.
+
+
+
+ Allocate an array of pointers.
+
+ Length of array.
+ Type of array.
+ Pointer to allocated memory.
+
+
+
+ Allocate a tracked pointer.
+
+ Signal if the pointer is a root.
+ Type of pointer.
+ Pointer to allocated memory.
+
+
+
+ Allocate a tracked pointer array.
+
+ Length of array.
+ Signal if the pointer is a root.
+ Type of array.
+ Pointer to allocated memory.
+
+
+
+ Allocate a tracked array of pointers.
+
+ Length of array.
+ Signal if the pointer is a root.
+ Type of array.
+ Pointer to allocated memory.
+
+
+
+ Behaviour statistics manager will provide access to the behaviour statistics snapshots.
+
+
+
+
+ The completed snapshot of statistics related to Fusion Behaviour type execution from the previous update.
+
+
+
+
+ Represents a snapshot of statistics related to Fusion Behaviour type execution.
+
+
+
+
+ Gets the count of FixedUpdateNetwork executions.
+
+
+
+
+ Gets the count of Render executions.
+
+
+
+
+ Gets the total execution time of FixedUpdateNetwork in milliseconds.
+
+
+
+
+ Gets the total execution time of Render in milliseconds.
+
+
+
+
+ Represents a fusion statistics manager.
+
+
+
+
+ Provides access to a complete snapshot of the fusion statistics.
+
+
+ This property behaves as a read-only property and provides the collected snapshot of the fusion statistics.
+
+
+
+
+ Manages the network object statistics.
+
+
+
+
+ Represents a snapshot of Fusion statistics.
+
+
+
+
+ Gets or sets the number of resimulations.
+
+
+
+
+ Gets or sets the number of forward ticks.
+
+
+
+
+ Gets or sets the number of incoming packets.
+
+
+
+
+ Gets or sets the number of outgoing packets.
+
+
+
+
+ Gets or sets the in-bandwidth value.
+
+
+
+
+ Gets or sets the outbandwith property.
+
+
+
+
+ Gets or sets the round trip time (RTT) in seconds.
+
+
+
+
+ Gets the input in bandwidth.
+
+
+
+
+ Gets the input out bandwidth.
+
+
+
+
+ The number of received objects updates per packet.
+
+
+
+
+ The number of sent objects updates per packet.
+
+
+
+
+ The number of used segments allocated for objects on the simulation.
+
+
+
+
+ The number of used segments allocated for general purposes on the simulation.
+
+
+
+
+ The number of free segments allocated for objects on the simulation.
+
+
+
+
+ The number of free segments allocated for general purposes on the simulation.
+
+
+
+
+ The number of words that were written.
+
+
+
+
+ The number of words that were read.
+
+
+
+
+ The total size in bytes of all written words.
+
+
+
+
+ The total size in bytes of all read words.
+
+
+
+
+ Gets the Input Receive Delta.
+
+
+
+
+ Gets the Time Resets count.
+
+
+
+
+ Gets the State Receive Delta.
+
+
+
+
+ Gets the Simulation Time Offset.
+
+
+
+
+ Gets the Simulation Speed.
+
+
+
+
+ Gets the Interpolation Offset.
+
+
+
+
+ Gets the Interpolation Speed.
+
+
+
+
+ Represents a snapshot of lag compensation statistics.
+
+
+
+
+ Represents the total time taken to advance, add and update all hitboxes on the Lag Compensation system.
+
+
+
+
+ Represents the deeper level reached by the BVH.
+
+
+
+
+ Represents total nodes count on the BVH.
+
+
+
+
+ Represents the total number of HitBoxCollider on the HitBoxSnapshot colliders buffer, including both used and free ones.
+
+
+
+
+ Represents the amount of time taken to register new hitboxes on the HitboxBuffer.
+
+
+
+
+ Represents the amount of time taken to register new hitboxes on the BVH.
+
+
+
+
+ Represents the amount of time taken to update the BVH.
+
+
+
+
+ Represents the amount of time taken to update the HitboxBuffer.
+
+
+
+
+ Represents the amount of time taken to advance the hitbox buffer and copy previous snapshot information.
+
+
+
+
+ Represents the amount of time taken to refit the BVH bounds after the nodes update.
+
+
+
+
+ Clear the snapshot
+
+
+
+
+ Represents a snapshot of specific memory statistics. For basic total allocated memory and total free memory check the Fusion Statistics.
+
+
+
+
+ Enum representing the target allocator for memory statistics.
+
+
+
+
+ The number of buckets used in the allocator.
+
+
+
+
+ Represents the total number of free blocks in the allocator.
+
+
+
+
+ Represents the number of full blocks in each bucket of the allocator.
+
+
+
+
+ Represents the number of used blocks in each bucket of the allocator.
+
+
+
+
+ Represents the number of free blocks in each bucket of the allocator.
+
+
+
+
+ Manages network object statistics for monitored network objects.
+
+
+
+
+ Starts or stops monitoring the statistics of a network object.
+
+ The identifier of the network object to monitor.
+ True to start monitoring, false to stop monitoring.
+
+
+
+ Clears the list of monitored network objects.
+
+
+
+
+ Retrieves the network object statistics for a given network ID.
+
+
+ Returns true if the object is being monitored and its statistics are successfully retrieved; otherwise, returns false.
+
+
+
+
+ Collects statistics and resets the completed snapshots for further use.
+
+
+
+
+ Represents a snapshot of network object statistics.
+
+
+
+
+ Gets or sets the number of incoming packets.
+
+
+
+
+ Gets or sets the number of outgoing packets.
+
+
+
+
+ Gets or sets the in-bandwidth value.
+
+
+
+
+ Gets or sets the outbandwith property.
+
+
+
+
+ Call this to batch-optimize any object-changes notified through
+ ssBVHNode.refit_ObjectChanged(..). For example, in a game-loop,
+ call this once per frame.
+
+
+
+
+ Call this when you wish to update an object. This does not update straight away, but marks it for update when Optimize() is called
+
+
+
+
+ initializes a BVH with a given nodeAdaptor, and object list.
+
+
+
+
+ SplitNode is called when a node has too many objects in it, and needs to be split into two nodes.
+
+ BVH
+ The list of objects in the node
+
+
+
+ Details regarding a shape intersection.
+ It does not carry information about the intersection happening or not.
+
+
+
+
+ Contact point.
+
+
+
+
+ Vector that described the plane of smallest penetration between the shapes.
+
+
+
+
+ Penetration along the normal plane.
+
+
+
+
+ Checks if a sphere in the local space of an AABB intersects with it.
+
+ The extents of the AABB in the positive direction of each axis.
+ The center of the sphere in the local space of the AABB.
+ The radius of the sphere.
+ True if there is intersection. False otherwise.
+
+
+
+ Checks if a sphere in the local space of an AABB intersects with it and outputs contact data (also in local space).
+
+ The extents of the AABB in the positive direction of each axis.
+ The center of the sphere in the local space of the AABB.
+ The radius of the sphere.
+ Contact data in the local space of the AABB. Default if there is no intersection.
+ True if there is intersection. False otherwise.
+
+
+
+ Container class to provide the necessary info to draw nodes from the BVH
+
+
+
+
+ Get the node Bounds
+
+
+
+
+ Get the node depth on the BVH
+
+
+
+
+ Get the BVH max depth
+
+
+
+
+ Container class to provide the necessary information to draw a hitbox collider
+
+
+
+
+ The of the collider.
+
+
+
+
+ The box extends of the collider
+ Used on of types: Box
+
+
+
+
+ The offset of the collider.
+
+
+
+
+ The radius of the collider.
+ Used on of types: Sphere and Capsule.
+
+
+
+
+ The height for capsule colliders.
+
+
+
+
+
+ Represents the top center position of the capsule collider.
+
+
+
+
+ Represents the bottom center position of the capsule collider.
+
+
+
+
+ The local to world matrix of the collider.
+
+
+
+
+ Provide access to iterate over the lag compensation system components and give the necessary information to draw them.
+
+
+
+
+ Iterate over to get the hitbox snapshots draw data. Iterate the received hitbox snapshot draw data to get all the colliders draw info for that snapshot.
+
+
+
+
+ Iterate over to get the BVH node draw data.
+
+
+
+
+ Method to draw capsules out of simple shapes.
+
+ The top capsule end position
+ The bottom capsule end posistion
+ The capsule radius
+
+
+
+ Provide a way to iterate over the and
+ return the container for each snapshot on the buffer.
+
+
+
+
+ Returns an enumerator that iterates through the .
+
+
+
+
+ Provide a way to iterate over the and return
+ the for each collider on the snapshot.
+
+
+
+
+ Returns an enumerator that iterates through the of this container.
+
+
+
+
+ Provide a way to iterate over BVH and return a for each node.
+
+
+
+
+ Returns an enumerator that iterates through the .
+
+
+
+
+ Queries can hit either fusion's custom or Unity's standard Physx/Box2D colliders.
+
+
+
+
+ Used when a raycast does not hit anything. Not used on overlaps.
+
+
+
+
+ is a Fusion .
+
+
+
+
+ is a Unity PhysX Collider.
+
+
+
+
+ is a Unity Box2D Collider.
+
+
+
+
+ LagCompensated Extension methods
+
+
+
+
+ Sorts all in ascending order of distance
+ from to the point.
+
+ List containing hits to be sorted.
+ Used as reference point to compute distance from hit points.
+ If are null.
+
+
+
+ Sorts all in ascending order of .
+
+ List containing hits to be sorted.
+ If are null.
+
+
+
+ HitboxBuffer will store all snapshots of the colliders into a circular buffer
+
+
+
+
+ HitboxContainer represents 1 snapshot of all containers in a given Tick
+
+
+
+
+ Pre-processing delegate for queries.
+
+ The query to be performed.
+ The root candidates to be used for the query.
+ The indices of the colliders that have been processed.
+
+
+
+ Represents an Axis-Aligned Bounding Box (AABB).
+
+
+
+
+ Represents the center of the AABB.
+
+
+
+
+ Represents the extents (half-widths) of the AABB.
+
+
+
+
+ Represents the minimum point (lower corner) of the AABB.
+
+
+
+
+ Represents the maximum point (upper corner) of the AABB.
+
+
+
+
+ Constructs an AABB from a Unity Bounds object.
+
+ The Unity Bounds object to construct the AABB from.
+
+
+
+ Constructs an AABB from a center point and extents.
+
+ The center point of the AABB.
+ The extents (half-widths) of the AABB.
+
+
+
+ Constructs an AABB from a center point that encapsulate two other points.
+
+
+
+
+ Query parameters for position rotation query
+
+
+
+
+ Represents the base parameters for the query.
+
+
+
+
+ Represents the hitbox to be queried.
+
+
+
+
+ Create a new .
+
+ Parameters to be used
+ The hitbox to be queried
+
+
+
+ Class that represents a box overlap query. Used to query against the API.
+
+
+
+
+ The box query center.
+
+
+
+
+ The box query extents.
+
+
+
+
+ The box query rotation.
+
+
+
+
+ Create a new with the given .
+
+ The parameters to be used when creating the query.
+
+
+
+ Create a new with the given . The result colliders arrays
+ can be provided to avoid allocation.
+
+ The parameters to be used when creating the query.
+ Array to write the results of the PhysX query if used.
+ Array to write the results of the Box2D query if used.
+
+
+
+ Check if the given overlaps with this query.
+
+ The bounds to check.
+ True if the bounds overlaps with this query, false otherwise.
+
+
+
+ Base parameters needed to execute a box overlap query
+
+
+
+
+ Represents the base parameters for the query.
+
+
+
+
+ Represents the center of the box for the overlap query.
+
+
+
+
+ Represents the extents of the box for the overlap query.
+
+
+
+
+ Represents the rotation of the box for the overlap query.
+
+
+
+
+ Represents the capacity for the cached PhysX and Box2D static hits.
+
+
+
+
+ Create a new
+
+ Parameters to be used
+ The query center
+ The query extents
+ The query rotation
+ Capacity for the cached PhysX and Box2D static hits.
+
+
+
+ Base class for all Lag Compensation queries
+
+
+
+
+ Represents the interaction type of the query with triggers.
+
+
+
+
+ Represents the options for the hit detection of the query.
+
+
+
+
+ Represents the layer mask to selectively ignore colliders when performing the query.
+
+
+
+
+ Represents the player who initiated the query.
+
+
+
+
+ Represents the simulation tick at which the query was initiated.
+
+
+
+
+ Represents the user arguments for the query.
+
+
+
+
+ Represents the interpolation factor between the current and next simulation tick.
+
+
+
+
+ Represents the simulation tick to which the query is performed.
+
+
+
+
+ Represents the delegate to be called for pre-processing before the query is performed.
+
+
+
+
+ Initializes a new instance of the Query class using the provided QueryParams.
+
+ The QueryParams to use for initializing the Query.
+
+
+
+ Checks if the provided bounds should be included in the query.
+
+ The bounds to check.
+ True if the bounds should be included in the query, false otherwise.
+
+
+
+ Base parameters needed to execute a query.
+
+
+
+
+ Represents the options for the hit detection of the query.
+
+
+
+
+ Represents the interaction type of the query with triggers.
+
+
+
+
+ Represents the layer mask to selectively ignore colliders when performing the query.
+
+
+
+
+ Represents the player who initiated the query.
+
+
+
+
+ Represents the simulation tick at which the query was initiated.
+
+
+
+
+ Represents the simulation tick to which the query is performed.
+
+
+
+
+ Represents the interpolation factor between the current and next simulation tick.
+
+
+
+
+ Represents the delegate to be called for pre-processing before the query is performed.
+
+
+
+
+ Represents the user arguments for the query.
+
+
+
+
+ Class that represents a raycast all query. Used to query against the API.
+
+
+
+
+ Create a new with the given .
+
+ The parameters to be used when creating the query.
+
+
+
+ Create a new with the given . The result colliders arrays
+ can be provided to avoid allocation.
+
+ The parameters to be used when creating the query.
+ Array to write the results of the PhysX query if used.
+ Array to write the results of the Box2D query if used.
+
+
+
+ Class that represents a raycast query. Used to query against the API.
+
+
+
+
+ Represents the direction of the raycast for the query.
+
+
+
+
+ Represents the origin point of the raycast for the query.
+
+
+
+
+ Represents the maximum length of the raycast for the query.
+
+
+
+
+ Create a new with the given
+
+ The parameters to be used when creating the query.
+
+
+
+ Check if the provided bounds should be included in the query.
+
+ The bounds to check.
+ True if the bounds should be included in the query, false otherwise.
+
+
+
+ Base parameters needed to execute a raycast query
+
+
+
+
+ Represents the base parameters for the raycast query.
+
+
+
+
+ Represents the origin point of the raycast for the query.
+
+
+
+
+ Represents the direction of the raycast for the query.
+
+
+
+
+ Represents the maximum length of the raycast for the query.
+
+
+
+
+ Represents the capacity for the cached PhysX and Box2D static hits.
+
+
+
+
+ Create a new
+
+ Parameters to be used
+ The raycast origin
+ The raycast direction
+ The raycast max length
+ Capacity for the cached PhysX and Box2D static hits.
+
+
+
+ Class that represents a sphere overlap query. Used to query against the API.
+
+
+
+
+ Represents the center of the sphere for the overlap query.
+
+
+
+
+ Represents the radius of the sphere for the overlap query.
+
+
+
+
+ Create a new with the given .
+
+ The parameters to be used when creating the query.
+
+
+
+ Create a new with the given .
+
+ The parameters to be used when creating the query.
+ Array to write the results of the PhysX query if used.
+ Array to write the results of the Box2D query if used.
+
+
+
+ Check if the given intersects with the sphere overlap query.
+
+ The bounds to check against.
+ True if the bounds intersects with the sphere overlap query, false otherwise.
+
+
+
+ Base parameters needed to execute a sphere overlap query
+
+
+
+
+ Represents the base parameters for the sphere overlap query.
+
+
+
+
+ Represents the center of the sphere for the overlap query.
+
+
+
+
+ Represents the radius of the sphere for the overlap query.
+
+
+
+
+ Represents the capacity for the cached PhysX and Box2D static hits.
+
+
+
+
+ Create a new .
+
+ Parameters to be used
+ The query center
+ The query radius
+ Capacity for the cached PhysX and Box2D static hits.
+
+
+
+ Defines the collision geometry type of a .
+
+
+
+
+ [Future Use] to represent a disabled .
+
+
+
+
+ Geometry is a box, fill in Extents and (optional) Offset.
+
+
+
+
+ Geometry is a sphere, fill in Radius and (optional) Offset.
+
+
+
+
+ Geometry is a capsule, fill in capsule Radius, capsule Height and (optional) Offset.
+
+
+
+
+ Represents a single lag-compensated collider.
+ Multiple component instances can be added anywhere in the hierarchy of a which includes a .
+
+
+
+
+ The collision geometry type for this .
+
+
+
+
+ When is set to , this defines the local-space geometry for narrow-phase checks.
+
+
+
+
+ When is set to , this defines the local-space geometry for narrow-phase checks.
+
+
+
+
+ When is set to , this defines the local-space geometry for narrow-phase checks.
+
+
+
+
+ When is set to , this defines the local-space geometry for narrow-phase checks.
+
+
+
+
+ This 's local-space offset from its GameObject position.
+
+
+
+
+ Reference to the top-level component for this .
+
+
+
+
+ The index of this hitbox in the array on .
+ The value is set by the root when initializing the nested hitboxes with .
+
+
+
+
+ Mask to access the state of this hitbox on the root.
+
+
+
+
+ Get or set the state of this Hitbox.
+ If a hitbox or its HitboxRoot are not active, it will not be hit by lag-compensated queries.
+
+
+
+
+ Index assigned to the collider of this hitbox on the lag-compensated snapshots.
+
+
+
+
+ World-space position (includes Offset) of this .
+
+
+
+
+ Color used when drawing gizmos for this hitbox.
+
+
+
+
+ Set a layer mask for this gameobject. This method caches the layer mask.
+
+
+
+
+
+ Draws this hitbox gizmo on Unity editor.
+
+
+
+
+ Draw the gizmos.
+
+
+
+
+ Entry point for lag compensated queries, which
+ maintains a history buffer, and provides lag compensated raycast and overlap methods.
+ Singleton instance is accessible through the property Runner.LagCompensation.
+ Usage - Call any of the following methods:
+ HitboxManager.Raycast()
+ HitboxManager.RaycastAll()
+ HitboxManager.PositionRotation()
+ HitboxManager.OverlapSphere()
+ These methods use the history buffer to perform a query against a state consistent with how the indicated perceived them locally.
+
+
+
+
+ Debug data from Broadphase BVH (tree depth).
+
+
+
+
+ Debug data from Broadphase BVH (total nodes count).
+
+
+
+
+ Debug data from lag compensation history (registered count).
+
+
+
+
+ Debug data used to draw the BVH nodes and the lag compensation history.
+
+
+
+
+ Performs a lag-compensated raycast query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ Raycast origin, in world-space
+ Raycast direction, in world-space
+ Raycast length
+ Player who "owns" this raycast. Used by the server to find the exact hitbox snapshots to check against.
+ Raycast results will be filled in here.
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ True if something is hit
+
+
+
+ Performs a lag-compensated raycast query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ Raycast origin, in world-space
+ Raycast direction, in world-space
+ Raycast length
+ Simulation tick number to use as the time reference for the lag compensation (use this for server AI, and similar).
+
+ Simulation tick number to use as the time reference for the lag compensation.
+ If provided, must be combined with the parameter for interpolation between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded value of .
+
+
+ Interpolation value when querying between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded alpha value.
+
+ Raycast results will be filled in here.
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ True if something is hit
+
+
+
+ Performs a lag-compensated raycast query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+ Important: results are NOT sorted by distance.
+
+ Raycast origin, in world-space
+ Raycast direction, in world-space
+ Raycast length
+ Player who "owns" this raycast. Used by the server to find the exact hitbox snapshots to check against.
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Clear list of hits before filling with new ones (defaults to true).
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ total number of hits
+
+
+
+ Performs a lag-compensated raycast query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+ Important: results are NOT sorted by distance.
+
+ Raycast origin, in world-space
+ Raycast direction, in world-space
+ Raycast length
+ Simulation tick number to use as the time reference for the lag compensation (use this for server AI, and similar).
+
+ Simulation tick number to use as the time reference for the lag compensation.
+ If provided, must be combined with the parameter for interpolation between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded value of .
+
+
+ Interpolation value when querying between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded alpha value.
+
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Clear list of hits before filling with new ones (defaults to true).
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ total number of hits
+
+
+
+ Performs a lag-compensated overlap sphere query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ Sphere center, in world-space
+ Sphere radius
+ Player who "owns" this overlap. Used by the server to find the exact hitbox snapshots to check against.
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Clear list of hits before filling with new ones (defaults to true).
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ total number of hits
+
+
+
+ Performs a lag-compensated overlap sphere query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ Sphere center, in world-space
+ Sphere radius
+ The tick to be queried
+
+ Simulation tick number to use as the time reference for the lag compensation.
+ If provided, must be combined with the parameter for interpolation between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded value of .
+
+
+ Interpolation value when querying between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded alpha value.
+
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Clear list of hits before filling with new ones (defaults to true).
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ total number of hits
+
+
+
+ Performs a lag-compensated box overlap query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ Center of the box in world space.
+ Half of the size of the box in each dimension.
+ Rotation of the box.
+ Player who "owns" this overlap. Used by the server to find the exact hitbox snapshots to check against.
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Clear list of hits before filling with new ones (defaults to true).
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ The total number of hits found.
+
+
+
+ Performs a lag-compensated box overlap query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ Center of the box in world space.
+ Half of the size of the box in each dimension.
+ Rotation of the box.
+ The exact tick to be queried
+
+ Simulation tick number to use as the time reference for the lag compensation.
+ If provided, must be combined with the parameter for interpolation between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded value of .
+
+
+ Interpolation value when querying between and .
+ If is included on , this query will be resolved against hitbox colliders interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded alpha value.
+
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Only objects with matching layers will be checked against.
+ Opt-in flags to compute with sub-tick accuracy () and/or to include PhysX () or Box2D ().
+ Clear list of hits before filling with new ones (defaults to true).
+ Trigger interaction behavior when also querying PhysX.
+
+ Delegate to pre-process HitboxRoots found in the broad-phase resolution of the query.
+ Roots removed from the list will not be processed any further.
+ Roots that remain on the candidates collection will be normally processed and fitting colliders will be evaluated in
+ the query narrow-phase resolution.
+ Hitbox collider indices added to the processed set will be evaluated in the narrow-phase regardless of further root
+ processing steps (e.g. layer mask match).
+
+ The total number of hits found.
+
+
+
+ Performs a lag-compensated query for a specific Hitbox position and rotation.
+
+ The target hitbox to be queried in the past
+ The tick to be queried
+
+ Simulation tick number to use as the time reference for the lag compensation.
+ If provided, must be combined with the parameter for interpolation between and .
+ If is requested, the query will return the hitbox state interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded value of .
+
+
+ Interpolation value when querying between and .
+ If is requested, the query will return the hitbox state interpolated between the specified ticks.
+ Otherwise, only one of the two ticks will be considered, according to the rounded alpha value.
+
+ Will be filled with the hitbox position at the time of the tick
+ Will be filled with the hitbox rotation at the time of the tick
+ If the query should interpolate between ticks to reflect exactly what was seen on the client.
+
+
+
+ Performs a lag-compensated query for a specific Hitbox position and rotation.
+
+ The target hitbox to be queried in the past
+ Player who "owns" this overlap. Used by the server to find the exact hitbox snapshots to check against.
+ Will be filled with the hitbox position at the time of the tick
+ Will be filled with the hitbox rotation at the time of the tick
+ If the query should interpolate between ticks to reflect exactly what was seen on the client.
+
+
+
+ Get the closest hit from a list of .
+
+ The closest found.
+
+
+
+ Performs a lag-compensated raycast query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ The query containing all necessary information.
+ Raycast results will be filled in here.
+ The total number of hits found.
+
+
+
+ Performs a lag-compensated raycast query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ The query containing all necessary information.
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Clear list of hits before filling with new ones (defaults to true).
+ The total number of hits found.
+
+
+
+ Performs a lag-compensated sphere overlap query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ The query containing all necessary information.
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Clear list of hits before filling with new ones (defaults to true).
+ The total number of hits found.
+
+
+
+ Performs a lag-compensated box overlap query against all registered hitboxes.
+ If the or flag is indicated, query will also include static colliders,
+ Unity colliders are recommended for static geometry, rather than Hitboxes.
+
+ The query containing all necessary information.
+ List to be filled with hits (both hitboxes and/or static colliders, if included).
+ Clear list of hits before filling with new ones (defaults to true).
+ The total number of hits found.
+
+
+
+ Gets the tick and alpha interpolate values for a player.
+
+ The player reference.
+ The tick value from which to interpolate.
+ The tick value to which to interpolate.
+ The interpolation alpha value.
+
+
+
+ Gets a snapshot of the lag compensation statistics.
+
+ The lag compensation statistics snapshot.
+
+
+
+ Internal use. Inserts (new ones) and updates all registered hitboxes into lag compensation history.
+
+
+
+
+ Register new hitboxes and updates existing ones on the Server.
+
+
+
+
+
+
+ Per-query options for lag compensation (both raycast and overlap).
+
+
+
+
+ Default, no extra options.
+
+
+
+
+ Add this to include checks against PhysX colliders.
+
+
+
+
+ Add this to include checks against Box2D colliders. If PhysX flag is set, it will be used instead.
+
+
+
+
+ Subtick accuracy query (exactly like seen by player).
+
+
+
+
+ If the objects which the player performing the query
+ (if specified) has input authority over should be ignored by the query.
+
+
+
+
+ Settings for lag compensation history.
+
+
+
+
+ Indicates if a instance should be added when the is initialized.
+
+
+
+
+ Hitbox snapshot history length in milliseconds.
+
+
+
+
+ Hitbox capacity per snapshot.
+
+
+
+
+ The size of the cached static colliders (PhysX or Box2D) array of the default Lag Compensation Queries.
+
+
+
+
+ Broadphase BVH node expansion factor (default 20%) for leaf nodes, so updates are not too frequent.
+
+
+
+
+ Optional: tries to optimize broadphase BVH every update. May be removed in the future.
+
+
+
+
+ Defines a lag compensated query hit result.
+
+
+
+
+ Hit object source (PhysX or Fusion Hitboxes).
+
+
+
+
+ The Unity Game Object that was hit. Its data is not lag compensated.
+ This is either the 's or the 's gameObject,
+ depending on the object hit being a lag-compensated Hitbox or a regular Unity collider, respectively.
+
+
+
+
+ Surface normal (if requested) of the hit, at the lag compensated time.
+
+
+
+
+ Point of impact of the hit, at the lag compensated time.
+
+
+
+
+ The hitbox collider position on the snapshot.
+
+
+
+
+ The hitbox collider rotation on the snapshot.
+
+
+
+
+ Distance (if requested) to hit, at the lag compensated time.
+
+
+
+
+ Fusion's . Null in case the hit was on PhysX or Box2D.
+
+
+
+
+ PhysX collider hit. Null in case hit is a Fusion or a Box2D hit.
+
+
+
+
+ Box2D collider hit. Null in case hit is a Fusion or a PhysX hit.
+
+
+
+
+ Auxiliary field used when sorting hits in a collection.
+
+
+
+
+ Creates a structure from the information on a Unity .
+
+ The used as source.
+ The built LagCompensatedHit structure.
+
+
+
+ Creates a structure from the information on a Unity .
+
+ The used as source.
+ The built LagCompensatedHit structure.
+
+
+
+ Creates a structure from the information on a .
+
+ The used as source.
+ The built LagCompensatedHit structure.
+
+
+
+ Root group container. Manages registering/unregistering hitboxes with the group, and defines the broadphase geometry for the group.
+ Broadphase is the initial rough query used by raycasts/overlaps/etc to find potential hit candidates,
+ which are then used in the final narrowphase query.
+
+
+
+
+ Set of configuration options for a Hitbox Root behaviour.
+
+
+
+
+ If the collection of hitboxes under a given root should be re-initialized before the Root is registered
+ in a hitbox snapshot. If disabled, the hitboxes will be used as configured in edit-time.
+
+
+
+
+ If Hitboxes on inactive Game Objects should be registered under this root upon initialization.
+
+
+
+
+ Set of configuration flags that replicate the behaviour as it was before the flag options were added.
+
+
+
+
+ Ser of configuration flags with the default behaviour, suitable for most use-cases.
+
+
+
+
+ Get or set the state of this HitboxRoot.
+ For a hitbox to be hit by lag-compensated queries, both it and its HitboxRoot must be active.
+
+
+
+
+ The max number of hitboxes allowed under the same root.
+
+
+
+
+ Set of configuration options for this Hitbox Root behaviour.
+ Check the API documentation for more details on what each flag represents.
+
+
+
+
+ The radius of the broadphase bounding sphere for this group.
+ Used by to insert/update lag compensated NetworkObjects into its BVH (bounding volume hierarchy) data structure.
+ Be sure this radius encompasses all children components (including their full ranges of animation motion).
+ We plan to offer an option to dynamically compute the bounding volume, but the performance trade of will still favor a hand-crafted radius.
+ Broadphase is the initial rough query used by raycasts/overlaps/etc to find potential hit candidates,
+ which are then used in the final narrowphase query.
+
+
+
+
+ Local-space offset of the broadphase bounding sphere from its transform position.
+ Adjust the and until the sphere gizmo (shown in the Unity Scene window)
+ encompasses all children components (including their full ranges of animation motion).
+ Broadphase is the initial rough query used by raycasts/overlaps/etc to find potential hit candidates,
+ which are then used in the final narrowphase query.
+
+
+
+
+ Color used when drawing gizmos for this hitbox.
+
+
+
+
+ All Hitbox instances in hierarchy. Auto-filled at Spawned.
+
+
+
+
+ Reference to associated hitbox manager (from which lag compensated queries can be performed).
+
+
+
+
+ If this is in interest for the local player.
+
+
+
+
+ on draw gizmos.
+
+
+
+
+ Draws the gizmos for the
+
+
+
+
+ Finds child components, and adds them to the collection.
+
+
+
+
+ Sets to a rough value which encompasses all in their current positions.
+
+
+
+
+ Sets the state of a Hitbox instance under this root.
+ Both the hitbox and its root must be active in order for it to be hit by lag-compensated queries.
+
+ A hitbox instance under the hierarchy of this root.
+ If the hitbox should be activated or deactivated.
+ If the of the is outside the valid range.
+ In Debug configuration, if the is not part of this root.
+
+
+
+ Checks the state of a Hitbox instance under this root.
+ Both the hitbox and its root must be active in order for it to be hit by lag-compensated queries.
+
+ A hitbox instance under the hierarchy of this root.
+ True if the is part of this root and is active.
+ If the of the is outside the valid range.
+ In Debug configuration, if the is not part of this root.
+
+
+
+
+
+
+ A Networked fusion type for degrees. This can be used with the , in RPCs, or in structs.
+
+
+
+ Size of this struct in bytes.
+
+
+
+ Clamps the current value to the supplied min-max range.
+
+
+
+
+ Returns the smaller of two supplied angles.
+
+
+
+
+ Returns the larger of two supplied angles.
+
+
+
+
+ Lerps between two angle values.
+
+
+
+
+ Returns a the value, clamped to the min-max range.
+
+
+
+
+ Less than operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ True if the value of the first Angle instance is less than the value of the second Angle instance, otherwise false.
+
+
+
+ Less than or equal to operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ True if the value of the first Angle instance is less than or equal to the value of the second Angle instance, otherwise false.
+
+
+
+ Greater than operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ True if the value of the first Angle instance is greater than the value of the second Angle instance, otherwise false.
+
+
+
+ Greater than or equal to operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ True if the value of the first Angle instance is greater than or equal to the value of the second Angle instance, otherwise false.
+
+
+
+ Equality operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ True if the value of the first Angle instance is equal to the value of the second Angle instance, otherwise false.
+
+
+
+ Inequality operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ True if the value of the first Angle instance is not equal to the value of the second Angle instance, otherwise false.
+
+
+
+ Checks equality with another Angle.
+
+ Other Angle.
+ Equality result.
+
+
+
+ Checks equality with an object.
+
+ Object to compare.
+ Equality result.
+
+
+
+ Gets the hash code.
+
+ Hash code.
+
+
+
+ Addition operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ A new Angle instance that is the sum of the first and second Angle instances, wrapped around at 360 degrees if necessary.
+
+
+
+ Subtraction operator for Angle struct.
+
+ First Angle instance.
+ Second Angle instance.
+ A new Angle instance that is the difference of the first and second Angle instances, wrapped around at 360 degrees if necessary.
+
+
+
+ Converts Angle to float.
+
+ Angle instance.
+ Float representation of the Angle.
+
+
+
+ Converts Angle to double.
+
+ Angle instance.
+ Double representation of the Angle.
+
+
+
+ Converts double to Angle.
+
+ Double value.
+ Angle instance with the value of the double.
+
+
+
+ Converts float to Angle.
+
+ Float value.
+ Angle instance with the value of the float.
+
+
+
+ Converts int to Angle.
+
+ Integer value.
+ Angle instance with the value of the integer.
+
+
+
+ String representation of the Angle.
+
+
+
+
+ Base class for all Fusion assets.
+
+
+
+
+ Alternative base class to Unity's MonoBehaviour.
+ This allows for components that work both in Unity, as well as the Photon relays.
+
+
+
+
+ Wrapper for Unity's GameObject.AddComponent()
+
+
+
+
+ Wrapper for Unity's GameObject.TryGetComponent()
+
+
+
+
+ Wrapper for Unity's GameObject.GetComponentInChildren()
+
+
+
+
+ Wrapper for Unity's GameObject.Destroy()
+
+
+
+
+ Get the string to dump to the log.
+
+ The string builder to append to.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
+ Represents a compressed float value for network transmission.
+
+
+
+ Encoded value of the float.
+
+
+
+ Implicit conversion from float to FloatCompressed.
+
+ The float value to convert.
+ A new FloatCompressed instance with the compressed value of the float.
+
+
+
+ Implicit conversion from FloatCompressed to float.
+
+ The FloatCompressed instance to convert.
+ The decompressed float value of the FloatCompressed instance.
+
+
+
+ Checks if the current FloatCompressed instance is equal to the other FloatCompressed instance.
+
+ The other FloatCompressed instance to compare with the current FloatCompressed instance.
+ True if the values of both FloatCompressed instances are equal, otherwise false.
+
+
+
+ Checks if the provided object is a FloatCompressed instance and if it's equal to the current FloatCompressed instance.
+
+ The object to compare with the current FloatCompressed instance.
+ True if the provided object is a FloatCompressed instance and it's equal to the current FloatCompressed instance, otherwise false.
+
+
+
+ Returns the hash code for the current FloatCompressed instance.
+
+ A hash code for the current FloatCompressed instance.
+
+
+
+ Equality operator for FloatCompressed struct.
+
+ First FloatCompressed instance.
+ Second FloatCompressed instance.
+ True if the value of the first FloatCompressed instance is equal to the value of the second FloatCompressed instance, otherwise false.
+
+
+
+ Inequality operator for FloatCompressed struct.
+
+ First FloatCompressed instance.
+ Second FloatCompressed instance.
+ True if the value of the first FloatCompressed instance is not equal to the value of the second FloatCompressed instance, otherwise false.
+
+
+
+ Represents a compressed Vector2 value for network transmission.
+
+
+
+ Encoded value of the x component.
+
+
+ Encoded value of the y component.
+
+
+ Gets or sets the x component.
+
+
+ Gets or sets the y component.
+
+
+
+ Implicit conversion from Vector2 to Vector2Compressed.
+
+ The Vector2 value to convert.
+ A new Vector2Compressed instance with the compressed value of the Vector2.
+
+
+
+ Implicit conversion from Vector2Compressed to Vector2.
+
+ The Vector2Compressed instance to convert.
+ The decompressed Vector2 value of the Vector2Compressed instance.
+
+
+
+ Checks if the current Vector2Compressed instance is equal to the other Vector2Compressed instance.
+
+ The other Vector2Compressed instance to compare with the current Vector2Compressed instance.
+ True if the values of both Vector2Compressed instances are equal, otherwise false.
+
+
+
+ Checks if the provided object is a Vector2Compressed instance and if it's equal to the current Vector2Compressed instance.
+
+ The object to compare with the current Vector2Compressed instance.
+ True if the provided object is a Vector2Compressed instance and it's equal to the current Vector2Compressed instance, otherwise false.
+
+
+
+ Returns the hash code for the current Vector2Compressed instance.
+
+ A hash code for the current Vector2Compressed instance.
+
+
+
+ Equality operator for Vector2Compressed struct.
+
+ First Vector2Compressed instance.
+ Second Vector2Compressed instance.
+ True if the value of the first Vector2Compressed instance is equal to the value of the second Vector2Compressed instance, otherwise false.
+
+
+
+ Inequality operator for Vector2Compressed struct.
+
+ First Vector2Compressed instance.
+ Second Vector2Compressed instance.
+ True if the value of the first Vector2Compressed instance is not equal to the value of the second Vector2Compressed instance, otherwise false.
+
+
+
+ Represents a compressed Vector3 value for network transmission.
+
+
+
+ Encoded value of the x component.
+
+
+ Encoded value of the y component.
+
+
+ Encoded value of the z component.
+
+
+ Gets or sets the x component.
+
+
+ Gets or sets the y component.
+
+
+ Gets or sets the z component.
+
+
+
+ Implicit conversion from Vector3 to Vector3Compressed.
+
+ The Vector3 value to convert.
+ A new Vector3Compressed instance with the compressed value of the Vector3.
+
+
+
+ Implicit conversion from Vector3Compressed to Vector3.
+
+ The Vector3Compressed instance to convert.
+ The decompressed Vector3 value of the Vector3Compressed instance.
+
+
+
+ Implicit conversion from Vector2 to Vector3Compressed.
+
+ The Vector2 value to convert.
+ A new Vector3Compressed instance with the compressed value of the Vector2.
+
+
+
+ Implicit conversion from Vector3Compressed to Vector2.
+
+ The Vector3Compressed instance to convert.
+ The decompressed Vector2 value of the Vector3Compressed instance.
+
+
+
+ Checks if the current Vector3Compressed instance is equal to the other Vector3Compressed instance.
+
+ The other Vector3Compressed instance to compare with the current Vector3Compressed instance.
+ True if the values of both Vector3Compressed instances are equal, otherwise false.
+
+
+
+ Checks if the provided object is a Vector3Compressed instance and if it's equal to the current Vector3Compressed instance.
+
+ The object to compare with the current Vector3Compressed instance.
+ True if the provided object is a Vector3Compressed instance and it's equal to the current Vector3Compressed instance, otherwise false.
+
+
+
+ Returns the hash code for the current Vector3Compressed instance.
+
+ A hash code for the current Vector3Compressed instance.
+
+
+
+ Equality operator for Vector3Compressed struct.
+
+ First Vector3Compressed instance.
+ Second Vector3Compressed instance.
+ True if the value of the first Vector3Compressed instance is equal to the value of the second Vector3Compressed instance, otherwise false.
+
+
+
+ Inequality operator for Vector3Compressed struct.
+
+ First Vector3Compressed instance.
+ Second Vector3Compressed instance.
+ True if the value of the first Vector3Compressed instance is not equal to the value of the second Vector3Compressed instance, otherwise false.
+
+
+
+ Represents a compressed Vector4 value for network transmission.
+
+
+
+ Encoded value of the x component.
+
+
+ Encoded value of the y component.
+
+
+ Encoded value of the z component.
+
+
+ Encoded value of the w component.
+
+
+ Gets or sets the x component.
+
+
+ Gets or sets the y component.
+
+
+ Gets or sets the z component.
+
+
+ Gets or sets the w component.
+
+
+
+ Implicit conversion from Vector4 to Vector4Compressed.
+
+ The Vector4 value to convert.
+ A new Vector4Compressed instance with the compressed value of the Vector4.
+
+
+
+ Implicit conversion from Vector4Compressed to Vector4.
+
+ The Vector4Compressed instance to convert.
+ The decompressed Vector4 value of the Vector4Compressed instance.
+
+
+
+ Checks if the current Vector4Compressed instance is equal to the other Vector4Compressed instance.
+
+ The other Vector4Compressed instance to compare with the current Vector4Compressed instance.
+ True if the values of both Vector4Compressed instances are equal, otherwise false.
+
+
+
+ Checks if the provided object is a Vector4Compressed instance and if it's equal to the current Vector4Compressed instance.
+
+ The object to compare with the current Vector4Compressed instance.
+ True if the provided object is a Vector4Compressed instance and it's equal to the current Vector4Compressed instance, otherwise false.
+
+
+
+ Returns the hash code for the current Vector4Compressed instance.
+
+ A hash code for the current Vector4Compressed instance.
+
+
+
+ Equality operator for Vector4Compressed struct.
+
+ First Vector4Compressed instance.
+ Second Vector4Compressed instance.
+ True if the value of the first Vector4Compressed instance is equal to the value of the second Vector4Compressed instance, otherwise false.
+
+
+
+ Inequality operator for Vector4Compressed struct.
+
+ First Vector4Compressed instance.
+ Second Vector4Compressed instance.
+ True if the value of the first Vector4Compressed instance is not equal to the value of the second Vector4Compressed instance, otherwise false.
+
+
+
+ Represents a compressed Quaternion value for network transmission.
+
+
+
+ Encoded value of the x component.
+
+
+ Encoded value of the y component.
+
+
+ Encoded value of the z component.
+
+
+ Encoded value of the w component.
+
+
+ Gets or sets the x component.
+
+
+ Gets or sets the y component.
+
+
+ Gets or sets the z component.
+
+
+ Gets or sets the w component.
+
+
+
+ Implicit conversion from Quaternion to QuaternionCompressed.
+
+ The Quaternion value to convert.
+ A new QuaternionCompressed instance with the compressed value of the Quaternion.
+
+
+
+ Implicit conversion from QuaternionCompressed to Quaternion.
+
+ The QuaternionCompressed instance to convert.
+ The decompressed Quaternion value of the QuaternionCompressed instance.
+
+
+
+ Checks if the current QuaternionCompressed instance is equal to the other QuaternionCompressed instance.
+
+ The other QuaternionCompressed instance to compare with the current QuaternionCompressed instance.
+ True if the values of both QuaternionCompressed instances are equal, otherwise false.
+
+
+
+ Checks if the provided object is a QuaternionCompressed instance and if it's equal to the current QuaternionCompressed instance.
+
+ The object to compare with the current QuaternionCompressed instance.
+ True if the provided object is a QuaternionCompressed instance and it's equal to the current QuaternionCompressed instance, otherwise false.
+
+
+
+ Returns the hash code for the current QuaternionCompressed instance.
+
+ A hash code for the current QuaternionCompressed instance.
+
+
+
+ Equality operator for QuaternionCompressed struct.
+
+ First QuaternionCompressed instance.
+ Second QuaternionCompressed instance.
+ True if the value of the first QuaternionCompressed instance is equal to the value of the second QuaternionCompressed instance, otherwise false.
+
+
+
+ Inequality operator for QuaternionCompressed struct.
+
+ First QuaternionCompressed instance.
+ Second QuaternionCompressed instance.
+ True if the value of the first QuaternionCompressed instance is not equal to the value of the second QuaternionCompressed instance, otherwise false.
+
+
+
+ Defines the type of the current connection with the Remote Peer,
+ either the Server or a Client
+
+
+
+
+ No connection is currently active
+
+
+
+
+ Connection was accomplished using the Photon Relay Services
+
+
+
+
+ Connection was accomplished directly with the remote peer
+
+
+
+
+ A fixed size array that can be used in structs.
+
+
+
+
+
+ Enumerator for the FixedArray struct.
+
+
+
+
+ Gets the current element in the collection.
+
+
+
+
+ Initializes a new instance of the Enumerator struct.
+
+ The FixedArray instance to enumerate.
+
+
+
+ Advances the enumerator to the next element of the collection.
+
+ True if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
+
+
+
+ Sets the enumerator to its initial position, which is before the first element in the collection.
+
+
+
+
+ Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+
+
+
+
+ The fixed size of the array.
+
+
+
+
+ Indexer of array elements.
+
+
+
+
+ NetworkArray constructor.
+
+
+
+
+ Allocates a new array and copies values from this array. For a non-alloc alternative use .
+
+
+
+
+ Adds each value to the supplied List. This does not clear the list, so values will be appended to the existing list.
+
+
+
+
+ Copies values to the supplied array.
+
+ The array to copy values to. Must not be null.
+ If true, this method will throw an error if the supplied array is smaller than this . If false, will only copy as many elements as the target array can hold.
+
+
+
+ Returns a string that represents the current object.
+
+
+
+
+ Returns an enumerator that iterates through the FixedArray.
+
+
+
+
+ Sets all elements in the array to their default value.
+
+
+
+
+ Copies a range of elements from a source array into the FixedArray.
+
+ The source array from which to copy elements. Must not be null.
+ The zero-based index in the source array at which copying begins.
+ The number of elements to copy from the source array.
+ Thrown when the provided source array is null.
+ Thrown when the number of elements to copy is greater than the length of the FixedArray.
+ Thrown when the sum of sourceOffset and sourceCount is greater than the length of the source array.
+
+
+
+ Copies a range of elements from a source list into the FixedArray.
+
+ The source list from which to copy elements. Must not be null.
+ The zero-based index in the source list at which copying begins.
+ The number of elements to copy from the source list.
+ Thrown when the provided source list is null.
+ Thrown when the number of elements to copy is greater than the length of the FixedArray.
+ Thrown when the sum of sourceOffset and sourceCount is greater than the length of the source list.
+
+
+
+ Returns the elements of this array as a string, with value separated by \n characters. Specifically for use in the Unity inspector.
+ This is private and only is found by NetworkBehaviourEditor using reflection, so do not rename this method.
+
+
+
+
+ Helper methods for FixedArray.
+
+
+
+
+ Creates a FixedArray from a sequence of fields.
+
+ Reference to the first field in the sequence.
+ Reference to the last field in the sequence.
+ A new FixedArray instance with the values from the sequence of fields.
+
+
+
+ Creates a FixedArray with a specified length.
+
+ Reference to the first field in the array.
+ The length of the array.
+ A new FixedArray instance with the specified length.
+
+
+
+ Creates a FixedArray with a specified length and adapts the type of the elements.
+
+ Reference to the first field in the array.
+ The length of the array.
+ A new FixedArray instance with the specified length and adapted type of elements.
+
+
+
+ Returns the index of the first occurrence of a value in the FixedArray.
+
+ The FixedArray to search.
+ The value to locate in the FixedArray.
+ The zero-based index of the first occurrence of elem within the entire FixedArray, if found; otherwise, -1.
+
+
+
+ Interface for fixed storage types.
+
+
+
+
+ Provides utility methods for fixed storage types.
+
+
+
+
+ Gets the word count of a fixed storage type.
+
+ The type of the fixed storage.
+ The word count of the fixed storage type.
+
+
+
+ A FixedStorage that can hold up to 2 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 4 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 8 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 16 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 32 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 64 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 128 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 256 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ A FixedStorage that can hold up to 512 words.
+
+
+
+
+ The size of the FixedStorage in bytes.
+
+
+
+
+ The data of the FixedStorage.
+
+
+
+
+ Provides utility methods for compressing and decompressing float values.
+
+
+
+
+ Default accuracy for float compression and decompression.
+
+
+
+
+ Compresses a float value.
+
+ The float value to compress.
+ The accuracy to use for compression. Defaults to DEFAULT_ACCURACY.
+ The compressed float value.
+
+
+
+ Decompresses a compressed float value.
+
+ The compressed float value to decompress.
+ The accuracy to use for decompression. Defaults to DEFAULT_ACCURACY.
+ The decompressed float value.
+
+
+
+ This may only be deterministic on 64 bit systems.
+
+ String to hash
+ Initial hash value
+ Hash code
+
+
+
+ Defines an asynchronous operation.
+
+
+
+ Gets a value indicating whether the operation is done.
+
+
+ Occurs when the operation is completed.
+
+
+ Gets the exception information if an error occurred during the operation.
+
+
+
+ Defines a coroutine.
+
+
+
+
+ Defines the interface for reading and writing elements in a byte array.
+
+ The type of the elements.
+
+
+
+ Reads an element from the specified index in the byte array.
+
+ The byte array.
+ The index of the element.
+ The element at the specified index.
+
+
+
+ Writes an element to the specified index in the byte array.
+
+ The byte array.
+ The index at which to write the element.
+ The element to write.
+
+
+
+ Gets the word count of an element.
+
+ The word count of an element.
+
+
+
+ Reads a reference to an element from the specified index in the byte array.
+
+ The byte array.
+ The index of the element.
+ A reference to the element at the specified index.
+
+
+
+ Calculate the hash code of an element.
+
+
+
+
+
+
+ Flag interface for custom NetworkInput structs.
+
+
+
+
+ A set of parameters that tune the interpolated correction of prediction error on transform data.
+
+
+
+
+
+ A factor with dimension of 1/s (Hz) that works as a lower limit for how much
+ of the accumulated prediction error is corrected every frame.
+ This factor affects both the position and the rotation correction.
+ Suggested values are greater than zero and smaller than MaxRate.
+
+
+ E.g.: MinRate = 3, rendering delta time = (1/60)s: at least 5% (3 * 1/60) of the accumulated error
+ will be corrected on this rendered frame.
+
+
+ This threshold might not be respected if the resultant correction magnitude is
+ below the PosMinCorrection
+ or above the PosTeleportDistance, for the position error,
+ or above the RotTeleportRadians, for the rotation error.
+
+
+
+
+
+
+ A factor with dimension of 1/s (Hz) that works as a upper limit for how much
+ of the accumulated prediction error is corrected every frame.
+ This factor affects both the position and the rotation correction.
+ Suggested values are greater than MinRate
+ and smaller than half of a target rendering rate.
+
+
+ E.g.: MaxRate = 15, rendering delta time = (1/60)s: at maximum 25% (15 * 1/60) of the accumulated error
+ will be corrected on this rendered frame.
+
+
+ This threshold might not be respected if the resultant correction magnitude is
+ below the PosMinCorrection or
+ above the PosTeleportDistance, for the position error,
+ or above the RotTeleportRadians, for the rotation error.
+
+
+
+
+
+
+ The reference for the magnitude of the accumulated position error, in meters,
+ at which the position error will be corrected at the MinRate.
+ Suggested values are greater than PosMinCorrection
+ and smaller than PosBlendEnd.
+
+
+ In other words, if the magnitude of the accumulated error is equal to or smaller than this threshold,
+ it will be corrected at the MinRate.
+ If, instead, the magnitude is between this threshold and PosBlendEnd,
+ the error is corrected at a rate between MinRate
+ and MaxRate, proportionally.
+ If it is equal to or greater than PosBlendEnd,
+ it will be corrected at the MaxRate.
+
+
+ Note: as the factor is expressed in distance units (meters), it might need to be scaled
+ proportionally to the overall scale of objects in the scene and speeds at which they move,
+ which are factors that affect the expected magnitude of prediction errors.
+
+
+
+
+
+
+ The reference for the magnitude of the accumulated position error, in meters,
+ at which the position error will be corrected at the MaxRate.
+ Suggested values are greater than PosBlendStart
+ and smaller than PosTeleportDistance.
+
+
+ In other words, if the magnitude of the accumulated error is equal to or greater than this threshold,
+ it will be corrected at the MaxRate.
+ If, instead, the magnitude is between PosBlendStart and this threshold,
+ the error is corrected at a rate between MinRate
+ and MaxRate, proportionally.
+ If it is equal to or smaller than PosBlendStart,
+ it will be corrected at the MinRate.
+
+
+ Note: as the factor is expressed in distance units (meters), it might need to be scaled
+ proportionally to the overall scale of objects in the scene and speeds at which they move,
+ which are factors that affect the expected magnitude of prediction errors.
+
+
+
+
+
+
+ The value, in meters, that represents the minimum magnitude of the accumulated position error
+ that will be corrected in a single frame, until it is fully corrected.
+
+
+ This setting has priority over the resultant correction rate, i.e. the restriction
+ will be respected even if it makes the effective correction rate be different than
+ the one computed according to the min/max rates and start/end blend values.
+ Suggested values are greater than zero and smaller than PosBlendStart.
+
+
+ Note: as the factor is expressed in distance units (meters), it might need to be scaled
+ proportionally to the overall scale of objects in the scene and speeds at which they move,
+ which are factors that affect the expected magnitude of prediction errors.
+
+
+
+
+
+
+ The value, in meters, that represents the magnitude of the accumulated
+ position error above which the error will be instantaneously corrected,
+ effectively teleporting the rendered object to its correct position.
+ Suggested values are greater than PosBlendEnd.
+
+
+ This setting has priority over the resultant correction rate, i.e. the restriction
+ will be respected even if it makes the effective correction rate be different than
+ the one computed according to the min/max rates and start/end blend values.
+
+
+ Note: as the factor is expressed in distance units (meters), it might need to be scaled
+ proportionally to the overall scale of objects in the scene and speeds at which they move,
+ which are factors that affect the expected magnitude of prediction errors.
+
+
+
+
+
+
+ The reference for the magnitude of the accumulated rotation error, in radians,
+ at which the rotation error will be corrected at the MinRate.
+ Suggested values are smaller than RotBlendEnd.
+
+
+ In other words, if the magnitude of the accumulated error is equal to or smaller than this threshold,
+ it will be corrected at the MinRate.
+ If, instead, the magnitude is between this threshold and RotBlendEnd,
+ the error is corrected at a rate between MinRate
+ and MaxRate, proportionally.
+ If it is equal to or greater than RotBlendEnd,
+ it will be corrected at the MaxRate.
+
+
+
+
+
+
+ The reference for the magnitude of the accumulated rotation error, in radians,
+ at which the rotation error will be corrected at the MaxRate.
+ Suggested values are greater than RotBlendStart
+ and smaller than RotTeleportRadians.
+
+
+ In other words, if the magnitude of the accumulated error is equal to or greater than this threshold,
+ it will be corrected at the MaxRate.
+ If, instead, the magnitude is between RotBlendStart and this threshold,
+ the error is corrected at a rate between MinRate
+ and MaxRate, proportionally.
+ If it is equal to or smaller than RotBlendStart,
+ it will be corrected at the MinRate.
+
+
+
+
+
+
+ The value, in radians, that represents the magnitude of the accumulated
+ rotation error above which the error will be instantaneously corrected,
+ effectively teleporting the rendered object to its correct orientation.
+ Suggested values are greater than RotBlendEnd.
+
+
+ This setting has priority over the resultant correction rate, i.e. the restriction
+ will be respected even if it makes the effective correction rate be different than
+ the one computed according to the min/max rates and start/end blend values.
+
+
+
+
+
+ Fusion type for networking arrays.
+ Maximum capacity is fixed, and is set with the .
+ Typical Usage:
+
+ [Networked, Capacity(4)]
+ NetworkArray<float> syncedArray => default;
+
+ Optional usage (for NetworkBehaviours ONLY - this is not legal in INetworkStructs):
+
+ [Networked, Capacity(4)]
+ NetworkArray<int> syncedArray { get; } = MakeInitializer(new int[] { 1, 2, 3, 4 });
+
+ Usage for modifying data:
+
+ array.Set(123);
+ array[0] = 456;
+
+
+ T can be a primitive, or an INetworkStruct.
+
+
+
+ Enumerator for NetworkArray.
+
+
+
+
+ Gets the current element in the collection.
+
+
+
+ Gets the current element in the collection.
+
+
+
+ Initializes a new instance of the Enumerator with the specified NetworkArray.
+
+ The NetworkArray to enumerate.
+
+
+
+ Advances the enumerator to the next element of the collection.
+
+ true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.
+
+
+
+ Sets the enumerator to its initial position, which is before the first element in the collection.
+
+
+
+
+ Releases all resources used by the Enumerator.
+
+
+
+
+ The fixed size of the array.
+
+
+
+
+ Indexer of array elements.
+
+
+
+
+ NetworkArray constructor.
+
+
+
+
+ Returns a NetworkArrayReadOnly view of this array.
+
+
+
+
+ Returns the array value at supplied index.
+
+
+
+
+ Sets the array value at the supplied index.
+
+
+
+
+ This method is exposed with an extension method to filter
+ types to unmanaged ones only. This is not exhaustive,
+ as wrapped types are likely to pass this.
+
+ Index to get.
+ Value at index.
+
+
+
+
+ Allocates a new array and copies values from this array. For a non-alloc alternative use .
+
+
+
+
+ Adds each value to the supplied List. This does not clear the list, so values will be appended to the existing list.
+
+
+
+
+ Copies values to the supplied array.
+
+ NetworkArray to copy to.
+ Thrown if the supplied array is smaller than this .
+
+
+
+ Copies values to the supplied array.
+
+ Array to copy to.
+ If true, this method will throw an error if the supplied array is smaller than this . If false, will only copy as many elements as the target array can hold.
+
+
+
+ Returns a string that represents the current object.
+
+
+
+
+ Returns an enumerator that iterates through the collection.
+
+
+
+
+ Clears the array, setting all values to default.
+
+
+
+
+ Copies a range of elements from a source array into the NetworkArray.
+
+ The source array from which to copy elements. Must not be null.
+ The zero-based index in the source array at which copying begins.
+ The number of elements to copy from the source array.
+ Thrown when the provided source array is null.
+ Thrown when the number of elements to copy is greater than the length of the NetworkArray.
+ Thrown when the sum of sourceOffset and sourceCount is greater than the length of the source array.
+
+
+
+ Copies a range of values from a supplied source list into the NetworkArray.
+
+ The source list from which to copy elements.
+ The zero-based index in the source list at which copying begins.
+ The number of elements to copy from the source list.
+ Thrown when the provided source list is null.
+ Thrown when the number of elements to copy is greater than the length of the NetworkArray.
+ Thrown when the sum of sourceOffset and sourceCount is greater than the length of the source list.
+
+
+
+ Returns the elements of this array as a string, with value separated by \n characters. Specifically for use in the Unity inspector.
+ This is private and only is found by NetworkBehaviourEditor using reflection, so do not rename this method.
+
+
+
+
+ Returns a NetworkArrayReadOnly view of this array.
+
+ NetworkArray to convert.
+ NetworkArrayReadOnly view of this array.
+
+
+
+ Provides extension methods for the NetworkArray class.
+
+
+
+
+ Finds the index of the first occurrence of a specified element in the NetworkArray.
+
+ The NetworkArray to search.
+ The element to locate in the NetworkArray.
+ The zero-based index of the first occurrence of elem within the entire NetworkArray, if found; otherwise, -1.
+
+
+
+ Returns a reference to the element at a specified position in the NetworkArray.
+
+ The NetworkArray to search.
+ The zero-based index of the element to get a reference for.
+ A reference to the element at the specified position in the NetworkArray.
+
+
+
+ Defines the interface for a networked array.
+
+
+
+
+ Gets or sets the element at the specified index.
+
+ The zero-based index of the element to get or set.
+
+
+
+ Attribute applied to an array property by the weaver.
+
+
+
+
+ Array capacity.
+
+
+
+
+ Word count of each element.
+
+
+
+
+ ReaderWriter type for the element.
+
+
+
+
+
+
+
+ Provides a read-only view of a network array.
+
+ The type of the elements.
+
+
+
+ The fixed size of the array.
+
+
+
+
+ Indexer of array elements.
+
+
+
+
+ NetworkArrayReadOnly constructor.
+
+
+
+
+ Represents a boolean value that can be networked.
+
+
+
+ The size of the NetworkBool structure in bytes.
+
+
+
+ Initializes a new instance of the NetworkBool struct with the specified value.
+
+ The boolean value.
+
+
+
+ Determines whether the specified NetworkBool is equal to the current NetworkBool.
+
+ The NetworkBool to compare with the current NetworkBool.
+ true if the specified NetworkBool is equal to the current NetworkBool; otherwise, false.
+
+
+
+ Returns a string that represents the current NetworkBool.
+
+ A string that represents the current NetworkBool.
+
+
+
+ Determines whether the specified object is equal to the current NetworkBool.
+
+ The object to compare with the current NetworkBool.
+ true if the specified object is equal to the current NetworkBool; otherwise, false.
+
+
+
+ Serves as the default hash function.
+
+ A hash code for the current NetworkBool.
+
+
+
+ Defines an implicit conversion of a NetworkBool to a bool.
+
+ The NetworkBool to convert.
+
+
+
+ Defines an implicit conversion of a bool to a NetworkBool.
+
+ The bool to convert.
+
+
+
+ Represents a set of buttons that can be networked.
+
+
+
+
+ Gets the bits representing the state of the buttons.
+
+
+
+
+ Initializes a new instance of the NetworkButtons struct with the specified buttons state.
+
+ The integer representing the state of the buttons.
+
+
+
+ Checks if the button at the specified index is set.
+
+ The index of the button to check.
+ true if the button is set; otherwise, false.
+
+
+
+ Sets the button at the specified index to down.
+
+ The index of the button to set to down.
+
+
+
+ Sets the button at the specified index to up.
+
+ The index of the button to set to up.
+
+
+
+ Sets the button at the specified index to the specified state.
+
+ The index of the button to set.
+ The state to set the button to.
+
+
+
+ Sets all buttons to up.
+
+
+
+
+ Sets all buttons to down.
+
+
+
+
+ Checks if the button of the specified enum type is set.
+
+ The enum type of the button.
+ The button of type T to check.
+ true if the button is set; otherwise, false.
+
+
+
+ Sets the button of the specified enum type to down.
+
+ The enum type of the button.
+ The button of type T to set to down.
+
+
+
+ Sets the button of the specified enum type to up.
+
+ The enum type of the button.
+ The button of type T to set to up.
+
+
+
+ Sets the button of the specified enum type to the specified state.
+
+ The enum type of the button.
+ The button of type T to set.
+ The state to set the button to.
+
+
+
+ Gets the buttons that were pressed or released since the previous state.
+
+ The previous state of the buttons.
+ A tuple containing the buttons that were pressed and the buttons that were released.
+
+
+
+ Gets the buttons that were pressed since the previous state.
+
+ The previous state of the buttons.
+ The buttons that were pressed.
+
+
+
+ Gets the buttons that were released since the previous state.
+
+ The previous state of the buttons.
+ The buttons that were released.
+
+
+
+ Checks if the button at the specified index was pressed since the previous state.
+
+ The previous state of the buttons.
+ The index of the button to check.
+ true if the button was pressed; otherwise, false.
+
+
+
+ Checks if the button at the specified index was released since the previous state.
+
+ The previous state of the buttons.
+ The index of the button to check.
+ true if the button was released; otherwise, false.
+
+
+
+ Checks if the button of the specified enum type was pressed since the previous state.
+
+ The enum type of the button.
+ The previous state of the buttons.
+ The button of type T to check.
+ true if the button was pressed; otherwise, false.
+
+
+
+ Checks if the button of the specified enum type was released since the previous state.
+
+ The enum type of the button.
+ The previous state of the buttons.
+ The button of type T to check.
+ true if the button was released; otherwise, false.
+
+
+
+ Determines whether the specified NetworkButtons is equal to the current NetworkButtons.
+
+ The NetworkButtons to compare with the current NetworkButtons.
+ true if the specified NetworkButtons is equal to the current NetworkButtons; otherwise, false.
+
+
+
+ Determines whether the specified object is equal to the current NetworkButtons.
+
+ The object to compare with the current NetworkButtons.
+ true if the specified object is equal to the current NetworkButtons; otherwise, false.
+
+
+
+ Serves as the default hash function.
+
+ A hash code for the current NetworkButtons.
+
+
+
+ Fusion type for networking Dictionaries.
+ Maximum capacity is fixed, and is set with the .
+ Typical Usage:
+
+ [Networked, Capacity(10)]
+ NetworkDictionary<int, float> syncedDict => default;
+
+ Usage for modifying data:
+
+ var dict = syncedDict;
+ dict.Add(5, 123);
+ dict[5] = 456;
+ dict.Remove(5);
+
+
+ Key can be a primitive, or an INetworkStruct.
+ Value can be a primitive, or an INetworkStruct.
+
+
+ Meta word count for NetworkDictionary.
+
+
+
+ Enumerator for NetworkDictionary.
+
+
+
+
+ Move to next entry in dictionary.
+
+ Returns true if there is a next entry.
+
+
+
+ Reset enumerator.
+
+
+
+
+ Current key/value pair.
+
+ Thrown if enumerator is not valid.
+
+
+
+ Dispose enumerator.
+
+
+
+
+ Current number of key/value entries in the Dictionary.
+
+
+
+
+ The maximum number of entries this dictionary may contain.
+
+
+
+
+ Key indexer. Gets/Sets value for specified key.
+
+
+
+
+ Initializes a new instance of the NetworkDictionary struct with the specified data, capacity, and reader/writers.
+
+ The pointer to the data of the dictionary.
+ The capacity of the dictionary.
+ The reader/writer for the keys of the dictionary.
+ The reader/writer for the values of the dictionary.
+
+
+
+ Converts the current NetworkDictionary to a read-only version.
+
+ A new instance of NetworkDictionaryReadOnly with the same data, capacity, and reader/writers as the current NetworkDictionary.
+
+
+
+ Remove all entries from the Dictionary, and clear backing memory.
+
+
+
+
+ Returns true if the Dictionary contains an entry for the given key.
+
+
+
+
+ Returns true if the Dictionary contains an entry value which compares as equal to given value.
+
+ The value to compare against.
+ Specify custom IEqualityComparer to be used for compare.
+
+
+
+ Returns the value for the given key. Will throw an error if the key is not found.
+
+
+
+
+ Sets the value for the given key. Will add a new key if the key does not already exist.
+
+
+
+
+ Adds a new key value pair to the Dictionary. If the key already exists, will return false.
+
+
+
+
+ Attempts to get the value for a given key. If found, returns true.
+
+ The key to remove.
+ Returns value of removed item. Returns default value if key did not exist.
+ Returns true if key was found.
+
+
+
+ Remove entry from Dictionary.
+
+ The key to remove.
+ Returns true if key was found.
+
+
+
+ Removes entry from Dictionary. If successful (key existed), returns true and the value of removed item.
+
+ The key to remove.
+ Returns value of removed item. Returns default value if key did not exist.
+ Returns true if key was found.
+
+
+
+ Returns an enumerator that iterates through the NetworkDictionary.
+
+
+
+
+ Converts the current NetworkDictionary to a read-only version.
+
+ The NetworkDictionary to convert.
+ A new instance of NetworkDictionaryReadOnly with the same data, capacity, and reader/writers as the current NetworkDictionary.
+
+
+
+ Defines the interface for a networked dictionary.
+
+
+
+
+ Adds an item to the networked dictionary.
+
+ The item to add to the dictionary.
+
+
+
+ Attribute applied to a dictionary property by the weaver.
+
+
+
+
+
+
+
+ Capacity of the dictionary.
+
+
+
+
+ Word count for the key.
+
+
+
+
+ Word count for the value.
+
+
+
+
+
+
+
+
+
+
+ A read-only version of .
+
+ The type of the key.
+ The type of the value.
+
+
+
+ Current number of key/value entries in the Dictionary.
+
+
+
+
+ The maximum number of entries this dictionary may contain.
+
+
+
+
+ Returns the value for the given key. Will throw an error if the key is not found.
+
+
+
+
+ Attempts to get the value for a given key. If found, returns true.
+
+ The key to remove.
+ Returns value of removed item. Returns default value if key did not exist.
+ Returns true if key was found.
+
+
+
+ Fusion type for networking LinkedLists.
+ Maximum capacity is fixed, and is set with the .
+ Typical Usage:
+
+ [Networked, Capacity(10)]
+ NetworkLinkedList<int> syncedLinkedList => default;
+
+ Optional usage (for NetworkBehaviours ONLY - this is not legal in INetworkStructs):
+
+ [Networked, Capacity(4)]
+ NetworkLinkedList<int> syncedLinkedList { get; } = MakeInitializer(new int[] { 1, 2, 3, 4 });
+
+ Usage for modifying data:
+
+ var list = syncedLinkedList;
+ list.Add(123);
+ list[0] = 456;
+ list.Remove(0);
+
+
+ T can be a primitive, or an INetworkStruct.
+
+
+ Returns the number of words required to store a single element.
+
+
+ Returns the number of words required to store the list metadata.
+
+
+
+ Enumerator for .
+
+
+
+
+ Advances the enumerator to the next element of the .
+
+ Returns true if the enumerator advanced to the next element.
+
+
+
+ Resets the enumerator to its initial position, which is before the first element in the collection.
+
+
+
+
+ Gets the current element in the collection.
+
+ The current element in the collection.
+ Thrown when the enumerator is positioned before the first element or after the last element.
+
+
+
+ Releases all resources used by the .
+
+
+
+
+ Returns the current element count.
+
+
+
+
+ Returns the max element count.
+
+
+
+
+ Element indexer.
+
+
+
+
+ Initializes a new instance of the NetworkLinkedList struct with the specified data, capacity, and reader/writer.
+
+ The pointer to the data of the list.
+ The capacity of the list.
+ The reader/writer for the elements of the list.
+
+
+
+ Remaps the current NetworkLinkedList to a new memory location.
+
+ The pointer to the new memory location.
+ A new instance of NetworkLinkedList with the same capacity and reader/writer, but mapped to the new memory location.
+
+
+
+ Removes and clears all list elements.
+
+
+
+
+ Returns true if the value already exists in the list.
+
+
+
+
+ Returns true if the value already exists in the list.
+
+
+
+
+ Sets the value at supplied index.
+
+
+
+
+ Returns the value at supplied index.
+
+
+
+
+ Returns the index with this value. Returns -1 if not found.
+
+
+
+
+ Returns the index of the first occurrence of a value in the NetworkLinkedList.
+
+ The value to locate in the NetworkLinkedList. The value can be null for reference types.
+ An equality comparer to compare values. Must not be null.
+ The zero-based index of the first occurrence of value within the entire NetworkLinkedList, if found; otherwise, -1.
+
+ This method performs a linear search; therefore, this method is an O(n) operation, where n is Count.
+
+
+
+
+ Removes the first found element with indicated value.
+
+
+
+
+ Removes the first found element with indicated value.
+
+
+
+
+ Adds a value to the end of the list.
+
+ Value to add.
+
+
+
+ Get the enumerator for the list.
+
+
+
+
+ Defines the interface for a networked linked list.
+
+
+
+
+ Adds an item to the networked linked list.
+
+ The item to add to the linked list.
+
+
+
+ Attribute applied to a list property by the weaver.
+
+
+
+
+ List capacity.
+
+
+
+
+ Word count of each element.
+
+
+
+
+ ReaderWriter type for the element.
+
+
+
+
+
+
+
+ Read-only version of .
+
+ Custom struct type.
+
+
+ Returns the number of words required to store a single element.
+
+
+ Returns the number of words required to store the list metadata.
+
+
+
+ Returns the current element count.
+
+
+
+
+ Returns the max element count.
+
+
+
+
+ Element indexer.
+
+
+
+
+ Returns true if the value already exists in the list.
+
+
+
+
+ Returns true if the value already exists in the list.
+
+
+
+
+ Returns the value at supplied index.
+
+
+
+
+ Returns the index with this value. Returns -1 if not found.
+
+
+
+
+ Returns the index of the first occurrence of a value in the FixedArray.
+
+ The value to locate in the FixedArray. The value can be null for reference types.
+ An equality comparer to compare values. Must not be null.
+ The zero-based index of the first occurrence of value within the entire FixedArray, if found; otherwise, -1.
+
+ This method performs a linear search; therefore, this method is an O(n) operation, where n is Capacity.
+
+
+
+
+ PCG32 random generator, 16 bytes in size.
+ http://www.pcg-random.org
+
+
+
+
+ 0x1.00000001p-32 aka 0x3df0000000100000
+
+
+
+
+ 0x1p-32 aka 0x3df0000000000000
+
+
+
+
+ 0x1.000002p-24 aka 0x33800001
+
+
+
+
+ 0x1p-24 aka 0x33800000
+
+
+
+
+ Returns the same RNG instance.
+
+
+
+
+ Generates a random double value within the inclusive range [0, 1].
+
+ A random double value between 0 and 1, inclusive.
+
+
+
+ Generates a random double value within the exclusive range [0, 1).
+
+ A random double value between 0 (inclusive) and 1 (exclusive).
+
+
+
+ Generates a random float value within the inclusive range [0, 1].
+
+ A random float value between 0 and 1, inclusive.
+
+
+
+ Generates a random float value within the exclusive range [0, 1).
+
+ A random float value between 0 (inclusive) and 1 (exclusive).
+
+
+
+ Generates a random integer value within the range of int.MinValue to int.MaxValue.
+
+ A random integer value between int.MinValue and int.MaxValue, inclusive.
+
+
+
+ Generates a random unsigned integer value within the range of 0 to uint.MaxValue.
+
+ A random unsigned integer value between 0 and uint.MaxValue, inclusive.
+
+
+ Size of the struct in bytes.
+
+
+ Maximum allowed value
+
+
+
+ Creates a new instance of with a random seed.
+
+ Seed value.
+
+
+
+ String representation of the RNG state.
+
+
+
+
+ Returns a random Double within [minInclusive, maxInclusive] (range is inclusive).
+ If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.
+
+
+
+
+ Returns a random Single within [minInclusive, maxInclusive] (range is inclusive).
+ If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.
+
+
+
+
+ Returns a random Int32 within [minInclusive, maxExclusive) (range is exclusive).
+ If minInclusive and maxExclusive are equal, then the "exclusive rule" is ignored and minInclusive will be returned.
+ If minInclusive is greater than maxExclusive, then the numbers are automatically swapped.
+
+
+
+
+ Returns a random Int32 within [minInclusive, maxInclusive] (range is inclusive).
+ If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.
+
+
+
+
+ Returns a random UInt32 within [minInclusive, maxExclusive) (range is exclusive).
+ If minInclusive and maxExclusive are equal, then the "exclusive rule" is ignored and minInclusive will be returned.
+ If minInclusive is greater than maxExclusive, then the numbers are automatically swapped.
+
+
+
+
+ Returns a random UInt32 within [minInclusive, maxInclusive] (range is inclusive).
+ If minInclusive is greater than maxInclusive, then the numbers are automatically swapped.
+
+
+
+
+ Fixed-size UTF32 string. All operations are alloc-free, except for converting to .
+
+
+
+
+
+ Creates a new instance of with the given value.
+
+ String value.
+
+
+
+ Maximum UTF32 string length.
+
+
+
+
+ Converts to/from regular UTF16 string. Setter is alloc-free. Use
+ to get possibly alloc-free conversion.
+
+
+
+
+ Number of UTF32 scalars. It is equal or less than or the length
+ of , because those use UTF16 encoding, which needs two characters to encode
+ some values.
+
+
+
+
+ Returns UTF32 scalar at position. To iterate over characters,
+ use .
+
+ Index to get.
+ UTF32 scalar at position.
+
+
+
+ Defines an implicit conversion of a string to a NetworkString.
+
+ The string to convert.
+ A new instance of NetworkString with the same value as the string.
+
+
+
+ Defines an explicit conversion of a NetworkString to a string.
+
+ The NetworkString to convert.
+ The string value of the NetworkString.
+
+
+
+ Defines an inequality operator for NetworkString.
+
+ The first NetworkString to compare.
+ The second NetworkString to compare.
+ true if the NetworkStrings are not equal; otherwise, false.
+
+
+
+ Defines an inequality operator for a string and a NetworkString.
+
+ The string to compare.
+ The NetworkString to compare.
+ true if the string and the NetworkString are not equal; otherwise, false.
+
+
+
+ Defines an inequality operator for a NetworkString and a string.
+
+ The NetworkString to compare.
+ The string to compare.
+ true if the NetworkString and the string are not equal; otherwise, false.
+
+
+
+ Defines an equality operator for NetworkString.
+
+ The first NetworkString to compare.
+ The second NetworkString to compare.
+ true if the NetworkStrings are equal; otherwise, false.
+
+
+
+ Defines an equality operator for a string and a NetworkString.
+
+ The string to compare.
+ The NetworkString to compare.
+ true if the string and the NetworkString are equal; otherwise, false.
+
+
+
+ Defines an equality operator for a NetworkString and a string.
+
+ The NetworkString to compare.
+ The string to compare.
+ true if the NetworkString and the string are equal; otherwise, false.
+
+
+
+ Checks if is equivalent and if not converts to UTF16 and
+ stores the result in .
+
+ The string to convert.
+ False if no conversion was performed, true otherwise.
+
+
+
+ Converts to UTF32 string and stores it internally.
+
+ The string to set.
+ False if was too long to fit and had to be trimmed.
+
+
+
+ Returns the index of the first occurrence of a specified character in this instance.
+
+ The Unicode character to seek.
+ The search starting position.
+ The zero-based index position of value if that character is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified character in this instance.
+
+ The Unicode character to seek.
+ The search starting position.
+ The number of character positions to examine.
+ The zero-based index position of value if that character is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified Unicode code point in this instance.
+
+ The Unicode code point to seek.
+ The search starting position.
+ The zero-based index position of value if that Unicode code point is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified Unicode code point in this instance.
+
+ The Unicode code point to seek.
+ The search starting position.
+ The number of character positions to examine.
+ The zero-based index position of value if that Unicode code point is found, or -1 if it is not.
+ Thrown when the start index is less than zero or greater than the safe length of the string, or when the count is less than zero or the sum of the start index and count is greater than the safe length of the string.
+
+
+
+ Returns the index of the first occurrence of a specified string in this instance.
+
+ The string to seek.
+ The search starting position.
+ The zero-based index position of value if that string is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified string in this instance.
+
+ The string to seek.
+ The search starting position.
+ The number of character positions to examine.
+ The zero-based index position of value if that string is found, or -1 if it is not.
+ Thrown when the string is null.
+ Thrown when the start index is less than zero or greater than the safe length of the string, or when the count is less than zero or the sum of the start index and count is greater than the safe length of the string.
+
+
+
+ Returns the index of the first occurrence of a specified NetworkString in this instance.
+
+ The size of the other NetworkString.
+ The NetworkString to seek.
+ The search starting position.
+ The zero-based index position of value if that NetworkString is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified NetworkString in this instance.
+
+ The size of the other NetworkString.
+ The NetworkString to seek.
+ The search starting position.
+ The number of character positions to examine.
+ The zero-based index position of value if that NetworkString is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified NetworkString in this instance.
+
+ The size of the other NetworkString.
+ The NetworkString to seek.
+ The search starting position.
+ The zero-based index position of value if that NetworkString is found, or -1 if it is not.
+
+
+
+ Returns the index of the first occurrence of a specified NetworkString in this instance.
+
+ The size of the other NetworkString.
+ The NetworkString to seek.
+ The search starting position.
+ The number of character positions to examine.
+ The zero-based index position of value if that NetworkString is found, or -1 if it is not.
+ Thrown when the start index is less than zero or greater than the safe length of the string, or when the count is less than zero or the sum of the start index and count is greater than the safe length of the string.
+
+
+
+ Determines whether a specified character is in this instance.
+
+ The Unicode character to seek.
+ true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.
+
+
+
+ Determines whether a specified Unicode code point is in this instance.
+
+ The Unicode code point to seek.
+ true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.
+
+
+
+ Determines whether a specified string is in this instance.
+
+ The string to seek.
+ true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.
+
+
+
+ Determines whether a specified NetworkString is in this instance.
+
+ The size of the other NetworkString.
+ The NetworkString to seek.
+ true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.
+
+
+
+ Determines whether a specified NetworkString is in this instance.
+
+ The size of the other NetworkString.
+ The NetworkString to seek.
+ true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.
+
+
+
+ Returns a substring from this instance. The substring starts at a specified character position.
+
+ The zero-based starting character position of a substring in this instance.
+ A new NetworkString that is equivalent to the substring that begins at startIndex in this instance, or NetworkString.Empty if startIndex is equal to the length of this instance.
+ startIndex is less than zero or greater than the length of this instance.
+
+
+
+ Returns a substring from this instance. The substring starts at a specified character position and has a specified length.
+
+ The zero-based starting character position of a substring in this instance.
+ The number of characters in the substring.
+ A new NetworkString that is equivalent to the substring of length length that begins at startIndex in this instance, or NetworkString.Empty if startIndex is equal to the length of this instance and length is zero.
+ startIndex plus length indicates a position not within this instance, or startIndex or length is less than zero.
+
+
+
+ Converts all the characters in this NetworkString to lowercase.
+
+ A new NetworkString in which all characters in this NetworkString are converted to lowercase.
+
+
+
+ Converts all the characters in this NetworkString to uppercase.
+
+ A new NetworkString in which all characters in this NetworkString are converted to uppercase.
+
+
+
+ Calculates the length of the equivalent UTF16 string.
+
+ The length of the equivalent UTF16 string.
+
+
+
+ Compares this instance with a specified string.
+
+ The string to compare.
+ A 32-bit signed integer that indicates the comparison result.
+
+
+
+ Compares this instance with a specified NetworkString.
+
+ The NetworkString to compare.
+ A 32-bit signed integer that indicates the comparison result.
+
+
+
+ Compares this instance with a specified NetworkString.
+
+ The NetworkString to compare.
+ A 32-bit signed integer that indicates the comparison result.
+
+
+
+ Compares this instance with a specified NetworkString of a different size.
+
+ The size of the other NetworkString.
+ The NetworkString to compare.
+ A 32-bit signed integer that indicates the comparison result.
+
+
+
+ Compares this instance with a specified NetworkString of a different size.
+
+ The size of the other NetworkString.
+ The NetworkString to compare.
+ A 32-bit signed integer that indicates the comparison result.
+
+
+
+ Determines whether the current NetworkString is equal to a specified string.
+
+ The string to compare with the current NetworkString.
+ true if the specified string is equal to the current NetworkString; otherwise, false.
+
+
+
+ Determines whether the current NetworkString is equal to a specified object.
+
+ The object to compare with the current NetworkString.
+ true if the specified object is equal to the current NetworkString; otherwise, false.
+
+
+
+ Determines whether the current NetworkString is equal to a specified NetworkString.
+
+ The NetworkString to compare with the current NetworkString.
+ true if the specified NetworkString is equal to the current NetworkString; otherwise, false.
+
+
+
+ Determines whether the current NetworkString is equal to a specified NetworkString.
+
+ The NetworkString to compare with the current NetworkString.
+ true if the specified NetworkString is equal to the current NetworkString; otherwise, false.
+
+
+
+ Determines whether the current NetworkString is equal to a specified NetworkString of a different size.
+
+ The size of the other NetworkString.
+ The NetworkString to compare with the current NetworkString.
+ true if the specified NetworkString is equal to the current NetworkString; otherwise, false.
+
+
+
+ Determines whether the current NetworkString is equal to a specified NetworkString of a different size.
+
+ The size of the other NetworkString.
+ The NetworkString to compare with the current NetworkString.
+ true if the specified NetworkString is equal to the current NetworkString; otherwise, false.
+
+
+
+ Assign a new value to this NetworkString.
+
+ String value.
+
+
+
+ Checks if the current NetworkString starts with a specified string.
+
+ The string to check.
+ true if the current NetworkString starts with the specified string; otherwise, false.
+ Thrown when the string is null.
+
+
+
+ Checks if the current NetworkString starts with a specified NetworkString of a different size.
+
+ The size of the other NetworkString.
+ The NetworkString to check.
+ true if the current NetworkString starts with the specified NetworkString; otherwise, false.
+
+
+
+ Checks if the current NetworkString ends with a specified NetworkString of a different size.
+
+ The size of the other NetworkString.
+ The NetworkString to check.
+ true if the current NetworkString ends with the specified NetworkString; otherwise, false.
+
+
+
+ Checks if the current NetworkString ends with a specified string.
+
+ The string to check.
+ true if the current NetworkString ends with the specified string; otherwise, false.
+ Thrown when the string is null.
+
+
+
+ Returns the hash code for this NetworkString.
+
+ A 32-bit signed integer hash code.
+
+
+
+ Converts the value of this NetworkString to its equivalent string representation.
+
+ A string representation of the value of this NetworkString.
+
+
+
+ Returns an enumerator that iterates through the NetworkString.
+
+ A UTF32Tools.CharEnumerator for the NetworkString.
+
+
+
+ Provides static methods for NetworkString operations.
+
+
+
+
+ Gets the capacity of a NetworkString of a specified size.
+
+ The size of the NetworkString.
+ The capacity of a NetworkString of the specified size.
+
+
+
+ Represents a Fusion player.
+
+ The PlayerRef, in contrast to the player index, is 1-based. The reason is that default(PlayerRef) will return a "null/invalid" player ref struct for convenience. There are automatic cast operators that can cast an int into a PlayerRef.
+
+ default(PlayerRef), internally a 0, means NOBODY
+ PlayerRef, internally 1, is the same as player index 0
+ PlayerRef, internally 2, is the same as player index 1
+
+
+
+
+ Gets an equality comparer that can be used to compare two PlayerRef instances.
+
+
+
+
+ The size of the PlayerRef structure in bytes.
+
+
+
+
+ A constant representing the raw index value for the master client.
+
+
+
+
+ Invalid player ref. Used to differentiate no player ref (None) from an invalid one.
+
+
+
+
+ None player
+
+
+
+
+ Special master client player ref value of -1
+
+
+
+
+ If this player ref is a valid unique player index
+
+
+
+
+ Returns true if the index value equals -1 (internal raw value of 0), indicating no player.
+
+
+
+
+ Returns true if this PlayerRef indicates the MasterClient rather than a specific Player by Index,
+ This is a special flag value which has the encoded index value of -2 (internal raw backing value of -1).
+ This is not a valid PlayerRef value in itself, and no Runner will ever be assigned this value as its LocalPlayer.
+ It is used by properties like Object.StateAuthority to indicate that the MasterClient has authority
+ (which ever player that currently is), rather than a specific Player.
+
+
+
+
+ Returns the index backing value without modification.
+ Unlike which returns the backing value - 1.
+ 0=None -1=MasterClient >0=PlayerId
+
+
+
+
+ Returns the PlayerRef int as an integer Id value.
+ -1=None -2=MasterClient >=0=PlayerId
+
+
+
+
+ Returns the PlayerRef as an integer Id value.
+ -1=None -2=MasterClient
+
+
+
+
+ Determines whether the specified object is equal to the current object.
+
+ The object to compare with the current object.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Serves as the default hash function.
+
+
+
+
+ Returns a string that represents the current object.
+
+
+
+
+ Creates a new PlayerRef from the given encoded value.
+
+ The encoded value to create the PlayerRef from.
+ A new PlayerRef that represents the encoded value.
+
+
+
+ Creates a new PlayerRef from the given index.
+
+ The index to create the PlayerRef from.
+ A new PlayerRef that represents the index.
+
+
+
+ Determines whether two PlayerRef instances are equal.
+
+ The first PlayerRef to compare.
+ The second PlayerRef to compare.
+ true if the PlayerRefs are equal; otherwise, false.
+
+
+
+ Determines whether two PlayerRef instances are not equal.
+
+ The first PlayerRef to compare.
+ The second PlayerRef to compare.
+ true if the PlayerRefs are not equal; otherwise, false.
+
+
+
+ Writes the PlayerRef to the provided NetBitBuffer.
+
+ The buffer to write to.
+ The PlayerRef to write.
+
+
+
+ Writes the PlayerRef to the provided buffer.
+
+ The type of the buffer. Must be unmanaged and implement INetBitWriteStream.
+ The buffer to write to.
+ The PlayerRef to write.
+
+
+
+ Reads a PlayerRef from the provided NetBitBuffer.
+
+ The buffer to read from.
+ The PlayerRef read from the buffer.
+
+
+
+ Determines whether the specified PlayerRef is equal to the current PlayerRef.
+
+ The PlayerRef to compare with the current PlayerRef.
+ true if the specified PlayerRef is equal to the current PlayerRef; otherwise, false.
+
+
+
+ Provides utility methods for reading and writing data.
+
+
+
+ Accuracy of floating point values when serialized.
+
+
+
+ Writes a float value to the provided memory location.
+
+ The memory location to write to.
+ The float value to write.
+
+
+
+ Reads a float value from the provided memory location.
+
+ The memory location to read from.
+ The float value read from the memory location.
+
+
+
+ Writes a Vector2 value to the provided memory location.
+
+ The memory location to write to.
+ The Vector2 value to write.
+
+
+
+ Reads a Vector2 value from the provided memory location.
+
+ The memory location to read from.
+ The Vector2 value read from the memory location.
+
+
+
+ Writes a Vector3 value to the provided memory location.
+
+ The memory location to write to.
+ The Vector3 value to write.
+
+
+
+ Reads a Vector3 value from the provided memory location.
+
+ The memory location to read from.
+ The Vector3 value read from the memory location.
+
+
+
+ Writes a Vector4 value to the provided memory location.
+
+ The memory location to write to.
+ The Vector4 value to write.
+
+
+
+ Reads a Vector4 value from the provided memory location.
+
+ The memory location to read from.
+ The Vector4 value read from the memory location.
+
+
+
+ Writes a Quaternion value to the provided memory location.
+
+ The memory location to write to.
+ The Quaternion value to write.
+
+
+
+ Reads a Quaternion value from the provided memory location.
+
+ The memory location to read from.
+ The Quaternion value read from the memory location.
+
+
+
+ Provides utility methods for reading and writing data.
+
+
+
+ Accuracy of floating point values when serialized.
+
+
+
+ Reads a boolean value from the provided memory location.
+
+ The memory location to read from.
+ The boolean value read from the memory location.
+
+
+
+ Writes a boolean value to the provided memory location.
+
+ The memory location to write to.
+ The boolean value to write.
+
+
+
+
+
+
+
+
+
+
+
+ Writes a string to the provided memory location in UTF8 format without a hash.
+
+ The memory location to write to.
+ The string to write.
+ The number of bytes written.
+
+
+
+ Reads a string from the provided memory location in UTF8 format without a hash.
+
+ The memory location to read from.
+ The string read from the memory location.
+ The number of bytes read.
+
+
+
+ Gets the byte count of a string in UTF8 format without a hash.
+
+ The string to get the byte count of.
+ The byte count of the string in UTF8 format.
+
+
+
+
+
+
+
+
+
+
+
+ Writes a string to the provided memory location in UTF32 format without a hash.
+
+ The memory location to write to.
+ The maximum length of the string.
+ The string to write.
+ The number of bytes written.
+
+
+
+ Reads a string from the provided memory location in UTF32 format without a hash.
+
+ The memory location to read from.
+ The maximum length of the string.
+ The string read from the memory location.
+ The number of bytes read.
+
+
+
+ Writes a string to the provided memory location in UTF32 format with a hash.
+
+ The memory location to write to.
+ The maximum length of the string.
+ The string to write.
+ A reference to a cache string. This will be updated with the trimmed value of the input string.
+ The number of bytes written.
+
+
+
+ Reads a string from the provided memory location in UTF32 format with a hash.
+
+ The memory location to read from.
+ The maximum length of the string.
+ A reference to a cache string. This will be updated with the read string if it matches the cached hashcode.
+ The number of bytes read.
+
+
+
+ Gets the word count of a string with optional caching.
+
+ The capacity of the string.
+ Indicates whether caching is used.
+ The word count of the string.
+
+
+
+ Verifies the byte count of a network unwrapped object.
+ Throws an exception if the actual byte count exceeds the maximum allowed byte count.
+
+ The type of the network unwrapped object.
+ The actual byte count.
+ The maximum allowed byte count.
+ The actual byte count if it does not exceed the maximum allowed byte count.
+
+
+
+ Verifies the byte count of a network wrapped object.
+ Throws an exception if the actual byte count exceeds the maximum allowed byte count.
+
+ The type of the network wrapped object.
+ The actual byte count.
+ The maximum allowed byte count.
+ The actual byte count if it does not exceed the maximum allowed byte count.
+
+
+
+ Provides utility methods for reflection.
+
+
+
+
+ Retrieves a custom attribute of type T from the provided member.
+
+ The type of the attribute to retrieve. Must be a subclass of Attribute.
+ The member to retrieve the attribute from.
+ Specifies whether to search this member's inheritance chain to find the attributes.
+ The custom attribute of type T.
+ Thrown when the provided member does not have an attribute of type T.
+ Thrown when the provided member has more than one attribute of type T.
+
+
+
+ Gets the NetworkBehaviourWeavedAttribute for the specified type.
+ Throws an InvalidOperationException if the type has not been weaved.
+
+ The type to get the NetworkBehaviourWeavedAttribute for.
+ The NetworkBehaviourWeavedAttribute for the specified type.
+ Thrown when the type has not been weaved.
+
+
+
+ Gets all assemblies that have been weaved.
+
+ An IEnumerable of all weaved assemblies.
+
+
+
+ Gets all types that are assignable from SimulationBehaviour from all assemblies.
+
+ An IEnumerable of all types that are assignable from SimulationBehaviour.
+
+
+
+ Gets all types that are assignable from SimulationBehaviour from all weaved assemblies.
+
+ An IEnumerable of all types that are assignable from SimulationBehaviour in weaved assemblies.
+
+
+
+ Gets all types that are assignable from NetworkBehaviour from all assemblies.
+
+ An IEnumerable of all types that are assignable from NetworkBehaviour.
+
+
+
+ Gets all types that are assignable from NetworkBehaviour from all weaved assemblies.
+
+ An IEnumerable of all types that are assignable from NetworkBehaviour in weaved assemblies.
+
+
+
+ Gets all types that have the WeaverGeneratedAttribute from all weaved assemblies.
+
+ An IEnumerable of all types that have the WeaverGeneratedAttribute in weaved assemblies.
+
+
+
+
+ A circular buffer.
+
+
+ Normally, you push to the back and pop from the front.
+ When it's full, PushBack will remove from the front and PushFront will remove from the back.
+
+
+
+
+
+ Returns a new instance.
+
+
+
+
+ Returns a new instance.
+
+
+
+
+ The number of items in the buffer.
+
+
+
+
+ The maximum number of items that can be in the buffer.
+
+
+
+
+ True if the buffer contains no items.
+
+
+
+
+ True if the buffer contains the maximum number of items.
+
+
+
+
+ Indexed access to items in the buffer.
+ Indexes follow insertion order, i.e. this[0] returns the front item and this[Count - 1] returns the rear item.
+
+
+
+
+
+ Returns a read-only reference to the front item in the buffer.
+
+
+
+
+ Returns a reference to the front item in the buffer.
+
+
+
+
+ Returns a read-only reference to the item in the buffer at index.
+ Indexes follow insertion order, i.e. this[0] returns the front item and this[Count - 1] returns the back item.
+
+
+
+
+ Returns a reference to the item in the buffer at index.
+ Indexes follow insertion order, i.e. this[0] returns the front item and this[Count - 1] returns the back item.
+
+
+
+
+ Returns a read-only reference to the back item in the buffer.
+
+
+
+
+ Returns a reference to the back item in the buffer.
+
+
+
+
+ Inserts an item at the back of the buffer.
+
+
+
+
+ Inserts an item at the front of the buffer.
+
+
+
+
+ Removes and returns the item at the back of the buffer.
+
+
+
+
+ Removes and returns the item at the front of the buffer.
+
+
+
+
+ Removes all items from the buffer.
+
+
+
+
+ Returns an ArraySegment pair, where both segments and the items within them follow insertion order.
+ Does not copy.
+
+
+
+
+ Returns a new array with the buffer's items in insertion order.
+
+
+
+
+ Returns an enumerator that can iterate the buffer.
+
+
+
+
+ Converts index into the corresponding index in _buffer.
+
+
+
+
+ Increments the provided index variable, wrapping around if necessary.
+
+
+
+
+ Decrements the provided index variable, wrapping around if necessary.
+
+
+
+
+ Scene reference struct.
+ Can be used to reference a scene by index or by path.
+
+
+
+ The size of the SceneRef structure in bytes.
+
+
+ A constant representing the flag for addressable scenes.
+
+
+ The raw value of the SceneRef. This can represent either an index or a path hash, depending on the flag.
+
+
+
+ None scene
+
+
+
+
+ If this scene index is valid
+
+
+
+
+ Returns true if this scene ref is an index.
+
+
+
+
+ Returns lower 32 bits as an index.
+
+
+
+
+ Gets the path hash of the SceneRef.
+
+ Thrown when the SceneRef is an index, not a path.
+
+
+
+ Checks if the SceneRef corresponds to a specific path.
+
+ The path to check.
+ true if the SceneRef corresponds to the path; otherwise, false.
+
+
+
+ Creates a SceneRef from an index.
+
+ The index to create the SceneRef from.
+ A SceneRef that represents the index.
+ Thrown when the index is less than 0 or equal to int.MaxValue.
+
+
+
+ Creates a scene ref from a path. The most common use case for this method is when using Unity's addressable scenes.
+ The path is hashed (31 bit), so on rare occasion there may be a hash collision. In such case
+ consider renaming a scene or construct your own hash and use .
+ To check if a scene ref is was created for a specific path, use .
+
+ The path to create the SceneRef from.
+ A SceneRef that represents the path.
+
+
+
+ Creates a SceneRef from a raw value.
+
+ The raw value to create the SceneRef from.
+ A SceneRef that represents the raw value.
+
+
+
+ Determines whether the specified object is equal to the current SceneRef.
+
+ The object to compare with the current SceneRef.
+ true if the specified object is equal to the current SceneRef; otherwise, false.
+
+
+
+ Determines whether the specified SceneRef is equal to the current SceneRef.
+
+ The SceneRef to compare with the current SceneRef.
+ true if the specified SceneRef is equal to the current SceneRef; otherwise, false.
+
+
+
+ Serves as the default hash function.
+
+ A hash code for the current SceneRef.
+
+
+
+ Returns a string that represents the current SceneRef.
+
+ A string that represents the current SceneRef.
+
+
+
+ Returns a string that represents the current SceneRef, with optional formatting.
+
+ If true, the string will be enclosed in brackets.
+ If true, the string will be prefixed with "Scene:".
+ A string that represents the current SceneRef, formatted according to the provided parameters.
+
+
+
+ Parses a SceneRef from a string.
+
+
+
+
+
+
+ Returns true if the values are equal.
+
+ SceneRef a
+ SceneRef b
+ true if the values are equal; otherwise, false.
+
+
+
+ Returns true if the values are not equal.
+
+ SceneRef a
+ SceneRef b
+ true if the values are not equal; otherwise, false.
+
+
+
+ A serializable dictionary.
+
+
+
+
+ Creates a new serializable dictionary.
+
+ The type of the dictionary key.
+ The type of the dictionary value.
+ A new serializable dictionary.
+
+
+
+ A serializable dictionary.
+
+ The type of the dictionary key.
+ The type of the dictionary value.
+
+ This class is not thread-safe.
+
+
+
+
+ The property path for the items in the SerializableDictionary.
+
+
+
+
+ The property path for the key in the Entry structure.
+
+
+
+
+ Wraps an existing Dictionary into a SerializableDictionary.
+
+ The Dictionary to be wrapped.
+ A new SerializableDictionary that wraps the provided Dictionary.
+
+
+
+ Gets or sets the value associated with the specified key.
+
+ The key of the value to get or set.
+ The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new element with the specified key.
+
+
+
+ Gets the number of key/value pairs contained in the SerializableDictionary.
+
+
+
+
+ Gets a value indicating whether the SerializableDictionary is read-only. This value is always false.
+
+
+
+
+ Adds the specified key and value to the SerializableDictionary.
+
+ The key of the element to add.
+ The value of the element to add.
+
+
+
+ Removes all keys and values from the SerializableDictionary.
+
+
+
+
+ Determines whether the SerializableDictionary contains the specified key.
+
+ The key to locate in the SerializableDictionary.
+ true if the SerializableDictionary contains an element with the specified key; otherwise, false.
+
+
+
+ Removes the value with the specified key from the SerializableDictionary.
+
+ The key of the element to remove.
+ true if the element is successfully found and removed; otherwise, false. This method returns false if key is not found in the SerializableDictionary.
+
+
+
+ Gets the value associated with the specified key.
+
+ The key of the value to get.
+ When this method returns, contains the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.
+ true if the SerializableDictionary contains an element with the specified key; otherwise, false.
+
+
+
+ Gets a collection containing the keys in the SerializableDictionary.
+
+
+
+
+ Gets a collection containing the values in the SerializableDictionary.
+
+
+
+
+ Returns an enumerator that iterates through the SerializableDictionary.
+
+ A Dictionary{TKey,TValue}.Enumerator structure for the SerializableDictionary.
+
+
+
+ Resets the SerializableDictionary, clearing its internal dictionary.
+
+
+
+
+ Stores the SerializableDictionary's data into an array for serialization.
+ This includes handling duplicates and null keys.
+
+
+
+
+ A tick is a 32-bit integer that represents a frame number.
+
+
+
+
+ Provides a mechanism for comparing two Tick objects.
+
+
+
+
+ Compares two Tick objects and returns a value indicating whether one is less than, equal to, or greater than the other.
+
+ The first Tick object to compare.
+ The second Tick object to compare.
+ A signed integer that indicates the relative values of x and y.
+
+
+
+ Provides a mechanism for comparing two Tick objects for equality.
+
+
+
+
+ Determines whether the specified Tick objects are equal.
+
+ The first Tick object to compare.
+ The second Tick object to compare.
+ true if the specified Tick objects are equal; otherwise, false.
+
+
+
+ Serves as a hash function for a Tick object.
+
+ The Tick object for which to get a hash code.
+ A hash code for the specified Tick object.
+
+
+
+ The size of the Tick structure in bytes.
+
+
+
+
+ The alignment of the Tick structure in bytes.
+
+
+
+
+ The raw value of the Tick. This represents a frame number.
+
+
+
+
+ Returns the next Tick, incremented by a specified value.
+
+ The value to increment the Tick by.
+ A new Tick that represents the current Tick incremented by the specified value.
+
+
+
+ Determines whether the specified Tick is equal to the current Tick.
+
+ The Tick to compare with the current Tick.
+ true if the specified Tick is equal to the current Tick; otherwise, false.
+
+
+
+ Compares the current Tick with another Tick.
+
+ A Tick to compare with this Tick.
+ A value that indicates the relative order of the objects being compared.
+
+
+
+ Determines whether the specified object is equal to the current Tick.
+
+ The object to compare with the current Tick.
+ true if the specified object is equal to the current Tick; otherwise, false.
+
+
+
+ Serves as the default hash function.
+
+ A hash code for the current Tick.
+
+
+
+ String representation of the Tick.
+
+
+
+
+ Determines whether the first specified Tick is greater than the second specified Tick.
+
+
+
+
+ Determines whether the first specified Tick is greater than or equal to the second specified Tick.
+
+
+
+
+ Determines whether the first specified Tick is less than the second specified Tick.
+
+
+
+
+ Determines whether the first specified Tick is less than or equal to the second specified Tick.
+
+
+
+
+ Determines whether the first specified Tick is equal to the second specified Tick.
+
+
+
+
+ Determines whether the first specified Tick is not equal to the second specified Tick.
+
+
+
+
+ Converts an integer to a Tick.
+
+ The integer to convert.
+ A Tick that represents the specified integer. If the integer is less than 0, the Tick's raw value is set to 0.
+
+
+
+ Converts a Tick to an integer.
+
+ The Tick to convert.
+ An integer that represents the raw value of the specified Tick.
+
+
+
+ Converts a Tick to a boolean.
+
+ The Tick to convert.
+ true if the Tick's raw value is greater than 0; otherwise, false.
+
+
+
+ A tick accumulator.
+
+
+
+
+ Gets the number of pending ticks in the TickAccumulator.
+
+
+
+
+ Gets the remaining time in the TickAccumulator.
+
+
+
+
+ Gets a value indicating whether the TickAccumulator is running.
+
+
+
+
+ Gets or sets the time scale of the TickAccumulator.
+
+ Thrown when the value is less than or equal to 0.
+
+
+
+ Calculates the alpha value based on the given step.
+
+ The step value used to calculate the alpha.
+ The calculated alpha value.
+
+
+
+ Adds a specified number of ticks to the TickAccumulator.
+
+ The number of ticks to add.
+
+
+
+ Adds a specified amount of time to the TickAccumulator, incrementing the tick count as necessary.
+
+ The amount of time to add.
+ The time step value.
+ The maximum number of ticks to add. If this value is reached, the remaining time is set to 0.
+
+
+
+ Stops the TickAccumulator from accumulating ticks.
+
+
+
+
+ Starts the TickAccumulator, allowing it to accumulate ticks.
+
+
+
+
+ Consumes a tick from the TickAccumulator.
+
+ When this method returns, contains a boolean indicating whether the consumed tick was the last one.
+ true if a tick was successfully consumed; otherwise, false.
+
+
+
+ Starts a new TickAccumulator.
+
+ A new TickAccumulator.
+
+
+
+ A tick rate is a collection of tick rates.
+
+
+
+
+ Represents a selection of tick rates for client and server.
+
+
+
+
+ The tick rate for the client.
+
+
+
+
+ The index of the server's tick rate in the available tick rates.
+
+
+
+
+ The index of the client's send tick rate in the available tick rates.
+
+
+
+
+ The index of the server's send tick rate in the available tick rates.
+
+
+
+
+ Represents a resolved tick rate.
+
+
+ The tick rate is resolved by the client and server tick rates.
+
+
+
+ The size of the Resolved structure in bytes.
+
+
+ The size of the Resolved structure in words.
+
+
+ The tick rate for the client.
+
+
+ The send tick rate for the client.
+
+
+ The tick rate for the server.
+
+
+ The send tick rate for the server.
+
+
+
+ Gets the delta time for the server tick rate.
+
+
+
+
+ Gets the delta time for the server send rate.
+
+
+
+
+ Gets the stride of the server tick rate relative to the client tick rate.
+
+
+
+
+ Gets the delta time for the client tick rate.
+
+
+
+
+ Gets the delta time for the client send rate.
+
+
+
+
+ Gets the stride of the client tick rate. This is always 1.
+
+
+
+
+
+
+
+ Enumerates the possible results of validating a tick rate selection.
+
+
+
+ The tick rate selection is valid.
+
+
+ An error occurred during validation.
+
+
+ The tick rate selection was not found.
+
+
+ The tick rate selection is invalid.
+
+
+ The server index in the tick rate selection is out of range.
+
+
+ The client send index in the tick rate selection is out of range.
+
+
+ The server send index in the tick rate selection is out of range.
+
+
+ The server send rate in the tick rate selection is larger than the tick rate.
+
+
+
+ Gets the tick rate for the client.
+
+
+
+
+ Gets the count of tick rates in the TickRate.
+
+
+
+
+ Gets the tick rate at the specified index.
+
+ The index of the tick rate to get.
+ The tick rate at the specified index.
+
+
+
+ Gets the divisor for the tick rate at the specified index.
+
+ The index of the tick rate to get the divisor for.
+ The divisor for the tick rate at the specified index.
+ Thrown when the index is out of range.
+ Thrown when the client tick rate is not divisible by the tick rate at the specified index.
+
+
+
+ Gets the tick rate at the specified index.
+
+ The index of the tick rate to get.
+ The tick rate at the specified index.
+ Thrown when the index is out of range.
+
+
+
+ Converts the tick rates to an array.
+
+ An array containing the tick rates.
+
+
+
+ Validates the tick rates in the TickRate.
+
+ true if the tick rates are valid; otherwise, false.
+
+ The tick rates are valid if:
+ - There is at least one tick rate.
+ - There are no more than four tick rates.
+ - The first tick rate is greater than 0.
+ - Each tick rate is a divisor of the first tick rate.
+
+
+
+
+ Clamps the indices in the specified Selection to valid ranges.
+
+ The Selection to clamp.
+ A new Selection with clamped indices. If the TickRate is invalid, returns a default Selection.
+
+
+
+ Validates the tick rates in the specified Selection.
+
+ The Selection to validate.
+ A ValidateResult that indicates the result of the validation.
+
+ The Selection is valid if:
+ - The TickRate is valid.
+ - The client tick rate in the Selection matches the client tick rate in the TickRate.
+ - The server index in the Selection is within the range of available tick rates.
+ - The server send index in the Selection is within the range of available tick rates.
+ - The client send index in the Selection is within the range of available tick rates.
+ - The server send rate in the Selection is not larger than the server tick rate.
+
+
+
+
+ Initializes the TickRate class by setting up the valid tick rates and their lookup dictionary.
+
+
+
+
+ Checks if the provided TickRate is valid.
+
+ The TickRate to validate.
+ true if the TickRate is valid; otherwise, false.
+
+
+
+ Checks if the provided tick rate is valid.
+
+ The tick rate to validate.
+ true if the tick rate is valid; otherwise, false.
+
+
+
+ Retrieves the TickRate associated with the specified tick rate.
+
+ The tick rate to retrieve the TickRate for.
+ The TickRate associated with the specified tick rate.
+ Thrown when the tick rate is invalid.
+
+
+
+ Resolves the specified Selection into a Resolved structure.
+
+ The Selection to resolve.
+ A Resolved structure that represents the resolved tick rates.
+
+
+
+ Gets a read-only list of all available TickRates.
+
+
+ This property ensures that the TickRate class is initialized before returning the list.
+
+
+
+
+ A timer that is based on ticks instead of seconds.
+
+
+
+
+ Gets a TickTimer that is not running.
+
+
+
+
+ Gets a value indicating whether the TickTimer is running.
+
+
+ true if the TickTimer is running; otherwise, false.
+
+
+
+
+ Gets the target tick of the TickTimer.
+
+
+ The target tick if the TickTimer is running; otherwise, null.
+
+
+
+
+ Checks if the TickTimer has expired.
+
+ The NetworkRunner associated with the TickTimer.
+ true if the TickTimer is alive, the runner is running, and the target tick has been reached or passed; otherwise, false.
+
+
+
+ Checks if the TickTimer has expired or is not running.
+
+ The NetworkRunner associated with the TickTimer.
+ true if the TickTimer is not running, the runner is not running, or the TickTimer has expired; otherwise, false.
+
+
+
+ Gets the number of remaining ticks until the TickTimer expires.
+
+ The NetworkRunner associated with the TickTimer.
+ The number of remaining ticks if the TickTimer is alive and running; otherwise, null.
+
+
+
+ Gets the remaining time in seconds until the TickTimer expires.
+
+ The NetworkRunner associated with the TickTimer.
+ The remaining time in seconds if there are remaining ticks; otherwise, null.
+
+
+
+ Creates a TickTimer from a specified delay in seconds.
+
+ The NetworkRunner associated with the TickTimer.
+ The delay in seconds to set the TickTimer to.
+ A TickTimer that will expire after the specified delay in seconds. If the NetworkRunner is not alive or not running, returns a default TickTimer.
+
+
+
+ Creates a TickTimer from a specified number of ticks.
+
+ The NetworkRunner associated with the TickTimer.
+ The number of ticks to set the TickTimer to.
+ A TickTimer that will expire after the specified number of ticks. If the NetworkRunner is not alive or not running, returns a default TickTimer.
+
+
+
+ Returns a string that represents the current TickTimer.
+
+ A string that represents the current TickTimer.
+
+
+
+ The number of available samples.
+
+
+
+
+ The maximum number samples that can fit in this series.
+
+
+
+
+ True if the series contains zero samples.
+
+
+
+
+ True if the series contains the maximum number of samples.
+
+
+
+
+ The most recent sample.
+
+
+
+
+ The arithmetic mean of the samples in the series.
+
+
+
+
+ The variance of the samples in the series.
+
+
+
+
+ The standard deviation of the samples in the series.
+
+
+
+
+ The smallest value in the series.
+
+
+
+
+ The largest value in the series.
+
+
+
+
+ The median value in the series.
+
+
+
+
+ The mean absolute deviation from the mean.
+
+
+
+
+ The median absolute deviation from the median.
+
+
+
+
+ Returns the exponentially-weighted average of the series (with smoothing factor alpha).
+
+
+
+
+ Adds a new sample to the time series. If the series is already full, the oldest sample will be removed.
+
+ The new sample value to be added to the series.
+ Thrown when the provided value is NaN or Infinity.
+
+
+
+ Removes all samples and resets statistical values.
+
+
+
+
+ A base class for Unity array surrogates.
+
+ Unmanaged type of the array elements.
+ Unmanaged type of the reader/writer for the array elements.
+
+
+
+ Gets or sets the data array for the UnityArraySurrogate.
+
+
+
+
+ Reads data into the UnityArraySurrogate from a specified memory location.
+
+ The memory location to read from.
+ The number of elements to read.
+
+
+
+ Writes data from the UnityArraySurrogate to a specified memory location.
+
+ The memory location to write to.
+ The number of elements to write.
+
+
+
+ Initializes the UnityArraySurrogate with a specified capacity.
+
+ The capacity to initialize the UnityArraySurrogate with.
+
+
+
+ A surrogate for serializing a dictionary.
+
+ The type of the key.
+ The type of the key reader writer.
+ The type of the value.
+ The type of the value reader writer.
+
+
+
+
+ Gets or sets the data property.
+
+
+
+
+ Reads data into the UnityDictionarySurrogate from a specified memory location.
+
+ The memory location to read from.
+ The number of elements to read.
+
+
+
+ Writes data from the UnityDictionarySurrogate to a specified memory location.
+
+ The memory location to write to.
+ The number of elements to write.
+
+
+
+ Initializes the UnityDictionarySurrogate with a specified capacity.
+
+ The capacity to initialize the UnityDictionarySurrogate with.
+
+
+
+ A surrogate for serializing a linked list.
+
+ The type of the elements in the linked list.
+ The type of the reader writer for the elements in the linked list.
+
+
+ Gets or sets the data property.
+
+
+
+ Reads data into the UnityLinkedListSurrogate from a specified memory location.
+
+ The memory location to read from.
+ The number of elements to read.
+
+
+
+ Writes data from the UnityLinkedListSurrogate to a specified memory location.
+
+ The memory location to write to.
+ The number of elements to write.
+
+
+
+ Initializes the UnityLinkedListSurrogate with a specified capacity.
+
+ The capacity to initialize the UnityLinkedListSurrogate with.
+
+
+
+ Represents a base class for Unity surrogates.
+ This class is serializable and provides abstract methods for reading, writing, and initializing data.
+
+
+
+
+ Reads data from a specified memory location into the UnitySurrogateBase.
+
+ The memory location to read from.
+ The number of elements to read.
+
+
+
+ Writes data from the UnitySurrogateBase to a specified memory location.
+
+ The memory location to write to.
+ The number of elements to write.
+
+
+
+ Initializes the UnitySurrogateBase with a specified capacity.
+
+ The capacity to initialize the UnitySurrogateBase with.
+
+
+
+ Represents an interface for Unity surrogates.
+ This interface provides methods for reading and writing data.
+
+
+
+
+ Reads data from a specified memory location.
+
+ The memory location to read from.
+ The number of elements to read.
+
+
+
+ Writes data to a specified memory location.
+
+ The memory location to write to.
+ The number of elements to write.
+
+
+
+ Represents a base class for Unity value surrogates.
+ This class is serializable and provides methods for reading, writing, and initializing data.
+
+ The type of the data.
+ The type of the reader/writer for the data. Must be unmanaged and implement IElementReaderWriter{T}.
+
+
+
+ Gets or sets the data for the UnityValueSurrogate.
+
+
+
+
+ Reads data into the UnityValueSurrogate from a specified memory location.
+
+ The memory location to read from.
+ The number of elements to read.
+
+
+
+ Writes data from the UnityValueSurrogate to a specified memory location.
+
+ The memory location to write to.
+ The number of elements to write.
+
+
+
+ Initializes the UnityValueSurrogate with a specified capacity.
+
+ The capacity to initialize the UnityValueSurrogate with.
+
+
+
+ Represents an interface for Unity value surrogates.
+ This interface provides a property for accessing and modifying the data.
+
+ The type of the data.
+
+
+
+ Gets or sets the data for the Unity value surrogate.
+
+
+
+
+ Enum representing the possible modes for adding a system to the Unity player loop.
+
+
+
+ Add the system as the first child of the parent system.
+
+
+ Add the system as the last child of the parent system.
+
+
+ Add the system before the parent system in the player loop.
+
+
+ Add the system after the parent system in the player loop.
+
+
+
+ The unique identifier for a network entity.
+
+
+
+
+ The size of the network id block in bytes.
+
+
+
+
+ IEqualityComparer interface for NetworkId objects.
+
+
+
+
+ Determines whether the specified NetworkId objects are equal.
+
+
+
+
+ Returns a hash code for the specified NetworkId object.
+
+
+
+
+ The size of the network id in bytes.
+
+
+
+
+ The alignment of the network id in bytes.
+
+
+
+
+ The IEqualityComparer for NetworkId objects.
+
+
+
+
+ The raw value of the network id.
+
+
+
+
+ Signal if the network id is valid.
+
+
+
+
+ Signal if the network id is reserved.
+
+
+
+
+ Determines whether the current NetworkId object is equal to another NetworkId object.
+
+ A NetworkId object to compare with this object.
+ true if the current object is equal to the other parameter; otherwise, false.
+
+
+
+ Compares the current NetworkId object with another NetworkId object.
+
+ A NetworkId object to compare with this object.
+ A value that indicates the relative order of the objects being compared.
+
+
+
+ Determines whether the specified object is equal to the current NetworkId object.
+
+ The object to compare with the current object.
+ true if the specified object is equal to the current object; otherwise, false.
+
+
+
+ Determines whether two NetworkId objects are equal.
+
+
+
+
+ Determines whether two NetworkId objects are not equal.
+
+
+
+
+ Converts the NetworkId object to a boolean value.
+
+
+
+
+ Writes the NetworkId to the provided NetBitBuffer.
+
+ The buffer to write the NetworkId to.
+ The NetworkId to write.
+
+
+
+ Reads a NetworkId from the provided NetBitBuffer.
+
+ The buffer to read the NetworkId from.
+ The NetworkId read from the buffer.
+
+
+
+ Writes this NetworkId to the provided NetBitBuffer.
+
+ The buffer to write this NetworkId to.
+
+
+
+ Get the hash code for this NetworkId.
+
+
+
+
+ String representation of the NetworkId.
+
+
+
+
+ String conversion specifically for use in prefixing names of GameObjects.
+
+
+
+
+ Enum representing the priority levels for network objects
+
+
+
+
+ Priority level assigned to player-related network objects.
+
+
+
+
+ High priority level, typically assigned to network objects that require frequent updates.
+
+
+
+
+ Medium priority level, typically assigned to network objects that require regular updates.
+
+
+
+
+ Low priority level, typically assigned to network objects that require less frequent updates.
+
+
+
+
+ Lowest priority level, typically assigned to network objects that require minimal updates.
+
+
+
+
+ The primary Fusion component for networked GameObject entities.
+ This stores the object's network identity and manages the object's state and input authority.
+
+
+
+
+ Delegate for determining if a network object should be replicated to a specific player.
+
+ The network object in question.
+ The player to potentially replicate to.
+ True if the object should be replicated to the player, false otherwise.
+
+
+
+ Delegate for determining the priority level of a network object for a specific player.
+
+ The network object in question.
+ The player for whom the priority level is being determined.
+ The priority level of the network object for the player.
+
+
+
+ The unique identifier for this network entity.
+
+
+
+
+ Signal that this comes from a Resume Spawn
+
+
+
+
+ The this entity is associated with.
+
+
+
+
+ Used for whenever objects need to be sorted in a deterministic order, like
+ when registering scene objects.
+
+
+
+
+ Delegate callback used to override if an object should be replicate to a client or not
+
+
+
+
+ Delegate callback used to override priority value for a specific object-player pair
+
+
+
+
+ How Object Interest is determined for this object.
+
+
+
+
+ Last tick this object received an update.
+
+
+
+
+ Flags used for network object prefabs and similar
+
+
+
+
+ The type ID for this prefab or scene object, set when adding to the prefab table and registering scene objects, respectively.
+ All spawned instances of this object will retain this value. Use for the unique ID of network entries.
+
+
+
+
+ Array of initial child nested entities, that are children of this Object.
+
+
+
+
+ Array of all s associated with this network entity.
+
+
+
+
+ The ID + Unity GameObject name for this entity.
+
+
+
+
+ Returns true while a NetworkObject is valid (after it is spawned until it is despawned).
+ While this property is true, Networked Properties and RPCs on the NetworkObject can be used.
+ Internally, the property validates whether a NetworkObject is associated with its , and that runner is not null.
+
+
+
+
+ If this object is inserted into the simulation
+
+
+
+
+ Returns if is the designated Input Source for this network entity.
+
+
+
+
+ Returns if is the designated State Source for this network entity.
+
+
+
+
+ Returns if is neither the Input nor State Source for this network entity.
+
+
+
+
+ Returns true if this object is nested in a prefab instance.
+
+
+
+
+ Returns root of this prefab instance, if this object is nested.
+
+
+
+
+ Returns the for this instance,
+ indicating what snapshot data will be used to render it.
+
+
+
+
+ Force the used to
+
+
+
+
+ Returns the for this instance,
+ indicating how snapshot data will be used to render it.
+
+
+
+
+ Returns the current interpolation time for this object
+
+
+
+
+ Returns the that has Input Authority over this network entity.
+ PlayerRefs are assigned in order from 0 to MaxPlayers-1 and are re-used as players join and leave.
+ The only caveat is that the server player (if one exists), always gets the last index no matter how many clients are connected.
+
+
+
+
+ Returns the that has State Authority over this network entity.
+ PlayerRefs are assigned in order from 0 to MaxPlayers-1 and are re-used as players join and leave.
+ The only caveat is that the server player (if one exists), always gets the last index no matter how many clients are connected.
+
+
+
+
+ Toggles if this NetworkObject is included in the , which will include the prefab in builds as a Spawnable object.
+
+
+
+
+ Awake is called when the script instance is being loaded.
+
+
+
+
+ OnDestroy is called when the script instance is being destroyed.
+
+
+
+
+ Calculates the total word count for a given NetworkObject.
+
+ The NetworkObject for which the word count is to be calculated.
+ The total word count of the NetworkObject. Returns 0 if the NetworkObject is not alive.
+ Thrown when a NetworkBehaviour reference is missing in the NetworkBehaviour array of the NetworkObject.
+
+
+
+ Gets a bitmask of flags, representing the current local authority over this .
+
+
+
+
+ Sets which has Input Authority for this Object.
+
+
+
+
+ Request state authority over this on shared mode.
+
+
+
+
+ Release the state authority over this on shared mode.
+
+
+
+
+ Removes input authority from whichever player has it for this object. Only valid when called on a Host or Server peer.
+
+
+
+
+ Converts the Network Object to it's NetworkId.
+
+ The object to convert
+ The of the object. Default if the object is not alive (null or destroyed)
+
+
+
+ Add or remove specific player interest in this NetworkObject. Only the NetworkObject State Authority can set interest.
+
+ The player to set interest for
+ If the player should always be interested in this object
+
+
+
+ Copies the entire State from another
+
+ to copy the State from
+
+
+
+ Copies the entire State from another based on the
+
+ to copy the state from
+
+
+
+ Return the .
+
+ The that is assigned to
+ The to get the ID from
+ The of the object. Default if the object is not alive (null or destroyed)
+
+
+
+ Return the .
+
+ The to get the ID from
+ The of the object. Default if the object is not alive (null or destroyed)
+
+
+
+ Return the reference on that matches the provided
+
+ The that will be used to try to find a with ID equals to
+ The to be searched
+ The found . null if the provided is not valid
+
+
+
+ Returns a string representation of the object.
+
+ The StringBuilder to append to.
+
+
+
+ Enum representing the flags for network objects in the Fusion system.
+ This enum is marked with the Flags attribute, allowing it to be treated as a bit field.
+
+
+
+
+ Represents a state where no flags are set.
+
+
+
+
+ Mask for isolating the version part of the flags.
+
+
+
+
+ Represents the first version of the network object flags.
+
+
+
+
+ Flag indicating that the network object should be ignored.
+
+
+
+
+ Shared Mode only. The current Master client always has State Authority for this object.
+ If the Master client leaves the new Master client automatically becomes the State Authority
+ for it.
+
+
+
+
+ Flag indicating that the network object should be destroyed when the state authority leaves.
+
+
+
+
+ Flag indicating that the network object allows state authority override.
+
+
+
+
+ Extension methods for the NetworkObjectFlags enum.
+
+
+
+
+ Returns the version of the flags.
+
+ The flags to get the version of.
+ The version of the flags.
+
+
+
+ Check if the flags are the current version.
+
+ The flags to check.
+ True if the flags are the current version, false otherwise.
+
+
+
+ Sets the flags to the current version.
+
+ The flags to set.
+ The flags with the version set to the current version.
+
+
+
+ Check if the flags are ignored.
+
+ The flags to check.
+ True if the flags are ignored, false otherwise.
+
+
+
+ Sets the ignored flag on the flags.
+
+ Flags to set the ignored flag on.
+ Ignored flag value.
+ The flags with the ignored flag set to the given value.
+
+
+
+ Sets the flags with the provided mask and value.
+
+ The original flags.
+ The value to be set.
+ The mask to isolate the part of the flags to be set.
+ The flags after setting the value with the mask.
+
+ This method first clears the part of the flags specified by the mask, then sets that part to the provided value.
+
+
+
+
+ NetworkObjectGuid
+
+
+
+
+ EqualityComparer for NetworkObjectGuid
+
+
+
+
+ Check if two NetworkObjectGuid are equals
+
+
+
+
+ Get the hashcode for a NetworkObjectGuid
+
+
+
+ The Size of the NetworkObjectGuid in bytes
+
+
+ The alignment of the NetworkObjectGuid
+
+
+ The Raw Guid Value of the NetworkObjectGuid
+
+
+ The default value of a NetworkObjectGuid
+
+
+
+ Create a new NetworkObjectGuid
+
+ The guid to use
+
+
+
+ Create a new NetworkObjectGuid
+
+ Data0 of the Guid
+ Data1 of the Guid
+
+
+
+ Create a NetworkObjectGuid from a byte array
+
+ The byte array to create the NetworkObjectGuid from
+
+
+
+ Create a NetworkObjectGuid from a byte*
+
+ The byte* to create the NetworkObjectGuid from
+
+
+
+ Signal if the NetworkObjectGuid is valid.
+
+
+
+
+ Implicit conversion from Guid to NetworkObjectGuid
+
+ Guid to convert from
+ NetworkObjectGuid
+
+
+
+ Implicit conversion from NetworkObjectGuid to Guid
+
+ NetworkObjectGuid to convert from
+ Guid
+
+
+
+ Try to parse a string into a NetworkObjectGuid
+
+ String to parse
+ Parsed NetworkObjectGuid
+ True if the string was parsed successfully, false otherwise
+
+
+
+ Parse a NetworkObjectGuid from a string.
+
+ The string to parse.
+ The parsed NetworkObjectGuid.
+
+
+
+ Compare two NetworkObjectGuid
+
+ True if the NetworkObjectGuid are equal, false otherwise
+
+
+
+ Compare two NetworkObjectGuid
+
+ True if the NetworkObjectGuid are not equal, false otherwise
+
+
+
+ Check if the NetworkObjectGuid is equal to another NetworkObjectGuid
+
+ The other NetworkObjectGuid to check against
+ True if the NetworkObjectGuids are equal, false otherwise
+
+
+
+ Check if the NetworkObjectGuid is equal to another object
+
+ The other object to check against
+ True if the objects are equal, false otherwise
+
+
+
+ Get the hashcode for a NetworkObjectGuid
+
+
+
+
+ Returns a string representation of the NetworkObjectGuid.
+
+
+
+
+ Returns a string representation of the NetworkObjectGuid.
+
+
+
+
+ Returns a string representation of the NetworkObjectGuid.
+
+
+
+
+ Compare the NetworkObjectGuid to another NetworkObjectGuid
+
+ The other NetworkObjectGuid to compare against
+ 0 if the NetworkObjectGuid are equal, -1 if this NetworkObjectGuid is less than the other, 1 if this NetworkObjectGuid is greater than the other
+
+
+
+ Explicit conversion from NetworkObjectGuid to NetworkPrefabRef
+
+ NetworkObjectGuid to convert from
+ NetworkPrefabRef
+
+
+
+ NetworkPrefabRef
+
+
+ A decoupled prefab reference. Internally stored as a GUID.
+
+
+
+
+ EqualityComparer for NetworkPrefabRef
+
+
+
+
+ Check if two NetworkPrefabRef are equals
+
+
+
+
+ Get the hashcode for a NetworkPrefabRef
+
+
+
+ The Size of the NetworkPrefabRef in bytes
+
+
+ The alignment of the NetworkPrefabRef
+
+
+ The Raw Guid Value of the NetworkPrefabRef
+
+
+ The default value of a NetworkPrefabRef
+
+
+
+ Create a new NetworkPrefabRef
+
+ The guid to use
+
+
+
+ Create a new NetworkPrefabRef
+
+ Data0 of the Guid
+ Data1 of the Guid
+
+
+
+ Create a NetworkPrefabRef from a byte array
+
+ The byte array to create the NetworkPrefabRef from
+
+
+
+ Create a NetworkPrefabRef from a byte*
+
+ The byte* to create the NetworkPrefabRef from
+
+
+
+ Signal if the NetworkPrefabRef is valid.
+
+
+
+
+ Implicit conversion from Guid to NetworkPrefabRef
+
+ Guid to convert from
+ NetworkPrefabRef
+
+
+
+ Implicit conversion from NetworkPrefabRef to Guid
+
+ NetworkPrefabRef to convert from
+ Guid
+
+
+
+ Try to parse a string into a NetworkPrefabRef
+
+ String to parse
+ Parsed NetworkPrefabRef
+ True if the string was parsed successfully, false otherwise
+
+
+
+ Parse a NetworkPrefabRef from a string.
+
+ The string to parse.
+ The parsed NetworkPrefabRef.
+
+
+
+ Compare two NetworkPrefabRef
+
+ True if the NetworkPrefabRef are equal, false otherwise
+
+
+
+ Compare two NetworkPrefabRef
+
+ True if the NetworkPrefabRef are not equal, false otherwise
+
+
+
+ Check if the NetworkPrefabRef is equal to another NetworkPrefabRef
+
+ The other NetworkPrefabRef to check against
+ True if the NetworkPrefabRefs are equal, false otherwise
+
+
+
+ Check if the NetworkPrefabRef is equal to another object
+
+ The other object to check against
+ True if the objects are equal, false otherwise
+
+
+
+ Get the hashcode for a NetworkPrefabRef
+
+
+
+
+ Returns a string representation of the NetworkPrefabRef.
+
+
+
+
+ Returns a string representation of the NetworkPrefabRef.
+
+
+
+
+ Returns a string representation of the NetworkPrefabRef.
+
+
+
+
+ Compare the NetworkPrefabRef to another NetworkPrefabRef
+
+ The other NetworkPrefabRef to compare against
+ 0 if the NetworkPrefabRef are equal, -1 if this NetworkPrefabRef is less than the other, 1 if this NetworkPrefabRef is greater than the other
+
+
+
+ Explicit conversion from NetworkPrefabRef to NetworkObjectGuid
+
+ NetworkPrefabRef to convert from
+ NetworkObjectGuid
+
+
+
+ Enum representing various flags for a network object header.
+ Each flag represents a different state or property of a network object.
+
+
+
+
+ Flag indicating that the object is of global interest.
+
+
+
+
+ Flag indicating that the object should be destroyed when the state authority leaves.
+
+
+
+
+ Flag indicating that the object was spawned by a client.
+
+
+
+
+ Flag indicating that the state authority override is allowed.
+
+
+
+
+ Flag indicating that the object has no prefab. (Mainly internal data).
+
+
+
+
+ Flag indicating that the object is an array of structs.
+
+
+
+
+ Flag indicating that the object should not be destroyed on load.
+
+
+
+
+ Flag indicating that the object has a main network TRSP.
+
+
+
+
+ Flag indicating that the object is in an area of interest.
+
+
+
+
+ Represents a pointer to a NetworkObjectHeader.
+ This struct is unsafe because it uses pointers.
+
+
+
+
+ Represents a pointer to a NetworkObjectHeader.
+ This struct is unsafe because it uses pointers.
+
+
+
+
+ Pointer to a NetworkObjectHeader.
+
+
+
+
+ Gets the Type of the NetworkObjectHeader this struct points to.
+
+
+
+
+ Gets the Id of the NetworkObjectHeader this struct points to.
+
+
+
+
+
+
+
+
+
+ Network object header information for a .
+
+
+
+
+ Network object header information for a .
+
+
+
+
+ The size of the NetworkObjectHeader in bytes.
+
+
+
+
+ The size of the NetworkObjectHeader in words.
+
+
+
+
+ The word index of the player data in the NetworkObjectHeader.
+
+
+
+
+ The unique identifier of the network object.
+
+
+
+
+ The size of the network object's data in words.
+
+
+
+
+ The number of behaviours in the network object.
+
+
+
+
+ The type identifier of the network object.
+
+
+
+
+ The unique identifier of the root network object in the nesting hierarchy.
+
+
+
+
+ The nesting key of the network object.
+
+
+
+
+ The flags indicating various states or properties of the network object.
+
+
+
+
+ The player reference who has input authority over the network object.
+
+
+
+
+ The player reference who has state authority over the network object.
+
+
+
+
+ The unique data for each player.
+
+
+
+
+ Reserved space for future use.
+
+
+
+
+ The size of the network object's data in bytes.
+
+
+
+
+ Returns a pointer to the data of a NetworkObjectHeader.
+
+ Pointer to the NetworkObjectHeader.
+ Pointer to the data of the NetworkObjectHeader.
+
+
+
+ Returns the count of data words in a NetworkObjectHeader.
+
+ Pointer to the NetworkObjectHeader.
+ The count of data words in the NetworkObjectHeader.
+
+
+
+ Returns a pointer to the array of behaviour change ticks in a NetworkObjectHeader.
+
+ Pointer to the NetworkObjectHeader.
+ Pointer to the array of behaviour change ticks in the NetworkObjectHeader.
+
+
+
+ Checks if a NetworkObjectHeader has a main network TRSP.
+
+ Pointer to the NetworkObjectHeader.
+ True if the NetworkObjectHeader has a main network TRSP, false otherwise.
+
+
+
+ Returns a pointer to the main network TRSP data of a NetworkObjectHeader, if it exists.
+
+ Pointer to the NetworkObjectHeader.
+ Pointer to the main network TRSP data of the NetworkObjectHeader if it exists, null otherwise.
+
+
+
+ The string representation of the NetworkObjectHeader.
+
+
+
+
+ Checks if the current instance of NetworkObjectHeader is equal to another instance of the same type.
+
+
+
+
+ Checks if the current instance of NetworkObjectHeader is equal to another object.
+
+
+
+
+ Generates a hash code for the current instance of NetworkObjectHeader.
+
+
+
+
+ Determines if two instances of NetworkObjectHeader are equal.
+
+ True if the instances are equal; otherwise, false.
+
+
+
+ Determines if two instances of NetworkObjectHeader are not equal.
+
+ True if the instances are not equal; otherwise, false.
+
+
+
+ Compute the CRC of this Object Snapshot
+
+
+
+
+ Interface for initializing network objects.
+
+
+
+
+ Initializes the network object.
+
+ The network object to initialize.
+
+
+
+ Initializes network objects for Unity.
+
+
+
+
+ Initializes the network object.
+
+ The network object to initialize.
+
+
+
+ Meta information about a network object.
+
+
+
+ The flags indicating various states or properties of the network object.
+
+
+ Get the NetworkObjectTypeId of this object.
+
+
+ Get the NetworkId of this object.
+
+
+ Get the NetworkId of the root object in the nesting hierarchy.
+
+
+ The nesting key of the network object.
+
+
+ Get the Player that has state authority over this object.
+
+
+ Get the Player that has input authority over this object.
+
+
+
+ A key used to identify a network object nesting.
+
+
+
+
+ Implements the IEqualityComparer interface.
+
+
+
+
+ Determines whether two NetworkObjectNestingKey objects are equal.
+
+
+
+
+ Returns a hash code for the specified NetworkObjectNestingKey.
+
+
+
+ The size of the NetworkObjectNestingKey in bytes.
+
+
+ The alignment of the NetworkObjectNestingKey in bytes.
+
+
+ The value of the NetworkObjectNestingKey.
+
+
+
+ Checks if the NetworkObjectNestingKey is none.
+
+ True if the value of the NetworkObjectNestingKey is 0; otherwise, false.
+
+
+
+ Checks if the NetworkObjectNestingKey is valid.
+
+ True if the value of the NetworkObjectNestingKey is greater than 0; otherwise, false.
+
+
+
+ Initializes a new instance of the NetworkObjectNestingKey struct with a specified value.
+
+ The value of the NetworkObjectNestingKey.
+
+
+
+ Checks if the current instance of NetworkObjectNestingKey is equal to another instance of the same type.
+
+ An instance of NetworkObjectNestingKey to compare with the current instance.
+ True if the current instance is equal to the other parameter; otherwise, false.
+
+
+
+ Checks if the current instance of NetworkObjectNestingKey is equal to another object.
+
+ An object to compare with the current instance.
+ True if the current instance is equal to the obj parameter; otherwise, false.
+
+
+
+ Serves as the default hash function.
+
+ A hash code for the current object.
+
+
+
+ Returns a string that represents the current object.
+
+ A string that represents the current object.
+
+
+
+ Interface which defines the handlers for Spawn() and Despawn() actions.
+ Passing an instance of this interface to
+ as the argument value will assign that instance
+ as the handler for runner Spawn() and Despawn() actions.
+ By default (if == null) actions will use Instantiate(), and Despawn() actions will use Destroy().
+
+
+
+
+ Acquires an instance of a prefab for a network object.
+
+ The NetworkRunner that manages the network objects.
+ The context that provides information for acquiring the prefab instance.
+ The acquired NetworkObject instance.
+ A NetworkObjectAcquireResult indicating the result of the operation.
+
+
+
+ Releases an instance of a network object.
+
+ The NetworkRunner that manages the network objects.
+ The context that provides information for releasing the network object instance.
+
+
+
+ Translates guid into prefab id.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Represents the context for acquiring a prefab instance for a network object.
+ This struct is unsafe because it uses pointers.
+
+
+
+
+ The identifier of the prefab.
+
+
+
+
+ The metadata of the network object.
+
+
+
+
+ Indicates whether the operation is synchronous.
+
+
+
+
+ Indicates whether the network object should not be destroyed on load.
+
+
+
+
+ Initializes a new instance of the NetworkPrefabAcquireContext struct with the specified parameters.
+
+ The identifier of the prefab.
+ The metadata of the network object.
+ Indicates whether the operation is synchronous.
+ Indicates whether the network object should not be destroyed on load.
+
+
+
+ Checks if the Header is not null.
+
+ True if the Header is not null; otherwise, false.
+
+
+
+ Gets the data pointer to the first word of this NetworkObject's data block.
+
+ Data pointer to the first word of this NetworkObject's data block or null, if data is not yet allocated.
+
+
+
+ Represents the context for releasing a network object.
+ This struct is unsafe because it uses pointers.
+
+
+
+
+ The network object to be released.
+
+
+
+
+ The type identifier of the network object.
+
+
+
+
+ Indicates whether the network object is being destroyed.
+
+
+
+
+ Indicates whether the network object is a nested object.
+
+
+
+
+ Initializes a new instance of the NetworkObjectReleaseContext struct with the specified parameters.
+
+ The network object to be released.
+ The type identifier of the network object.
+ Indicates whether the network object is being destroyed.
+ Indicates whether the network object is a nested object.
+
+
+
+ Returns a string that represents the current object.
+
+ A string that represents the current object.
+
+
+
+ Enum representing the possible results of acquiring a prefab instance for a network object.
+
+
+
+ Indicates that the prefab instance was successfully acquired.
+
+
+ Indicates that the acquisition of the prefab instance failed.
+
+
+ Indicates that the acquisition of the prefab instance should be retried.
+
+
+ Indicates that the acquisition of the prefab instance should be ignored.
+
+
+
+ A dummy implementation of the INetworkObjectProvider interface.
+ This class is used for testing purposes and throws a NotImplementedException for all its methods.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This class is used to compare two NetworkObject instances based on their SortKey.
+ It implements the IComparer interface.
+
+
+
+
+ An instance of the NetworkObjectSortKeyComparer class.
+
+
+
+
+ Compares two NetworkObject instances based on their SortKey.
+
+ The first NetworkObject to compare.
+ The second NetworkObject to compare.
+
+ A signed integer that indicates the relative values of x and y.
+
+
+
+
+ Enum representing the type of a NetworkObject.
+
+
+
+
+ Represents a NetworkObject that is a Prefab.
+
+
+
+
+ Represents a NetworkObject that is a Custom type.
+
+
+
+
+ Represents a NetworkObject that is an InternalStruct.
+
+
+
+
+ Represents a NetworkObject that is a SceneObject.
+
+
+
+
+ Represents an Invalid NetworkObject type.
+
+
+
+
+ ID for a Prefab which has been cataloged in a .
+
+
+
+
+ Comparer
+
+
+
+
+ Checks if two NetworkObjectTypeId instances are equal.
+
+
+
+
+ Gets the hash code of a NetworkObjectTypeId instance.
+
+ The NetworkObjectTypeId instance.
+
+
+ Represents the size of a NetworkObjectTypeId in bytes.
+
+
+ Represents the alignment of a NetworkObjectTypeId in memory.
+
+
+ Represents the maximum number of SceneObjects that can be represented by a NetworkObjectTypeId.
+
+
+ An instance of the NetworkObjectTypeId EqualityComparer class.
+
+
+ Represents a NetworkObjectTypeId for the PlayerData.
+
+
+ Gets the kind of the NetworkObjectTypeId.
+
+
+
+ Creates a NetworkObjectTypeId from a SceneRef, an object index, and an optional NetworkSceneLoadId.
+
+ The SceneRef to use.
+ The object index to use.
+ The NetworkSceneLoadId to use. Defaults to default(NetworkSceneLoadId).
+
+ A NetworkObjectTypeId that represents a SceneObject with the given SceneRef, object index, and NetworkSceneLoadId.
+
+ Thrown when the provided SceneRef is not valid.
+ Thrown when the provided object index is out of range.
+
+
+
+ Creates a NetworkObjectTypeId from a NetworkSceneObjectId.
+
+
+
+
+
+
+ Gets the NetworkSceneObjectId representation of the NetworkObjectTypeId assuming it is a SceneObject.
+
+
+ The NetworkSceneObjectId representation of the NetworkObjectTypeId.
+
+ Thrown when the NetworkObjectTypeId is not a SceneObject.
+
+
+
+ Creates a NetworkObjectTypeId from a NetworkPrefabId.
+
+ The NetworkPrefabId to use.
+
+ A NetworkObjectTypeId that represents a Prefab with the given NetworkPrefabId.
+
+ Thrown when the provided NetworkPrefabId is not valid.
+
+
+
+ Gets the NetworkPrefabId representation of the NetworkObjectTypeId assuming it is a Prefab.
+
+
+ The NetworkPrefabId representation of the NetworkObjectTypeId.
+
+ Thrown when the NetworkObjectTypeId is not a Prefab.
+
+
+
+ Creates a NetworkObjectTypeId from a raw uint value representing a Custom type.
+
+ The raw uint value to use.
+
+ A NetworkObjectTypeId that represents a Custom type with the given raw value.
+
+
+
+
+ Gets the raw uint value representation of the NetworkObjectTypeId assuming it is a Custom type.
+
+
+ The raw uint value representation of the NetworkObjectTypeId.
+
+ Thrown when the NetworkObjectTypeId is not a Custom type.
+
+
+
+ Creates a NetworkObjectTypeId from a ushort value representing an InternalStruct type.
+
+ The ushort value to use.
+
+ A NetworkObjectTypeId that represents an InternalStruct type with the given ushort value.
+
+
+
+
+ Gets the ushort value representation of the NetworkObjectTypeId assuming it is an InternalStruct type.
+
+
+ The ushort value representation of the NetworkObjectTypeId.
+
+ Thrown when the NetworkObjectTypeId is not an InternalStruct type.
+
+
+ Represents the first part of the value of a NetworkObjectTypeId.
+
+
+ Represents the second part of the value of a NetworkObjectTypeId.
+
+
+
+ Checks if the NetworkObjectTypeId is invalid.
+
+
+
+
+ Checks if the NetworkObjectTypeId is valid.
+
+
+
+
+ Checks if the NetworkObjectTypeId is a SceneObject.
+
+
+
+
+ Checks if the NetworkObjectTypeId is a Prefab.
+
+
+
+
+ Checks if the NetworkObjectTypeId is an InternalStruct.
+
+
+
+
+ Checks if the NetworkObjectTypeId is a Custom type.
+
+
+
+
+ Checks if the current NetworkObjectTypeId instance is equal to another NetworkObjectTypeId instance.
+
+ The other NetworkObjectTypeId instance to compare with the current instance.
+
+
+
+ Generates a hash code for the current NetworkObjectTypeId instance.
+
+
+
+
+ Determines whether the specified object is equal to the current NetworkObjectTypeId instance.
+
+ The object to compare with the current NetworkObjectTypeId instance.
+
+
+
+ Returns a string that represents the current NetworkObjectTypeId instance.
+
+
+
+ Determines whether two NetworkObjectTypeId instances are equal.
+
+
+ Determines whether two NetworkObjectTypeId instances are not equal.
+
+
+
+ Converts a NetworkPrefabId instance to a NetworkObjectTypeId instance.
+
+ The NetworkPrefabId instance to convert.
+
+ A NetworkObjectTypeId instance that represents a Prefab with the given NetworkPrefabId.
+
+
+
+
+ Interface for a network asset source.
+
+ Type of the network asset.
+
+
+
+ Acquires the network asset.
+
+ If true, the acquisition is done synchronously.
+
+
+
+ Releases the network asset.
+
+
+
+
+ Waits for the result of the network asset acquisition.
+
+ The network asset.
+
+
+
+ Checks if the network asset acquisition is completed.
+
+
+
+
+ Gets the description of the network asset.
+
+
+
+
+ Interface for a network prefab source.
+
+
+
+
+ Gets the GUID of the network object asset.
+
+
+
+
+ This class represents the data for a network object prefab.
+
+
+
+
+ The unique identifier for the network object.
+
+
+
+
+ ID for a Prefab which has been cataloged in a .
+
+
+
+
+ Equality comparer for NetworkPrefabId.
+
+
+
+
+ Checks if two NetworkPrefabId are equal.
+
+
+
+
+ Gets the hash code of a NetworkPrefabId.
+
+
+
+
+ The size of a NetworkPrefabId.
+
+
+
+
+ The alignment of a NetworkPrefabId.
+
+
+
+
+ The maximum index value of a NetworkPrefabId.
+
+
+
+
+ The raw value of the NetworkPrefabId.
+
+
+
+
+ Checks if the NetworkPrefabId is none.
+
+
+
+
+ Checks if the NetworkPrefabId is valid.
+
+
+
+
+ Converts the NetworkPrefabId to an index.
+
+
+
+
+ Creates a NetworkPrefabId from an index.
+
+
+
+
+ Creates a NetworkPrefabId from a raw value.
+
+
+
+
+ Checks if the NetworkPrefabId is equal to another NetworkPrefabId.
+
+
+
+
+ Checks if the NetworkPrefabId is equal to another object.
+
+
+
+
+ Gets the hash code of the NetworkPrefabId.
+
+
+
+
+ Converts the NetworkPrefabId to a string.
+
+
+
+
+ Compares the NetworkPrefabId to another object.
+
+
+
+
+ Converts the NetworkPrefabId to a string with optional brackets and prefix.
+
+
+
+
+ Checks if two NetworkPrefabId are equal.
+
+
+
+
+ Checks if two NetworkPrefabId are not equal.
+
+
+
+
+ Compares the NetworkPrefabId to another NetworkPrefabId.
+
+
+
+
+ Enum representing the possible results of attempting to get a prefab from the NetworkPrefabTable.
+
+
+
+
+ The prefab was successfully retrieved.
+
+
+
+
+ The retrieval of the prefab is in progress.
+
+
+
+
+ The prefab was not found in the NetworkPrefabTable.
+
+
+
+
+ There was an error in loading the prefab.
+
+
+
+
+ Class representing a table of network prefabs.
+
+
+
+
+ Options for the NetworkPrefabTable.
+
+
+
+
+ All prefab sources.
+
+
+
+
+ Acquired prefabs mask.
+
+
+
+
+ Data about acquired prefabs. Only indices matched by are valid.
+
+
+
+
+ Translates guid to index in .
+
+
+
+
+ Incremented every time a change occurs.
+
+
+
+
+ All prefab sources.
+
+
+
+
+ Prefab table version. Incremented every time a change occurs.
+
+
+
+
+ Returns all entries in the table.
+
+
+
+
+ Adds a prefab source to the table.
+
+ Prefab source to add.
+ Thrown if a prefab source with the same guid already exists.
+
+
+
+ Tries to add a prefab source to the table.
+
+ Prefab source to add.
+ Id of the prefab source.
+ True if the prefab source was added, false otherwise.
+ Thrown if is null.
+
+
+
+ Gets a prefab source by guid.
+
+ Guid of the prefab source.
+ The prefab source, or default if not found.
+
+
+
+ Gets a prefab source by id.
+
+ Id of the prefab source.
+ The prefab source, or default if not found.
+
+
+
+ Gets a prefab id by guid.
+
+ Guid of the prefab source.
+ The prefab id, or default if not found.
+
+
+
+ Gets a prefab guid by id.
+
+ Id of the prefab source.
+ The prefab guid, or default if not found.
+
+
+
+ Get the instance count of a prefab id.
+
+ Id of the prefab.
+ The instance count, or 0 if not found.
+
+
+
+ Add an instance of a prefab id.
+
+ Id of the prefab.
+ The new instance count, or 0 if not found.
+
+
+
+ Remove an instance of a prefab id.
+
+ Id of the prefab.
+ The new instance count, or 0 if not found.
+
+
+
+ Returns true if the prefab table contains a prefab with the given id.
+
+ Id of the prefab.
+ True if the prefab table contains a prefab with the given id.
+
+
+
+ Signal if a prefab id has been acquired.
+
+ Id of the prefab.
+ True if the prefab id has been acquired.
+
+
+
+ Load a prefab by id.
+
+ Id of the prefab.
+ If true, the load will be synchronous.
+ The loaded prefab, or null if not found.
+
+
+
+ Unload a prefab by id.
+
+ Id of the prefab.
+ True if the prefab was unloaded, false otherwise.
+
+
+
+ Unload all unreferenced prefabs.
+
+ If true, incomplete loads will be unloaded as well.
+ The number of prefabs unloaded.
+
+
+
+ Unload all prefabs.
+
+
+
+
+ Clear the prefab table.
+
+
+
+
+ Options for the NetworkPrefabTable.
+
+
+
+
+ If true, prefabs will be unloaded when the last instance is released.
+
+
+
+
+ If true, all prefabs will be unloaded on shutdown.
+
+
+
+
+ Default options.
+
+
+
+
+ Provides constants and methods for managing authority masks.
+
+
+
+
+ Constant representing the state authority mask.
+
+
+
+
+ Constant representing the input authority mask.
+
+
+
+
+ Constant representing the proxy authority mask.
+
+
+
+
+ Constant representing no authority.
+
+
+
+
+ Constant representing all authorities.
+
+
+
+
+ Creates an authority mask based on the provided state and input flags.
+
+ If true, the state authority is included in the mask.
+ If true, the input authority is included in the mask.
+ An integer representing the created authority mask.
+
+
+
+ Flags a method as being a networked Remote Procedure Call.
+ Only usable in a NetworkBehaviour.
+ Calls to this method (from the indicated allowed ) will generate a network message,
+ which will execute the method remotely on the indicated .
+ The RPC method can include an empty argument, that will include meta information about the RPC on the receiving peer.
+ Example:
+
+ | [Rpc(RpcSources.All, RpcTargets.All, InvokeLocal = false, Channel = RpcChannel.Reliable, TickAligned = true)]
+ | public void RPC_Configure(NetworkObject no, string name, Color color, RpcInfo info = default) { }
+
+ To target a specific Player, use the :
+
+ | [Rpc]
+ | public void RpcFoo([RpcTarget] PlayerRef targetPlayer) {}
+
+ Use as a return value to access meta information about the RPC send attempt, such as failure to send reasons, message size, etc.
+
+ Non-static RPCs are only valid on a .
+ Static RPCs can be implemented on s, and do not require a instance.
+ Static RPC require the first argument to be NetworkRunner.
+
+ Static RPC Example:
+
+ | [Rpc]
+ | public static void RPC_Configure(NetworkRunner runner) { }
+
+
+
+
+
+ The legal types that can trigger this Rpc. Cast to int.
+ Default value is (int).
+
+
+
+
+ The types that will receive and invoke this method. Cast to int.
+ Default value is (int).
+
+
+
+
+ Indicates if the method should be called locally (on the RPC caller). This happens immediately.
+ Default value is true.
+
+
+
+
+ Specifies which RpcChannel to use.
+ Default value is
+
+
+
+
+ Indicates if this RPC's execution will be postponed until the local simulation catches up with the sender's Tick number.
+ Even if set to false, the order of Rpcs is always preserved. Rpcs are deferred until all preceding Rpcs have
+ executed.
+ Default value is true.
+
+
+
+
+ Options for when the game is run in mode and RPC is invoked by the host.
+
+
+
+
+ Constructor for RpcAttributes.
+
+
+
+
+ Constructor for RpcAttributes.
+
+ The legal types that can trigger this Rpc. Default is
+ The types that will receive and invoke this method. Default is
+
+
+
+ Maximum allowed size for the payload of the RPC message.
+
+
+
+
+ Flags for the RPC channel.
+
+
+
+
+ Rpc order preserved, delivery verified, resend in case of a failed delivery.
+
+
+
+
+ Rpc order preserved, delivery not verified, no resend attempts.
+
+
+
+
+ Header for RPC messages.
+
+
+
+
+ The size of the RpcHeader structure in bytes.
+
+
+
+
+ The NetworkId of the object associated with the RPC message.
+
+
+
+
+ The behaviour associated with the RPC message.
+
+
+
+
+ The method associated with the RPC message.
+
+
+
+
+ Writes the RpcHeader to the provided byte pointer.
+
+ The RpcHeader to write.
+ The byte pointer to write the RpcHeader to.
+ Returns the size of the RpcHeader structure in bytes.
+
+
+
+ Reads the size of the RpcHeader from the provided byte pointer.
+
+ The byte pointer to read the RpcHeader size from.
+ Returns the size of the RpcHeader structure in bytes.
+
+
+
+ Reads the RpcHeader from the provided byte pointer.
+
+ The byte pointer to read the RpcHeader from.
+ The size of the RpcHeader structure in bytes.
+ Returns the RpcHeader read from the byte pointer.
+
+
+
+ Creates a new RpcHeader with the provided NetworkId, behaviour, and method.
+
+ The NetworkId of the object associated with the RPC message.
+ The behaviour associated with the RPC message.
+ The method associated with the RPC message.
+ Returns a new RpcHeader with the provided parameters.
+
+
+
+ Creates a new RpcHeader with the provided staticRpcKey.
+
+ The staticRpcKey associated with the RPC message.
+ Returns a new RpcHeader with the provided staticRpcKey.
+
+
+
+ Returns a string that represents the current RpcHeader.
+
+ Returns a string that represents the current RpcHeader.
+
+
+
+ Options for when the game is run in mode and RPC is invoked by the host.
+
+
+
+
+ If host invokes RPC will be set to (default).
+
+
+
+
+ If host invokes RPC will be set to the host's local player.
+
+
+
+
+ RpcInfo is a struct that contains information about the RPC message.
+
+
+
+
+ Represents the tick at which the RPC message was sent.
+
+
+
+
+ Represents the player who sent the RPC message.
+
+
+
+
+ Represents the channel through which the RPC message was sent.
+
+
+
+
+ Indicates whether the RPC message is invoked locally.
+
+
+
+
+ Creates a new RpcInfo instance for a local RPC message.
+
+ The NetworkRunner associated with the RPC message.
+ The RpcChannel through which the RPC message was sent.
+ The RpcHostMode of the RPC message.
+ Returns a new RpcInfo instance with the provided parameters.
+
+
+
+ Creates a new RpcInfo instance from a SimulationMessage.
+
+ The NetworkRunner associated with the RPC message.
+ The SimulationMessage from which to create the RpcInfo instance.
+ The RpcHostMode of the RPC message.
+ Returns a new RpcInfo instance with the provided parameters.
+
+
+
+ Returns a string that represents the current RpcInfo.
+
+ Returns a string that represents the current RpcInfo.
+
+
+
+ Represents the data required to invoke an RPC message.
+
+
+
+ Represents the key associated with the RPC message.
+
+
+ Represents the sources of the RPC message.
+
+
+ Represents the targets of the RPC message.
+
+
+ Represents the delegate to be invoked for the RPC message.
+
+
+
+ Returns a string that represents the current RpcInvokeData.
+
+ Returns a string that represents the current RpcInvokeData.
+
+
+
+ Represents a delegate that can be invoked by an RPC message.
+
+ The NetworkBehaviour associated with the RPC message.
+ The SimulationMessage associated with the RPC message.
+
+ The RpcInvokeDelegate is used to invoke an RPC message. The delegate is invoked by the RpcSystem
+ when an RPC message is received. The delegate is invoked with the NetworkBehaviour associated with
+ the RPC message and the SimulationMessage associated with the RPC message.
+
+
+
+
+ May be used as an optional return value. Contains meta data about the RPC send, such as failure to send reasons, culling, message size, etc.
+ Example:
+
+ | [Rpc]
+ | public RpcInvokeInfo RpcFoo(int value) {
+ | return default;
+ | }
+ |
+ | public override void FixedUpdateNetwork() {
+ | var info = RpcFoo();
+ | Debug.Log(info);
+ | }
+
+
+
+
+ Represents the result of the local RPC invocation.
+
+
+ Represents the result of the RPC message send operation.
+
+
+ Contains detailed information about the RPC send operation result.
+
+
+
+ Returns a string that represents the current RpcInvokeInfo.
+
+
+
+
+ Results for the local RPC Invocation of the RPC method.
+
+
+
+
+ RPC has been invoked locally.
+
+
+
+
+ Not invoked locally because is false.
+
+
+
+
+ Not invoked locally because simulation stage is
+
+
+
+
+ Not invoked because source current authority does not match flags set in
+
+
+
+
+ Not invoked because target player is local and this current authority does not match flags set in
+
+
+
+
+ Not invoked because target player is not local.
+
+
+
+
+ RPC is too large. See for the maximum allowed size.
+
+
+
+
+
+
+
+
+
+ Results for the RPC message send operation. Note: Some individual targets may be culled even if the send operation succeeds.
+ Information about culled targets can be found in .
+
+
+
+
+ RPC has been sent. Check for details.
+
+
+
+
+ Send culled because is false.
+
+
+
+
+ Send culled because source current authority does not match flags set in
+
+
+
+
+ Send culled because there are no active connections.
+
+
+
+
+ Send culled because target player does not exist.
+
+
+
+
+ Send culled because target player is local and is false.
+
+
+
+
+ RPC message size is too large to be sent. See for the maximum allowed size.
+
+
+
+
+ RPC send operation result information.
+
+
+
+
+ Result flags for the RPC send operation.
+
+
+
+
+ The size of the RPC message.
+
+
+
+
+ Returns a string that represents the current RpcSendResult.
+
+
+
+
+ Enum representing the sources of an RPC message.
+
+
+
+
+ Represents the state authority source of an RPC message.
+
+
+
+
+ Represents the input authority source of an RPC message.
+
+
+
+
+ Represents the proxy source of an RPC message.
+
+
+
+
+ Represents all possible sources of an RPC message.
+
+
+
+
+ Represents a delegate that can be invoked by an RPC message.
+
+ The NetworkRunner associated with the RPC message.
+ The SimulationMessage associated with the RPC message.
+
+ The RpcInvokeDelegate is used to invoke an RPC message. The delegate is invoked by the RpcSystem
+ when an RPC message is received. The delegate is invoked with the NetworkRunner associated with
+ the RPC message and the SimulationMessage associated with the RPC message.
+
+
+
+
+ RPC attribute used to indicate a specific target player for an RPC when sending from one player to another.
+ RPC is sent to the server, and then is forwarded to the specified player.
+ Usage:
+
+ | [Rpc]
+ | public void RpcFoo([RpcTarget] PlayerRef targetPlayer) { }
+
+
+
+
+ RPC Attribute constructor.
+
+
+
+ Enum representing the targets of an RPC message.
+
+
+
+
+ Represents the state authority target of an RPC message.
+
+
+
+
+ Represents the input authority target of an RPC message.
+
+
+
+
+ Represents the proxy target of an RPC message.
+
+
+
+
+ Represents all possible targets of an RPC message.
+
+
+
+
+ Enum representing the status of an RPC target.
+
+
+
+
+ Represents an unreachable RPC target.
+
+
+
+
+ Represents the RPC target as self.
+
+
+
+
+ Represents a remote RPC target.
+
+
+
+
+ Project configuration settings specific to how the Host Migration behaves.
+
+
+
+
+ Enabled the Host Migration feature
+
+
+
+
+ Delay between Host Migration Snapshot updates
+
+
+
+
+ Transitory Holder with all necessary information to restart the Fusion Runner
+ after the Host Migration has completed
+
+
+
+
+ New GameMode the local peer will assume after the Host Migration
+
+
+
+
+ Represents a Server or Client Simulation. IMPORTANT: You can only use a NetworkRunner once. Once that NetworkRunner
+ disconnects from a game session or fails to connect it should be destroyed, and a new Network Runner instance should
+ be created to start any new game sessions. For more information see the
+ Online Manual.
+
+
+
+
+ if this instance is a resume (host migration)
+
+
+
+
+ Compute and send a Host Migration Snapshot to the Photon Cloud
+
+ Task with the result of the operation. True if it was successful, false otherwise.
+
+
+
+ Iterate over the old NetworkObjects from the Resume Snapshot
+
+ Iterable list of
+
+
+
+ Iterate over the Scene NetworkObjects from the Resume Snapshot while giving the reference of the old
+ Snapshot data associated with that particular Scene Object
+
+ Iterable list of Scene and Scene Object Header
+
+
+
+ Temporary Host Migration Snapshot data buffer
+
+
+
+
+ Temporary Host Migration Snapshot Data buffer size
+
+
+
+
+ Gets a temporary representation of a from the old Server Snapshot
+
+
+
+
+ Setup Host Migration information
+
+ Host Migration info
+
+
+
+ Start the Host Migration process
+
+ Base Snapshot to be used when restarting the Host
+
+
+
+ Signal the Host Migration process has started
+
+
+
+
+ Try to send a Host Snapshot to Plugin
+
+
+
+
+ Get the Snapshot Host Migration Data
+
+ True if the snapshot was properly captured
+
+
+
+ Enumeration of Fusion.Runtime.dll options.
+
+
+
+
+ Use the Debug version of the Fusion.Runntime.dll.
+
+
+
+
+ Use the Debug version of the Fusion.Runntime.dll.
+
+
+
+
+ Initialization stages of Fusion
+
+
+
+
+ Runner is about to start
+
+
+
+
+ Runner is running
+
+
+
+
+ Runner is shutdown
+
+
+
+
+ Get Fusion.Runtime.dll build type.
+
+
+
+
+ Delegate type for on before spawned callback
+
+
+
+
+ Delegate type for object callback
+
+
+
+
+ Delegate type for event.
+
+
+
+
+ Event for object acquired
+
+
+
+
+ Event raised when [Networked] property of or has a valid underlying , but
+ the simulation is unable to find an instance, e.g. due to AoI. In such case, a property will return null.
+
+
+
+
+ Stores the Shutdown parameters used when requesting a Shutdown from inside a Runner Callback
+
+
+
+
+ Is the runner updating the simulation.
+
+
+
+
+ Completion Source for the startup Photon Cloud Operations
+
+
+
+
+ Check if the Runner was properly Initialized
+
+
+
+
+ Signal if the OnGameStarted was invoked already
+
+
+
+
+ A queue of simulation behaviours that were attached to the runner by AddGlobal and implement the ISpawned interface.
+ But the spawned call is delayed to when the RuntimeConfig is ready.
+
+
+
+
+ Indicates if this is collecting .
+
+
+
+
+ The current topology used
+
+
+
+
+ Returns the for this .
+
+
+
+
+ Returns the flags for The type of network peer the associated represents.
+
+
+
+
+ Returns the current stage of this .
+
+
+
+
+ Returns the fixed tick time interval. Derived from the .
+
+
+
+
+ The time the current State represents (the most recent FixedUpdateNetwork simulation).
+ Use as an equivalent to Unity's Time.fixedTime.
+ Time is relative to Tick 0 (which represents Time 0f).
+
+
+
+
+ The current time (current State.Time + Simulation.DeltaTime) for predicted objects (objects in the local time frame).
+ Use as an equivalent to Unity's Time.time.
+ Time is relative to Tick 0 (which represents Time 0f).
+
+
+
+
+ The current time (current State.Time + Simulation.DeltaTime) for non-predicted objects (objects in a remote time frame).
+ Use as an equivalent to Unity's Time.time.
+ Time is relative to Tick 0 (which represents Time 0f).
+
+
+
+
+ Returns if this is valid and running.
+
+
+
+
+ If the runner is shutdown
+
+
+
+
+ Has the shutdown been deferred.
+
+
+
+
+ Are we dealing with a regular, planned shutdown.
+
+
+
+
+ Get the local time alpha value
+
+
+
+
+ Get the latest confirmed tick of the server we are aware of
+
+
+
+
+ If the runner is pending to start
+
+
+
+
+ Returns if this represents a Client connection.
+
+
+
+
+ Returns if this Client is currently connected to a Remote Server
+
+
+
+
+ Returns if this represents a Server connection.
+
+
+
+
+ Returns true if this runner represents a Client or Host. Dedicated servers have no local player and will return false.
+
+
+
+
+ Returns true if this runner was started as single player (Started as with = 1).
+
+
+
+
+ If this is the last tick that is being executed this update
+
+
+
+
+ If this is the first tick that executes this update or re-simulation
+
+
+
+
+ If this is not a re-simulation but a new forward tick
+
+
+
+
+ If we are currently executing a client side prediction re-simulation.
+
+
+
+
+
+
+
+
+
+ The current state of the runner, if it's Starting, Running, Shutdown
+
+
+
+
+ Returns a for the local simulation. For a dedicated server will equal false.
+ PlayerRefs are assigned in order from 0 to MaxPlayers-1 and are re-used as players join and leave.
+ The only caveat is that the server player (if one exists), always gets the last index no matter how many clients are connected.
+
+
+
+
+ The tick associated with the current state of networked objects, or the current simulation tick being processed (when evaluated during FixedUpdateNetwork).
+
+
+
+
+ Returns the reference.
+
+
+
+
+ Reference to the .
+
+
+
+
+ Returns how many ticks we executed last update.
+
+
+
+
+ Returns the collection of objects for this NetworkRunner's .
+
+
+
+
+ Returns the collection of objects for this NetworkRunner's .
+ Unlike it will not contain players that have just left the room and are pending
+ deletion.
+
+
+
+
+ Is the Fusion player in the room and not pending deletion?
+
+
+
+
+ Returns the instance.
+
+
+
+
+
+
+
+ Bound Address of the internal socket used for direct connection in Server/Host Mode.
+ On the Host/Server this address contains the address/port that was passed into StartGame.
+ When forwarding ports on the router/ firewall this port should be used as the internal port for the forwarding. The external port can either be the same value or any port.
+ Note: This is not the public address of the server or the address / port that was discovered via NAT Punchthrough.
+
+
+
+
+ Returns the instance.
+
+
+
+
+ Global CancellationTokenSource for this NetworkRunner Instance
+ Used to control all async operations along the life cycle of the Runner
+ Should be used in conjunction with
+
+
+
+
+ Global copy of the Cancellation Token for this NetworkRunner Instance
+
+
+
+
+ Returns the global instance of a lag compensation buffer .
+
+
+
+
+ Remote prefabs are instantiated after an entire packet is read; this is to ensure
+ references are resolved correctly immediately. This is a buffer for all the instantiated instances
+ that await their spawned callbacks.
+
+
+
+
+ Queue of NetworkIds that have been received and wait for NOs to be created.
+
+
+
+
+ Queue of nested NetworkIds that have been received and wait for NOs to be created.
+
+
+
+
+ Queue of NetworkIds that have been received and wait for NOs to be destroyed.
+
+
+
+
+ Disconnects a player from the server.
+
+ The player to disconnect. Must be a valid PlayerRef.
+ Optional byte array. If provided, it will be used as the disconnection token.
+
+ This method can only be called from the server. If called from a client, an error message will be logged.
+
+
+
+
+ Disconnect a client based on its NetAddress
+
+ NetAddress of the client
+
+
+
+ Connect this as a client to a Server.
+
+
+
+
+ Initiates a .
+
+
+
+
+ Called by the simulation when the RuntimeConfig is first acknowledged.
+
+
+
+
+ OnGameStarted Callback
+
+
+
+
+ Invoke OnGameStarted callback
+
+
+
+
+ Starts using the supplied arguments.
+
+
+
+
+ Pauses the game in single player
+
+
+
+
+ Continues a paused game in single player
+
+
+
+
+ Sets the paused state in a single player
+
+
+
+
+ Get the number of interfaces of the desired type that are registered on the behaviour updater.
+
+ The interface type
+ The number of interfaces
+
+
+
+ Get the interface list head.
+
+ The interface type
+ The desired index on the list of behaviourList
+ The head reference
+ A disposable to be used on an `using` scope
+
+
+
+ Get the previous behaviour
+
+ The reference behaviour to get the previous one
+ Gives the previous behaviour
+
+
+
+ Get the next behaviour
+
+ The reference behaviour to get the next one
+ Gives the next behaviour
+
+
+
+ Starts an operation to retrieves the list of available regions.
+
+ Optional App ID. If not provided, the method will use the global App ID from the PhotonAppSettings.
+ Optional CancellationToken parameter that can be used to cancel the operation.
+ Returns a list with information about all the available regions.
+
+
+
+ Gets Player's Actor Number (ID).
+
+ If used in Shared Mode, every client can get this information.
+ If used in Client Server Mode, only the Server is able to get this information.
+
+ PlayerRef to get the Actor Number (ID)
+ Actor Number associated with the PlayerRef, otherwise null.
+
+
+
+ Gets Player's UserID.
+
+ If used in Shared Mode, every client can get this information.
+ If used in Client Server Mode, only the Server is able to get this information.
+
+ PlayerRef to get the UserID. If no PlayerRef is passed, the UserID of the local client is returned instead.
+ UserID if valid player found, otherwise null.
+
+
+
+ Sets the network object associated with this player
+
+ PlayerRef to set the network object
+ Network object to associate with the player
+
+
+
+ Gets the network object associated with a specific player
+
+ PlayerRef to get the network object
+ Network object if one is associated with the player
+
+
+
+ Try to gets the associated with a specific player
+
+ PlayerRef to get the network object
+ Network object if one is associated with the player
+ Signals if it was able to get a for the player provided
+
+
+
+ Get a list with all behaviours of the desired type that are registered on the .
+
+ type
+ The result list
+
+
+
+ Retrieves a list of all network objects in the simulation.
+
+ A list of NetworkObject instances.
+
+
+
+ Populate a list with all network objects in the simulation.
+
+ The list to which the network objects will be added.
+
+
+
+ Add on the list all behaviours of the desired type that are registered on the .
+ Note: The list will not be cleared before adding the results.
+
+ The list to add the behaviours
+ type
+
+
+
+ Returns the player round trip time (ping) in seconds
+
+ The player you want the round trip time for
+
+
+
+ Sends RPC message. Not meant to be used directly, ILWeaver calls this.
+
+ SimulationMessage to send
+
+
+
+ Sends RPC message. Not meant to be used directly, ILWeaver calls this.
+
+ SimulationMessage to send
+ RpcSendResult
+
+
+
+ Checks if the provided player is valid in the current simulation.
+
+ The player reference to be validated.
+ Returns true if the player is valid, false otherwise.
+
+
+
+ Returns a copy of the Connection Token used by a Player when connecting to this Server.
+ Only available on Server. It will return null if running on a Client or the Connection token is missing
+
+ PlayerRef to check for a Connection Token
+ Copy of the Connection Token
+
+
+
+ Return the with a Remote .
+ Valid only when invoked from a Server ()
+
+ Remote Player to check the
+ with a
+
+
+
+ Returns an array of all instances registered with this .
+
+ The type of the behaviours to be returned.
+ An array of instances of the specified type.
+
+
+
+ Register an instance for callbacks from this .
+
+ Callbacks to register
+
+
+
+ Unregister an instance for callbacks from this .
+
+ Callbacks to unregister
+
+
+
+ Gets a memory snapshot of the simulation.
+
+ The target allocator for the memory statistics. Must be a valid value from the MemoryStatisticsSnapshot.TargetAllocator enum.
+ A reference to the MemoryStatisticsSnapshot struct that will store the memory snapshot.
+
+
+
+ This method is meant to be called by .
+
+
+
+
+ Promote a player to be the new master client. Only the master client is able to call this method
+
+ The player to be promoted to master client
+
+
+
+ This method is meant to be called by .
+
+
+
+
+ Search on the runner object for instances of and register them for callbacks on this .
+ Disabled components are not registered.
+
+
+
+
+ Sends a reliable data buffer to a target player.
+
+ The player who should receive the buffer.
+ The key associated with the reliable data.
+ The data buffer to be sent.
+
+
+
+ Sends a reliable data buffer to the server.
+
+ The key associated with the reliable data.
+ The data buffer to be sent.
+
+ If the runner is a client, the data is sent to the server (connection index 0) with the player's index.
+ If the runner is a server, the data is sent via the simulation callbacks.
+
+
+
+
+ Flags this player as always interested in this object. Means it does not have to be in a players area of interest to be replicated. Only the NetworkObject State Authority can set interest.
+
+ The player
+ The object
+ If he's always interested, or not.
+
+
+
+ Returns the data from player, converted to the indicated .
+
+
+
+
+ Returns the unconverted unsafe for the indicated player.
+
+
+
+
+ Requests state authority for a specified on shared mode.
+
+ The NetworkId for which state authority is being requested.
+
+
+
+ Releases state authority for a given on shared mode.
+
+ The NetworkId for which state authority needs to be released.
+
+
+
+ Outputs the from player, translated to the indicated .
+
+
+
+
+ Get the instance for this from a .
+
+ NetworkID to look forward
+ null if object cannot be found.
+
+
+
+ Get the instance for this from a .
+
+ Object NetworkID to look forward
+ NetworkObject reference, if found
+ True if object was found.
+
+
+
+ Get the instance for this from a .
+
+ NetworkBehaviourId to look forward
+ NetworkBehaviour reference, if found
+ True if object was found.
+
+
+
+ Try to find a with the provided NetworkBehaviourId.
+
+ The NetworkBehaviourId to search for
+ The behaviour found
+ A type
+ Returns true if the behaviour was found and it is alive. False otherwise
+
+
+
+ Tries to return the first instance of T found on the root of a .
+
+ The type of the component to search for
+ NetworkId of the to search for
+ Returns the found component. Null if the cannot be found, or if T cannot be found on the GameObject.
+
+
+
+ Tries to return the behaviour .
+
+ NetworkBehaviour to get the from
+ Returns the of the provided behaviour. Returns default if the behaviour is not alive or the that has this behaviour is not valid.
+
+
+
+ Tries to return a for the provided.
+
+ NetworkBehaviour to get the from
+ Returns a to the provided behaviour. Returns default if the behaviour is not alive or the that has this behaviour is not valid.
+
+
+
+ Sets the simulation state for this object, if it takes part in the NetworkFixedUpdate, etc.
+ In shared mode a client cannot change the simulation state of s it does not have state authority over.
+
+ the object to change state for
+ true if it should be simulated, false if otherwise
+ true if the state of the object changed, false otherwise
+
+
+
+ Set the area of interest grid dimensions
+
+ X dimension
+ Y dimension
+ Z dimension
+ Can't change grid size in shared mode
+
+
+
+ Set the area of interest cell size
+
+ Size of the cell
+ Can't change cell size in shared mode
+
+
+
+ Retrieves a list of network object IDs that are in the area of interest for the specified player. Server only.
+
+ The player for whom the area of interest is being queried.
+ A list of network object IDs in the area of interest for the player.
+
+
+
+ Populates the provided list with data about the current Area of Interest (AOI) cells.
+ Each element in the list represents one AOI cell.
+
+ The list to be populated with AOI cell data. Each tuple in the list contains the center of the AOI cell, its size, the count of players in the cell, and the count of objects in the cell.
+
+
+
+ Tries to get the FusionStatisticsManager from the simulation.
+
+ The FusionStatisticsManager returned by the method
+ True if the FusionStatisticsManager is successfully retrieved, otherwise false
+
+
+
+ Tries to get the statistics snapshot for a specified behaviour type.
+
+ The type of the behaviour for which to get the statistics snapshot.
+ When this method returns, contains the statistics snapshot for the specified behaviour type, if found; otherwise, the default value.
+ true if the statistics snapshot for the specified behaviour type is found; otherwise, false.
+
+
+
+ Returns if the contains a reference to a in the current State.
+
+
+
+
+ Returns if the contains a with given in the current State.
+
+
+
+
+ Destroys a NetworkObject.
+
+ The NetworkObject to be destroyed.
+
+ This method checks if the local simulation has state authority over the NetworkObject.
+ If it does, it checks if the NetworkObject exists and has state authority.
+ If these conditions are met, it destroys the NetworkObject.
+
+ Thrown when the NetworkObject does not belong to this runner.
+
+
+
+ Ensures that a specific component exists on this gameobject.
+
+
+
+
+ Returns if a given is present in this gameobject.
+
+ Returns true if the was found
+
+
+
+ Removes a specific from this gameobject, if it exists.
+
+
+
+
+ Add and register a to this .
+ Note: It should NOT be a
+
+
+
+
+ Removes a specific from this gameobject, if it exists.
+
+
+
+
+ Unregister a instance from the callbacks.
+ Invalid if NetworkRunner has not been started and initialized.
+
+
+
+
+ Attaches a user-created network object to the network.
+
+ The network object to attach. Must not be null and must have a valid NetworkTypeId.
+ Optional PlayerRef. If assigned, it will be the default input authority for this object.
+ Optional boolean. If true, the object will be allocated in memory and attached to the scene object. Default is true.
+ Optional boolean. If provided, it will override the master client object setting. Default is null.
+ Thrown when the provided network object is null.
+ Thrown when the provided network object has an invalid NetworkTypeId.
+
+
+
+ Call this every FixedUpdateNetwork to add an area of interest for a player.
+ Should only be called from the Host/Server in Server client mode.
+ Should only be called for the local player in shared mode.
+
+
+
+
+ Clears the area of interest for a player. This can only be called from the server/host
+
+
+
+
+ Test if a player has Interest in a .
+
+ Returns null if interest cannot be determined (clients without State Authority are not aware of other client's Object Interest)
+
+
+
+ Controls if a specific network behaviours state is replicated to all players or not
+
+ The behaviour to change replication status for
+ true = replicate, false = don't replicate
+
+
+
+ Controls if a specific network behaviours state is replicated to a player or not
+
+ The behaviour to change replication status for
+ The player to change replication status for
+ true = replicate, false = don't replicate
+
+
+
+ Attach and assign to this the provided.
+ Used internally from the default implementation of to register scene objects.
+
+
+
+
+ Registers scene objects to the network.
+
+ The scene reference. Must be valid.
+ Array of NetworkObject instances to be registered. Must not be null.
+ Optional NetworkSceneLoadId. Default value is used if not provided.
+ The number of objects registered.
+ Thrown when the provided scene is not valid.
+ Thrown when the provided objects array is null.
+
+
+
+ Return the for a specific player.
+
+
+
+
+
+
+
+ Get enumerator for the collection of all s. Allows
+ to enumerate alloc-free.
+
+
+
+
+ A list of all s.
+
+
+
+
+ Set the value for simulating physics scenes when using multi-peer.
+ NOTE: The physics scenes will only be simulated if AutoSimulate is enabled for Physics3D and SimulationMode is set to FixedUpdate for Physics2D in the project settings.
+
+ The value to set. True to simulate physics scenes, false otherwise.
+
+
+
+ Try to get the physics info.
+
+ Network physics info
+ True if the physics info exists, otherwise false.
+
+
+
+ Try to set the physics info.
+
+ Network physics info
+ True if the physics info was set, otherwise false.
+ Thrown if the runner does not have the scene authority.
+
+
+
+ The initial scene info that was used to start the runner. It is consumed before the first tick by the scene authority.
+
+ The way this works is a bit complex. The order of things is as follows:
+ first update -> BeforeFirstTick -> OnServerStart / OnClientStart (master) -> ConsumeInitialSceneInfo
+
+ Only then the initial scene info is consumed and is invoked. Any load/unload calls
+ before that get queued and executed after the initial scene info is consumed.
+
+
+
+
+ What caused the scene change. This is either set in or when object is updated remotely.
+
+
+
+
+ To pretend the scene info is available before the first tick (important for shared mode), we store the copy of initial scene info
+ here and modify it/return it instead of the state. After scene info has been consumed, this is no longer needed.
+
+ Last used scene info. If is set this is compared
+ to the current scene info and scenes are loaded/unloaded accordingly.
+
+
+
+
+ Completed and nullified once the initial / first remote scene info is consumed. Loads/Unloads that happen before the first tick
+ depend on the result of this task.
+
+
+
+
+ Is this runner responsible for scene management.
+
+
+
+
+ Signals if the instance assigned to this is busy
+ with any scene loading operation.
+
+
+
+
+ Tries to get the of this .
+
+ The result
+ Returns true if it was able to get the scene info
+
+
+
+
+
+
+
+
+
+ Moves a GameObject to a specific scene
+
+ Game Object to move
+ Scene to move the object to
+ True if the object was moved, false otherwise
+
+
+
+ Moves a GameObject to the same scene as another GameObject
+
+ Game Object to move
+ Game Object to move to the same scene as
+ True if the object was moved, false otherwise
+
+
+
+ Loads a scene
+
+ Name of the scene to load
+ Parameters to use when loading the scene
+ Should the scene be set as active when loaded
+ Scene Load operation
+
+
+
+ Loads a scene
+
+ Name of the scene to load
+ Scene load mode
+ Scene physics mode
+ Should the scene be set as active when loaded
+ Scene Load operation
+
+
+
+ Loads a scene
+
+ Reference to the scene to load
+ Scene load mode
+ Scene physics mode
+ Should the scene be set as active when loaded
+ Scene Load operation
+
+
+
+ Unloads a scene
+
+ Name of the scene to unload
+ Scene Unload operation
+
+
+
+
+
+
+
+
+
+ Invoke on all implementations
+
+
+
+
+ Invoke on all implementations
+
+
+
+
+ The main scene of the or default if not running.
+
+
+
+
+ Get the a GameObject instance belongs to.
+
+ GameObject to check for a
+ reference, or null if not found
+
+
+
+ Get the from a specific Scene
+
+ Scene to check for a
+ reference, or null if not found
+
+
+
+ Get the 3D Physics scene being used by this Runner.
+
+
+
+
+ Get the 2D Physics scene being used by this Runner.
+
+
+
+
+ Instantiates an object in the scene of this runner
+
+
+
+
+ Instantiates an object in the scene of this runner
+
+
+
+
+ Instantiates an object in the scene of this runner
+
+
+
+
+ Instantiates an object in the scene of this runner
+
+
+
+
+ Ensures the scene of this runner is active and returns the previous active scene
+
+ Previous active scene
+ True if the scene was changed, false otherwise
+
+
+
+ Moves an object to the scene of this runner
+
+
+ Component of object to move
+
+
+
+ Moves an object to the scene of this runner
+
+ Object to move
+ Target scene to move the object to
+
+
+
+ Mark an object as `DontDestroyOnLoad`.
+
+ Object to mark
+
+
+
+ Signal if the Network Runner can spawn a
+
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any derived classes) to replicate the initial transform state.
+
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a Component type that is part of a
+
+ Must be a Type derived from
+ used to spawn the
+ T reference, or null if it was not able to spawn the object
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+
+
+
+ Attempts to network instantiate a using a GameObject. The supplied GameObject must have a component.
+
+ A GameObject with a
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a prefab.
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a .
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab Ref used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Object Guid used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab ID used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a Component type that is part of a
+
+ Must be a Type derived from
+ used to spawn the
+ T reference, or null if it was not able to spawn the object
+ Spawned reference
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+
+
+
+ Attempts to network instantiate a using a GameObject. The supplied GameObject must have a component.
+
+ A GameObject with a
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ Spawned reference
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a prefab.
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ Spawned reference
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a .
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab Ref used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ Spawned reference
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Object Guid used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ Spawned reference
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab ID used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+ Spawned reference
+ reference, or null if it was not able to spawn the object
+
+
+
+ Attempts to network instantiate a using a Component type that is part of a
+
+ Must be a Type derived from
+ used to spawn the
+ T reference, or null if it was not able to spawn the object
+ A callback to fire once the spawn is done.
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags
+
+
+
+ Attempts to network instantiate a using a GameObject. The supplied GameObject must have a component.
+
+ A GameObject with a
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags,
+ A callback to fire once the spawn is done.
+
+
+
+ Attempts to network instantiate a using a prefab.
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags,
+ A callback to fire once the spawn is done.
+
+
+
+ Attempts to network instantiate a using a .
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab Ref used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags,
+ A callback to fire once the spawn is done.
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Object Guid used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags,
+ A callback to fire once the spawn is done.
+
+
+
+ Attempts to network instantiate a using a
+ Note: position and rotation values are only used locally for the instantiation of the object, and are not inherently networked.
+ Use (or any custom class derived from NetworkTRSP) to replicate the initial transform state.
+
+ Prefab ID used to spawn the
+ Spawn Position
+ Spawn Rotation
+ Player Input Authority
+ reference
+ Spawn flags,
+ A callback to fire once the spawn is done.
+
+
+
+ If this callback is implemented, the default behavior of disconnecting
+ when the cloud connection is lost in server/client or host/client mode
+ is disabled. This callback will be invoked instead, leaving the decision
+ up to the user. It is called both on the server/host and on the client.
+
+ NetworkRunner instance
+ Shutdown reason for the connection loss
+ Flag to signal if the peer is attempting to reconnect to the Photon Cloud
+
+
+
+
+
+
+ Signal if the Local Peer is connected to Photon Cloud and is able to Create/Join Room but also receive Lobby Updates
+
+
+
+
+
+
+
+ Photon Client UserID
+
+ Returns null if Peer is not connected to Photon Cloud
+
+
+
+ used by this Runner to Authenticate the local peer.
+
+
+
+
+ Current Game Mode active on the Fusion Simulation
+
+
+
+
+ Stores information about the current running session
+
+
+
+
+ Signal if the local peer is already inside a Lobby
+
+
+
+
+ Signal if the runner was already initialized. Used to avoid recycling of NetworkRunners.
+
+
+
+
+ Check the current Connection Type with the Remote Server
+
+
+
+
+ Exposes the current NAT Type from the local Peer
+
+
+
+
+ Signal if the Local Peer is in a Room and is the Room Master Client
+
+
+
+
+
+
+
+ Completion Source for the startup Photon Cloud Operations
+
+
+
+
+ Responsible to manage the Photon Cloud related Services
+
+
+
+
+ The cached region summary for the local player. Initially empty but populated after the first connection.
+
+
+
+
+ Join the Peer to a specific Lobby, either a prebuild or a custom one.
+
+ More about matchmaking:
+ https://doc.photonengine.com/en-us/fusion/current/manual/matchmaking
+
+ Lobby Type to Join
+ Lobby ID
+ Authentication Values used to authenticate this peer
+ Custom Photon Application Settings
+ Signal if the LoadBalancingClient should use the Default or Alternative Ports
+ Optional Cancellation Token
+ Signal if the cached regions ping should be used to speed up connection
+ Async Task to Join a Session Lobby. Can be used to wait for the process to be finished.
+
+
+
+ Starts the local Fusion Runner and takes care of all major setup necessary
+
+ More about matchmaking:
+ https://doc.photonengine.com/en-us/fusion/current/manual/matchmaking
+
+ Custom arguments used to setup the Fusion Simulation
+ Task that can be awaited to chain actions
+
+
+
+ Connect the local peer to Photon Cloud using an async process.
+
+ Authentication Values used to authenticate this peer
+ Custom Photon Application Settings
+ External Communicator that will be reused on restart
+ External CancellationToken
+ Signal if the LoadBalancingClient should use the Default or Alternative Ports
+ Signal if the cached regions ping should be used to speed up connection
+ Async Task of the connect to Photon Cloud process. Can be used to wait for the process to be finished.
+
+
+
+ Disconnect the Peer from Photon Cloud
+
+ If the Cloud Services were not initialized, it just returns immediately
+
+ Async Task of the disconnect from Photon Cloud process. Can be used to wait for the process to be finished.
+
+
+
+ Start Fusion in Single Player Mode
+
+ Initialization Arguments
+ A running Task of the initialization process
+
+
+
+ Start Fusion in one of the Cloud Game Modes
+
+ Initialization Arguments
+ A running Task of the initialization process
+
+
+
+ Shutdown the Fusion Runner based on a arbitrary Exception
+
+ Exception used as base for the Shutdown procedure
+ Awaitable Task of the Shutdown procedure
+
+
+
+ Signal an update on the list of
+
+ New Session Info
+
+
+
+ Signal an update on the list of
+
+ Custom Authentication Response
+
+
+
+ Interface which defines the handlers for Updates. An implementation
+ is responsible for calling and
+ periodically.
+
+ An instance of this interface can be passed to
+ as the . By default (if == null)
+ Fusion will use , which invokes before
+ script's Update and before LateUpdate.
+
+
+
+
+ Called when the is started.
+
+ The instance.
+
+
+
+ Called when the is stopped.
+
+ The instance.
+
+
+
+ Network Runner Callbacks Delegates
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Companion component for . Exposes as UnityEvents,
+ which can be wired up to other components in the inspector.
+
+
+
+
+
+ UnityEvent for NetworkInput
+
+
+
+
+ UnityEvent for NetworkInput with PlayerRef
+
+
+
+
+ UnityEvent for ConnectRequest
+
+
+
+
+ UnityEvent for ConnectFailed
+
+
+
+
+ UnityEvent for DisconnectFromServer
+
+
+
+
+ UnityEvent for Shutdown
+
+
+
+
+ UnityEvent for PlayerRef
+
+
+
+
+ UnityEvent for NetworkRunner
+
+
+
+
+ UnityEvent for SimulationMessage
+
+
+
+
+ UnityEvent for SessionInfo List
+
+
+
+
+ UnityEvent for Custom Authentication
+
+
+
+
+ UnityEvent for HostMigration
+
+
+
+
+ UnityEvent for Reliable Data
+
+
+
+
+ UnityEvent for Reliable Data Progress
+
+
+
+
+ UnityEvent for NetworkObject
+
+
+
+
+ UnityEvent for NetworkObject with PlayerRef
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The core Fusion config file that is shared with all peers at startup.
+
+
+
+
+ Options for running one or multiple peers in one Unity instance.
+ Multiple is useful for testing multiple players/clients inside of the Unity editor without needing to build executables.
+ Each peer is assigned its own independent physics scene and instance.
+
+
+
+
+ This is the normal use case, where every build and the editor run a single server, host or client peer.
+
+
+
+
+ This is the optional use case, which allows running multiple peers in the Unity editor, or in a build.
+
+
+
+
+ Eventual Consistency state replication options.
+ Scheduling enables automatic prioritization of objects when culling occurs
+ (when Object's are not replicated due to exceeding per tick data limits, they increase in priority on the following Tick).
+ Interest Management enables NetworkObject Area Of Interest and Explicit Interest features.
+
+
+
+
+ No special replication handling. This setting is ideal if your project never exceeds per tick data limits during gameplay.
+
+
+
+
+ When changed Network Objects are not replicated by the server to a client due to culling (data per tick limit was reached)
+ the server increases the priority of that Network Object for the next outgoing Tick update to that client.
+
+
+
+
+ In addition to scheduling, Interest Management features are also enabled (Area Of Interest and Explicit Interest).
+
+
+
+
+ Default file name for the asset
+
+
+
+
+ Reference for the default . By default, loads a resource named "NetworkProjectConfig". This behaviour
+ can be changed with an attribute .
+
+
+
+
+ Unloads , if already loaded. If loading has faulted, resets the state
+ and next call to the accessor will attempt to load the config again.
+
+
+
+
+ Current Type ID
+
+
+
+
+ Current version
+
+
+
+
+ Current version
+
+
+
+
+ Current Type ID
+
+
+
+
+ Setting for whether multiple peers can run per Unity instance (typically to allow easy testing of multiple peers inside of the editor).
+
+
+
+
+ Advanced lag compensation buffer settings.
+
+
+
+
+ This flag changes the behaviour of to return null (instead of throwing an exception) and ) to return
+ if Fusion was unable to load a prefab synchronously (e.g. because it was Addressable). Fusion will enqueue the spawn and attempt to perform it the next frame, until successful.
+ Useful for transition from Fusion 1.x.
+
+
+
+
+ Signal if the callbacks should be invoked in Batch Mode.
+
+
+
+
+ Signal if the of the should be included on the name of the GameObject
+
+
+
+
+ Inactive need special handling in case they get destroyed without ever being activated. This is achieved
+ with adding a nested GameObject called "NetworkObjectInactivityGuard" that tracks the OnDestroy message.
+ can be used to control whether these guards are visible in the hierarchy or not.
+
+
+
+
+ Allow the use of Client-Server modes in WebGL builds. This is not recommended, as it can lead to degraded performance.
+ Client-Server modes are not supported in WebGL builds by default, this setting allows its usage despite the limitations.
+ Read more about the limitations of WebGL builds in the Fusion documentation at https://doc.photonengine.com/fusion/v2/fusion-intro.
+
+
+
+
+ When this setting is enabled, each client will record its frame and packet timing information to a local file (one file per session).
+ Timing issues depend on many external factors, which makes them difficult to intentionally reproduce. But if an issue can be captured once,
+ its trace can be used to simulate and troubleshoot it more effectively.
+
+
+
+
+ Reference to the instance for this .
+
+
+
+
+ Reference to settings for this .
+
+
+
+
+ this can be used to override the time synchronization from code
+
+
+
+
+ Reference to settings for this .
+
+
+
+
+ Reference to settings for this
+
+
+
+
+ Reference to settings for this
+
+
+
+
+ Settings for simulating network conditions of latency and loss.
+
+
+
+
+ Heap Settings
+
+
+
+
+ Names of assemblies Fusion is going to weave. Not case sensitive.
+
+
+
+
+ Use Fusion.SerializableDictionary to store [Networked] dictionary properties initial value. If unchecked,
+ the weaver will emit System.Generic.Dictionary instead - a type that's not Unity-serializable, but custom
+ serializers (e.g. Odin) may support it.
+
+
+
+
+ If set, the weaver will add a check to all [Networked] properties on each
+ to verify if owing has been attached to.
+
+
+
+
+ If set, the weaver will check if is used in types that do not support it. This requires
+ all types to be scanned and can increase weaving duration.
+
+
+
+
+ If set, the weaver will check if properties getters and setters are empty.
+
+
+
+
+ Get the execution order for a given type. If the type is registered, returns null.
+
+ Type to check for the execution order.
+ Execution order for the type, or null if not registered.
+
+
+
+ Make a copy of the .
+
+
+
+
+ ToString() implementation.
+
+
+
+
+ Get the version information for the Fusion.Runntime.dll.
+
+
+
+
+ Serialize a into a JSON string.
+
+ NetworkProjectConfig reference
+ JSON String
+
+
+
+ De-serialize a from a JSON string (typically sent by the Room's Creator).
+
+ JSON string of a serialized NetworkProjectConfig
+ NetworkProjectConfig reference de-serialized from JSON string
+
+
+
+ Remove unnecessary data from serialized version of .
+
+
+
+
+ Manages and references the current instance of
+
+
+
+
+ The current instance.
+
+
+
+
+ The current instance.
+
+
+
+
+ Try to get the current instance.
+
+ instance if it exists, otherwise null.
+ True if the instance exists, otherwise false.
+
+
+
+ True if the instance exists, otherwise false.
+
+
+
+
+ Unload the current instance.
+
+
+
+
+ An auto-generated list containing source information (e.g. Resource path, address, static reference) for all the prefabs that can be spawned, i.e. the ones with
+ component and enabled.
+
+ Additional prefabs can registered at runtime with .
+
+
+
+
+ Options for the .
+
+
+
+
+ An auto-generated list containing meta information about all the s in the project, e.g. execution order.
+
+
+
+ The type of the .
+
+
+ The execution order of the .
+
+
+
+ An auto-generated list containing meta information about all the s in the project, e.g. execution order.
+
+
+
+
+ Unloads all prefabs.
+
+
+
+
+ Network Spawn Status
+
+
+
+ Spawn is queued and will be spawned when the prefab is loaded.
+
+
+ Spawned successfully.
+
+
+ Failed to Load Prefab Synchronously.
+
+
+ Failed to create instance.
+
+
+ Failed to spawn because the client can't spawn.
+
+
+ Failed to spawn because the local player is not yet set.
+
+
+
+ Network Spawn Flags
+
+
+
+
+ Object get spawned as DontDestroyOnLoad on all clients.
+
+
+
+
+ In shared mode, override the state authority to , ignoring "Is Master Client Object" inspector setting.
+ If used by a non-master client, object will be spawned with local player authority and an error message will be logged.
+
+
+
+
+ In shared mode, override the state authority to local player, ignoring "Is Master Client Object" inspector setting.
+
+
+
+
+ Spawn Operation
+
+
+
+ Network Runner Reference
+
+
+ Get the spawned Network Object
+
+
+ Get the Spawn Operation Status
+
+
+ Returns true if the object has been spawned.
+
+
+ Returns true if the object is still queued for spawning.
+
+
+ Returns true if the object has failed to spawn.
+
+
+ Get this Spawn Operation
+
+
+
+ Awaiter for
+
+
+
+
+ Awaiter Constructor
+
+ Spawn Operation
+
+
+ Returns true if the Spawn Operation is completed
+
+
+
+ Get the result of the Spawn Operation
+
+ Spawned Network Object
+ Thrown if the Spawn Operation failed
+
+
+
+ Awaiter OnCompleted Callback
+
+ Continuation Action
+ Thrown if the Spawn Operation is not supported
+
+
+
+ Network Object Spawn Delegate
+
+
+
+
+ Network Object Spawn Exception
+
+
+
+
+ Network Object Spawn Exception Constructor
+
+ Network Spawn Status
+ Network Object Type Id
+
+
+ Network Object Type Id
+
+
+ Network Spawn Status
+
+
+ Exception Message
+
+
+
+ Stores data types used on the interface
+
+
+
+
+ Data holder of a Connection Request from a remote client
+
+
+
+
+ Address of the remote client
+
+
+
+
+ Accepts the Request
+
+
+
+
+ Refuses the Request
+
+
+
+
+ Refuses the Request
+
+
+
+
+ Describes a list of Reason why the Fusion Runner was Shutdown
+
+
+
+
+ OK Reason means Fusion was Shutdown by request
+
+
+
+
+ Shutdown was caused by some internal error
+
+
+
+
+ Raised when the peer tries to Join a Room with a mismatching type between ClientServer Mode and Shared Mode.
+
+
+
+
+ Raised when the local peer started as a Server and tried to join a Room that already has a Server peer.
+
+
+
+
+ Raised when the Peer is disconnected or kicked by a Plugin Logic.
+
+
+
+
+ Raised when the Game the Peer is trying to Join is Closed
+
+
+
+
+ Raised when the Game the Peer is trying to Join does not exist
+
+
+
+
+ Raised when all CCU available for the Photon Application are in use
+
+
+
+
+ Raised when the peer is trying to connect to an unavailable or non-existent Region
+
+
+
+
+ Raised when a Session with the same name was already created
+
+
+
+
+ Raised when a peer is trying to join a Room with already the max capacity of players
+
+
+
+
+ Raised when the Authentication Values are invalid
+
+
+
+
+ Raised when the Custom Authentication has failed for some other reason
+
+
+
+
+ Raised when the Authentication Ticket has expired
+
+
+
+
+ Timeout on the Connection with the Photon Cloud
+
+
+
+
+ Raised when Fusion is already running and the StartGame is invoked again
+
+
+
+
+ Raised when any of the StartGame arguments does not meet the requirements
+
+
+
+
+ Signal this Runner is shutting down because of a Host Migration is about to happen
+
+
+
+
+ Connection with a remote server failed by timeout
+
+
+
+
+ Connection with a remote server failed because it was refused
+
+
+
+
+ The current operation has timed out
+
+
+
+
+ The current operation was canceled
+
+
+
+
+ Interface for callbacks.
+ Register a class/struct instance which implements this interface with .
+
+
+
+
+ Callback from a when a new has exit the Area of Interest
+
+ NetworkRunner reference
+ NetworkObject reference
+ PlayerRef reference
+
+
+
+ Callback from a when a new has entered the Area of Interest
+
+ NetworkRunner reference
+ NetworkObject reference
+ PlayerRef reference
+
+
+
+ Callback from a when a new player has joined.
+
+
+
+
+ Callback from a when a player has disconnected.
+
+
+
+
+ Called when the runner is shutdown
+
+ The runner being shutdown
+ Describes the reason Fusion was Shutdown
+
+
+
+ Callback when disconnects from a server or host.
+
+
+
+
+ Callback when receives a Connection Request from a Remote Client
+
+ Local NetworkRunner
+ Request information
+ Request Token
+
+
+
+ Callback when fails to connect to a server or host.
+
+
+
+
+ This callback is invoked when a manually dispatched simulation message is received from a remote peer
+
+ The runner this message is for
+ The message pointer
+
+
+
+ Callback is invoked when a Reliable Data Stream has been received
+
+ NetworkRunner reference
+ Which PlayerRef the stream was sent from
+ ReliableKey reference that identifies the data stream
+ Data received
+
+
+
+ Callback is invoked when a Reliable Data Stream is being received, reporting its progress
+
+ NetworkRunner reference
+ Which PlayerRef the stream is being sent from
+ ReliableKey reference that identifies the data stream
+ Progress of the stream
+
+
+
+ Callback from that polls for user inputs.
+ The that is supplied expects:
+
+ input.Set(new CustomINetworkInput() { /* your values */ });
+
+
+
+
+
+ Callback from when an input is missing.
+
+ NetworkRunner reference
+ PlayerRef reference which the input is missing from
+ NetworkInput reference which is missing
+
+
+
+ Callback when successfully connects to a server or host.
+
+
+
+
+ This callback is invoked when a new List of Sessions is received from Photon Cloud
+
+ The runner this object exists on
+ Updated list of Session
+
+
+
+ Callback is invoked when the Authentication procedure returns a response from the Authentication Server
+
+ The runner this object exists on
+ Custom Authentication Reply Values
+
+
+
+ Callback is invoked when the Host Migration process has started
+
+ The runner this object exists on
+ Migration Token that stores all necessary information to restart the Fusion Runner
+
+
+
+ Callback is invoked when a Scene Load has finished
+
+ NetworkRunner reference
+
+
+
+ Callback is invoked when a Scene Load has started
+
+ NetworkRunner reference
+
+
+
+ Represents the initialization arguments for the NetworkRunner.
+
+
+
+
+ Gets or sets the network scene information.
+
+
+
+
+ Gets or sets the network address.
+
+
+
+
+ Gets or sets the public network address.
+
+
+
+
+ Gets or sets the player count.
+
+
+
+
+ Gets or sets the simulation mode.
+
+
+
+
+ Gets or sets the input word count.
+
+
+
+
+ Gets or sets the scene information word count.
+
+
+
+
+ Gets or sets the network project configuration.
+
+
+
+
+ Gets or sets the action to be called when the game starts.
+
+
+
+
+ Gets or sets the network object provider.
+
+
+
+
+ Gets or sets the network scene manager.
+
+
+
+
+ Gets or sets the network runner updater.
+
+
+
+
+ Gets or sets the network object initializer.
+
+
+
+
+ Gets or sets the custom callback interfaces.
+
+
+
+
+ Gets or sets the connection token.
+
+
+
+
+ Gets a value indicating whether the game is in single-player mode.
+
+
+
+
+ Gets or sets the resume network ID for host migration.
+
+
+
+
+ Gets or sets the resume tick for host migration.
+
+
+
+
+ Gets or sets the resume state for host migration.
+
+
+
+
+ Gets or sets the action to be called when host migration resumes.
+
+
+
+
+ Default implementation of that uses the Unity PlayerLoop.
+
+
+
+
+ Default settings for the NetworkRunner Update Loop.
+
+
+
+
+ Default settings for the NetworkRunner Render Loop.
+
+
+
+
+ Registers in the PlayerLoop.
+
+ Update settings.
+ Render settings.
+ True if registered, false if already registered with the same settings.
+
+
+
+ Unregisters from the PlayerLoop.
+
+ True if unregistered, false if not registered.
+
+
+
+ Invokes for all the runners
+ and stores them for upcoming .
+
+
+
+
+ Invokes for all the runners
+ that have been updated with the last .
+
+
+
+
+ Used to invoke in the PlayerLoop.
+
+
+
+
+ Used to invoke in the PlayerLoop.
+
+
+
+
+ Settings for the .
+
+
+
+
+ Reference to the PlayerLoopSystem to add the NetworkRunner to.
+
+
+
+
+ Add mode for the PlayerLoopSystem.
+
+
+
+
+ Checks if the settings are equal.
+
+ Settings to check for equality.
+ True if equal, false otherwise.
+
+
+
+ Checks if the settings are equal.
+
+ Settings to check for equality.
+ True if equal, false otherwise.
+
+
+
+ Gets the hash code of the settings.
+
+ Hash code.
+
+
+
+ Returns a string representation of the settings.
+
+ String representation.
+
+
+
+ Checks if the settings are equal.
+
+ Settings to check for equality.
+ Settings to check for equality.
+ True if equal, false otherwise.
+
+
+
+ Checks if the settings are not equal.
+
+ Settings to check for equality.
+ Settings to check for equality.
+ True if not equal, false otherwise.
+
+
+
+ Fusion Game Mode.
+
+ Used to select how the local simulation will act.
+
+
+
+
+ Single Player Mode: it works very similar to Mode, but don't accept any connections.
+
+
+
+
+ Shared Mode: starts a Game Client, which will connect to a Game Server running in the Photon Cloud using the Fusion Plugin.
+
+
+
+
+ Server Mode: starts a Dedicated Game Server with no local player.
+
+
+
+
+ Host Mode: starts a Game Server and allows a local player.
+
+
+
+
+ Client Mode: starts a Game Client, which will connect to a peer in either or Modes.
+
+
+
+
+ Automatically start as Host or Client. The first peer to connect to a room will be started as a Host, all others will connect as clients.
+
+
+
+
+ Fusion Start Arguments, used to configure the simulation mode and other settings
+
+ More about matchmaking:
+ https://doc.photonengine.com/en-us/fusion/current/manual/matchmaking
+
+
+
+
+ in which this peer will start
+
+
+
+
+ Photon Cloud Session Name used either to Create or Join a Session.
+
+ Default: null (random session matching)
+
+
+
+
+ Used to generate a new Session Name when creating a Session.
+
+ Default: null (a random session name is generated based on a GUID)
+
+
+
+
+ Peer Binding Address
+
+ Default:
+
+
+
+
+ Custom Public Reflexive Address
+
+ Default: null
+
+
+
+
+ Object pool to use
+
+ Default: null
+
+
+
+
+ See .
+
+ Default: null
+
+ More about Scene Loading:
+ https://doc.photonengine.com/en-us/fusion/current/manual/scene-loading
+
+
+
+
+ See
+
+
+
+
+ See
+
+
+
+
+ Custom used to start the simulation
+
+ Default: Global NetworkProjectConfig
+
+ More about NetworkProjectConfig:
+ https://doc.photonengine.com/en-us/fusion/current/manual/network-project-config
+
+
+
+
+ Number of players allowed to connect to the session. Overrides the value set in the NetworkProjectConfig. The 1-255 range is purely a limit in the NetworkProjectConfig inspector the player count can be set to any positive int value via code.
+
+ Default: DefaultPlayers from the Global NetworkProjectConfig
+
+
+
+
+ Scene that will be set as the starting Scene.
+
+ Default: null (no scene set)
+
+
+
+
+ Callback that is invoked when the Fusion has fully started
+
+ Default: null
+
+
+
+
+ Flag to disable the NAT Punchthrough implementation and connect only via Relay
+
+ Default: false
+
+
+
+
+ User defined callback interfaces we will provide O(1) constant time lookup for
+
+ Default: null
+
+
+
+
+ Connection token sent by client to server. Not used in shared mode.
+
+ Default: null (empty connection token)
+
+
+
+
+ Custom Session Properties.
+ This dictionary can be used to either setup the initial Session Properties when creating a Session
+ but also to set the matchmaking filters when joining a Random Session.
+
+ Default: null (empty custom properties)
+
+
+
+
+ Session should be created Open or Closed to accept joins
+
+ Default: true
+
+
+
+
+ Session should be Visible or not in the Session Lobby list
+
+ Default: true
+
+
+
+
+ Session Join Matchmaking Mode when joining a Session.
+ For more information, check
+
+ Default:
+
+
+
+
+ Signal if the internal Realtime Client should use the Default Photon ports to connect to the Photon Cloud.
+ By default, Fusion uses ports: 27000, 27001 and 27002.
+ Set this to True to use ports: 5058, 5055 and 5056.
+
+
+ Default: false (uses ports 27000, 27001 and 27002)
+
+
+
+
+ Session Custom Lobby to be published in
+
+ Default: null (default Lobby for each Session Type, LobbyClientServer or LobbyShared)
+
+
+
+
+ Specify a Custom STUN Server used to Resolve the peer Reflexive Addresses
+ It can be used to specify multiple STUN Servers separated by semicolon (;)
+
+ Default: null (no custom STUN Server)
+
+
+
+
+ Custom Authentication Data
+
+ Default: null (default authentication values)
+
+
+
+
+ Custom Photon Application Settings
+
+ Default: null (Global PhotonAppSettings)
+
+
+
+
+ Enables the Session creation when starting a Client with an specific Session Name
+
+ Default: false (clients *can not* create new Sessions)
+
+
+
+
+ Host Migration Token used when restarting the Fusion Simulation
+
+ Default: null
+
+
+
+
+ Callback invoked when the new Host is migrating from the old Host state
+
+ Default: null
+
+
+
+
+ Optional CancellationToken used to cancel the NetworkRunner start up process and shutdown
+
+ Defaults: null
+
+
+
+
+ Enables the usage of the previous cached regions pings. This speeds up the region ping process and the runner startup process.
+
+ Defaults: true
+
+
+
+
+ StartGameArgs ToString()
+
+
+
+
+ Describe an Exception that Occurred while starting the Fusion Simulation
+
+
+
+
+ ShutdownReason that caused this exception
+
+
+
+
+ StartGameException to String
+
+
+
+
+ Represents the result of starting the Fusion Simulation
+
+
+
+
+ Signal if the Start was OK
+
+
+
+
+ Start Game Shutdown Reason
+
+
+
+
+ Custom Error Message filled with data about the Shutdown.
+ Usually used to store custom data when the StartGame fails.
+
+
+
+
+ Optional Exception StackTrace
+
+
+
+
+ String representation of the StartGameResult
+
+
+
+
+ Convert arbitrary Exceptions into a StartGameException to public use
+
+ Exception to be converted
+ Reference to a StartGameException holding a ShutdownReason
+
+
+
+ Interface for a scene manager.
+ A scene manager is responsible for loading and unloading scenes
+
+
+
+
+ Callback for initialization
+
+
+
+
+ Callback for shutdown and clean up
+
+
+
+
+ Signals if the instance is busy with any scene loading operations
+
+
+
+
+ The main scene of the . Mostly used for Multipeer logic
+
+
+
+
+ Signals if the given scene is the main runner scene. Mostly used for Multipeer logic
+
+
+
+
+ Tries to get the physics scene 2D.
+
+ Returns true if the operation was successfully
+
+
+
+ Tries to get the physics scene 3D.
+
+ Returns true if the operation was successfully
+
+
+
+ Mark an object as `DontDestroyOnLoad`.
+
+
+
+
+ Move a to a desired scene.
+
+ Return true if the operation was successfully
+
+
+
+ Loads a given scene with the specified parameters.
+
+ Returns a that can be waited
+
+
+
+ Unloads a given scene.
+
+ Returns a that can be waited
+
+
+
+ Gets a for the scene that the given belongs to.
+
+
+
+
+ Gets a for the given scene name or path.
+
+
+
+
+ Implement this method and return true if you want to handle scene info changes manually. Return false if
+ the default scene info change handling should be done by the instead.
+
+ Return true if a custom handling is provided, false otherwise to use the default one
+
+
+
+ A wrapper for async scene operations.
+
+
+
+ The scene reference of the operation
+
+
+ Signals if the operation is valid
+
+
+ Signals if the operation is done
+
+
+
+ Attached error to the operation
+
+
+
+
+ Creates a from a
+
+ Scene reference
+ Async operation reference
+ Returns a instance
+ Thrown if is null
+
+
+
+ Creates a from a
+
+ Scene reference
+ Coroutine reference
+ Returns a instance
+ Thrown if is null
+
+
+
+ Creates a from a
+
+ Scene reference
+ Task reference
+ Returns a instance
+ Thrown if is null
+
+
+
+ Creates a from a
+
+ Scene reference
+ Exception reference
+ Returns a instance
+ Thrown if is null
+
+
+
+ Creates a completed
+
+ Scene reference
+ Returns a instance
+
+
+
+ Adds a callback to be called when the operation is completed
+
+ The callback to be called
+
+
+
+ Gets the awaiter for the operation
+
+
+
+
+ Awaiter for
+
+
+
+
+ Creates a new instance
+
+ The operation to await
+
+
+
+ Signals if the operation is completed
+
+
+
+
+ Gets the result of the operation
+
+
+
+
+ Adds a callback to be called when the operation is completed
+
+ The callback to be called
+
+
+
+ A unique identifier for a scene load operation.
+
+
+
+
+ The value of the id
+
+
+
+
+ Creates a new with the given value
+
+ The value of the id
+
+
+
+ Compares two for equality
+
+ The other
+ Returns true if the two are equal
+
+
+
+ Compares two for equality
+
+ The other object to check
+ Returns true if the two are equal
+
+
+
+ Returns the hash code of the
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Parameters for loading a scene
+
+
+
+
+ The unique id of the scene load operation
+
+
+
+
+ The to use when loading the scene
+
+
+
+
+ The to use when loading the scene
+
+
+
+
+ The to use when loading the scene
+
+
+
+
+ Signals if the scene should be active on load
+
+
+
+
+ Signals if the scene should be single loaded
+
+
+
+
+ Signals if the scene should have local 2D physics
+
+
+
+
+ Signals if the scene should have local 3D physics
+
+
+
+
+ Compares two for equality
+
+ The other
+ Returns true if the two are equal
+
+
+
+ Compares two for equality
+
+ The other
+ Returns true if the two are equal
+
+
+
+ Returns the hash code of the
+
+
+
+
+ Compares two for equality
+
+ Left
+ Right
+ Returns true if the two are equal
+
+
+
+ Compares two for inequality
+
+ Left
+ Right
+ Returns true if the two are not equal
+
+
+
+ Returns a string representation of the
+
+
+
+
+ Network Scene Info Default Flags
+
+
+
+ The scene count mask
+
+
+ The counter mask
+
+
+
+ Can store up to 8 active scenes and allows for duplicates.
+ Each write increases which can be used to generate unique scene objects ids
+ for when a scene is supposed to be reloaded.
+
+
+
+ The size of the struct in words
+
+
+ The size of the struct in bytes
+
+
+ Max number of scenes that can be stored
+
+
+ The scenes list
+
+
+ The scenes load parameters list
+
+
+
+ Gets the index of the given scene
+
+ SceneRef to look for
+ Scene parameters to look for
+ Returns the index of the scene or -1 if not found
+
+
+
+
+
+
+ Total Scene Count
+
+
+
+
+ Version number
+
+
+
+
+ Adds a scene to the list
+
+ Scene to add
+ Load scene mode
+ Local physics mode
+ Signals if the scene should be active on load
+ Returns the index of the scene or -1 if the scene could not be added
+
+
+
+ Removes a scene from the list
+
+ Scene to remove
+ Returns true if the scene was removed
+
+
+
+ String representation of the
+
+
+
+
+ Compares two for equality
+
+ The other
+ Returns true if the two are equal
+
+
+
+ Compares two for equality
+
+ The other
+ Returns true if the two are equal
+
+
+
+ Get the hash code of the
+
+ Hast code of the
+
+
+
+ Implicit conversion to
+
+ SceneRef to convert
+ Returns a instance
+
+
+
+ What has contributed to the observed change in the scene info.
+
+
+
+
+ No change.
+
+
+
+
+ The initial local scene has changed.
+
+
+
+
+ The remove scene has changed.
+
+
+
+
+ A unique identifier for a scene object.
+
+
+
+
+ Identifies the scene in which the object is located.
+
+
+
+
+ Index of the object in the scene or any other form of unique identifier.
+
+
+
+
+ Use
+
+
+
+
+ Unique identifier of a specific scene load. Needs to be used when loading multiple scenes with the same or reloading a scene.
+ For example, increments its internal LoadId every time a new scene is added.
+
+
+
+
+ TODO
+
+
+
+
+
+
+
+ Signal if the is valid.
+
+
+
+
+ String representation of the .
+
+
+
+
+ Check if two are equal.
+
+ Another to check for equality
+ Returns true if the two are equal
+
+
+
+ Check if two are equal.
+
+ Another to check for equality
+ Returns true if the two are equal
+
+
+
+ Get the hash code of the .
+
+
+
+
+ Indicates which point in time (or "timeframe") networked properties should be rendered in.
+
+
+
+
+ The default timeframe for owned and predicted objects.
+
+
+
+
+ The default timeframe for proxied objects.
+
+
+
+
+ Indicates how available snapshot data should be used to render networked properties
+ (in the chosen ).
+
+
+
+
+ The rendered value will come from interpolating the values at
+ and to the desired point in time.
+
+
+
+
+ The rendered value will come from the nearest available snapshot at or before the
+ point in time being rendered.
+
+
+
+
+ The rendered value will come from the nearest available snapshot ahead of the
+ point in time being rendered.
+
+
+
+
+ The rendered value will come from the latest snapshot.
+
+
+
+
+ Can be used to acquire interpolated data for different points in time.
+
+
+
+
+ Get the render data for the given .
+
+ Network behaviour to get render data for.
+ Render data for the previous point in time.
+ Render data for the next point in time.
+ Interpolation alpha.
+
+
+
+ Information used to observe an object in remote time.
+
+
+
+
+ Main simulation class
+
+
+
+
+ Clears the provided list and populates it with data about the current Area of Interest (AOI) cells.
+ Each tuple in the list represents one AOI cell, containing its center, size, player count, and object count.
+
+ The list to be populated with AOI cell data.
+
+
+
+ Retrieves a list of network object IDs that are in the area of interest for the specified player.
+
+ The player for whom the area of interest is being queried.
+ A list of network object IDs in the area of interest for the player.
+
+
+
+ Used by RunnerAOIGizmos component. Supplies data about current active AOI cells.
+
+
+
+
+ Area of Interest Definition
+
+
+
+
+ Size of each cell in the AOI grid.
+
+
+
+
+ Get the size of the AOI grid.
+
+ The size of the AOI grid.
+
+
+
+ Get the size of each cell in the AOI grid.
+
+ The size of each cell in the AOI grid.
+
+
+
+ Convert a sphere into a set of AOI cells.
+
+ Sphere center
+ Sphere radius. Max allowed radius is
+ Resulting set of cells
+
+
+
+ Convert a position into the respective cell coordinate.
+
+ Position
+ Cell coordinate
+
+
+
+ Converts a cell index into its corresponding cell coordinates.
+
+ The index of the cell to be converted.
+ A tuple containing the x, y, and z coordinates of the cell.
+
+
+
+ Convert a cell index into the respective cell center position.
+
+ Cell index
+ Cell center position
+
+
+
+ Convert a position into the respective cell index.
+
+ Position
+ Cell index
+
+
+
+ Convert a cell coordinate into the respective cell index.
+
+ X coordinate
+ Y coordinate
+ Z coordinate
+ Cell index
+
+
+
+ Clamp cell coordinates to the valid range.
+
+ X coordinate
+ Y coordinate
+ Z coordinate
+ Clamped cell coordinates
+
+
+
+ latest tick on server we are aware of
+
+
+
+
+ latest tick on server we are aware of
+
+
+
+
+ How large the ticks the current simulation takes are
+
+
+
+
+ The current tick rate of the simulation
+
+
+
+
+ The delta time of each tick as a double
+
+
+
+
+ The delta time of each tick as a float
+
+
+
+
+ The packet send rate
+
+
+
+
+ The packet send delta time
+
+
+
+
+ Gets the fixed tick time interval. Derived from the .
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Use inside of FixedUpdateNetwork to determine if the tick currently being simulated has previously been simulated locally.
+ Resimulation occurs in client prediction when new states arrive from the StateAuthority.
+ Networked objects are set to the most current authority state tick, and simulations are repeated from that tick to the local current tick.
+
+
+
+
+ Use in conjunction with IsResimulation/IsForward inside of FixedUpdateNetwork to determine if the current tick being simulated
+ is the last tick of the resimulation or forward phase of the simulation loop.
+
+ 'Resimulation' describes simulating a tick that has been previously been simulated.
+ 'Forward' describes simulating a tick that is being simulated for the first time locally.
+ 'Prediction' describes simulating ticks higher than the most current known StateAuthority snapshot tick.
+
+
+
+
+
+ Use in conjunction with IsResimulation/IsForward inside of FixedUpdateNetwork to determine if the current tick being simulated
+ is the first tick of the resimulation or forward phase of the simulation loop.
+
+ 'Resimulation' describes simulating a tick that has been previously been simulated.
+ 'Forward' describes simulating a tick that is being simulated for the first time locally.
+ 'Prediction' describes simulating ticks higher than the most current known StateAuthority snapshot tick.
+
+
+
+
+
+ Use inside of FixedUpdateNetwork to determine if the tick currently being simulated has NOT previously been simulated locally.
+
+
+
+
+ True if the current stage of the simulation loop is Forward. False during resimulations.
+
+ 'Resimulation' describes simulating a tick that has been previously been simulated.
+ 'Forward' describes simulating a tick that is being simulated for the first time locally.
+ 'Prediction' describes simulating ticks higher than the most current known StateAuthority snapshot tick.
+
+
+
+
+
+ The tick associated with the current state of networked objects, or the current simulation tick being processed (when evaluated during FixedUpdateNetwork).
+
+
+
+
+ The previous tick
+
+
+
+
+ The current simulation time in seconds
+
+
+
+
+ The current input collection size
+
+
+
+
+ Indicates if a Server/Client or Shared Mode (relay server) topology is being used.
+
+
+
+
+ Gets the flags for The type of network peer this simulation represents.
+
+
+
+
+ Gets the current value.
+
+
+
+
+ The file used by this .
+
+
+
+
+ The file used by this .
+
+
+
+
+ Remote Interpolation Alpha
+
+
+
+
+ Remote previous Tick
+
+
+
+
+ Remote Tick
+
+
+
+
+ If this peer is a client. True for client peers in Server/Client topologies, and true for all peers in Shared Mode.
+
+
+
+
+ If this peer is the server. True for the Server or Host peer in Server/Client topologies, and always false for all peers in Shared Mode (the relay is the server).
+
+
+
+
+ True for any peer that represents a human player. This is true for all peers except a dedicated server.
+
+
+
+
+ Indicates that this simulation is operating in Single Player mode, which is a Host that accepts no connections.
+
+
+
+
+ Only valid in Shared Mode. Indicates if this peer is flagged as the MasterClient, which means it is default StateAuthority
+
+
+
+
+ List of Active players in the Simulation
+
+
+
+
+ Signal if the Simulation is currently running
+
+
+
+
+ In shared mode, scene info is only reliable after the initial tick. Before that
+ initial scene info data needs to be used.
+
+
+
+
+ Bound Address of the internal socket
+
+
+
+
+ Current
+
+
+
+
+ Get LocalPlayer PlayerRef
+
+
+
+
+ Callback invoked After the Simulation Update
+
+
+
+
+ Callback invoked on the Connected
+
+ Connection that was connected
+
+
+
+ Callback invoked on the Disconnected
+
+ Connection that was disconnected
+ Reason for the disconnection
+
+
+
+ Callback invoked when the Network Receive is completed
+
+
+
+
+ Callback invoked when there is no simulation
+
+
+
+
+ Callback invoked before the Simulation Loop
+
+ Total number of re-simulations
+
+
+
+ Callback invoked before the First Tick
+
+
+
+
+ Add or remove specific player interest in a NetworkObject.
+
+
+
+
+ Try to get the Host Player
+
+ Host Player
+ True if the Host Player was found, false otherwise
+
+
+
+ Check if a NetworkObjectMeta is interested by a specific Player
+
+ NetworkObjectMeta to check
+ Player to check
+ True if the Player is interested in the NetworkObjectMeta, false otherwise
+
+
+
+ Check if a Player is the Input Authority over an NetworkObjectMeta
+
+ NetworkObjectMeta to check
+ Player to check
+ True if the Player is the Input Authority over the NetworkObjectMeta, false otherwise
+
+
+
+ Check if a Player is the Input Authority over an NetworkObjectMeta
+
+ NetworkObjectMeta to check
+ Player to check
+ True if the Player is the Input Authority over the NetworkObjectMeta, false otherwise
+
+
+
+ Check if a Player is the State Authority in relation to another Player
+
+ State Source Player
+ Player to check
+ True if the Player is the State Authority, false otherwise
+
+
+
+ Check if a Player is the State Authority over a NetworkObjectMeta
+
+ NetworkObjectMeta to check
+ Player to check
+ True if the Player is the State Authority, false otherwise
+
+
+
+ Check if the Local Player is the Input Authority
+
+ Object's input authority
+ True if the Player is the Input Authority, false otherwise
+
+
+
+ Check if the Local Player is the State Authority
+
+ Object's input authority
+ True if the Player is the State Authority, false otherwise
+
+
+
+ Get the State Authority PlayerRef for a NetworkObjectMeta
+
+ Player to check
+ PlayerRef of the State Authority for the NetworkObject
+
+
+
+ Return a copy if a Player's Connection Token
+
+ Player to check for the Connection Token
+ Connection Token Copy
+
+
+
+ Return the Address of a remote Player
+
+ Player to check for the NetAddress
+ NetAddress of a specific player
+
+
+
+ Return the UniqueId as a long from a specific Player
+
+ Player to check for the UniqueId
+ UniqueId of a specific Player
+
+
+
+ Get the Simulation Input for a specific Player
+
+ Player to check for the Simulation Input
+ Simulation Input for a specific Player
+
+
+
+ Signal if the Server has any Active Connection with any number of Clients.
+
+ True, if at least one connection is active, false otherwise.
+
+
+
+ Callback invoked before the Simulation Update
+
+
+
+
+ Callback invoked after the Simulation Update
+
+
+
+
+ Forwards the Simulation based on the Delta Time
+
+ Delta Time used to forward the simulation
+ How many Ticks executed on this Update
+
+
+
+ Set the rate at which reliable data is sent in hz.
+ Minimum value is 1hz, maximum value is the same as the
+ Increasing this value increases the throughput when sending reliable data such as with .
+
+
+
+ Returns the number of objects in the simulation.
+
+
+ Returns a map of all objects in the simulation.
+
+
+
+ Gets a bitmask of flags, representing the current local authority over this .
+
+
+
+
+ Enqueue a on the Out Message List for a specific
+
+ Message to enqueue
+ Target Connection
+
+
+
+ Disconnect a client based on it's NetAddress
+
+ Client Adress to Disconnect
+
+
+
+ Dispose Host Migration data
+
+
+
+
+ Process the serialized data from the bytebuffer into a organized Dictionary of NetIDs=NO Snapshots
+
+ Data buffer to read the data from
+ Target dictionary that will be filled with NetworkObjects data
+ Allocator used to create new
+
+
+
+ Result flags for the RPC message send operation.
+
+
+
+
+ Invalid result.
+
+
+
+
+ Client sent to the server, server will send to the target client.
+
+
+
+
+ Server sent to a specific client (a targeted message).
+
+
+
+
+ Server attempted to send to all the clients and at least one succeeded.
+
+
+
+
+ Target object not confirmed on the client.
+
+
+
+
+ Target object not in client's interest. Likely due to being outside of player's AOI region, or needs to be explicitly set as always interested.
+
+
+
+
+ Target client not connected (a targeted message).
+
+
+
+
+ Server attempted to send to all the clients, but none was connected.
+
+
+
+
+ Server attempted to send to all the clients, but the target object is not confirmed/not in Object Interest for all target clients.
+
+
+
+ Mask for sent messages.
+
+
+ Mask for not sent messages.
+
+
+ Mask for broadcast messages.
+
+
+ Mask for culled messages.
+
+
+
+
+
+
+
+
+ Classic server and client model
+
+
+
+
+ Relay based shared world model
+
+
+
+
+ Project configuration settings specific to how the Simulation class behaves.
+
+
+
+
+
+
+
+
+
+ Send delta compressed and redundant input, used for most games
+
+
+
+
+ Send redundant input, use for games with small input structs (like fps games) and high player count
+
+
+
+
+ Only send latest input state, useful for VR, etc.
+
+
+
+
+
+
+
+
+
+ When a 's data changes, the server will send all properties
+ whose changes have not been acknowledged.
+
+
+
+ This option consumes more bandwidth, but guarantees that each
+ has consistent state.
+
+
+
+
+
+
+ When a 's data changes, the server will only send the newly
+ changed properties.
+
+
+
+ This option consumes less bandwidth, but a may have
+ inconsistent state at times (some properties up-to-date but not others).
+
+
+
+
+
+ The time mode that the uses to calculate the delta time for the simulation update.
+
+
+
+
+ Use Time.UnscaledDeltaTime. Time is not affected by timescale and keeps running when the editor is paused.
+
+
+
+
+ Use Time.DeltaTime. Only for . Can be used to allow for timescale changes in gameplay or to pause the game and continue without interruption when stopping at a debug breakpoint.
+
+
+
+ Input Data Word Count
+
+
+ Scheduling is the default.
+
+
+ Signal if scheduling is enabled
+
+
+ Signal if AOI is enabled
+
+
+ Signal if scheduling is running without AOI
+
+
+
+ The way which input is transferred
+
+
+
+
+ How the server chooses to send updates to balance consistency and bandwidth consumption.
+
+
+
+
+ The time mode that the Runner uses to update the simulation.
+ -
+
+
+
+ The default number of players allowed to join a game instance. Can also be changed in code when starting Fusion.
+ The 1-255 range is purely a limit in the inspector the player count can be set to any positive int value via code by changing the value of the
+ or by passing a player count override via .
+
+
+
+
+ The default tick rate to use. Can also be changed in code when starting Fusion.
+
+
+
+
+ The topology used
+
+
+
+
+ If, in host mode, we should allow host migration if the current host leaves.
+
+
+
+
+ The amount of object destroys Fusion sends per packet.
+ Increasing this value means Fusion prioritizes sending more destroys before regular state changes.
+ Setting this value to 255, can help with problems when unloading scenes with many runtime spawned objects (such as Spawned/Despawned being called on those objects multiple times).
+
+
+
+
+ If set to true, makes sure Fusion packets fit into UDP MTU on retries, thus avoiding fragmentation. This can help in poor network conditions, when
+ larger Fusion packets are rejected due to UDP packets arriving out of order or being lost, at a cost of more packets being sent overall, especially
+ when using large state objects.
+
+
+
+
+ If set to true, makes sure Fusion packets fit into UDP MTU on retries, thus avoiding fragmentation. This can help in poor network conditions, when
+ larger Fusion packets are rejected due to UDP packets arriving out of order or being lost, at a cost of more packets being sent overall, especially
+ when using large state objects.
+
+
+
+
+
+
+
+
+
+ Enable Serializers
+
+
+
+
+
+
+
+
+
+ Memory Heap Settings
+
+
+
+
+ Default size of each Heap Page
+
+
+
+
+ Default number of Heap Pages
+
+
+
+
+ Heap Global Size
+
+
+
+
+ Initializes and creates a new based on the Global Size
+
+
+
+
+ ToString
+
+
+
+
+ Main network configuration class.
+
+
+
+
+ Flag for allowed Reliable Data transfer modes.
+
+
+
+
+ Allow Client to Server.
+
+
+
+
+ Allow Client to Client using Server as Proxy.
+
+
+
+
+ Size in Kilobytes of the underlying socket send buffer.
+
+
+
+
+ Size in Kilobytes of the underlying socket receive buffer.
+
+
+
+
+ Max number of connection attempts that a Client will run when trying to connect to a remote Server.
+
+
+
+
+ Interval in seconds between each connection attempt from a Client.
+
+
+
+
+ Default assumed RTT in seconds for new connections (before actual RTT has been determined). The real RTT is calculated over time once the connection is established.
+
+
+
+
+ Max allowed time in seconds that the local peer can run without receiving any update from a remote peer.
+ If a client does not receive any update from the server within this period, it will disconnect itself.
+ If a server does not receive any update from a remote client within this period, it will disconnect that particular client.
+
+
+
+
+ Interval in seconds between PING messages sent to a remote connection, in order to keep that connection alive.
+
+ Currently unused.
+
+
+
+ Default delay between connection changes status to Shutdown (disconnected/invalid), and it actually being released (freeing all references to that particular connection).
+
+
+
+
+ Current mode.
+
+
+
+
+ Initializes and creates a copy of this .
+
+ A copy of this .
+
+
+
+ Convert this into a using the as reference.
+
+
+
+
+ Configuration for network conditions simulation (induced latency and loss).
+
+
+
+
+ If adverse network conditions are being simulated.
+
+
+
+
+ The pattern used to oscillate between and values.
+
+
+
+
+ The lowest packet delay value returned from the oscillator.
+
+
+
+
+ The highest packet delay value returned from the oscillator.
+
+
+
+
+ The period of the oscillator (the rate at which delay oscillates in seconds).
+
+
+
+
+ The oscillates between 0 and 1. Values below this threshold are reduced to zero, resulting in a value equal to .
+
+
+
+
+ After the delay value from the oscillator is determined, random 0 to this value of additional seconds be added to the packet latency.
+
+
+
+
+ The pattern used to oscillate between and values.
+
+
+
+
+ The lowest loss chance value the oscillator will produce. 0 = 0% chance of being lost. 1 = 100% chance of being lost.
+
+
+
+
+ The highest loss chance value the oscillator will produce. 0 = 0% chance of being lost. 1 = 100% chance of being lost.
+
+
+
+
+ The wave oscillates between 0 and 1. Values below this threshold are reduced to zero, resulting in a value equal to .
+
+
+
+
+ The period of the oscillator (the rate at which delay oscillates between and ).
+
+
+
+
+ After the oscillation loss chance is calculated, an additional random value of 0 to this (normalized) percentage of loss chance is added.
+
+
+
+ Creates a copy of this .
+
+
+
+ Creates a new based on the current configuration.
+
+ A new based on the current configuration.
+
+
+
+ Time Synchronization Configuration
+
+
+
+
+ How big of a window the client looks at to evaluate the latest network conditions.
+ Increasing this makes the client slower to adapt to changes.
+
+
+
+
+ The maximum percentage of inputs that should ever arrive late because of jitter.
+ Decreasing this increases the client's simulation offset.
+
+
+
+
+ The maximum percentage of snapshots that should ever arrive late because of jitter.
+ Decreasing this increases the client's interpolation delay.
+
+
+
+
+ The number of consecutive, additional chances each input should have to reach the server before it's needed.
+ Increasing this increases the client's simulation offset.
+
+
+
+
+ The number of consecutive snapshots a client should be able to miss without disrupting their interpolation.
+ Increasing this increases the client's interpolation delay.
+
+
+
+
+
+ The maximum percentage the client's simulation can speed up or slow down
+ to maintain its target simulation offset.
+
+
+
+
+
+
+ The maximum percentage the client's interpolation can speed up or slow down
+ to maintain its target interpolation delay.
+
+
+
+
+
+ Simulation Input
+
+
+
+
+ Buffer for s.
+
+
+
+ Number of inputs in the buffer.
+
+
+ Whether the buffer is full.
+
+
+
+ Creates a new .
+
+ Network project configuration.
+
+
+ Clears the buffer.
+
+
+
+ Copies the buffer to an array and sorts it.
+
+ Array to copy to.
+ Number of elements copied.
+
+
+
+ Whether the buffer contains an input for .
+
+ Tick to check.
+ Whether the buffer contains an input for .
+
+
+
+ Removes an input for from the buffer.
+
+ Tick to remove.
+ Removed input.
+ Whether an input was removed.
+
+
+
+ Gets the insert time for .
+
+ Tick to get insert time for.
+ Insert time for .
+
+
+
+ Gets the input for .
+
+ Tick to get input for.
+ Input for .
+
+
+
+ Retrieves the last used input header data.
+
+ The last used input header data.
+
+
+
+ Adds an input to the buffer.
+
+ Input to add.
+ Insert time for .
+ Whether the input was added.
+
+
+
+ Player that owns this input.
+
+
+
+
+ Header for this input.
+
+
+
+
+ Data for this input.
+
+
+
+
+ Simulation input sent count.
+
+
+
+
+ Clear a total of words from this input.
+
+ Word count to clear.
+
+
+
+ Copy words from to this input.
+
+ Input to copy from.
+ Word count to copy.
+
+
+
+ Simulation Input Header
+
+
+
+ Word count of the header.
+
+
+ Size of the header.
+
+
+ Tick of the input.
+
+
+ Interpolation alpha of the input.
+
+
+ Interpolation from tick of the input.
+
+
+ Interpolation to tick of the input.
+
+
+
+ Simulation Message
+
+
+
+ SimulationMessage size in bytes.
+
+
+ Max user message size in bytes.
+
+
+ Flag for user messages.
+
+
+ Flag for remote messages.
+
+
+ Flag for static messages.
+
+
+ Flag for unreliable messages.
+
+
+ Flag for targeted messages to a player.
+
+
+ Flag for targeted messages to the server.
+
+
+ Flag for internal messages.
+
+
+ Flag for messages that are not tick aligned.
+
+
+ Flag for dummy messages.
+
+
+ Flag for user flags.
+
+
+ Flag for reserved flags.
+
+
+ Flag for reserved bits.
+
+
+
+ Tick of this
+
+
+
+
+ Source Player of this
+
+
+
+
+ Capacity in Bits of this
+
+
+
+
+ Current offset in Bits
+
+
+
+
+ Reference Count
+
+
+
+
+ Flags
+
+
+
+
+ Target Player of this
+
+
+
+
+ Add a reference to this
+
+
+
+
+ Subtract a reference from this
+
+ True if the reference count is now 0
+
+
+
+ Set the player target of this
+
+ Target Player
+
+
+
+ Set this as Static
+
+
+
+
+ Set this as Unreliable
+
+
+
+
+ Set this as Not Tick Aligned
+
+
+
+
+ Set this as Dummy
+
+
+
+
+ Get if a flag is set on this
+
+ Flag to check
+ True if the flag is set
+
+
+
+ Signal if this is Targeted
+
+ True if this is Targeted
+
+
+
+ Signal if this is Unreliable
+
+
+
+
+ Create a copy of a
+
+ to allocate from
+ to copy
+ Copy of the
+
+
+
+ Get the byte pointer content of a
+
+ SimulationMessage to get the byte pointer of
+ Byte pointer of the
+
+
+
+ Get the byte pointer content of a
+
+ SimulationMessage to get the byte pointer of
+ Byte pointer of the
+
+
+
+ Allocate a new
+
+ Simulation to get the Memory from
+ Size in bytes of the new
+ Pointer to the new
+
+
+
+ Checks if a message with given size can be allocated.
+
+
+
+ Simulation Message ToString
+
+
+ Simulation Message ToString
+
+
+
+ Simulation Message Pointer
+
+
+
+
+ Pointer to the message.
+
+
+
+
+ Flags for The type of network peer a simulation represents.
+
+
+
+
+ Simulation represents a server peer, with no local player.
+
+
+
+
+ Simulation represents a server peer, with a local player.
+
+
+
+
+ Simulation represents a client peer, with a local player.
+
+
+
+
+ Stores the runtime configuration of the simulation
+
+
+
+
+ Current tick rates and send rates for server and client
+
+
+
+
+ Current Simulation Mode
+
+
+
+
+ Current player count
+
+
+
+
+ Current master client (in shared mode)
+
+
+
+
+ Current master client (in shared mode)
+
+
+
+
+ Current master client (in shared mode)
+
+
+
+
+ Flags for which stage the simulation currently running. Forward is when a tick is being simulated for the first time.
+ Resimulate is when a tick is being simulated again with corrections.
+
+
+
+
+ Currently simulating a tick for the first time.
+
+
+
+
+ Currently simulating a previously simulated tick again, with state corrections.
+
+
+
+
+ Reduces errors at a constant rate using an on-off controller.
+
+
+
+
+ The clock used to send inputs to the server. Later than Local by input delay. Currently input delay is always 0.
+
+
+
+
+ Local (or "simulation") time is the clock used to drive FixedUpdateNetwork. It is the tick FixedNetworkUpdate
+ should simulate up to.
+
+
+
+
+ Remote (or "interpolation") time is the clock used to select pairs of snapshots for interpolating remote
+ (proxy) objects.
+
+
+
+
+ Reduces errors at a variable rate using a PID controller.
+
+
+
+
+ NetworkInput Struct
+
+
+
+
+ Number of Words for the
+
+
+
+
+ Data pointer of the
+
+
+
+
+ Signal if the is valid or not
+
+
+
+
+ Get the Type associated with this
+
+
+
+
+ Tries to export data as the indicated T struct.
+
+
+
+
+ Tries to import data from a struct.
+
+
+
+
+ Gets the content of this as another type
+
+
+
+
+ Sets the content of this to another type
+
+
+
+
+ Converts the Type of this to another type
+
+
+
+
+
+
+
+ Checks if this is of a certain type
+
+
+
+
+ Network Physics
+
+
+
+
+ Word Count
+
+
+
+
+ Total Size
+
+
+
+
+ Time Scale
+
+
+
+
+ Base interface for all Fusion Network Structs
+
+
+
+
+ Utility methods for
+
+
+
+
+ Get the max word count from all registered types
+
+
+
+
+ Get Type Word Count if it is of type
+
+ Type to check for word count
+ Number of words for the
+
+
+
+ Get the Key associate with the argument Type
+
+ Type to check for the key
+ Associated Type Key, or an exception if not found
+
+
+
+ Get the Type based on its associate Key
+
+ Key associated with a Type
+ Type associated with the Key, or null otherwise
+
+
+
+ Utility methods for
+
+
+
+
+ Get Word Count
+
+ type reference
+ Number of Words necessary for this specific
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns boxed static instance.
+
+
+
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.xml.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.xml.meta
new file mode 100644
index 00000000..3da8c818
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Runtime.xml.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: d461b7cc07b37504f94b4a901b69e494
+labels:
+- FusionCodeDoc
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.dll b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.dll
new file mode 100644
index 00000000..622c04e6
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.dll differ
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.dll.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.dll.meta
new file mode 100644
index 00000000..3aea0d00
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.dll.meta
@@ -0,0 +1,33 @@
+fileFormatVersion: 2
+guid: 850f5b8096bb4c64abfef35065cde6b1
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.xml b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.xml
new file mode 100644
index 00000000..8a55d2a9
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.xml
@@ -0,0 +1,4479 @@
+
+
+
+ Fusion.Sockets
+
+
+
+
+ Responsible for encrypting and decrypting data buffers
+
+
+
+
+
+
+
+
+
+
+ Encrypts the data in the provided buffer.
+
+ The buffer containing the data to be encrypted.
+ The length of the data in the buffer.
+ The total capacity of the buffer.
+ Returns true if the encryption was successful, false otherwise.
+ Thrown when the encryption provider is not initialized.
+ Thrown when the original buffer cannot hold the encrypted data.
+
+
+
+
+
+
+
+
+
+
+
+
+ Build a new AES Implementation
+
+
+
+
+ Build a new HMACSHA256 Implementation
+
+
+
+
+ Clear and return the IN Encrypt Buffer
+
+
+
+
+ Clear and return the OUT Encrypt Buffer
+
+
+
+
+ Dispose of the DataEncryptor
+
+
+
+
+ Interface for classes that manage the encryption/decryption of byte arrays
+
+
+
+
+ Setup the encryption implementation with the right key
+
+
+
+
+ Generate the key used used by the encryption implementation
+
+ Key used to setup the encryption implementation
+
+
+
+ Encrypt data in place and update it's length.
+
+ Data to encrypt
+ Length of the data to encrypt
+ Buffer total capacity
+ True if the encryption was completed, false otherwise
+
+
+
+ Decrypt data in place and update it's length.
+
+ Data to decrypt
+ Length of the data to decrypt
+ Buffer total capacity
+ True if the decryption was completed, false otherwise
+
+
+
+ Compute the Buffer hash and append it to the buffer itself
+
+ Data to compute the hash
+ Length of the data to hash
+ Buffer total capacity
+ True if the hash was properly computed, false otherwise
+
+
+
+ Verify the buffer hash that was appended to the buffer
+
+ Buffer to check the hash
+ Length of the data to hash
+ Buffer total capacity
+ True if the hash was properly verified, false otherwise
+
+
+
+ The EncryptionManager class manages encryption keys for different handles.
+
+ A type that implements the IDataEncryption interface.
+ A type that implements the IEquatable interface.
+
+ This class is unsafe because it uses pointers in its methods.
+
+
+
+
+ A dictionary that maps handle IDs to their corresponding encryption objects.
+
+
+
+
+ Disposes all encryption objects in the _cyphers dictionary.
+
+
+ This method is called when the EncryptionManager object is being disposed.
+
+
+
+
+ Registers a new encryption key for a specific handle.
+
+ The handle ID for which the encryption key is to be registered.
+ The encryption key to be registered.
+
+
+
+ Deletes the encryption key for a specific handle.
+
+ The handle ID for which the encryption key is to be deleted.
+
+
+
+ Check if a handle has encryption setup
+
+ Handle ID
+ True if the handle has encryption setup, false otherwise
+
+
+
+ Wraps the provided buffer with encryption and computes a hash for it.
+
+ The handle ID for which the packet is to be encrypted and hashed.
+ The data buffer array containing the packet to be encrypted and hashed.
+ The length of the buffer array.
+ The total capacity of the buffer array.
+ Returns true if both the encryption and hash computation were successful, false otherwise.
+
+
+
+ Unwraps the provided buffer by verifying its hash and decrypting it.
+
+ The handle ID for which the packet is to be verified and decrypted.
+ The data buffer array containing the packet to be verified and decrypted.
+ The length of the buffer array.
+ The total capacity of the buffer array.
+ Returns true if both the hash verification and decryption were successful, false otherwise.
+
+
+
+ Generates a new encryption key.
+
+ A byte array representing the generated encryption key.
+
+
+
+ Computes the hash for the data in the buffer for a specific handle.
+
+ The handle for which to compute the hash.
+ The buffer containing the data to hash.
+ The length of the data in the buffer.
+ The total capacity of the buffer.
+ True if the hash was computed successfully, false otherwise.
+
+
+
+ Verifies the hash for the data in the buffer for a specific handle.
+
+ The handle for which to verify the hash.
+ The buffer containing the data to verify the hash.
+ The length of the data in the buffer.
+ The total capacity of the buffer.
+ True if the hash was verified successfully, false otherwise.
+
+
+
+ Encrypts a packet for a specific handle.
+
+ The handle ID for which the packet is to be encrypted.
+ The data buffer array containing the packet to be encrypted.
+ The length of the buffer array.
+ The total capacity of the buffer array.
+ Returns true if the encryption was successful, false otherwise.
+
+
+
+ Decrypts a packet from a specific handle.
+
+ The handle ID from which the packet is to be decrypted.
+ The data buffer array containing the packet to be decrypted.
+ The length of the buffer array.
+ The total capacity of the buffer array.
+ Returns true if the decryption was successful, false otherwise.
+
+
+
+ Represents an encryption token.
+
+
+
+
+ Configuration for the Encryption Feature
+
+
+
+
+ Enabled the Encryption Feature
+
+
+
+
+ Interface for writing bits to a stream.
+
+
+
+
+ Gets the current offset in bits.
+
+
+
+
+ Writes a 32-bit signed integer to the stream.
+
+ The 32-bit signed integer value to write.
+ The number of bits to write. Default is 32.
+
+
+
+ Writes a 32-bit signed integer to the stream with variable length encoding.
+
+ The 32-bit signed integer value to write.
+
+
+
+ Writes a 32-bit signed integer to the stream with variable length encoding and a specified block size.
+
+ The 32-bit signed integer value to write.
+ The block size for variable length encoding.
+
+
+
+ Writes a 64-bit unsigned integer to the stream with variable length encoding and a specified block size.
+
+ The 64-bit unsigned integer value to write.
+ The block size for variable length encoding.
+
+
+
+ Writes a boolean value to the stream.
+
+ The boolean value to write.
+ The boolean value that was written.
+
+
+
+ Writes a sequence of bytes to the stream, aligned to byte boundaries.
+
+ A pointer to the buffer containing the bytes to write.
+ The number of bytes to write.
+
+
+
+ Writes a sequence of bytes to the stream, aligned to byte boundaries.
+
+ A pointer to the buffer containing the bytes to write.
+
+
+
+ Represents a Network Address, which includes a IP and Port
+ This can contains either a IPv4 or a IPv6 address
+
+
+
+
+ Retrieves the Remote Actor ID which this Represents
+
+
+
+
+ Signal if the is a Relayed connection
+
+
+
+
+ Signal if the represents an IPv6 Address
+
+
+
+
+ Signal if the represents an IPv4 Address
+
+
+
+
+ Signal if this is not default/empty
+
+
+
+
+ Signal if this has a valid IP Address
+
+
+
+
+ Build a new based on an ActorId
+
+ ActorId used to build the NetAddress
+ Relay NetAddress that references the ActorId
+ ActorId must be 0 or greater
+
+
+
+ Build 64Bit Hash
+
+ Address to build the Hash
+ 64bit Hash
+
+
+
+ Create a new NetAddress on the LocalHost address with the desired Port
+
+ Port used to build the NetAddress
+ New NetAddress reference
+
+
+
+ Create a new on the LocalHost IPv6 Address with the desired Port
+
+ Port used to build the NetAddress
+ New NetAddress reference
+
+
+
+ Create a new NetAddress using the "Any" IPv4 Address representation (0.0.0.0)
+ with the Port passed as argument
+
+ Port used to build the NetAddress
+ New NetAddress reference
+
+
+
+ Create a new NetAddress using the "Any" IPv6 Address representation (::)
+ with the Port passed as argument
+
+ Port used to build the NetAddress
+ New NetAddress reference
+
+
+
+ Create a new NetAddress based on the IP and Port passed as argument
+
+ String representation of an IP, either IPv4 or IPv6
+ Port used to build the NetAddress
+ New NetAddress reference
+ If IP is empty/null or an invalid IP, or port < 0
+ If unable to parse IP
+
+
+
+ Determines whether the specified instances are equal.
+
+
+
+
+ Determines whether the specified is equal to the current .
+
+
+
+
+ Returns a hash code for this instance.
+
+
+
+
+ Provides a string representation of the
+
+
+
+
+ Provides methods to compare two instances for equality.
+
+
+
+
+ Determines whether the specified instances are equal.
+
+
+
+
+ Returns a hash code for the specified .
+
+
+
+
+ IPv4 Subnet Mask Utilities
+
+
+
+
+ List of IPv4 Subnet Masks
+
+
+
+
+ Check if two IPv4 seems to be in the same Subnet.
+
+ The addresses are checked against all subnet masks in .
+
+ EndPoint A
+ EndPoint B
+ True if both addresses seems to be in the same subnet
+
+
+
+ Extracts the Network Address of an IPv4 EndPoint based on a particular Subnet Mask
+
+ EndPoint
+ Subnet Mask
+ Network Address based on the Subnet Mask
+
+
+
+ Represents a buffer for reading and writing bits.
+
+
+
+
+ The address of the buffer.
+
+
+
+
+ Gets or sets a pointer to the data in the buffer.
+
+
+
+
+ Gets the length of the buffer in bits.
+
+
+
+
+ Gets the number of bytes remaining in the buffer.
+
+
+
+
+ Gets or sets the length of the buffer in bytes.
+
+
+
+
+ Gets or sets the current offset in bits.
+
+
+
+
+ Gets a value indicating whether the buffer has been fully read.
+
+
+
+
+ Gets a value indicating whether the buffer has overflowed.
+
+
+
+
+ Gets a value indicating whether the buffer has overflowed or has less than one byte remaining.
+
+
+
+
+ Gets or sets the current offset in bits without any safety checks.
+
+
+
+
+ Gets a value indicating whether the buffer is done or has overflowed.
+
+
+
+
+ Gets a value indicating whether there is more data to read in the buffer.
+
+
+
+
+ Gets or sets the packet type stored in the buffer.
+
+
+
+
+ Replaces the current data block with a temporary block of the specified size.
+
+ The size of the temporary block in bytes.
+
+
+
+ Represents an offset within a NetBitBuffer.
+
+
+
+
+ Initializes a new instance of the Offset struct with the specified buffer.
+
+ The buffer to initialize the offset from.
+
+
+
+ Gets the length in bits from the stored offset to the current offset of the buffer.
+
+ The buffer to calculate the length from.
+ The length in bits.
+
+
+
+ Gets the current offset of the specified buffer.
+
+ The buffer to get the offset from.
+ An Offset struct representing the current offset.
+
+
+
+ Allocates a new NetBitBuffer with the specified group and size.
+
+ The group identifier for the buffer.
+ The size of the buffer in bytes.
+ A pointer to the allocated NetBitBuffer.
+
+
+
+ Releases the reference to the specified buffer and sets it to null.
+
+ A reference to the buffer to release.
+
+
+
+ Releases the specified buffer.
+
+ The buffer to release.
+
+
+
+ Sets the buffer length in bytes and updates the internal length in bits.
+
+ A pointer to the buffer.
+ The length of the buffer in bytes.
+
+
+
+ Clears the buffer by setting all bits to zero.
+
+
+
+
+ Writes a boolean value to the buffer.
+
+ The boolean value to write.
+ The boolean value that was written.
+
+
+
+ Reads a boolean value from the buffer.
+
+ The boolean value read from the buffer.
+
+
+
+ Peeks at the next boolean value in the buffer without advancing the read position.
+
+ The boolean value peeked from the buffer.
+
+
+
+ Writes a byte value to the buffer.
+
+ The byte value to write.
+ The number of bits to write. Default is 8.
+
+
+
+ Reads a byte value from the buffer.
+
+ The number of bits to read. Default is 8.
+ The byte value read from the buffer.
+
+
+
+ Writes a 16-bit signed integer value to the buffer.
+
+ The 16-bit signed integer value to write.
+ The number of bits to write. Default is 16.
+
+
+
+ Reads a 16-bit signed integer value from the buffer.
+
+ The number of bits to read. Default is 16.
+ The 16-bit signed integer value read from the buffer.
+
+
+
+ Writes a 16-bit unsigned integer value to the buffer.
+
+ The 16-bit unsigned integer value to write.
+ The number of bits to write. Default is 16.
+
+
+
+ Reads a 16-bit unsigned integer value from the buffer.
+
+ The number of bits to read. Default is 16.
+ The 16-bit unsigned integer value read from the buffer.
+
+
+
+ Writes a 32-bit signed integer value to the buffer.
+
+ The 32-bit signed integer value to write.
+ The number of bits to write. Default is 32.
+
+
+
+ Reads a 32-bit signed integer value from the buffer.
+
+ The number of bits to read. Default is 32.
+ The 32-bit signed integer value read from the buffer.
+
+
+
+ Writes a 32-bit unsigned integer value to the buffer.
+
+ The 32-bit unsigned integer value to write.
+ The number of bits to write. Default is 32.
+
+
+
+ Writes a string to the buffer using UTF-8 encoding.
+
+ The string to write.
+
+
+
+ Writes a string to the buffer using the specified encoding.
+
+ The string to write.
+ The encoding to use.
+
+
+
+ Reads a string from the buffer using UTF-8 encoding.
+
+ The string read from the buffer.
+
+
+
+ Reads a string from the buffer using the specified encoding.
+
+ The encoding to use.
+ The string read from the buffer.
+
+
+
+ Checks if the specified number of bits can be written to the buffer.
+
+ The number of bits to check.
+ true if the specified number of bits can be written; otherwise, false.
+
+
+
+ Checks if the specified number of bits can be read from the buffer.
+
+ The number of bits to check.
+ true if the specified number of bits can be read; otherwise, false.
+
+
+
+ Gets a value indicating whether the buffer is aligned to an even byte boundary.
+
+
+
+
+ Gets the current offset in bytes.
+
+
+
+
+ Pads the buffer to the next byte boundary by writing zero bits if necessary.
+
+
+
+
+ Gets a pointer to the current data position in the buffer.
+
+ A pointer to the current data position in the buffer.
+
+
+
+ Pads the buffer to the next byte boundary and returns a pointer to the current data position.
+
+ A pointer to the current data position in the buffer after padding to the byte boundary.
+
+
+
+ Checks if the specified number of bits can be read or written without exceeding the buffer length.
+
+ The number of bits to check.
+ true if the specified number of bits can be read or written; otherwise, false.
+
+
+
+ Advances the buffer offset to the next byte boundary.
+
+
+
+
+ Writes an array of bytes to the buffer, ensuring byte alignment.
+
+ The array of bytes to write.
+ The number of bytes to write.
+
+
+
+ Writes a block of bytes to the buffer, ensuring byte alignment.
+
+ A pointer to the block of bytes to write.
+ The number of bytes to write.
+
+
+
+ Writes a block of bytes to the buffer, ensuring byte alignment.
+
+ A pointer to the block of bytes to write.
+
+
+
+ Reads an array of bytes from the buffer, ensuring byte alignment.
+
+ The array to store the read bytes.
+ The number of bytes to read.
+
+
+
+ Reads a block of bytes from the buffer, ensuring byte alignment.
+
+ A pointer to the block of bytes to store the read data.
+
+
+
+ Reads a block of bytes from the buffer, ensuring byte alignment.
+
+ A pointer to the block of bytes to store the read data.
+ The number of bytes to read.
+
+
+
+ Writes a 64-bit signed integer value with variable length to the buffer.
+
+ The 64-bit signed integer value to write.
+ The block size in bits.
+
+
+
+ Writes a 32-bit signed integer value with variable length to the buffer.
+
+ The 32-bit signed integer value to write.
+
+
+
+ Writes a 32-bit signed integer value with variable length to the buffer.
+
+ The 32-bit signed integer value to write.
+ The block size in bits.
+
+
+
+ Reads a 32-bit signed integer value with variable length from the buffer.
+
+ The 32-bit signed integer value read from the buffer.
+
+
+
+ Reads a 64-bit signed integer value with variable length from the buffer.
+
+ The block size in bits.
+ The 64-bit signed integer value read from the buffer.
+
+
+
+ Reads a 32-bit signed integer value with variable length from the buffer.
+
+ The block size in bits.
+ The 32-bit signed integer value read from the buffer.
+
+
+
+ Reads a 32-bit unsigned integer value with variable length from the buffer.
+
+ The block size in bits.
+ The 32-bit unsigned integer value read from the buffer.
+
+
+
+ Reads a 64-bit unsigned integer value with variable length from the buffer.
+
+ The block size in bits.
+ The 64-bit unsigned integer value read from the buffer.
+
+
+
+ Writes a 32-bit unsigned integer value with variable length to the buffer.
+
+ The 32-bit unsigned integer value to write.
+ The block size in bits.
+
+
+
+ Writes a 64-bit unsigned integer value with variable length to the buffer.
+
+ The 64-bit unsigned integer value to write.
+ The block size in bits.
+
+
+
+ Writes a 32-bit unsigned integer value with variable length to the buffer.
+
+ The 32-bit unsigned integer value to write.
+
+
+
+ Reads a 32-bit unsigned integer value with variable length from the buffer.
+
+ The 32-bit unsigned integer value read from the buffer.
+
+
+
+ Reads a 32-bit unsigned integer value from the buffer.
+
+ The number of bits to read. Default is 32.
+ The 32-bit unsigned integer value read from the buffer.
+
+
+
+ Writes a 64-bit signed integer value to the buffer.
+
+ The 64-bit signed integer value to write.
+ The number of bits to write. Default is 64.
+
+
+
+ Reads a 64-bit signed integer value from the buffer.
+
+ The number of bits to read. Default is 64.
+ The 64-bit signed integer value read from the buffer.
+
+
+
+ Writes a 64-bit unsigned integer value to the buffer.
+
+ The 64-bit unsigned integer value to write.
+ The number of bits to write. Default is 64.
+
+
+
+ Reads a 64-bit unsigned integer value from the buffer.
+
+ The number of bits to read. Default is 64.
+ The 64-bit unsigned integer value read from the buffer.
+
+
+
+ Writes a single-precision floating-point value to the buffer.
+
+ The single-precision floating-point value to write.
+
+
+
+ Reads a single-precision floating-point value from the buffer.
+
+ The single-precision floating-point value read from the buffer.
+
+
+
+ Writes a double-precision floating-point value to the buffer.
+
+ The double-precision floating-point value to write.
+
+
+
+ Reads a double-precision floating-point value from the buffer.
+
+ The double-precision floating-point value read from the buffer.
+
+
+
+ Writes a 32-bit integer value at a specified offset in the buffer.
+
+ The 32-bit integer value to write.
+ The offset in bits where the value should be written.
+ The number of bits to write.
+
+
+
+ Writes a 64-bit unsigned integer value at a specified offset in the buffer.
+
+ The 64-bit unsigned integer value to write.
+ The offset in bits where the value should be written.
+ The number of bits to write.
+
+
+
+ Writes a value to the buffer with a specified number of bits.
+
+ The value to write.
+ The number of bits to write.
+
+
+
+ Writes a value to the buffer with a specified number of bits, handling cases where the value spans multiple words.
+
+ The value to write.
+ The number of bits to write.
+
+
+
+ Represents a linked list of
+
+
+
+
+ Add a at the beginning of the List
+
+ NetBitBuffer to add to the list
+
+
+
+ Add a at the end of the list.
+
+ NetBitBuffer to add to the list
+
+
+
+ Removes the first element of the list
+
+ NetBitBuffer reference
+
+
+
+ Remove a specific from the list
+
+ NetBitBuffer to remove
+
+
+
+ Check if a specific is in the list
+
+ NetBitBuffer to check
+ True if the list contains the item, false otherwise
+
+
+
+ Represents a null bit buffer for writing data.
+
+
+
+
+ Gets or sets the offset in bits.
+
+ The current offset in bits.
+
+
+
+ Pads the buffer to the next byte boundary by writing zero bits if necessary.
+
+
+
+
+ Writes a byte value to the buffer and increments the offset by the specified number of bits.
+
+ The byte value to write.
+ The number of bits to write. Default is 8.
+
+
+
+ Writes a 32-bit integer value to the buffer and increments the offset by the specified number of bits.
+
+ The 32-bit integer value to write.
+ The number of bits to write. Default is 32.
+
+
+
+ Writes a 32-bit integer value with variable length encoding.
+
+ The 32-bit integer value to write.
+
+
+
+ Writes a 32-bit integer value with variable length encoding and a specified block size.
+
+ The 32-bit integer value to write.
+ The block size for encoding.
+
+
+
+ Writes a 32-bit unsigned integer value with variable length encoding and a specified block size.
+
+ The 32-bit unsigned integer value to write.
+ The block size for encoding.
+
+
+
+ Writes a 64-bit unsigned integer value with variable length encoding and a specified block size.
+
+ The 64-bit unsigned integer value to write.
+ The block size for encoding.
+
+
+
+ Writes a 32-bit unsigned integer value with variable length encoding.
+
+ The 32-bit unsigned integer value to write.
+
+
+
+ Writes a boolean value to the buffer and increments the offset by 1 bit.
+
+ The boolean value to write.
+ The boolean value that was written.
+
+
+
+ Writes a specified number of bytes from a buffer to the bit buffer, ensuring byte alignment.
+
+ A pointer to the buffer containing the bytes to write.
+ The number of bytes to write.
+
+
+
+ Writes a specified number of bytes from a buffer to the bit buffer, ensuring byte alignment.
+
+ A pointer to the buffer containing the bytes to write.
+
+
+
+ Represents a serializer for reading and writing data to a .
+
+
+
+
+ Gets a value indicating whether the serializer is in write mode.
+
+
+
+
+ Gets a value indicating whether the serializer is in read mode.
+
+
+
+
+ Gets the buffer associated with the serializer.
+
+
+
+
+ Creates a new instance of for writing to the buffer.
+
+ The buffer to write to.
+ A new instance of configured for writing.
+
+
+
+ Creates a new instance of for reading from the buffer.
+
+ The buffer to read from.
+ A new instance of configured for reading.
+
+
+
+ Checks the boolean value and writes or reads it from the buffer based on the serializer mode.
+
+ The boolean value to check.
+ The boolean value read from the buffer if in read mode, otherwise the value written to the buffer.
+
+
+
+ Serializes a float value by writing or reading it from the buffer based on the serializer mode.
+
+ The float value to serialize.
+
+
+
+ Serializes a byte value by writing or reading it from the buffer based on the serializer mode.
+
+ The byte value to serialize.
+
+
+
+ Serializes a boolean value by writing or reading it from the buffer based on the serializer mode.
+
+ The boolean value to serialize.
+
+
+
+ Serializes an integer value by writing or reading it from the buffer based on the serializer mode.
+
+ The integer value to serialize.
+
+
+
+ Serializes an unsigned integer value by writing or reading it from the buffer based on the serializer mode.
+
+ The unsigned integer value to serialize.
+
+
+
+ Serializes an unsigned long value by writing or reading it from the buffer based on the serializer mode.
+
+ The unsigned long value to serialize.
+
+
+
+ Serializes a string value by writing or reading it from the buffer based on the serializer mode.
+
+ The string value to serialize.
+
+
+
+ Describe the Type of a Command Packet
+
+
+
+
+ Network Command Header
+ Describe its type and usual settings for all commands
+
+
+
+
+ Create a new NetCommandHeader based on a type
+
+ Type of Command that should be created
+ New NetCommandHeader reference based on the Command Type
+
+
+
+ Connect Command used to signal a remote server that a client is trying to connect to it
+
+
+
+
+ Accepted Command, sent by the server when a remote client connection is accepted
+
+
+
+
+ Refuse Command, sent by the server when the connection was refused.
+ This happens when the server has reached its max connection capacity.
+
+
+
+
+ Disconnect Command, it can be used by either side of the connection
+
+
+
+
+ General configuration used to drive the behavior of the Socket library
+
+
+
+
+ Pre-allocated number of data buffers used to send data
+
+
+
+
+ Number of Connection Groups supported by the local instance
+
+
+
+
+ Max Number of Connections supported by the local instance
+
+
+
+
+ Max number of Connection per Group based on the and
+
+
+
+
+ Size of the internal Socket send buffer
+
+
+
+
+
+ Size of the internal Socket receive buffer
+
+
+
+
+
+ UDP Packet Size in Bytes
+
+
+
+
+ UDP Packet Size in Bits based on
+
+
+
+
+ Number of Connection Attempts tried by the peer before cancel the connection
+
+
+
+
+ Interval in Seconds between attempts to connect to a remote server
+
+
+
+
+ Max Allowed time for the Send and Receive operations, in milliseconds
+
+
+
+
+ Initial RTT
+
+
+
+
+ Connection Timeout in seconds
+
+
+
+
+ Interval in Seconds between ping being sent to a remote end
+
+
+
+
+ Timeout in Seconds to allow a disconnected Connection to be released from the Group Mapping
+
+
+
+
+
+
+
+
+ Network Address used to bind the internal Socket
+
+
+
+
+ Package acknowledgment system configuration
+
+
+
+
+ Network simulation system configuration
+
+
+
+
+ Builds a with the default values
+
+
+
+
+ Represents the configuration for network notifications.
+
+
+
+
+ The number of bytes used for acknowledgment masks.
+
+
+
+
+ The count of forced acknowledgments.
+
+
+
+
+ The timeout for forced acknowledgments.
+
+
+
+
+ The size of the window.
+
+
+
+
+ The number of bytes used for sequences.
+
+
+
+
+ Gets the sequence bounds, calculated as WindowSize * 16.
+
+
+
+
+ Gets the number of bits used for acknowledgment masks.
+
+
+
+
+ Gets the default configuration for network notifications.
+
+
+
+
+ Represents the configuration for network simulation.
+
+
+
+
+ Pointer to the sequences used for loss notifications.
+
+
+
+
+ The length of the loss notification sequences.
+
+
+
+
+ The oscillator used for simulating delay.
+
+
+
+
+ The oscillator used for simulating loss.
+
+
+
+
+ The chance of a duplicate packet.
+
+
+
+
+ Gets the default configuration for network simulation.
+
+
+
+
+ Creates a configuration with specified loss notification sequences.
+
+ The sequences to be used for loss notifications.
+ A new instance of with the specified sequences.
+
+
+
+ Represents an oscillator configuration for network simulation.
+
+
+
+
+ Defines the shape of the wave.
+
+
+
+
+ Random noise wave shape.
+
+
+
+
+ Sine wave shape.
+
+
+
+
+ Square wave shape.
+
+
+
+
+ Triangle wave shape.
+
+
+
+
+ Sawtooth wave shape.
+
+
+
+
+ Reverse sawtooth wave shape.
+
+
+
+
+ The shape of the wave.
+
+
+
+
+ The minimum value of the wave.
+
+
+
+
+ The maximum value of the wave.
+
+
+
+
+ The period of the wave in seconds.
+
+
+
+
+ The threshold value for the wave.
+
+
+
+
+ Additional noise to be added to the wave.
+
+
+
+
+ Calculates the value of the wave at a given time.
+
+ The random number generator.
+ The elapsed time in seconds.
+ The calculated wave value.
+
+
+
+ The reason a connection with a remote server has failed
+
+
+
+
+ Server is not responding.
+
+
+
+
+ Server has accepted the max allowed Players
+
+
+
+
+ Server refused the connection
+
+
+
+
+ Network connection
+
+
+
+
+ Client Unique ID size in bytes
+
+
+
+
+ Gets a value indicating whether the connection is active.
+
+
+
+
+ Gets the round-trip time (RTT) for the connection.
+
+
+
+
+ Gets the remote address of the connection.
+
+
+
+
+ Gets the current status of the connection.
+
+
+
+
+ Gets the local connection ID.
+
+
+
+
+ Gets the remote connection ID.
+
+
+
+
+ Returns a string that represents the current NetConnection.
+
+
+
+
+ Represents a network connection ID.
+
+
+
+
+ An equality comparer for NetConnectionId instances.
+
+
+
+
+ Compares two NetConnectionId instances for equality.
+
+
+
+
+ Get the hash code for the NetConnectionId.
+
+
+
+ The group of the connection.
+
+
+ The index of the connection within the group.
+
+
+
+ Compares this NetConnectionId to another for equality.
+
+
+
+
+ Compares this NetConnectionId to another for equality.
+
+
+
+
+ Get the hash code for this NetConnectionId.
+
+
+
+
+ Compares two NetConnectionId instances for equality.
+
+
+
+
+ Compares two NetConnectionId instances for inequality.
+
+
+
+
+ NetConnectionId ToString
+
+
+
+
+ Represents a network connection map.
+
+
+
+
+ Represents the state of an entry in the `NetConnectionMap`.
+
+
+
+
+ The entry is not in use.
+
+
+
+
+ The entry is free and available for use.
+
+
+
+
+ The entry is currently in use.
+
+
+
+
+ Iterator for traversing the connections in a `NetConnectionMap`.
+
+
+
+
+ Gets the current connection in the iteration.
+
+
+
+
+ Initializes a new instance of the `Iterator` struct.
+
+ The `NetConnectionMap` to iterate over.
+
+
+
+ Gets a value indicating whether the current index is valid.
+
+
+
+
+ Advances the iterator to the next connection.
+
+ True if the iterator was successfully advanced to the next connection, otherwise false.
+
+
+
+ Disposes of the specified `NetConnectionMap` and its associated resources.
+
+ A pointer to the `NetConnectionMap` to dispose.
+ The callbacks to invoke during disposal.
+
+
+
+ Allocates and initializes a new `NetConnectionMap` with the specified capacity and group index.
+
+ The number of connections the map can hold.
+ The group index associated with the connections.
+ The configuration settings for the network connections.
+ A pointer to the newly allocated `NetConnectionMap`.
+
+
+
+ Gets the count of used connections minus the free connections.
+
+
+
+
+ Gets the count of used connections.
+
+
+
+
+ Gets the buffer of connections.
+
+
+
+
+ Gets a value indicating whether the connection map is full.
+
+
+
+
+ Remaps a connection from an old address to a new address.
+
+ The old address of the connection.
+ The new address of the connection.
+ A pointer to the remapped connection, or null if the remapping failed.
+
+
+
+ Removes a connection from the network peer group by its address.
+
+ The address of the connection to remove.
+ True if the connection was successfully removed, otherwise false.
+
+
+
+ Inserts a new connection into the network peer group using the specified address and unique ID.
+
+ The address of the connection to insert.
+ The unique ID of the connection to insert.
+ A pointer to the newly inserted connection, or null if the connection is already in use or the capacity is full.
+
+
+
+ Gets a connection by its index in the network peer group.
+
+ The index of the connection to retrieve.
+ A pointer to the connection if found, otherwise throws an IndexOutOfRangeException.
+ Thrown when the index is out of the usable capacity range.
+
+
+
+ Tries to get a connection by its index in the network peer group.
+
+ The index of the connection to retrieve.
+ Output parameter that will point to the connection if found.
+ True if the connection was found, otherwise false.
+
+
+
+ Finds a connection by its ID in the network peer group.
+
+ The ID of the connection to find.
+ A pointer to the connection if found, otherwise null.
+
+
+
+ Finds a connection by its address in the network peer group.
+
+ The address of the connection to find.
+ A pointer to the connection if found, otherwise null.
+
+
+
+ Represents the status of a network connection.
+
+
+
+
+ The connection has been created.
+
+
+
+
+ The connection is in the process of connecting.
+
+
+
+
+ The connection is established.
+
+
+
+
+ The connection has been disconnected.
+
+
+
+
+ The connection has been shut down.
+
+
+
+
+ Disconnect Reason Flag
+
+
+ Disconnect Reason Flag
+
+
+
+
+ The reason for disconnection is unknown.
+
+
+
+
+ The connection timed out.
+
+
+
+
+ The disconnection was requested.
+
+
+
+
+ The sequence is out of bounds.
+
+
+
+
+ The send window is full.
+
+
+
+
+ The disconnection was initiated by the remote party.
+
+
+
+
+ Describe the type of a Networked Packet
+
+
+
+
+ Network Peer
+
+
+
+
+ IPv6 header: 40 bytes, UDP header: 8 bytes, Realtime Header: 96 bytes
+
+
+
+
+ MaximumTransferUnit total bytes.
+
+ The maximum size of bytes that can be sent in a single UDP packet.
+
+
+
+
+ MaximumTransferUnit payload bytes.
+
+ The maximum number of bytes available for data(payload) in a single UDP packet.
+
+
+
+
+ MaximumTransferUnit bits. (ipv6 header: 40 bytes, udp header: 8 bytes)
+
+ Same as but in bits.
+
+
+
+
+ Max packet payload size in bytes. (Considering the NetNotifyHeader size for each fragment)
+
+ The maximum number of bytes available for data that can be fragmented into multiple packets of size .
+
+
+
+
+ Max packet total size in bytes.
+
+ The maximum number of bytes that can be fragmented into multiple packets of size .
+
+
+
+
+ Maximum number of fragments.
+
+
+
+
+ Flag for the last fragment.
+
+
+
+
+ Gets the network address of the peer.
+
+
+
+
+ Gets the configuration settings for the peer.
+
+
+
+
+ Gets the number of connection groups.
+
+
+
+
+ Gets a value indicating whether the peer is shut down.
+
+
+
+
+ Gets a pointer to the configuration settings of the specified NetPeer.
+
+ A pointer to the NetPeer instance.
+ A pointer to the NetConfig if the peer is not shut down; otherwise, null.
+
+
+
+ Gets a pointer to the NetPeerGroup at the specified index.
+
+ A pointer to the NetPeer instance.
+ The index of the NetPeerGroup.
+ A pointer to the NetPeerGroup if the peer is not shut down; otherwise, null.
+
+
+
+ Updates the state of the specified NetPeer.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ A random number generator.
+
+
+
+ Updates the state of the specified NetPeer and indicates whether work was done.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ A pointer to a boolean indicating whether work was done.
+ A random number generator.
+
+
+
+ Receives data for the specified NetPeer.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ A random number generator.
+
+
+
+ Receives data for the specified NetPeer and indicates whether work was done.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ A pointer to a boolean indicating whether work was done.
+ A random number generator.
+
+
+
+ Remaps the network address of the specified NetPeer.
+
+ A pointer to the NetPeer instance.
+ The old network address.
+ The new network address.
+
+
+
+ Sends data for the specified NetPeer.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ /// The amount of fragments sent
+
+
+
+ Sends data for the specified NetPeer and indicates whether work was done.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ A pointer to a boolean indicating whether work was done.
+ The amount of fragments sent
+
+
+
+ Initializes a new instance of the NetPeer structure with the specified configuration and socket.
+
+ The configuration settings for the NetPeer.
+ The socket used for network communication.
+ A pointer to the newly initialized NetPeer instance.
+
+
+
+ Initializes the specified NetPeer instance with the given configuration and socket.
+
+ A pointer to the NetPeer instance.
+ The configuration settings for the NetPeer.
+ The socket used for network communication.
+
+
+
+ Destroys the specified NetPeer instance and releases associated resources.
+
+ A pointer to the NetPeer instance.
+ The socket used for network communication.
+ The callbacks for the NetPeerGroup.
+
+
+ The amount of fragments sent
+
+
+ The amount of fragments sent
+
+
+
+ Network Peer Group.
+
+
+
+
+ Gets the elapsed time in seconds.
+
+
+
+
+ Gets the group index.
+
+
+
+
+ Gets the number of active connections.
+
+
+
+
+ Gets a connection by its ID in the network peer group.
+
+ Pointer to the network peer group.
+ The ID of the connection to retrieve.
+ A pointer to the connection if found, otherwise null.
+
+
+
+ Gets a connection by its index in the network peer group.
+
+ Pointer to the network peer group.
+ The index of the connection to retrieve.
+ A pointer to the connection if found, otherwise null.
+
+
+
+ Tries to get a connection by its index in the network peer group.
+
+ Pointer to the network peer group.
+ The index of the connection to retrieve.
+ Output parameter that will point to the connection if found.
+ True if the connection was found, otherwise false.
+
+
+
+ Gets an iterator for the connections in the network peer group.
+
+ Pointer to the network peer group.
+ An iterator for the connections in the network peer group.
+
+
+
+ Connects to a specified address with an optional unique ID and token.
+
+ Pointer to the network peer group.
+ The address to connect to.
+ The token used for the connection.
+ Optional unique ID for the connection.
+
+
+
+ Connects to a specified IP address and port with an optional unique ID and token.
+
+ Pointer to the network peer group.
+ The IP address to connect to.
+ The port to connect to.
+ The token used for the connection.
+ Optional unique ID for the connection.
+
+
+
+ Disconnects a given connection from the network peer group with an optional token.
+
+ Pointer to the network peer group.
+ Pointer to the connection to be disconnected.
+ Optional token used for the disconnection.
+
+
+
+ Updates the network peer group by processing received data, handling timeouts, and managing connection retries.
+
+ Pointer to the network peer group.
+ Callback interface for network peer group events.
+ Amount of packets received
+
+
+
+ Sends reliable data for a given connection in the network peer group.
+
+ Pointer to the network peer group.
+ Pointer to the connection.
+ Reliable ID for the data being sent.
+ Pointer to the data to be sent.
+ The length of the data to be sent.
+
+
+
+ Changes the address of a connection during the connecting phase.
+
+ Pointer to the network peer group.
+ Pointer to the connection.
+ The new address to be assigned to the connection.
+
+
+
+ Sends unconnected data to a specified address.
+
+ Pointer to the network peer group.
+ The address to send the data to.
+ Pointer to the data to be sent.
+ The length of the data to be sent.
+ True if the data was successfully sent, otherwise false.
+
+
+
+ Gets an unreliable data buffer for a given connection in the network peer group.
+
+ Pointer to the network peer group.
+ Pointer to the connection.
+ Output parameter that will point to the bit buffer containing the data to be sent.
+ True if the buffer was successfully acquired, otherwise false.
+
+
+
+ Sends an unreliable data buffer for a given connection in the network peer group.
+
+ Pointer to the network peer group.
+ Pointer to the connection.
+ Pointer to the bit buffer containing the data to be sent.
+ True if the buffer was successfully sent, otherwise false.
+
+
+
+ Gets a notify data buffer for a given connection in the network peer group.
+
+ Pointer to the network peer group.
+ Pointer to the connection.
+ Output parameter that will point to the bit buffer containing the data to be sent.
+ True if the buffer was successfully acquired, otherwise false.
+
+
+
+ Sends a notify data buffer for a given connection in the network peer group.
+
+ Pointer to the network peer group.
+ Pointer to the connection.
+ Pointer to the bit buffer containing the data to be sent.
+ Pointer to user data associated with the buffer.
+ True if the buffer was successfully sent, otherwise false.
+
+
+ Amount of packets received
+
+
+
+ Gets the idle time of a connection.
+
+ The network peer group.
+ The connection whose idle time is to be calculated.
+ The idle time of the connection in seconds.
+
+
+
+ Represents the possible replies to a connection request.
+
+
+
+
+ The connection request is accepted.
+
+
+
+
+ The connection request is refused.
+
+
+
+
+ The connection request is waiting for a decision.
+
+
+
+
+ Defines the callbacks for network peer group events.
+
+
+
+
+ Called when a connection is established.
+
+ The connection that was established.
+
+
+
+ Called when a connection is disconnected.
+
+ The connection that was disconnected.
+ The reason for disconnection.
+
+
+
+ Called when unreliable data is received.
+
+ The connection from which the data was received.
+ The buffer containing the data.
+
+
+
+ Called when unconnected data is received.
+
+ The buffer containing the data.
+
+
+
+ Called when notify data is received.
+
+ The connection from which the data was received.
+ The buffer containing the data.
+
+
+
+ Called when notify data is lost.
+
+ The connection from which the data was lost.
+ The envelope containing the lost data.
+
+
+
+ Called when notify data is delivered.
+
+ The connection to which the data was delivered.
+ The envelope containing the delivered data.
+
+
+
+ Called when a notify envelope is disposed.
+
+ The envelope that was disposed.
+
+
+
+ Called when reliable data is received.
+
+ The connection from which the data was received.
+ The identifier of the reliable data.
+ The data received.
+
+
+
+ Called when a connection request is received.
+
+ The address of the remote peer.
+ The token associated with the connection request.
+ The unique identifier for the connection request.
+ The reply to the connection request.
+
+
+
+ Called when a connection attempt fails.
+
+ The address of the remote peer.
+ The reason for the connection failure.
+
+
+
+ Called when a connection attempt is made.
+
+ The connection being attempted.
+ The number of attempts made.
+ The total number of connection attempts.
+
+
+
+ Represents an envelope for sending network packets in the Fusion.Sockets namespace.
+
+
+
+
+ Gets or sets the user data associated with the envelope.
+
+
+
+
+ Gets or sets the time the packet was sent.
+
+
+
+
+ Gets or sets the sequence number of the packet.
+
+
+
+
+ Gets or sets the type of the network packet.
+
+
+
+
+ Takes the user data associated with the envelope and sets the UserData to null.
+
+ The type of the user data.
+ The user data cast to the specified type.
+ Thrown if UserData is null.
+
+
+
+ Calculates the distance between two sequence numbers, taking into account the circular nature of the sequence.
+
+ The sequence number to start from.
+ The sequence number to calculate the distance to.
+
+ The distance between the two sequence numbers.
+ If 'from' is larger than 'to', the result is positive.
+ If 'from' is lesser than 'to', the result is negative.
+ If they are the same, the result is zero.
+
+ Thrown when the calculated distance is outside the range of an integer.
+
+
+
+ Represents a buffer for reliable data transmission.
+
+
+
+
+ The number of bytes used for the sequence.
+
+
+
+
+ The sequencer used for generating sequence numbers.
+
+
+
+
+ The list of received reliable data.
+
+
+
+
+ The current receive sequence number.
+
+
+
+
+ Gets the number of bits used for the sequence.
+
+
+
+
+ Creates a new instance of the ReliableBuffer structure.
+
+ A new ReliableBuffer instance.
+
+
+
+ Gets the next sequence number for sending data.
+
+ The next sequence number.
+
+
+
+ Disposes of the ReliableBuffer, freeing any allocated memory.
+
+
+
+
+ Attempts to receive data from the reliable buffer.
+
+ The pointer to the memory that needs to be freed later.
+ The reliable identifier associated with the received data.
+ The pointer to the received data.
+
+ true if the data is exactly what is expected; otherwise, false.
+
+
+
+
+ Frees the memory associated with the specified root pointer.
+
+ The pointer to the memory to be freed.
+
+
+
+ Receives data from the specified buffer and processes it.
+
+ The buffer containing the data to be received.
+ The reliable identifier associated with the received data.
+
+ true if the data is exactly what is expected; otherwise, false.
+
+
+
+
+ Represents a reliable key structure used in the Fusion.Sockets namespace.
+
+
+
+
+ The size of the ReliableKey structure in bytes.
+
+
+
+
+ Fixed byte array to store the key data.
+
+
+
+
+ Gets the key data as integers.
+
+ The first integer key.
+ The second integer key.
+ The third integer key.
+ The fourth integer key.
+
+
+
+ Gets the key data as unsigned long integers.
+
+ The first unsigned long key.
+ The second unsigned long key.
+
+
+
+ Creates a ReliableKey from integer values.
+
+ The first integer key.
+ The second integer key.
+ The third integer key.
+ The fourth integer key.
+ A new ReliableKey instance.
+
+
+
+ Creates a ReliableKey from unsigned long values.
+
+ The first unsigned long key.
+ The second unsigned long key.
+ A new ReliableKey instance.
+
+
+
+ Returns if the is the same.
+
+
+
+
+ Returns if obj is a ReliableKey and the is the same.
+
+
+
+
+ Returns if the is the same.
+
+
+
+
+ Returns if the is not the same.
+
+
+
+
+ Returns a hash based on the .
+
+
+
+
+
+ Represents a reliable identifier used in the Fusion.Sockets namespace.
+
+
+
+
+ The size of the ReliableId structure in bytes.
+
+
+
+
+ The sequence number associated with this ReliableId.
+
+
+
+
+ The length of the slice.
+
+
+
+
+ The total length.
+
+
+
+
+ The source identifier.
+
+
+
+
+ The source send identifier.
+
+
+
+
+ The target identifier.
+
+
+
+
+ The reliable key associated with this ReliableId.
+
+
+
+
+ Padding to align the structure.
+
+
+
+
+ Gets the combined source identifier.
+
+
+
+
+ Represents a reliable header structure used in the Fusion.Sockets namespace.
+
+
+
+
+ The size of the ReliableHeader structure in bytes.
+
+
+
+
+ Pointer to the next ReliableHeader in the list.
+
+
+
+
+ Pointer to the previous ReliableHeader in the list.
+
+
+
+
+ The ReliableId associated with this ReliableHeader.
+
+
+
+
+ Gets the data associated with the specified ReliableHeader.
+
+ The ReliableHeader to get data from.
+ A pointer to the data associated with the specified ReliableHeader.
+
+
+
+ Represents a list of reliable headers.
+
+
+
+
+ Gets or sets the number of items in the list.
+
+
+
+
+ Gets or sets the head of the list.
+
+
+
+
+ Gets or sets the tail of the list.
+
+
+
+
+ Adds the specified item to the beginning of the list.
+
+ The item to add to the beginning of the list.
+
+
+
+ Adds the specified item to the end of the list.
+
+ The item to add to the end of the list.
+
+
+
+ Adds the specified item before another specified item in the list.
+
+ The item before which the new item will be added.
+ The item to add to the list.
+
+
+
+ Adds the specified item after another specified item in the list.
+
+ The item after which the new item will be added.
+ The item to add to the list.
+
+
+
+ Removes and returns the head element of the list.
+
+ The head element of the list.
+
+
+
+ Removes the specified item from the list.
+
+ The item to remove.
+
+
+ Dispose
+
+
+
+ Represents a network socket with a handle and a native socket.
+
+
+
+
+ The handle of the socket.
+
+
+
+
+ The native socket.
+
+
+
+
+ Gets a value indicating whether the socket is created.
+
+
+
+
+ Defines the interface for network socket operations.
+
+
+
+
+ Gets a value indicating whether the socket supports multi-threading.
+
+
+
+
+ Initializes the socket with the specified configuration.
+
+ The configuration for the socket.
+
+
+
+ Creates a new socket with the specified configuration.
+
+ The configuration for the socket.
+ The created socket.
+
+
+
+ Binds the socket to the specified address and configuration.
+
+ The socket to bind.
+ The configuration for the socket.
+ The bound address.
+
+
+
+ Determines whether the specified address can be fragmented.
+
+ The address to check.
+ True if the address can be fragmented, otherwise false.
+
+
+
+ Polls the socket for incoming data with the specified timeout.
+
+ The socket to poll.
+ The timeout in milliseconds.
+ True if data is available, otherwise false.
+
+
+
+ Receives data from the socket into the specified buffer.
+
+ The socket to receive data from.
+ The address of the sender.
+ The buffer to store the received data.
+ The length of the buffer.
+ The number of bytes received.
+
+
+
+ Sends data from the specified buffer to the socket.
+
+ The socket to send data to.
+ The address of the recipient.
+ The buffer containing the data to send.
+ The length of the buffer.
+ Send reliable or not
+ The number of bytes sent.
+
+
+
+ Destroys the specified socket.
+
+ The socket to destroy.
+
+
+
+ Deletes the encryption key for the specified address.
+
+ The address to delete the encryption key for.
+
+
+
+ Sets up encryption with the specified key and encrypted key.
+
+ The encryption key.
+ The encrypted key.
+
+
+ Encryption System
+
+ Sets up the encryption system by initializing the encryption manager,
+ registering the encryption key, and creating the encryption token and buffer.
+
+ The encryption key.
+ The encrypted key.
+
+ If is null, it indicates that the peer is a server.
+ If is not null, the peer is a client.
+
+
+
+
+ Handles the outgoing encryption process for the given address and buffer.
+
+ The address to which the data is being sent.
+ The buffer containing the data to be sent.
+ The length of the data to be sent.
+ Returns true if the encryption process is successful, false otherwise.
+
+
+
+ Handles the incoming encryption process for the given address and buffer.
+
+ The address from which the data is received.
+ The buffer containing the received data.
+ The length of the received data.
+ The number of bytes received.
+ Returns true if the decryption process is successful, false otherwise.
+
+
+
+ Resets the encryption system by disposing the encryption manager and resetting the session key.
+
+
+
+
+ Deletes the encryption key associated with the given address.
+
+ The address whose associated encryption key is to be deleted.
+
+
+
+ Random ID of this socket
+
+
+
+
+ Reference to Current Communicator
+
+
+
+
+ Local Peer Address is based on the current Player Actor Number inside the Room
+
+
+
+
+ Specifies UDP network type.
+
+
+
+
+ Invalid NAT Type
+
+
+
+
+ UDP is always blocked.
+
+
+
+
+ No NAT, public IP, no firewall.
+
+
+
+
+ A full cone NAT is one where all requests from the same internal IP address and port are
+ mapped to the same external IP address and port. Furthermore, any external host can send
+ a packet to the internal host, by sending a packet to the mapped external address.
+
+
+
+
+ A symmetric NAT is one where all requests from the same internal IP address and port,
+ to a specific destination IP address and port, are mapped to the same external IP address and
+ port. If the same host sends a packet with the same source address and port, but to
+ a different destination, a different mapping is used. Furthermore, only the external host that
+ receives a packet can send a UDP packet back to the internal host.
+
+
+
+
+ This class implements STUN Client. Defined in RFC 8489
+
+ Session Traversal Utilities for NAT (STUN)
+ Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT(STUN)
+ Happy Eyeballs Version 2: Better Connectivity Using Concurrency
+ State of Peer-to-Peer (P2P) Communication across Network Address Translators(NATs)
+
+
+
+
+
+
+
+
+
+ List of public DNS Servers
+
+
+
+
+ Reset the state of the StunClient
+
+
+
+
+ Run the STUN Service to retrieve the current Reflexive Addresses of the local peer
+
+ The bound local address to be used for the STUN service.
+ A function delegate that takes a byte array and a NetAddress as parameters and returns a boolean value. This function is used to send data via a socket.
+ An optional parameter that represents a custom public address. If provided, this address is used instead of discovering one.
+ An optional parameter that represents a custom STUN server. If provided, this server is used instead of the default one.
+ A boolean value indicating whether to extend the query time. If true, the query time is extended; otherwise, it is not.
+ A function delegate that takes no parameters and returns a boolean value. This function is used to determine whether the STUN service should keep running.
+ Reflexive Info data as a object.
+
+
+
+ Tries to parse a buffer data into a
+
+ Remove origin of the buffer data
+ Buffer data to be parsed
+ Lenght of the buffer data to be parsed
+ True if the buffer contains a , false otherwise
+
+
+
+ Query the LAN Address
+
+ Bound Local Address
+ Output the Address Family found
+ Output the LAN Address
+ True if a valid LAN Address was found, false otherwise
+
+
+
+ Run a STUN Binding Request against the Public STUN Server in order to discover peer reflexive addresses
+
+ Custom method to send data to remote Address
+ Original Address Family
+ Request ID to be used when sending the STUN Binding Request
+ Signal to skip the NAT Type discovery
+ Running Task of the STUN Query Procedure
+
+
+
+ Retrieve the Local IP Endpoint currently active
+
+ True if a valid Local IP Address was found, false otherwise
+
+
+
+ This class implements STUN ERROR-CODE. Defined in RFC RFC 5389 15.6
+
+
+
+
+ Gets or sets error code.
+
+
+
+
+ Gets reason text.
+
+
+
+
+ Default constructor.
+
+ Error code.
+ Reason text.
+
+
+
+ Implements STUN message. Defined in RFC 3489.
+
+
+
+
+ Cache Stun Message Types
+
+
+
+
+ STUN Message Type
+
+
+
+
+ STUN Attribute Type
+
+
+
+
+ Global Stun Related defined values
+
+
+
+
+ IP Address Family
+
+
+
+
+ STUN Message Type
+
+
+
+
+ STUN Transaction ID
+
+
+
+
+ Gets transaction ID.
+
+
+
+
+ Gets or sets IP end point what was actually connected to STUN server. Returns null if not specified.
+
+
+
+
+ Gets or sets user name. Value null means not specified.
+
+
+
+
+ Gets or sets error info. Returns null if not specified.
+
+
+
+
+ Default constructor.
+
+
+
+
+ Parses STUN message from raw data packet.
+
+ Raw STUN message.
+ STUN Message length
+
+
+
+ Converts this to raw STUN packet.
+
+ Returns raw STUN packet.
+
+
+
+ Parses attribute from data.
+
+ SIP message data.
+ Offset in data.
+
+
+
+ Pasrses IP endpoint attribute.
+
+ STUN message data.
+ Offset in data.
+ Returns parsed IP end point.
+
+
+
+ Stores ip end point attribute to buffer.
+
+ Attribute type.
+ IP end point.
+ Buffer where to store.
+ Offset in buffer.
+
+
+
+ This class holds the result of a STUN Query
+
+
+
+
+ Current NAT Type of the peer
+
+
+
+
+ Signal if Result is valid
+
+
+
+
+ Gets public IP end point.
+
+
+
+
+ Gets private IP end point.
+
+
+
+
+ Invalid StunResult Reference
+
+
+
+
+ Initializes a new instance of the class.
+
+ The public IP endpoint. Defaults to an unspecified IPv4 address.
+ The private IP endpoint. Defaults to an unspecified IPv4 address.
+
+
+
+ List of public STUN Servers
+
+
+
+
+ Stores Addresses of a STUN Server
+
+
+
+
+ Build a list of STUN Servers
+
+ Filter STUN Servers with IPv6 Support
+ List of valid STUN Servers
+
+
+
+ Pre-Build the list of all STUN Servers
+
+ Optional Custom STUN Server to ping
+
+
+
+ Build the STUN Server Info by checking its valid IPs
+
+
+ STUN Server Address
+ reference
+
+
+
+ BitStream serialization methods.
+
+
+
+
+ Total size in BITS of the buffer
+
+
+
+
+ Current read/write position in BITS inside the Buffer
+
+
+
+
+ Size of written buffer in BYTES
+ Ammount of bytes required considering the total of written bytes
+
+
+
+
+ Gets a value indicating whether the current position is at an even byte boundary.
+
+
+
+
+ Total Size in BYTES of the Buffer
+
+
+
+
+ Signal if the buffer was completely written
+
+
+
+
+ Signal if the buffer is overflowing
+
+
+
+
+ Signal if the Buffer is in Write Mode
+
+
+
+
+ Signal if the Buffer is in Read Mode
+
+
+
+
+ Internal Byte Array
+
+
+
+
+ Initializes a new instance of the class with an empty byte array.
+
+
+
+
+ Initializes a new instance of the class with a specified size in bytes.
+
+ The size of the byte array in bytes.
+
+
+
+ Initializes a new instance of the class with the specified byte array.
+
+ The byte array to use as the internal buffer.
+
+
+
+ Initializes a new instance of the class with the specified byte array and size.
+
+ The byte array to use as the internal buffer.
+ The size of the byte array in bytes.
+
+
+
+ Sets the internal buffer to the specified byte array.
+
+ The byte array to use as the internal buffer.
+
+
+
+ Sets the internal buffer to the specified byte array and size.
+
+ The byte array to use as the internal buffer.
+ The size of the byte array in bytes.
+
+
+
+ Rounds the current position to the nearest byte boundary by filling with zero bits if necessary.
+
+ The number of bytes required to store the current position.
+
+
+
+ Doubles the capacity of the internal buffer.
+
+
+
+
+ Checks if at least one bit can be written to the stream.
+
+ True if at least one bit can be written, otherwise false.
+
+
+
+ Checks if at least one bit can be read from the stream.
+
+ True if at least one bit can be read, otherwise false.
+
+
+
+ Checks if the specified number of bits can be written to the stream.
+
+ The number of bits to check.
+ True if the specified number of bits can be written, otherwise false.
+
+
+
+ Checks if the specified number of bits can be read from the stream.
+
+ The number of bits to check.
+ True if the specified number of bits can be read, otherwise false.
+
+
+
+ Copies data from the specified byte array into the internal buffer.
+
+ The byte array to copy from.
+
+
+
+ Resets the internal buffer to its initial state.
+
+
+
+
+ Resets the internal buffer to the specified size.
+
+ The size in bytes to reset the buffer to.
+
+
+
+ Resets the internal buffer to the specified size without clearing the data.
+
+ The size in bytes to reset the buffer to.
+
+
+
+ Converts the internal buffer to a byte array.
+
+ A byte array containing the data in the internal buffer.
+
+
+
+ Writes a boolean value to the stream.
+
+ The boolean value to write.
+ The boolean value that was written.
+
+
+
+ Writes a boolean value to the stream.
+
+ The boolean value to write.
+ The boolean value that was written.
+
+
+
+ Reads a boolean value from the stream.
+
+ The boolean value that was read.
+
+
+
+ Reads a boolean value from the stream.
+
+ The boolean value that was read.
+
+
+
+ Writes a byte value to the stream with a specified number of bits.
+
+ The byte value to write.
+ The number of bits to write.
+
+
+
+ Reads a byte value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The byte value that was read.
+
+
+
+ Writes a byte value to the stream.
+
+ The byte value to write.
+
+
+
+ Reads a byte value from the stream.
+
+ The byte value that was read.
+
+
+
+ Reads a signed byte value from the stream.
+
+ The signed byte value that was read.
+
+
+
+ Writes a signed byte value to the stream.
+
+ The signed byte value to write.
+
+
+
+ Writes an unsigned short value to the stream with a specified number of bits.
+
+ The unsigned short value to write.
+ The number of bits to write.
+
+
+
+ Reads an unsigned short value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The unsigned short value that was read.
+
+
+
+ Writes an unsigned short value to the stream.
+
+ The unsigned short value to write.
+
+
+
+ Reads an unsigned short value from the stream.
+
+ The unsigned short value that was read.
+
+
+
+ Writes a short value to the stream with a specified number of bits.
+
+ The short value to write.
+ The number of bits to write.
+
+
+
+ Reads a short value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The short value that was read.
+
+
+
+ Writes a short value to the stream.
+
+ The short value to write.
+
+
+
+ Reads a short value from the stream.
+
+ The short value that was read.
+
+
+
+ Writes a character value to the stream.
+
+ The character value to write.
+
+
+
+ Reads a character value from the stream.
+
+ The character value that was read.
+
+
+
+ Writes an unsigned 32-bit integer value to the stream with a specified number of bits.
+
+ The unsigned 32-bit integer value to write.
+ The number of bits to write.
+
+
+
+ Reads an unsigned 32-bit integer value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The unsigned 32-bit integer value that was read.
+
+
+
+ Writes an unsigned 32-bit integer value to the stream.
+
+ The unsigned 32-bit integer value to write.
+
+
+
+ Reads an unsigned 32-bit integer value from the stream.
+
+ The unsigned 32-bit integer value that was read.
+
+
+
+ Writes a shifted 32-bit integer value to the stream with a specified number of bits.
+
+ The 32-bit integer value to write.
+ The number of bits to write.
+ The number of bits to shift.
+
+
+
+ Reads a shifted 32-bit integer value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The number of bits to shift.
+ The 32-bit integer value that was read.
+
+
+
+ Writes a 32-bit integer value to the stream with a specified number of bits.
+
+ The 32-bit integer value to write.
+ The number of bits to write.
+
+
+
+ Reads a 32-bit integer value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The 32-bit integer value that was read.
+
+
+
+ Writes a 32-bit integer value to the stream.
+
+ The 32-bit integer value to write.
+
+
+
+ Reads a 32-bit integer value from the stream.
+
+ The 32-bit integer value that was read.
+
+
+
+ Writes an unsigned 64-bit integer value to the stream with a specified number of bits.
+
+ The unsigned 64-bit integer value to write.
+ The number of bits to write.
+
+
+
+ Reads an unsigned 64-bit integer value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The unsigned 64-bit integer value that was read.
+
+
+
+ Writes an unsigned 64-bit integer value to the stream.
+
+ The unsigned 64-bit integer value to write.
+
+
+
+ Reads an unsigned 64-bit integer value from the stream.
+
+ The unsigned 64-bit integer value that was read.
+
+
+
+ Writes a signed 64-bit integer value to the stream with a specified number of bits.
+
+ The signed 64-bit integer value to write.
+ The number of bits to write.
+
+
+
+ Reads a signed 64-bit integer value from the stream with a specified number of bits.
+
+ The number of bits to read.
+ The signed 64-bit integer value that was read.
+
+
+
+ Writes a signed 64-bit integer value to the stream.
+
+ The signed 64-bit integer value to write.
+
+
+
+ Reads a signed 64-bit integer value from the stream.
+
+ The signed 64-bit integer value that was read.
+
+
+
+ Writes a 32-bit floating point value to the stream.
+
+ The 32-bit floating point value to write.
+
+
+
+ Reads a 32-bit floating point value from the stream.
+
+ The 32-bit floating point value that was read.
+
+
+
+ Writes a 64-bit floating point value to the stream.
+
+ The 64-bit floating point value to write.
+
+
+
+ Reads a 64-bit floating point value from the stream.
+
+ The 64-bit floating point value that was read.
+
+
+
+ Writes a byte array to the stream.
+
+ The byte array to write.
+
+
+
+ Writes a specified number of bytes from a byte array to the stream.
+
+ The byte array to write from.
+ The number of bytes to write.
+
+
+
+ Writes a specified number of bytes from a byte array to the stream starting at a given offset.
+
+ The byte array to write from.
+ The starting offset in the byte array.
+ The number of bytes to write.
+
+
+
+ Reads a specified number of bytes from the stream into a new byte array.
+
+ The number of bytes to read.
+ A byte array containing the read bytes.
+
+
+
+ Reads bytes from the stream into the specified byte array.
+
+ The byte array to read into.
+
+
+
+ Reads a specified number of bytes from the stream into the specified byte array.
+
+ The byte array to read into.
+ The number of bytes to read.
+
+
+
+ Reads a specified number of bytes from the stream into the specified byte array starting at a given offset.
+
+ The byte array to read into.
+ The starting offset in the byte array.
+ The number of bytes to read.
+
+
+
+ Writes a byte array to the stream with a length prefix.
+
+ The byte array to write.
+
+
+
+ Writes a byte array to the stream with a length prefix and a specified maximum length.
+
+ The byte array to write.
+ The maximum length of the byte array to write.
+
+
+
+ Reads a byte array from the stream with a length prefix.
+
+ A byte array containing the read bytes, or null if the length prefix indicates no data.
+
+
+
+ Writes a string to the stream using the specified encoding.
+
+ The string to write.
+ The encoding to use for the string.
+
+
+
+ Writes a string to the stream using UTF-8 encoding.
+
+ The string to write.
+
+
+
+ Reads a string from the stream using the specified encoding.
+
+ The encoding to use for the string.
+ The string that was read, or null if the length prefix indicates no data.
+
+
+
+ Reads a string from the stream using UTF-8 encoding.
+
+ The string that was read, or null if the length prefix indicates no data.
+
+
+
+ Writes a GUID to the stream.
+
+ The GUID to write.
+
+
+
+ Reads a GUID from the stream.
+
+ The GUID that was read.
+
+
+
+ Writes a byte value at a specified bit position in a byte array.
+
+ The byte array to write to.
+ The bit position to start writing at.
+ The number of bits to write.
+ The byte value to write.
+
+
+
+ Serialize a value.
+
+ The value type.
+
+
+
+ Evaluates a condition and serializes it if in write mode, or deserializes it if in read mode.
+
+ The condition to evaluate and serialize/deserialize.
+ The evaluated condition.
+
+
+
+ Serializes or deserializes a string value.
+
+ The string value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a boolean value.
+
+ The boolean value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a float value.
+
+ The float value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a double value.
+
+ The double value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a 64-bit integer value.
+
+ The 64-bit integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a 64-bit unsigned integer value.
+
+ The 64-bit unsigned integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a byte value.
+
+ The byte value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a 32-bit unsigned integer value.
+
+ The 32-bit unsigned integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a 32-bit unsigned integer value with a specified number of bits.
+
+ The 32-bit unsigned integer value to serialize/deserialize.
+ The number of bits to use for serialization/deserialization.
+
+
+
+ Serializes or deserializes a 64-bit unsigned integer value with a specified number of bits.
+
+ The 64-bit unsigned integer value to serialize/deserialize.
+ The number of bits to use for serialization/deserialization.
+
+
+
+ Serializes or deserializes a 32-bit integer value.
+
+ The 32-bit integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a 32-bit integer value with a specified number of bits.
+
+ The 32-bit integer value to serialize/deserialize.
+ The number of bits to use for serialization/deserialization.
+
+
+
+ Serializes or deserializes an array of 32-bit integers.
+
+ The array of 32-bit integers to serialize/deserialize.
+
+
+
+ Serializes or deserializes a byte array with a length prefix.
+
+ The byte array to serialize/deserialize.
+
+
+
+ Serializes or deserializes a byte array with a specified length.
+
+ The byte array to serialize/deserialize.
+ The length of the byte array.
+
+
+
+ Serializes or deserializes a byte array with a fixed size.
+
+ The byte array to serialize/deserialize.
+ The fixed size of the byte array.
+
+
+
+ Serializes or deserializes a byte array with a specified length and fixed size.
+
+ The byte array to serialize/deserialize.
+ The length of the byte array.
+ The fixed size of the byte array.
+
+
+
+ Serializes or deserializes the length of an array.
+
+ The type of the array elements.
+ The array whose length to serialize/deserialize.
+
+
+
+ Serializes or deserializes an array of elements using a specified serializer.
+
+ The type of the array elements.
+ The array to serialize/deserialize.
+ The serializer to use for each element.
+
+
+
+ Serializes or deserializes a byte value.
+
+ The byte value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a signed byte value.
+
+ The signed byte value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a short value.
+
+ The short value to serialize/deserialize.
+
+
+
+ Serializes or deserializes an unsigned short value.
+
+ The unsigned short value to serialize/deserialize.
+
+
+
+ Serializes or deserializes an integer value.
+
+ The integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes an unsigned 32-bit integer value.
+
+ The unsigned 32-bit integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes a 64-bit integer value.
+
+ The 64-bit integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes an unsigned 64-bit integer value.
+
+ The unsigned 64-bit integer value to serialize/deserialize.
+
+
+
+ Serializes or deserializes an unsigned 32-bit integer value with a specified number of bits.
+
+ The unsigned 32-bit integer value to serialize/deserialize.
+ The number of bits to use for serialization/deserialization.
+
+
+
+ Serializes or deserializes a 32-bit integer value with a specified number of bits.
+
+ The 32-bit integer value to serialize/deserialize.
+ The number of bits to use for serialization/deserialization.
+
+
+
+ Serializes or deserializes a buffer of byte values.
+
+ The buffer of byte values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of signed byte values.
+
+ The buffer of signed byte values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of short values.
+
+ The buffer of short values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of unsigned short values.
+
+ The buffer of unsigned short values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of 32-bit integer values.
+
+ The buffer of 32-bit integer values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of unsigned 32-bit integer values.
+
+ The buffer of unsigned 32-bit integer values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of 64-bit integer values.
+
+ The buffer of 64-bit integer values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Serializes or deserializes a buffer of unsigned 64-bit integer values.
+
+ The buffer of unsigned 64-bit integer values to serialize/deserialize.
+ The length of the buffer.
+
+
+
+ Handles Protocol Msgs sent by the Fusion Plugin
+
+ It converts the byte buffer into usable Protocol Msgs
+
+ Sender Actor of the Protocol Msg, generally the Plugin
+ Object that stores the buffer to be converted
+
+
+
+ Convert the Data object into a usable Byte Buffer.
+ How the conversion happens depends on the the Type of Communicator
+
+
+
+
+ Change master client request Message
+ Used to signal that Fusion Simulation should start
+
+
+
+
+ Player Unique Ref
+
+
+
+
+ Base Protocol Message.
+
+ This concentrates the basics for serialization and cloning
+
+
+
+
+ Max Length of the Custom Data
+
+
+
+
+ Stores the Current Protocol Message version
+
+
+
+
+ Stores the Current Fusion Serialization Version
+
+
+
+
+ Signal if this Message is Valid or not
+
+
+
+
+ Signal if this Message has a valid Protocol Version and Fusion Serialization Version
+
+
+
+
+ Custom data send along side any Protocol Message
+
+
+
+
+ Creates a copy of this Message
+
+
+
+
+ Created a new Message with a certain version
+
+ Protocol Message Version
+ Fusion Serialization Version
+
+
+
+ Serialize this Message into or from a .
+
+ Buffer to read from or write into the data of the Message
+
+
+
+ Used by the specialized versions of Message to serialize its data
+
+ Buffer to read from or write into the data of the Message
+
+
+
+ Check if this Message is compatible with target versions
+
+ Target Protocol Message Version
+ Plugin Version
+ Target Fusion Serialization Version
+ True if message is compatible with versions
+
+
+
+ Disconnect Protocol Message.
+
+ Used to signal a peer that it will be disconnected from Photon Cloud
+
+
+
+
+ Disconnect Reason
+
+
+
+
+ Disconnect Protocol Message
+
+
+
+
+ Disconnect Protocol Message
+
+ The reason for the disconnection.
+ The version of the protocol to be used. Defaults to the latest protocol version.
+ The version of the serialization to be used. Defaults to null.
+
+
+
+ List all Disconnect reason used by the Plugin to remove an Actor from the Room
+
+
+
+
+ No reason
+
+
+
+
+ Abstract disconnect reason
+
+
+
+
+ Used when an event with other code other then the treated ones is received by the plugin
+
+
+
+
+ When the Join Message is not of the Request Type
+
+
+
+
+ When the Join Message does not contain a valid Game Mode
+
+
+
+
+ When any of the major settings of a message does not align with the current settings,
+ like GameMode, Protocol Version, Serialization Version and Peer Mode
+
+
+
+
+ When there is already a Server running on the current Room
+
+
+
+
+ An error occured on the Plugin
+
+
+
+
+ Dummy Traffic Send Interval
+
+
+
+
+ Dummy Traffic Size
+
+
+
+
+ Flag to signal if the Dummy Traffic is valid
+
+
+
+
+ Local Peer Mode
+
+
+
+
+ message Type
+
+
+
+
+ Sent by Peer to Request to Join on the Plugin
+
+
+
+
+ Sent by the Plugin to confirm the Join of a Peer
+
+
+
+
+ Type of Peer which the Peer is starting as
+
+
+
+
+ No Mode Selected, means Invalid
+
+
+
+
+ Server Mode
+
+
+
+
+ Client Mode
+
+
+
+
+ Join Requests sent by the Plugin to request data from the Peer
+
+
+
+
+ No request in the Join Message
+
+
+
+
+ Request the Network Config
+
+
+
+
+ Request for Reflexive Information
+
+
+
+
+ Request to Disable NAT Punch
+
+
+
+
+ Join Message
+
+ It is used to join a Fusion Room Session with extra information about the Peer.
+ This is unrelated to the Join Operation into a Photon Room.
+
+
+
+
+ Join Message Type
+
+
+
+
+ Requested Plugin Game Mode
+
+
+
+
+ Local Peer Mode
+
+
+
+
+ Requests sent from Plugin
+
+
+
+
+ Peer Unique ID
+
+
+
+
+ Player Unique Ref
+
+
+
+
+ Peer Encryption Key
+
+
+
+
+ Peer Encryption Key
+
+
+
+
+ Network Config Msg Type
+
+
+
+
+ Request Network Config
+
+
+
+
+ Response to a Request
+
+
+
+
+ Override Signal for the Network Config
+
+
+
+
+ NetworkConfig Protocol Msgs
+ It is used to serialize the Fusion NetworkConfig and send to Photon Cloud Plugin
+
+
+
+
+ Network Config Type
+
+
+
+
+ JSON Serialized NetworkConfig
+
+
+
+
+ Reflexive Info Msgs
+
+ Used to transport information about the Reflexive Addresses of a Peer
+
+
+
+
+ Actor ID to which this info is related
+
+
+
+
+ Peer Public Address
+
+
+
+
+ Peer Private Address
+
+
+
+
+ Peer NAT Type
+
+
+
+
+ Signal if this Reflexive Info is Valid or not
+
+
+
+
+ Peer Unique ID
+
+
+
+
+ Snapshot Message Type
+
+
+
+
+ Invalid/Empty Type
+
+
+
+
+ Base Snapshot
+
+
+
+
+ Confirmation sent by the Plugin
+
+
+
+
+ State Snapshot Protocol Msgs
+
+ Used to sync the current Server Game State with the Photon Cloud Plugin
+ in order to perform an eventual Host Migration
+
+
+
+
+ Tick to which this Snapshot represents
+
+
+
+
+ Last NetworkID from the Server
+
+
+
+
+ Snapshot Type
+
+
+
+
+ Snapshot Total number of bytes stored or expected to be stored on the Snapshot
+
+
+
+
+ Check if the Snapshot has a valid Data based on the expected CRC
+
+ True if the Snapshot has a valid data
+
+
+
+ Get Snapshot internal Data Buffer
+
+ Internal Data Buffer
+
+
+
+ CRC Hash based on the content of the internal data or the expected CRC after all fragments are computed
+
+
+
+
+ Computes the CRC64 of the current Buffer Data stored on the Snapshot
+
+
+
+
+ Create a clone with this Snapshot and reset reference
+
+
+
+
+ Start Message Requests
+
+
+
+
+ No Requests
+
+
+
+
+ Peer should connect to Shared Server
+
+
+
+
+ Peer should wait for the Server Reflexive Info
+
+
+
+
+ Start Protocol Msgs
+ Used to signal that Fusion Simulation should start
+
+
+
+
+ Actor ID of the Remote Server
+
+
+
+
+ Start Requests
+
+
+
+
+ Defines the Mode the Plugin should run
+
+
+
+
+ No Game Mode set
+
+
+
+
+ Client Server Game Mode
+
+ The Plugin will act just as a relay, exchanging data between the peers.
+
+
+
+
+ Shared Game Mode
+
+ The Plugin will act as a Fusion Server and will accept remote connections
+
+
+
+
+ Photon Event Codes used by the Fusion to communicate with the Photon Cloud
+
+
+
+
+ Protocol Event Code
+
+
+
+
+ Data Event Code
+
+
+
+
+ Dummy Event Code
+
+
+
+
+ Zero (0) means: if it should be the room itself (authorative event).
+
+
+
+
+
+
+ Default CustomData Key of Realtime Events
+
+
+
+
+
+
+ Protocol Messages Serializer
+
+
+
+
+ Serialize a Protocol Message into a BitStream
+
+ Protocol Message to be serialized
+ BitStream containing the Protocol Message
+ True if the Protocol Message was serialized
+
+
+
+ Deserialize a Protocol Message from a BitStream
+
+ Stream containing a Protocol Message
+ Deserialized Protocol Message
+ True if a Protocol Message was deserialized
+
+
+
+ Invalid Version
+
+
+
+
+ Initial Version
+
+
+
+
+ Added Support to Fusion Serialization Version
+
+
+
+
+ Added Custom Data to all Protocol Messages
+
+
+
+
+ Added NAT Type to Reflexive Info
+
+
+
+
+ Added Host Migration Support
+
+
+
+
+ Added Peer Unique Key
+
+
+
+
+ Added Join Message PlayerRef
+
+
+
+
+ Rework Host Migration
+
+
+
+
+ Added Encryption Support
+
+
+
+
+ Added Dummy Traffic Support
+
+
+
+
+ Always points to the Latest version
+
+
+
+
diff --git a/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.xml.meta b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.xml.meta
new file mode 100644
index 00000000..bda64c5f
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Fusion.Sockets.xml.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: d77bef94dfcb61b44b1b809af11e53ed
+labels:
+- FusionCodeDoc
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Release.meta b/Assets/Photon/Fusion/Assemblies/Release.meta
new file mode 100644
index 00000000..470622f4
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Release.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ad677f39f9d15f746a4df26e67a7b402
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Common.dll.release b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Common.dll.release
new file mode 100644
index 00000000..97a922ae
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Common.dll.release differ
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Common.dll.release.meta b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Common.dll.release.meta
new file mode 100644
index 00000000..b3c92633
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Common.dll.release.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: e88931f866d341247bdd75e9663acab7
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Log.dll.release b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Log.dll.release
new file mode 100644
index 00000000..e0cdc000
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Log.dll.release differ
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Log.dll.release.meta b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Log.dll.release.meta
new file mode 100644
index 00000000..e8cbe451
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Log.dll.release.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 5824a7f6c259369499f815fa20f73256
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Realtime.dll.release b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Realtime.dll.release
new file mode 100644
index 00000000..4711653d
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Realtime.dll.release differ
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Realtime.dll.release.meta b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Realtime.dll.release.meta
new file mode 100644
index 00000000..5c8570b8
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Realtime.dll.release.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f9b150e50c4049e469c1f2177288065c
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Runtime.dll.release b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Runtime.dll.release
new file mode 100644
index 00000000..48882db0
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Runtime.dll.release differ
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Runtime.dll.release.meta b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Runtime.dll.release.meta
new file mode 100644
index 00000000..9b7c45a8
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Runtime.dll.release.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 7ae4310552d54ab458f82d7ae21ca757
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Sockets.dll.release b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Sockets.dll.release
new file mode 100644
index 00000000..6f027074
Binary files /dev/null and b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Sockets.dll.release differ
diff --git a/Assets/Photon/Fusion/Assemblies/Release/Fusion.Sockets.dll.release.meta b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Sockets.dll.release.meta
new file mode 100644
index 00000000..8c011903
--- /dev/null
+++ b/Assets/Photon/Fusion/Assemblies/Release/Fusion.Sockets.dll.release.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9a2ec6b90eeba1c47b380c9776d70a18
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/CodeGen.meta b/Assets/Photon/Fusion/CodeGen.meta
new file mode 100644
index 00000000..4759b1dc
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: aac8de19e8d82d844b4a99a89c3b26a2
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.Trigger.fusionweavertrigger b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.Trigger.fusionweavertrigger
new file mode 100644
index 00000000..e69de29b
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.Trigger.fusionweavertrigger.meta b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.Trigger.fusionweavertrigger.meta
new file mode 100644
index 00000000..9dec7f5f
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.Trigger.fusionweavertrigger.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f4bd6c24648e05c4fa838da70f847a76
+ScriptedImporter:
+ internalIDToNameTable: []
+ externalObjects: {}
+ serializedVersion: 2
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: ad51894a651725c42acc54ccd6a81282, type: 3}
+ RunWeaverOnConfigChanges: 1
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.User.cs b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.User.cs
new file mode 100644
index 00000000..cf40aefa
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.User.cs
@@ -0,0 +1,8 @@
+#if FUSION_WEAVER && FUSION_WEAVER_ILPOSTPROCESSOR
+namespace Fusion.CodeGen {
+ partial class ILWeaverSettings {
+ static partial void OverrideNetworkProjectConfigPath(ref string path) {
+ }
+ }
+}
+#endif
\ No newline at end of file
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.User.cs.meta b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.User.cs.meta
new file mode 100644
index 00000000..b6f752ef
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.User.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5f9faa3ffc014c941995a81138385040
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.asmdef b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.asmdef
new file mode 100644
index 00000000..adb4f645
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.asmdef
@@ -0,0 +1,48 @@
+{
+ "name": "Unity.Fusion.CodeGen",
+ "rootNamespace": "Fusion.CodeGen",
+ "references": [],
+ "includePlatforms": [
+ "Editor"
+ ],
+ "excludePlatforms": [],
+ "allowUnsafeCode": true,
+ "overrideReferences": true,
+ "precompiledReferences": [
+ "Mono.Cecil.dll",
+ "Mono.Cecil.Rocks.dll",
+ "Mono.Cecil.Pdb.dll",
+ "Fusion.Runtime.dll",
+ "Fusion.Common.dll",
+ "Fusion.Realtime.dll",
+ "Fusion.Sockets.dll",
+ "Fusion.Log.dll"
+ ],
+ "autoReferenced": false,
+ "defineConstraints": [
+ "FUSION_WEAVER"
+ ],
+ "versionDefines": [
+ {
+ "name": "Unity",
+ "expression": "0",
+ "define": "FUSION_WEAVER_ILPOSTPROCESSOR"
+ },
+ {
+ "name": "com.unity.nuget.mono-cecil",
+ "expression": "1",
+ "define": "FUSION_HAS_MONO_CECIL"
+ },
+ {
+ "name": "nuget.mono-cecil",
+ "expression": "0.1",
+ "define": "FUSION_HAS_MONO_CECIL"
+ },
+ {
+ "name": "com.unity.nuget.mono-cecil",
+ "expression": "1.11",
+ "define": "FUSION_CECIL_1_11_OR_NEWER"
+ }
+ ],
+ "noEngineReferences": false
+}
\ No newline at end of file
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.asmdef.meta b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.asmdef.meta
new file mode 100644
index 00000000..c09f525e
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: d9d8635f8670c0c44ba7a8140f7ac7b9
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.cs b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.cs
new file mode 100644
index 00000000..49b30206
--- /dev/null
+++ b/Assets/Photon/Fusion/CodeGen/Fusion.CodeGen.cs
@@ -0,0 +1,7422 @@
+#if !FUSION_DEV
+
+#region Assets/Photon/Fusion/CodeGen/AssemblyInfo.cs
+
+[assembly: Fusion.NetworkAssemblyIgnore]
+
+#endregion
+
+
+#region Assets/Photon/Fusion/CodeGen/ForLoopMacro.cs
+
+#if FUSION_WEAVER && FUSION_HAS_MONO_CECIL
+namespace Fusion.CodeGen {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Reflection;
+ using Mono.Cecil;
+ using Mono.Cecil.Cil;
+ using Mono.Cecil.Rocks;
+ using static ILWeaverOpCodes;
+ using MethodBody = Mono.Cecil.Cil.MethodBody;
+
+ public readonly struct NewArrayWithLengthEqualToOtherArrayOrZero : ILProcessorMacro {
+ public readonly Action GetArray;
+ public readonly TypeReference ArrayElementType;
+
+ public NewArrayWithLengthEqualToOtherArrayOrZero(TypeReference arrayElementType, Action getArray) {
+ GetArray = getArray;
+ ArrayElementType = arrayElementType;
+ }
+
+ public void Emit(ILProcessor il) {
+ var brNotNul = Nop();
+ var brNewArr = Nop();
+
+ il.Append(Dup());
+ il.Append(Brtrue_S(brNotNul));
+ il.Append(Pop());
+ il.Append(Ldc_I4(0));
+ il.Append(Br_S(brNewArr));
+
+ il.Append(brNotNul);
+ il.Append(Ldlen());
+ il.Append(Conv_I4());
+
+ il.Append(brNewArr);
+ il.Append(Newarr(ArrayElementType));
+ }
+ }
+
+ public readonly struct GetCollectionCountOrZero : ILProcessorMacro {
+ public readonly TypeReference CollectionType;
+
+ public GetCollectionCountOrZero(TypeReference collectionType) {
+ CollectionType = collectionType;
+ }
+
+ public void Emit(ILProcessor il) {
+
+ var brNotNul = Nop();
+ var done = Nop();
+
+ il.Append(Dup());
+ il.Append(Brtrue_S(brNotNul));
+ il.Append(Pop());
+ il.Append(Ldc_I4(0));
+ il.Append(Br_S(done));
+
+ il.Append(brNotNul);
+ il.Append(Call(new MethodReference("get_Count", il.Body.Method.Module.TypeSystem.Int32, CollectionType) { HasThis = true }));
+
+ il.Append(done);
+ }
+ }
+
+ public readonly struct ForLoopMacro : ILProcessorMacro {
+ public readonly MethodBody Body;
+ public readonly Action Generator;
+ public readonly Action Start;
+ public readonly Action Stop;
+
+ public ForLoopMacro(MethodBody body, Action generator, Action start, Action stop) {
+ Body = body;
+ Generator = generator;
+ Start = start;
+ Stop = stop;
+ }
+
+ public void Emit(ILProcessor il) {
+ var varId = Body.Variables.Count;
+ var indexVariable = new VariableDefinition(Body.Method.Module.TypeSystem.Int32);
+ Body.Variables.Add(indexVariable);
+
+ Start(il);
+ il.Append(Stloc(Body, varId));
+
+ var loopConditionStart = Ldloc(Body, varId);
+ il.Append(Br_S(loopConditionStart));
+ {
+ var loopBodyBegin = il.AppendReturn(Nop());
+ Generator(il, indexVariable);
+
+ il.Append(Ldloc(Body, varId));
+ il.Append(Ldc_I4(1));
+ il.Append(Add());
+ il.Append(Stloc(Body, varId));
+
+ il.Append(loopConditionStart);
+ Stop(il);
+ il.Append(Blt_S(loopBodyBegin));
+ }
+ }
+ }
+
+ public readonly struct DictionaryForEachMacro : ILProcessorMacro {
+ public readonly MethodBody Body;
+ public readonly Action Generator;
+ public readonly TypeReference EnumerableType;
+ public readonly ModuleDefinition Module;
+
+ public DictionaryForEachMacro(ModuleDefinition module, MethodBody body, Action generator, TypeReference enumerableType) {
+ Module = module;
+ Body = body;
+ Generator = generator;
+ EnumerableType = enumerableType;
+ }
+
+ (TypeReference variableType, TypeReference depententType) GetDependentType(Type type, TypeReference provider) {
+ var enumeratorDef = Module.ImportReference(type).Resolve();
+
+ var parameterTypeReference0 = new Mono.Cecil.GenericParameter($"!0", provider);
+ parameterTypeReference0.SetPosition(0);
+ var parameterTypeReference1 = new Mono.Cecil.GenericParameter($"!1", provider);
+ parameterTypeReference1.SetPosition(1);
+
+ var returnRef = new GenericInstanceType(Module.ImportReference(enumeratorDef)) {
+ GenericArguments = {
+ parameterTypeReference0,
+ parameterTypeReference1
+ }
+ };
+
+ var variableTypeRef = Module.ImportReference(enumeratorDef)
+ .MakeGenericInstanceType(((GenericInstanceType)EnumerableType).GenericArguments.ToArray());
+
+ return (variableTypeRef, returnRef);
+ }
+
+ public void Emit(ILProcessor il) {
+
+ var enumeratorType = GetDependentType(typeof(Dictionary<,>.Enumerator), EnumerableType);
+ var enumeratorVariable = new VariableDefinition(enumeratorType.variableType);
+ Body.Variables.Add(enumeratorVariable);
+
+ var keyValueType = GetDependentType(typeof(KeyValuePair<,>), enumeratorType.variableType);
+ var keyValueVariable = new VariableDefinition(keyValueType.variableType);
+ Body.Variables.Add(keyValueVariable);
+
+ il.Append(Callvirt(new MethodReference("GetEnumerator", enumeratorType.depententType, EnumerableType) { HasThis = true }));
+ il.Append(Stloc(enumeratorVariable));
+
+ var moveNextStart = Ldloca(enumeratorVariable);
+ var getCurrentStart = Ldloca(enumeratorVariable);
+
+ il.Append(Br(moveNextStart));
+
+ il.Append(getCurrentStart);
+ il.Append(Callvirt(new MethodReference("get_Current", keyValueType.depententType, enumeratorType.variableType) { HasThis = true }));
+ il.Append(Stloc(keyValueVariable));
+ Generator(il, keyValueVariable);
+
+ il.Append(moveNextStart);
+ il.Append(Callvirt(new MethodReference("MoveNext", Module.TypeSystem.Boolean, enumeratorType.variableType) { HasThis = true }));
+ il.Append(Brtrue_S(getCurrentStart));
+
+ }
+ }
+}
+#endif
+
+#endregion
+
+
+#region Assets/Photon/Fusion/CodeGen/ILMacroStruct.cs
+
+#if FUSION_WEAVER && FUSION_HAS_MONO_CECIL
+
+namespace Fusion.CodeGen {
+ using System;
+ using Mono.Cecil.Cil;
+
+ internal struct ILMacroStruct : ILProcessorMacro {
+ Action generator;
+ Instruction[] instructions;
+ public static implicit operator ILMacroStruct(Instruction[] instructions) {
+ if (instructions == null) {
+ throw new ArgumentNullException(nameof(instructions));
+ }
+ return new ILMacroStruct() {
+ instructions = instructions
+ };
+ }
+
+ public static implicit operator ILMacroStruct(Action generator) {
+ if (generator == null) {
+ throw new ArgumentNullException(nameof(generator));
+ }
+ return new ILMacroStruct() {
+ generator = generator
+ };
+ }
+
+ public void Emit(ILProcessor il) {
+ if (generator != null) {
+ generator(il);
+ } else {
+ foreach (var instruction in instructions) {
+ il.Append(instruction);
+ }
+ }
+ }
+ }
+}
+
+#endif
+
+#endregion
+
+
+#region Assets/Photon/Fusion/CodeGen/ILWeaver.Cache.cs
+
+#if FUSION_WEAVER && FUSION_HAS_MONO_CECIL
+namespace Fusion.CodeGen {
+
+ using System;
+ using System.Linq;
+ using System.Runtime.CompilerServices;
+ using Mono.Cecil;
+ using Mono.Cecil.Cil;
+ using Mono.Cecil.Rocks;
+ using static Fusion.CodeGen.ILWeaverOpCodes;
+
+ partial class ILWeaver {
+
+ private TypeReference MakeFixedBuffer(ILWeaverAssembly asm, int wordCount) {
+
+ FieldDefinition CreateFixedBufferField (TypeDefinition type, string fieldName, TypeReference elementType, int elementCount) {
+ var fixedBufferFieldType = new TypeDefinition("", $"<{fieldName}>e__FixedBuffer", TypeAttributes.SequentialLayout | TypeAttributes.AnsiClass | TypeAttributes.Sealed | TypeAttributes.BeforeFieldInit | TypeAttributes.NestedPublic) {
+ BaseType = asm.Import(typeof(ValueType)),
+ PackingSize = 0,
+ ClassSize = elementCount * elementType.GetPrimitiveSize(),
+ };
+ fixedBufferFieldType.AddAttribute(asm);
+ fixedBufferFieldType.AddAttribute(asm);
+ fixedBufferFieldType.AddTo(type);
+
+ var elementField = new FieldDefinition("FixedElementField", FieldAttributes.Public, elementType);
+ elementField.AddTo(fixedBufferFieldType);
+
+ var field = new FieldDefinition(fieldName, FieldAttributes.Public, fixedBufferFieldType);
+ field.AddAttribute(asm, elementType, elementCount);
+ field.AddTo(type);
+
+ return field;
+ }
+
+ string typeName = $"FixedStorage@{wordCount}";
+ var fixedBufferType = asm.CecilAssembly.MainModule.GetType("Fusion.CodeGen", typeName);
+ if (fixedBufferType == null) {
+ // fixed buffers could be included directly in structs, but then again it would be impossible to provide a custom drawer;
+ // that's why there's this proxy struct
+ var storageType = new TypeDefinition("Fusion.CodeGen", typeName,
+ TypeAttributes.ExplicitLayout | TypeAttributes.AnsiClass | TypeAttributes.Sealed | TypeAttributes.BeforeFieldInit | TypeAttributes.Serializable,
+ asm.ValueType);
+
+ storageType.AddTo(asm.CecilAssembly);
+ storageType.AddInterface(asm);
+ storageType.AddAttribute(asm, wordCount);
+
+ FieldDefinition bufferField;
+ if (Allocator.REPLICATE_WORD_SIZE == sizeof(int)) {
+ bufferField = CreateFixedBufferField(storageType, $"Data", asm.Import(typeof(int)), wordCount);
+ bufferField.Offset = 0;
+
+ // Unity debugger seems to copy only the first element of a buffer,
+ // the rest is garbage when inspected; let's add some additional
+ // fields to help it
+ for (int i = 1; i < wordCount; ++i) {
+ var unityDebuggerWorkaroundField = new FieldDefinition($"_{i}", FieldAttributes.Private | FieldAttributes.NotSerialized, asm.Import());
+ unityDebuggerWorkaroundField.Offset = Allocator.REPLICATE_WORD_SIZE * i;
+ unityDebuggerWorkaroundField.AddTo(storageType);
+ }
+
+ }
+
+ fixedBufferType = storageType;
+ }
+ return fixedBufferType;
+ }
+
+ private string TypeNameToIdentifier(TypeReference type, string prefix) {
+ string result = type.FullName;
+ result = result.Replace("`1", "");
+ result = result.Replace("`2", "");
+ result = result.Replace("`3", "");
+ result = result.Replace(".", "_");
+ result = prefix + result;
+ return result;
+ }
+
+ private TypeDefinition MakeUnitySurrogate(ILWeaverAssembly asm, PropertyDefinition property) {
+ var type = property.PropertyType;
+
+ GenericInstanceType baseType;
+ string surrogateName;
+
+ TypeReference dataType;
+ Instruction initCall = null;
+
+ if (type.IsNetworkDictionary(out var keyType, out var valueType)) {
+ keyType = asm.Import(keyType);
+ valueType = asm.Import(valueType);
+ var keyReaderWriterType = GetOrMakeElementReaderWriter(asm, property.DeclaringType, property, keyType);
+ var valueReaderWriterType = GetOrMakeElementReaderWriter(asm, property.DeclaringType, property, valueType);
+ baseType = asm.Import(typeof(Fusion.Internal.UnityDictionarySurrogate<,,,>)).MakeGenericInstanceType(keyType, keyReaderWriterType, valueType, valueReaderWriterType);
+ surrogateName = "UnityDictionarySurrogate@" + keyReaderWriterType.Name + "@" + valueReaderWriterType.Name;
+ dataType = TypeReferenceRocks.MakeGenericInstanceType(asm.Import(typeof(SerializableDictionary<,>)), keyType, valueType);
+ initCall = Call(new GenericInstanceMethod(asm.Import(asm.Import(typeof(SerializableDictionary)).Resolve().GetMethodOrThrow("Create"))) {
+ GenericArguments = { keyType, valueType }
+ });
+ } else if (type.IsNetworkArray(out var elementType)) {
+ elementType = asm.Import(elementType);
+ var readerWriterType = GetOrMakeElementReaderWriter(asm, property.DeclaringType, property, elementType);
+ baseType = asm.Import(typeof(Fusion.Internal.UnityArraySurrogate<,>)).MakeGenericInstanceType(elementType, readerWriterType);
+ surrogateName = "UnityArraySurrogate@" + readerWriterType.Name;
+ dataType = elementType.MakeArrayType();
+ initCall = Call(new GenericInstanceMethod(asm.Import(asm.Import(typeof(Array)).Resolve().GetMethodOrThrow("Empty"))) {
+ GenericArguments = { elementType }
+ });
+ } else if (type.IsNetworkList(out elementType)) {
+ elementType = asm.Import(elementType);
+ var readerWriterType = GetOrMakeElementReaderWriter(asm, property.DeclaringType, property, elementType);
+ baseType = asm.Import(typeof(Fusion.Internal.UnityLinkedListSurrogate<,>)).MakeGenericInstanceType(elementType, readerWriterType);
+ surrogateName = "UnityLinkedListSurrogate@" + readerWriterType.Name;
+ dataType = elementType.MakeArrayType();
+ initCall = Call(new GenericInstanceMethod(asm.Import(asm.Import(typeof(Array)).Resolve().GetMethodOrThrow("Empty"))) {
+ GenericArguments = { elementType }
+ });
+ } else {
+ var readerWriterType = GetOrMakeElementReaderWriter(asm, property.DeclaringType, property, property.PropertyType);
+ baseType = asm.Import(typeof(Fusion.Internal.UnityValueSurrogate<,>)).MakeGenericInstanceType(property.PropertyType, readerWriterType);
+ surrogateName = "UnityValueSurrogate@" + readerWriterType.Name;
+ dataType = property.PropertyType;
+ }
+
+ int attributesHash = HashCodeUtilities.InitialHash;
+ VisitPropertyMovableAttributes(property, (ctor, blob) => {
+ attributesHash = HashCodeUtilities.GetHashDeterministic(ctor.FullName, attributesHash);
+ attributesHash = HashCodeUtilities.GetHashCodeDeterministic(blob, attributesHash);
+ });
+ if (attributesHash != HashCodeUtilities.InitialHash) {
+ surrogateName += $"@Attributes_0x{attributesHash:X8}";
+ }
+
+ var surrogateType = asm.CecilAssembly.MainModule.GetType("Fusion.CodeGen", surrogateName);
+ if (surrogateType == null) {
+ surrogateType = new TypeDefinition("Fusion.CodeGen", surrogateName,
+ TypeAttributes.NotPublic | TypeAttributes.AnsiClass | TypeAttributes.Serializable | TypeAttributes.BeforeFieldInit,
+ baseType);
+
+ surrogateType.AddTo(asm.CecilAssembly);
+
+
+ var dataProp = new PropertyDefinition("DataProperty", PropertyAttributes.None, dataType);
+ dataProp.AddTo(surrogateType);
+
+ var dataField = new FieldDefinition("Data", FieldAttributes.Public, dataType);
+ dataField.AddTo(surrogateType);
+
+ var getMethod = new MethodDefinition($"get_{dataProp.Name}", MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.Virtual, dataType);
+ {
+ var il = getMethod.Body.GetILProcessor();
+ il.Append(Ldarg_0());
+ il.Append(Ldfld(dataField));
+ il.Append(Ret());
+ }
+ getMethod.AddTo(surrogateType);
+
+ var setMethod = new MethodDefinition($"set_{dataProp.Name}", MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.SpecialName | MethodAttributes.Virtual, asm.Void);
+ setMethod.Parameters.Add(new ParameterDefinition("value", ParameterAttributes.None, dataType));
+ {
+ var il = setMethod.Body.GetILProcessor();
+ il.Append(Ldarg_0());
+ il.Append(Ldarg_1());
+ il.Append(Stfld(dataField));
+ il.Append(Ret());
+ }
+ setMethod.AddTo(surrogateType);
+
+ dataProp.GetMethod = getMethod;
+ dataProp.SetMethod = setMethod;
+
+ MovePropertyAttributesToBackingField(asm, property, dataField, addSerializeField: false);
+
+ surrogateType.AddDefaultConstructor(il => {
+ if (initCall != null) {
+ il.Append(Ldarg_0());
+ il.Append(initCall);
+ il.Append(Stfld(dataField));
+ }
+ });
+ }
+ return surrogateType;
+ }
+
+ public static TypeReference GetExistingElementReaderWriter(TypeDefinition declaringType, ICustomAttributeProvider member, NetworkTypeInfo typeInfo) {
+ var result = TryGetExistingElementReaderWriter(declaringType, member, typeInfo);
+ if (result == null) {
+ throw new ILWeaverException($"No reader-writer found for {typeInfo.TypeRef}");
+ }
+ return result;
+ }
+
+ public static TypeReference TryGetExistingElementReaderWriter(TypeReference declaringType, ICustomAttributeProvider member, NetworkTypeInfo typeInfo) {
+ var module = declaringType.Module;
+ if (!typeInfo.CanBeUsedInStructs) {
+ if (!declaringType.Is()) {
+ throw new ILWeaverException($"{typeInfo.TypeRef} needs wrapping - such types are only supported as NetworkBehaviour properties.");
+ }
+
+ var interfaceType = module.ImportReference(typeof(IElementReaderWriter<>)).MakeGenericInstanceType(typeInfo.TypeRef);
+
+ // check if the behaviour implements the interface
+ var currentType = declaringType.Resolve();
+ while (currentType != null) {
+ if (currentType.Interfaces.Any(x => x.InterfaceType.FullName == interfaceType.FullName)) {
+ // already implemented
+ return declaringType;
+ }
+ currentType = currentType.BaseType?.Resolve();
+ }
+
+ return null;
+ } else {
+
+ switch (typeInfo.TypeRef.FullName) {
+ case "System.Byte" : return module.ImportReference(typeof(ElementReaderWriterByte));
+ case "System.SByte" : return module.ImportReference(typeof(ElementReaderWriterSByte));
+ case "System.Int16" : return module.ImportReference(typeof(ElementReaderWriterInt16));
+ case "System.UInt16": return module.ImportReference(typeof(ElementReaderWriterUInt16));
+ case "System.Int32" : return module.ImportReference(typeof(ElementReaderWriterInt32));
+ case "System.UInt32": return module.ImportReference(typeof(ElementReaderWriterUInt32));
+ case "System.Int64" : return module.ImportReference(typeof(ElementReaderWriterInt64));
+ case "System.UInt64": return module.ImportReference(typeof(ElementReaderWriterUInt64));
+ case "System.Single": return module.ImportReference(typeof(ElementReaderWriterSingle));
+ case "System.Double": return module.ImportReference(typeof(ElementReaderWriterDouble));
+ case "System.Boolean": return module.ImportReference(typeof(ElementReaderWriterBoolean));
+ //case "System.String": return Import();
+ case "System.Char": return module.ImportReference(typeof(ElementReaderWriterChar));
+ case "UnityEngine.Vector2": return module.ImportReference(typeof(ElementReaderWriterVector2));
+ case "UnityEngine.Vector3": return module.ImportReference(typeof(ElementReaderWriterVector3));
+ case "UnityEngine.Vector4": return module.ImportReference(typeof(ElementReaderWriterVector4));
+
+ case "Fusion.NetworkBool": return module.ImportReference(typeof(ElementReaderWriterNetworkBool));
+ case "Fusion.PlayerRef": return module.ImportReference(typeof(ElementReaderWriterPlayerRef));
+ case "Fusion.NetworkId": return module.ImportReference(typeof(ElementReaderWriterNetworkId));
+ case "Fusion.NetworkBehaviourId": return module.ImportReference(typeof(ElementReaderWriterNetworkBehaviourId));
+ }
+
+ var readerWriterName = "ReaderWriter@" + typeInfo.TypeRef.FullName.Replace(".", "_").Replace("/", "__");
+
+ if (typeInfo.TryGetCapacity(member, out int capacity)) {
+ readerWriterName += $"@Capacity_{capacity}";
+ }
+
+ return module.GetType("Fusion.CodeGen", readerWriterName);
+ }
+ }
+
+ private TypeReference GetOrMakeElementReaderWriter(ILWeaverAssembly asm, TypeReference declaringType, ICustomAttributeProvider member, TypeReference elementType) {
+
+ elementType = asm.Import(elementType);
+ var typeInfo = TypeRegistry.GetInfo(elementType);
+
+ var existing = TryGetExistingElementReaderWriter(declaringType, member, typeInfo);
+
+ if (existing != null) {
+ return existing;
+ }
+
+
+ var interfaceType = asm.Import(typeof(IElementReaderWriter<>)).MakeGenericInstanceType(elementType);
+
+ void AddIElementReaderWriterImplementation(TypeDefinition readerWriterType, int elementWordCount, bool isExplicit = false) {
+
+ var dataType = asm.Import(typeof(byte*));
+ var indexType = asm.Import(typeof(int));
+
+ readerWriterType.Interfaces.Add(new InterfaceImplementation(interfaceType));
+
+ var visibility = isExplicit ? MethodAttributes.Private : MethodAttributes.Public;
+ var namePrefix = isExplicit ? $"CodeGen@ElementReaderWriter<{elementType.FullName}>." : "";
+
+ var readMethod = new MethodDefinition($"{namePrefix}Read",
+ visibility | MethodAttributes.Final | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual,
+ elementType);
+
+ readMethod.Parameters.Add(new ParameterDefinition("data", ParameterAttributes.None, dataType));
+ readMethod.Parameters.Add(new ParameterDefinition("index", ParameterAttributes.None, indexType));
+ readMethod.AddAttribute(asm, MethodImplOptions.AggressiveInlining);
+ readMethod.AddTo(readerWriterType);
+
+ var readRefMethod = new MethodDefinition($"{namePrefix}ReadRef",
+ visibility | MethodAttributes.Final | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual,
+ elementType.MakeByReferenceType());
+
+ readRefMethod.Parameters.Add(new ParameterDefinition("data", ParameterAttributes.None, dataType));
+ readRefMethod.Parameters.Add(new ParameterDefinition("index", ParameterAttributes.None, indexType));
+ readRefMethod.AddAttribute(asm, MethodImplOptions.AggressiveInlining);
+ readRefMethod.AddTo(readerWriterType);
+
+ var writeMethod = new MethodDefinition($"{namePrefix}Write",
+ visibility | MethodAttributes.Final | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual,
+ asm.Void);
+
+ writeMethod.Parameters.Add(new ParameterDefinition("data", ParameterAttributes.None, dataType));
+ writeMethod.Parameters.Add(new ParameterDefinition("index", ParameterAttributes.None, indexType));
+ writeMethod.Parameters.Add(new ParameterDefinition("val", ParameterAttributes.None, elementType));
+ writeMethod.AddAttribute(asm, MethodImplOptions.AggressiveInlining);
+ writeMethod.AddTo(readerWriterType);
+
+ var getElementWordCountMethod = new MethodDefinition($"{namePrefix}GetElementWordCount",
+ visibility | MethodAttributes.Final | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual,
+ asm.Import(typeof(int)));
+
+ getElementWordCountMethod.AddAttribute(asm, MethodImplOptions.AggressiveInlining);
+ getElementWordCountMethod.AddTo(readerWriterType);
+
+ var getElementHashCodeMethod = new MethodDefinition($"{namePrefix}GetElementHashCode",
+ visibility | MethodAttributes.Final | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual,
+ asm.Import(typeof(int)));
+
+ getElementHashCodeMethod.Parameters.Add(new ParameterDefinition("val", ParameterAttributes.None, elementType));
+ getElementHashCodeMethod.AddAttribute(asm, MethodImplOptions.AggressiveInlining);
+ getElementHashCodeMethod.AddTo(readerWriterType);
+
+ if (isExplicit) {
+ readMethod.Overrides.Add(interfaceType.GetGenericInstanceMethodOrThrow(nameof(IElementReaderWriter.Read)));
+ readRefMethod.Overrides.Add(interfaceType.GetGenericInstanceMethodOrThrow(nameof(IElementReaderWriter.ReadRef)));
+ writeMethod.Overrides.Add(interfaceType.GetGenericInstanceMethodOrThrow(nameof(IElementReaderWriter.Write)));
+ getElementWordCountMethod.Overrides.Add(interfaceType.GetGenericInstanceMethodOrThrow(nameof(IElementReaderWriter.GetElementWordCount)));
+ getElementHashCodeMethod.Overrides.Add(interfaceType.GetGenericInstanceMethodOrThrow(nameof(IElementReaderWriter.GetElementHashCode)));
+ }
+
+ Action addressGetter = il => {
+ il.Append(Instruction.Create(OpCodes.Ldarg_1));
+ il.Append(Instruction.Create(OpCodes.Ldarg_2));
+ il.Append(Instruction.Create(OpCodes.Ldc_I4, elementWordCount * Allocator.REPLICATE_WORD_SIZE));
+ il.Append(Instruction.Create(OpCodes.Mul));
+ il.Append(Instruction.Create(OpCodes.Add));
+ };
+
+
+ EmitRead(asm, readMethod.Body.GetILProcessor(), elementType, readerWriterType, member, addressGetter, emitRet: true);
+ EmitRead(asm, readRefMethod.Body.GetILProcessor(), readRefMethod.ReturnType, readerWriterType, member, addressGetter, emitRet: true, throwForNonUnmanagedRefs: true);
+ EmitWrite(asm, writeMethod.Body.GetILProcessor(), elementType, readerWriterType, member, addressGetter, OpCodes.Ldarg_3, emitRet: true);
+ EmitGetHashCode(asm, getElementHashCodeMethod.Body.GetILProcessor(), elementType, readerWriterType, member, addressGetter,
+ valueGetter: il => {
+ il.Append(Ldarg_1());
+ },
+ valueAddrGetter: il => {
+ il.Append(Ldarga_S(getElementHashCodeMethod.Parameters[0]));
+ },
+ emitRet: true);
+
+ {
+ var il = getElementWordCountMethod.Body.GetILProcessor();
+ il.Append(Ldc_I4(elementWordCount));
+ il.Append(Ret());
+ }
+ }
+
+ if (!typeInfo.CanBeUsedInStructs) {
+ if (!declaringType.Is()) {
+ throw new ILWeaverException($"{elementType} needs wrapping - such types are only supported as NetworkBehaviour properties.");
+ }
+
+ // let's add an interface!
+ var behaviour = declaringType.Resolve();
+ var wordCount = typeInfo.GetMemberWordCount(member, behaviour);
+
+ Log.Debug($"Adding interface {behaviour} {interfaceType}");
+ AddIElementReaderWriterImplementation(behaviour, wordCount, isExplicit: true);
+ return behaviour;
+ } else {
+ // make there is a built-in reader-writer for this type?
+
+ var readerWriterName = "ReaderWriter@" + elementType.FullName.Replace(".", "_").Replace("/", "__");
+
+ if (typeInfo.TryGetCapacity(member, out int capacity)) {
+ readerWriterName += $"@Capacity_{capacity}";
+ }
+
+ const string GetInstanceMethodName = "GetInstance";
+
+ var readerWriterTypeDef = new TypeDefinition("Fusion.CodeGen", readerWriterName,
+ TypeAttributes.AnsiClass | TypeAttributes.Sealed | TypeAttributes.SequentialLayout | TypeAttributes.BeforeFieldInit, asm.ValueType);
+
+ // without this, VS debugger will crash
+ readerWriterTypeDef.PackingSize = 0;
+ readerWriterTypeDef.ClassSize = 1;
+
+ readerWriterTypeDef.AddTo(asm.CecilAssembly);
+
+ var wordCount = typeInfo.GetMemberWordCount(member, readerWriterTypeDef);
+ AddIElementReaderWriterImplementation(readerWriterTypeDef, wordCount);
+
+ var instanceField = new FieldDefinition("Instance", FieldAttributes.Public | FieldAttributes.Static, interfaceType);
+ instanceField.AddTo(readerWriterTypeDef);
+
+ var initializeMethod = new MethodDefinition(GetInstanceMethodName, MethodAttributes.Public | MethodAttributes.Static | MethodAttributes.HideBySig, interfaceType);
+ initializeMethod.AddAttribute(asm, MethodImplOptions.AggressiveInlining);
+ initializeMethod.AddTo(readerWriterTypeDef);
+
+ {
+ var il = initializeMethod.Body.GetILProcessor();
+ var loadFld = Ldsfld(instanceField);
+
+ var tmpVar = new VariableDefinition(readerWriterTypeDef);
+ il.Body.Variables.Add(tmpVar);
+
+ il.Append(Ldsfld(instanceField));
+ il.Append(Brtrue_S(loadFld));
+
+ il.Append(Ldloca_S(tmpVar));
+ il.Append(Initobj(readerWriterTypeDef));
+ il.Append(Ldloc_0());
+ il.Append(Box(readerWriterTypeDef));
+ il.Append(Stsfld(instanceField));
+
+ il.Append(loadFld);
+ il.Append(Ret());
+
+ }
+
+ return readerWriterTypeDef;
+ }
+ }
+
+ private void EmitElementReaderWriterLoad(ILWeaverAssembly asm, ILProcessor il, TypeReference readerWriterType) {
+ if (readerWriterType.Is()) {
+ il.Append(Ldarg_0());
+ } else {
+ var getInstanceMethod = readerWriterType.Resolve().GetMethodOrThrow("GetInstance");
+ il.Append(Call(asm.Import(getInstanceMethod)));
+ }
+ }
+
+ }
+}
+#endif
+
+#endregion
+
+
+#region Assets/Photon/Fusion/CodeGen/ILWeaver.cs
+
+#if FUSION_WEAVER && FUSION_HAS_MONO_CECIL
+
+namespace Fusion.CodeGen {
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Runtime.CompilerServices;
+ using Mono.Cecil;
+ using Mono.Cecil.Cil;
+ using Mono.Cecil.Rocks;
+ using Mono.Collections.Generic;
+ using static Fusion.CodeGen.ILWeaverOpCodes;
+ using ICustomAttributeProvider = Mono.Cecil.ICustomAttributeProvider;
+ using MethodAttributes = Mono.Cecil.MethodAttributes;
+ using ParameterAttributes = Mono.Cecil.ParameterAttributes;
+
+ public unsafe partial class ILWeaver {
+
+ Dictionary _rpcCount = new Dictionary(new MemberReferenceFullNameComparer());
+
+
+ internal readonly ILWeaverLog Log;
+ internal readonly ILWeaverSettings Settings;
+
+ public ILWeaver(ILWeaverSettings settings, ILWeaverLog log) {
+ if (log == null) {
+ throw new ArgumentNullException(nameof(log));
+ }
+ Log = log;
+ Settings = settings;
+ }
+
+ public ILWeaver(ILWeaverSettings settings, ILWeaverLogger logger) : this(settings, new ILWeaverLog(logger)) {
+ }
+
+ private void EnsureTypeRegistry(ILWeaverAssembly asm) {
+ if (TypeRegistry == null) {
+ TypeRegistry = new NetworkTypeInfoRegistry(asm.CecilAssembly.MainModule, Settings, Log.Logger, typeRef => CalculateStructWordCount(typeRef));
+ }
+ }
+
+ void InjectPtrNullCheck(ILWeaverAssembly asm, ILProcessor il, PropertyDefinition property) {
+ if (Settings.NullChecksForNetworkedProperties) {
+ var nop = Instruction.Create(OpCodes.Nop);
+
+ il.Append(Instruction.Create(OpCodes.Ldarg_0));
+ var ptrGetter = asm.NetworkedBehaviour.GetFieldOrThrow(nameof(NetworkBehaviour.Ptr));
+ il.Append(Instruction.Create(OpCodes.Ldfld, ptrGetter));
+ //var ptrField = asm.NetworkedBehaviour.GetField(nameof(NetworkBehaviour.Ptr));
+ //il.Append(Instruction.Create(OpCodes.Ldfld, ptrField));
+ il.Append(Instruction.Create(OpCodes.Ldc_I4_0));
+ il.Append(Instruction.Create(OpCodes.Conv_U));
+ il.Append(Instruction.Create(OpCodes.Ceq));
+ il.Append(Instruction.Create(OpCodes.Brfalse, nop));
+
+ var ctor = typeof(InvalidOperationException).GetConstructors().First(x => x.GetParameters().Length == 1);
+ var exnCtor = asm.Import(ctor);
+
+ il.Append(Instruction.Create(OpCodes.Ldstr, $"Error when accessing {property.DeclaringType.Name}.{property.Name}. Networked properties can only be accessed when Spawned() has been called."));
+ il.Append(Instruction.Create(OpCodes.Newobj, exnCtor));
+ il.Append(Instruction.Create(OpCodes.Throw));
+ il.Append(nop);
+ }
+ }
+
+ void EmitRead(ILWeaverAssembly asm, ILProcessor il, PropertyDefinition property, Action addressGetter) {
+ EmitRead(asm, il, property.PropertyType, property.DeclaringType, property, addressGetter, true);
+ }
+
+ void EmitRead(ILWeaverAssembly asm, ILProcessor il, TypeReference type, TypeReference declaringType, ICustomAttributeProvider member, Action addressGetter, bool emitRet = false, bool throwForNonUnmanagedRefs = false) {
+ // for pointer types we can simply just return the address we loaded on the stack
+ if (type.IsPointer || type.IsByReference) {
+ // load address
+ if (throwForNonUnmanagedRefs == false || TypeRegistry.GetInfo(type.GetElementTypeWithGenerics()).IsTriviallyCopyable) {
+ addressGetter(il);
+ } else {
+ il.Append(Ldstr($"Only supported for trivially copyable types. {type.GetElementTypeWithGenerics()} is not trivially copyable."));
+ il.Append(Newobj(asm.Import(typeof(NotSupportedException).GetConstructor(new[] { typeof(string) }))));
+ il.Append(Throw());
+ return;
+ }
+ } else {
+ using (var ctx = new MethodContext(asm, il.Body.Method, addressGetter: addressGetter)) {
+ ctx.LoadElementReaderWriterImpl = (il, type, member) => {
+ EmitElementReaderWriterLoad(asm, il, GetOrMakeElementReaderWriter(asm, declaringType, member, type));
+ };
+
+ TypeRegistry.EmitRead(type, il, ctx, member);
+ }
+ }
+
+ if (emitRet) {
+ il.Append(Ret());
+ }
+ }
+
+ void EmitWrite(ILWeaverAssembly asm, ILProcessor il, PropertyDefinition property, Action addressGetter, OpCode valueOpCode) {
+ EmitWrite(asm, il, property.PropertyType, property.DeclaringType, property, addressGetter, valueOpCode, true);
+ }
+
+ void EmitWrite(ILWeaverAssembly asm, ILProcessor il, TypeReference type, TypeReference declaringType, ICustomAttributeProvider member, Action addressGetter, OpCode valueOpCode, bool emitRet = false) {
+
+ if (type.IsPointer || type.IsByReference) {
+ throw new ILWeaverException($"Pointer and reference members are read-only");
+ }
+
+ using (var ctx = new MethodContext(asm, il.Body.Method, addressGetter: addressGetter, valueGetter: (il) => il.Append(Instruction.Create(valueOpCode)))) {
+ ctx.LoadElementReaderWriterImpl = (il, type, member) => {
+ EmitElementReaderWriterLoad(asm, il, GetOrMakeElementReaderWriter(asm, declaringType, member, type));
+ };
+ TypeRegistry.EmitWrite(type, il, ctx, member);
+ if (emitRet) {
+ il.Append(Ret());
+ }
+ }
+ }
+
+ void EmitGetHashCode(ILWeaverAssembly asm, ILProcessor il, TypeReference type, TypeReference declaringType, ICustomAttributeProvider member, Action addressGetter, Action valueGetter, Action valueAddrGetter, bool emitRet = false) {
+
+ using (var ctx = new MethodContext(asm, il.Body.Method, addressGetter: null, valueGetter: valueGetter, valueAddrGetter: valueAddrGetter)) {
+ ctx.LoadElementReaderWriterImpl = (il, type, member) => {
+ EmitElementReaderWriterLoad(asm, il, GetOrMakeElementReaderWriter(asm, declaringType, member, type));
+ };
+ TypeRegistry.EmitGetHashCode(type, il, ctx, member);
+ if (emitRet) {
+ il.Append(Ret());
+ }
+ }
+ }
+
+ void ThrowIfPropertyNotEmptyOrCompilerGenerated(PropertyDefinition property) {
+ Collection instructions;
+ int idx;
+
+ var getter = property.GetMethod;
+ var setter = property.SetMethod;
+
+ void ExpectNext(params OpCode[] opCodes) {
+ foreach (var opCode in opCodes) {
+ // skip nops
+ for (; idx < instructions.Count && instructions[idx].OpCode.Equals(OpCodes.Nop); ++idx) {
+ }
+
+ if (idx >= instructions.Count) {
+ throw new InvalidOperationException($"Expected {opCode}, but run out of instructions");
+ } else if (!instructions[idx].OpCode.Equals(opCode)) {
+ throw new InvalidOperationException($"Expected {opCode}, got {instructions[idx].OpCode} at {idx}. Full IL: {string.Join(", ", instructions)}");
+ }
+ ++idx;
+ }
+ }
+
+ if (getter != null && !getter.TryGetAttribute(out _)) {
+ instructions = getter.Body.Instructions;
+ idx = 0;
+
+ bool expectLocalVariable = false;
+ var returnType = getter.ReturnType;
+
+ switch (returnType.MetadataType) {
+ case MetadataType.SByte:
+ case MetadataType.Byte:
+ case MetadataType.Int16:
+ case MetadataType.UInt16:
+ case MetadataType.Int32:
+ case MetadataType.UInt32:
+ case MetadataType.Boolean:
+ case MetadataType.Char:
+ ExpectNext(OpCodes.Ldc_I4_0);
+ break;
+ case MetadataType.Int64:
+ case MetadataType.UInt64:
+ ExpectNext(OpCodes.Ldc_I4_0, OpCodes.Conv_I8);
+ break;
+ case MetadataType.Single:
+ ExpectNext(OpCodes.Ldc_R4);
+ break;
+ case MetadataType.Double:
+ ExpectNext(OpCodes.Ldc_R8);
+ break;
+ case MetadataType.String:
+ case MetadataType.Object:
+ ExpectNext(OpCodes.Ldnull);
+ break;
+ default:
+ expectLocalVariable = true;
+ ExpectNext(OpCodes.Ldloca_S, OpCodes.Initobj, OpCodes.Ldloc_0);
+ break;
+ }
+
+ if (getter.Body.Variables.Count > (expectLocalVariable ? 1 : 0)) {
+ if (expectLocalVariable) {
+ ExpectNext(OpCodes.Stloc_1, OpCodes.Br_S, OpCodes.Ldloc_1);
+ } else {
+ ExpectNext(OpCodes.Stloc_0, OpCodes.Br_S, OpCodes.Ldloc_0);
+ }
+ }
+
+ ExpectNext(OpCodes.Ret);
+ }
+
+ if (setter != null && !setter.TryGetAttribute(out _)) {
+ instructions = setter.Body.Instructions;
+ idx = 0;
+ ExpectNext(OpCodes.Ret);
+ }
+ }
+
+ (MethodDefinition getter, MethodDefinition setter) PreparePropertyForWeaving(PropertyDefinition property) {
+
+ var getter = property.GetMethod;
+ var setter = property.SetMethod;
+
+ // clear getter
+ getter.CustomAttributes.Clear();
+ getter.Body.Instructions.Clear();
+
+ // clear setter if it exists
+ setter?.CustomAttributes?.Clear();
+ setter?.Body?.Instructions?.Clear();
+
+ return (getter, setter);
+ }
+
+ struct WeavablePropertyMeta {
+ public string DefaultFieldName;
+ public FieldDefinition BackingField;
+ public bool ReatainIL;
+ public string OnChanged;
+ }
+
+ bool IsWeavableProperty(PropertyDefinition property, out WeavablePropertyMeta meta) {
+ if (property.TryGetAttribute(out var attr) == false) {
+ meta = default;
+ return false;
+ }
+
+ // check getter ... it has to exist
+ var getter = property.GetMethod;
+ if (getter == null) {
+ meta = default;
+ return false;
+ }
+
+ // check setter ...
+ var setter = property.SetMethod;
+ if (setter == null) {
+ // if it doesn't exist we allow either array or pointer
+ if (property.PropertyType.IsByReference == false && property.PropertyType.IsPointer == false && !property.PropertyType.IsNetworkCollection()) {
+ throw new ILWeaverException($"Simple properties need a setter.");
+ }
+ }
+
+ if (getter.IsStatic) {
+ throw new ILWeaverException($"Networked properties can't be static.");
+ }
+
+
+
+ // check for backing field ...
+ if (property.TryGetBackingField(out var backing)) {
+ var il = attr.Properties.FirstOrDefault(x => x.Name == "RetainIL");
+
+ if (il.Argument.Value is bool retainIL && retainIL) {
+ meta = new WeavablePropertyMeta() {
+ ReatainIL = true
+ };
+ return true;
+ }
+ }
+
+ meta = new WeavablePropertyMeta() {
+ BackingField = backing,
+ ReatainIL = false,
+ };
+
+ attr.TryGetAttributeProperty(nameof(NetworkedAttribute.Default), out meta.DefaultFieldName);
+
+
+ return true;
+ }
+
+
+
+ void ThrowIfNotRpcCompatible(TypeReference type) {
+ NetworkTypeInfo typeInfo;
+ typeInfo = TypeRegistry.GetInfo(type);
+ if (!typeInfo.CanBeUsedInRpc) {
+ throw new ArgumentException($"Can't be used in RPC");
+ }
+ }
+
+ MethodReference GetBaseMethodReference(ILWeaverAssembly asm, MethodDefinition overridingDefinition, TypeReference baseType) {
+
+ var baseMethod = new MethodReference(overridingDefinition.Name, overridingDefinition.ReturnType, baseType) {
+ HasThis = overridingDefinition.HasThis,
+ ExplicitThis = overridingDefinition.ExplicitThis,
+ CallingConvention = overridingDefinition.CallingConvention,
+ };
+
+ foreach (var parameter in overridingDefinition.Parameters) {
+ baseMethod.Parameters.Add(new ParameterDefinition(parameter.ParameterType));
+ }
+
+ if (baseMethod.DeclaringType is GenericInstanceType genericTypeRef) {
+ baseMethod = baseMethod.GetCallable(genericTypeRef);
+ }
+
+ return asm.Import(baseMethod);
+ }
+
+ string InvokerMethodName(string method, Dictionary nameCache) {
+ nameCache.TryGetValue(method, out var count);
+ nameCache[method] = ++count;
+ return $"{method}@Invoker{(count == 1 ? "" : count.ToString())}";
+ }
+
+ bool HasRpcPrefixOrSuffix(MethodDefinition def) {
+ return def.Name.StartsWith("rpc", StringComparison.OrdinalIgnoreCase) || def.Name.EndsWith("rpc", StringComparison.OrdinalIgnoreCase);
+ }
+
+ void WeaveRpcs(ILWeaverAssembly asm, TypeDefinition type, bool allowInstanceRpcs = true) {
+ // rpc list
+ var rpcs = new List<(MethodDefinition, CustomAttribute)>();
+
+
+ bool hasStaticRpc = false;
+
+ foreach (var rpc in type.Methods) {
+ if (rpc.TryGetAttribute(out var attr)) {
+
+ if (HasRpcPrefixOrSuffix(rpc) == false) {
+ throw new ILWeaverException($"{rpc}: name needs to start or end with the \"Rpc\" prefix or suffix");
+ }
+
+ if (rpc.IsStatic && rpc.Parameters.FirstOrDefault()?.ParameterType.FullName != asm.NetworkRunner.Reference.FullName) {
+ throw new ILWeaverException($"{rpc}: Static RPC needs {nameof(NetworkRunner)} as the first parameter");
+ }
+
+ hasStaticRpc |= rpc.IsStatic;
+
+ if (!allowInstanceRpcs && !rpc.IsStatic) {
+ throw new ILWeaverException($"{rpc}: Instance RPCs not allowed for this type");
+ }
+
+ foreach (var parameter in rpc.Parameters) {
+ if (rpc.IsStatic && parameter == rpc.Parameters[0]) {
+ continue;
+ }
+
+ if (IsInvokeOnlyParameter(parameter)) {
+ continue;
+ }
+
+ var parameterType = parameter.ParameterType.IsArray ? parameter.ParameterType.GetElementTypeWithGenerics() : parameter.ParameterType;
+
+ try {
+ ThrowIfNotRpcCompatible(parameterType);
+ } catch (Exception ex) {
+ throw new ILWeaverException($"{rpc}: parameter {parameter.Name} is not Rpc-compatible.", ex);
+ }
+ }
+
+ if (!rpc.ReturnType.Is(asm.RpcInvokeInfo) && !rpc.ReturnType.IsVoid()) {
+ throw new ILWeaverException($"{rpc}: RPCs can't return a value.");
+ }
+
+ rpcs.Add((rpc, attr));
+ }
+ }
+
+ if (!rpcs.Any()) {
+ return;
+ }
+
+ int instanceRpcKeys = GetInstanceRpcCount(type.BaseType);
+
+ Dictionary invokerNameCounter = new Dictionary();
+
+ foreach (var (rpc, attr) in rpcs) {
+ int sources;
+ int targets;
+
+ if (attr.ConstructorArguments.Count == 2) {
+ sources = attr.GetAttributeArgument(0);
+ targets = attr.GetAttributeArgument(1);
+ } else {
+ sources = AuthorityMasks.ALL;
+ targets = AuthorityMasks.ALL;
+ }
+
+ ParameterDefinition rpcTargetParameter = rpc.Parameters.SingleOrDefault(x => x.HasAttribute());
+ if (rpcTargetParameter != null && !rpcTargetParameter.ParameterType.Is()) {
+ throw new ILWeaverException($"{rpcTargetParameter}: {nameof(RpcTargetAttribute)} can only be used for {nameof(PlayerRef)} type argument");
+ }
+
+ attr.TryGetAttributeProperty(nameof(RpcAttribute.InvokeLocal), out var invokeLocal, defaultValue: true);
+ attr.TryGetAttributeProperty(nameof(RpcAttribute.Channel), out var channel);
+ attr.TryGetAttributeProperty(nameof(RpcAttribute.TickAligned), out var tickAligned, defaultValue: true);
+ attr.TryGetAttributeProperty(nameof(RpcAttribute.HostMode), out var hostMode);
+
+ // rpc key
+ int instanceRpcKey = -1;
+ var returnsRpcInvokeInfo = rpc.ReturnType.Is(asm.RpcInvokeInfo);
+
+
+ using (var ctx = new RpcMethodContext(asm, rpc, rpc.IsStatic)) {
+
+ // local variables
+ ctx.DataVariable = new VariableDefinition(asm.Import(typeof(byte)).MakePointerType());
+ ctx.OffsetVariable = new VariableDefinition(asm.Import(typeof(int)));
+ var message = new VariableDefinition(asm.SimulationMessage.Reference.MakePointerType());
+ VariableDefinition localAuthorityMask = null;
+
+ rpc.Body.Variables.Add(ctx.DataVariable);
+ rpc.Body.Variables.Add(ctx.OffsetVariable);
+ rpc.Body.Variables.Add(message);
+ rpc.Body.InitLocals = true;
+
+ // get il processes and our jump instruction
+ var il = rpc.Body.GetILProcessor();
+ var jmp = Nop();
+ var inv = Nop();
+ var prepareInv = Nop();
+
+ Instruction targetedInvokeLocal = null;
+
+
+ // instructions for our branch
+ var ins = new List();
+
+ if (returnsRpcInvokeInfo) {
+ // find local variable that's used for return(default);
+ ctx.RpcInvokeInfoVariable = new VariableDefinition(asm.RpcInvokeInfo);
+ rpc.Body.Variables.Add(ctx.RpcInvokeInfoVariable);
+ ins.Add(Ldloca(ctx.RpcInvokeInfoVariable));
+ ins.Add(Initobj(ctx.RpcInvokeInfoVariable.VariableType));
+
+ // fix each ret
+ var returns = il.Body.Instructions.Where(x => x.OpCode == OpCodes.Ret).ToList();
+ foreach (var retInstruction in returns) {
+ // need to pop the original value and load our new one
+ il.InsertBefore(retInstruction, Pop());
+ il.InsertBefore(retInstruction, Ldloc(ctx.RpcInvokeInfoVariable));
+ }
+ }
+
+ if (rpc.IsStatic) {
+ ins.Add(Ldsfld(asm.NetworkBehaviourUtils.GetFieldOrThrow(nameof(NetworkBehaviourUtils.InvokeRpc))));
+ ins.Add(Brfalse(jmp));
+ ins.Add(Ldc_I4(0));
+ ins.Add(Stsfld(asm.NetworkBehaviourUtils.GetFieldOrThrow(nameof(NetworkBehaviourUtils.InvokeRpc))));
+ } else {
+ ins.Add(Ldarg_0());
+ ins.Add(Ldfld(asm.NetworkedBehaviour.GetFieldOrThrow(nameof(NetworkBehaviour.InvokeRpc))));
+ ins.Add(Brfalse(jmp));
+ ins.Add(Ldarg_0());
+ ins.Add(Ldc_I4(0));
+ ins.Add(Stfld(asm.NetworkedBehaviour.GetFieldOrThrow(nameof(NetworkBehaviour.InvokeRpc))));
+ }
+ ins.Add(inv);
+
+
+ // insert instruction into method body
+ var prev = rpc.Body.Instructions[0]; //.OpCode == OpCodes.Nop ? rpc.Body.Instructions[1] : rpc.Body.Instructions[0];
+
+ for (int i = ins.Count - 1; i >= 0; --i) {
+ il.InsertBefore(prev, ins[i]);
+ prev = ins[i];
+ }
+
+ // jump target
+ il.Append(jmp);
+
+
+
+ var returnInstructions = returnsRpcInvokeInfo
+ ? new[] { Ldloc(ctx.RpcInvokeInfoVariable), Ret() }
+ : new[] { Ret() };
+
+ var ret = returnInstructions.First();
+
+ // check if runner's ok
+ if (rpc.IsStatic) {
+ il.AppendMacro(ctx.LoadRunner());
+ var checkDone = Nop();
+ il.Append(Brtrue_S(checkDone));
+ il.Append(Ldstr(rpc.Parameters[0].Name));
+ il.Append(Newobj(typeof(ArgumentNullException).GetConstructor(asm, 1)));
+ il.Append(Throw());
+ il.Append(checkDone);
+ } else {
+ il.Append(Ldarg_0());
+ il.Append(Call(asm.NetworkBehaviourUtils.GetMethod(nameof(NetworkBehaviourUtils.ThrowIfBehaviourNotInitialized))));
+ }
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(!invokeLocal, RpcLocalInvokeResult.NotInvokableLocally));
+
+ // if we shouldn't invoke during resim
+ {
+ var checkDone = Nop();
+
+ il.AppendMacro(ctx.LoadRunner());
+
+ il.Append(Call(asm.NetworkRunner.GetGetterOrThrow("Stage")));
+ il.Append(Ldc_I4((int)SimulationStages.Resimulate));
+ il.Append(Bne_Un_S(checkDone));
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(invokeLocal, RpcLocalInvokeResult.NotInvokableDuringResim));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.NotInvokableDuringResim));
+ il.Append(Br(ret));
+
+ il.Append(checkDone);
+ }
+
+ if (!rpc.IsStatic) {
+ localAuthorityMask = new VariableDefinition(asm.Import(typeof(int)));
+ rpc.Body.Variables.Add(localAuthorityMask);
+ il.Append(Ldarg_0());
+ il.Append(Call(asm.NetworkedBehaviour.GetGetterOrThrow(nameof(NetworkBehaviour.Object))));
+ il.Append(Call(asm.NetworkedObject.GetMethod(nameof(NetworkObject.GetLocalAuthorityMask))));
+ il.Append(Stloc(localAuthorityMask));
+ }
+
+ // check if target is reachable or not
+ if (rpcTargetParameter != null) {
+ il.AppendMacro(ctx.LoadRunner());
+
+ il.Append(Ldarg(rpcTargetParameter));
+ il.Append(Call(asm.NetworkRunner.GetMethod(nameof(NetworkRunner.GetRpcTargetStatus))));
+ il.Append(Dup());
+
+ // check for being unreachable
+ {
+ var done = Nop();
+ il.Append(Ldc_I4((int)RpcTargetStatus.Unreachable));
+ il.Append(Bne_Un_S(done));
+
+ if (!returnsRpcInvokeInfo) {
+ il.Append(Ldarg(rpcTargetParameter));
+ il.Append(Ldstr(rpc.ToString()));
+ il.Append(Call(asm.NetworkBehaviourUtils.GetMethod(nameof(NetworkBehaviourUtils.NotifyRpcTargetUnreachable))));
+ }
+
+ il.Append(Pop()); // pop the GetRpcTargetStatus
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(invokeLocal, RpcLocalInvokeResult.TargetPlayerIsNotLocal));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.TargetPlayerUnreachable));
+ il.Append(Br(ret));
+
+ il.Append(done);
+ }
+
+ // check for self
+ {
+ il.Append(Ldc_I4((int)RpcTargetStatus.Self));
+ if (invokeLocal) {
+ // straight to the invoke; this will prohibit any sending
+ Log.Assert(targetedInvokeLocal == null);
+ targetedInvokeLocal = Nop();
+ il.Append(Beq(targetedInvokeLocal));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(true, RpcLocalInvokeResult.TargetPlayerIsNotLocal));
+ } else {
+ // will never get called
+ var checkDone = Nop();
+ il.Append(Bne_Un_S(checkDone));
+
+ if (!returnsRpcInvokeInfo && NetworkRunner.BuildType == NetworkRunner.BuildTypes.Debug) {
+ il.Append(Ldarg(rpcTargetParameter));
+ il.Append(Ldstr(rpc.ToString()));
+ il.Append(Call(asm.NetworkBehaviourUtils.GetMethod(nameof(NetworkBehaviourUtils.NotifyLocalTargetedRpcCulled))));
+ }
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.TargetPlayerIsLocalButRpcIsNotInvokableLocally));
+ il.Append(Br(ret));
+
+ il.Append(checkDone);
+ }
+ }
+ }
+
+ // check if sender flags make sense
+ if (!rpc.IsStatic) {
+ var checkDone = Nop();
+
+ il.Append(Ldloc(localAuthorityMask));
+ il.Append(Ldc_I4(sources));
+ il.Append(And());
+ il.Append(Brtrue_S(checkDone));
+
+ if (!returnsRpcInvokeInfo) {
+ // source is not valid, notify
+ il.Append(Ldstr(rpc.ToString()));
+ il.Append(Ldarg_0());
+ il.Append(Call(asm.NetworkedBehaviour.GetGetterOrThrow(nameof(NetworkBehaviour.Object))));
+ il.Append(Ldc_I4(sources));
+ il.Append(Call(asm.NetworkBehaviourUtils.GetMethod(nameof(NetworkBehaviourUtils.NotifyLocalSimulationNotAllowedToSendRpc))));
+ }
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(invokeLocal, RpcLocalInvokeResult.InsufficientSourceAuthority));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.InsufficientSourceAuthority));
+
+ il.Append(Br(ret));
+
+ il.Append(checkDone);
+
+ if (invokeLocal) {
+ // how about the target? does it match only the local client?
+ if (targets != 0 && (targets & AuthorityMasks.PROXY) == 0) {
+ il.Append(Ldloc(localAuthorityMask));
+ il.Append(Ldc_I4(targets));
+ il.Append(And());
+ il.Append(Ldc_I4(targets));
+ il.Append(Beq(prepareInv));
+ }
+ }
+ }
+
+ var messageSizeVar = ctx.CreateVariable(asm.Import());
+ {
+ il.Append(Ldc_I4(RpcHeader.SIZE));
+ il.Append(Stloc(messageSizeVar));
+
+
+ for (int i = 0; i < rpc.Parameters.Count; ++i) {
+ var para = rpc.Parameters[i];
+
+ if (rpc.IsStatic && i == 0) {
+ Log.Assert(para.ParameterType.IsSame());
+ continue;
+ }
+
+ if (IsInvokeOnlyParameter(para)) {
+ continue;
+ }
+ if (para == rpcTargetParameter) {
+ continue;
+ }
+
+ il.Append(Ldloc(messageSizeVar));
+
+ using (ctx.ValueGetter(il => il.Append(Ldarg(para)))) {
+ if (para.ParameterType.IsArray) {
+ // do nothing
+ EmitRpcArrayByteSize(il, ctx, para, para.ParameterType.GetElementTypeWithGenerics());
+ } else {
+ TypeRegistry.EmitRpcByteCount(para.ParameterType, il, ctx, para, wordAligned: true);
+ }
+ }
+
+ il.Append(Add());
+ il.Append(Stloc(messageSizeVar));
+ }
+ }
+
+ // check the size
+ var sizeOk = Nop();
+ il.Append(Ldloc(messageSizeVar));
+ il.Append(Call(asm.SimulationMessage.GetMethod(nameof(SimulationMessage.CanAllocateUserPayload))));
+ il.Append(Brtrue_S(sizeOk));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(invokeLocal, RpcLocalInvokeResult.PayloadSizeExceeded));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.PayloadSizeExceeded));
+ if (!returnsRpcInvokeInfo) {
+ il.Append(Ldstr(rpc.ToString()));
+ il.Append(Ldloc(messageSizeVar));
+ il.Append(Call(asm.NetworkBehaviourUtils.GetMethod(nameof(NetworkBehaviourUtils.NotifyRpcPayloadSizeExceeded))));
+ }
+ il.Append(Br(ret));
+ il.Append(sizeOk);
+
+ // check if sending makes sense at all
+ var afterSend = Nop();
+
+ // if not targeted (already handled earlier) check if it can be sent at all
+ if (rpcTargetParameter == null) {
+ var checkDone = Nop();
+ il.AppendMacro(ctx.LoadRunner());
+ il.Append(Call(asm.NetworkRunner.GetMethod(nameof(NetworkRunner.HasAnyActiveConnections))));
+ il.Append(Brtrue(checkDone));
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.NoActiveConnections));
+ il.Append(Br(afterSend));
+ il.Append(checkDone);
+ }
+
+ // create simulation message
+ il.AppendMacro(ctx.LoadRunner());
+ il.Append(Call(asm.NetworkRunner.GetGetterOrThrow(nameof(NetworkRunner.Simulation))));
+ il.Append(Ldloc(messageSizeVar));
+
+ il.Append(Call(asm.SimulationMessage.GetMethod(nameof(SimulationMessage.Allocate), 2)));
+ il.Append(Stloc(message));
+
+ // get data for messages
+ il.Append(Ldloc(message));
+ il.Append(Ldc_I4(SimulationMessage.SIZE));
+ il.Append(Add());
+ il.Append(Stloc(ctx.DataVariable));
+
+ // create RpcHeader
+ il.Append(Ldloc(ctx.DataVariable));
+
+ if (rpc.IsStatic) {
+ il.Append(Ldstr(rpc.ToString()));
+ il.Append(Call(asm.Import(typeof(NetworkBehaviourUtils).GetMethod(nameof(NetworkBehaviourUtils.GetRpcStaticIndexOrThrow)))));
+ il.Append(Call(asm.RpcHeader.GetMethod(nameof(RpcHeader.Create), 1)));
+ } else {
+ il.Append(Ldarg_0());
+ il.Append(Call(asm.NetworkedBehaviour.GetGetterOrThrow(nameof(NetworkBehaviour.Object))));
+ il.Append(Call(asm.NetworkedObject.GetGetterOrThrow(nameof(NetworkObject.Id))));
+
+ il.Append(Ldarg_0());
+ il.Append(Ldfld(asm.NetworkedBehaviour.GetFieldOrThrow(nameof(NetworkBehaviour.ObjectIndex))));
+
+ instanceRpcKey = ++instanceRpcKeys;
+ il.Append(Ldc_I4(instanceRpcKey));
+ il.Append(Call(asm.RpcHeader.GetMethod(nameof(RpcHeader.Create), 3)));
+ }
+
+ il.Append(Stobj(asm.RpcHeader.Reference));
+ il.Append(Ldc_I4(RpcHeader.SIZE));
+ il.Append(Stloc(ctx.OffsetVariable));
+
+ // write parameters
+ for (int i = 0; i < rpc.Parameters.Count; ++i) {
+ var para = rpc.Parameters[i];
+
+ if (rpc.IsStatic && i == 0) {
+ continue;
+ }
+ if (IsInvokeOnlyParameter(para)) {
+ continue;
+ }
+ if (para == rpcTargetParameter) {
+ continue;
+ }
+
+ using (ctx.ValueGetter(il => il.Append(Ldarg(para)))) {
+ if (para.ParameterType.IsArray) {
+ //WeaveRpcArrayInput(asm, ctx, il, para);
+ EmitRpcWriteArray(il, ctx, para, para.ParameterType.GetElementTypeWithGenerics());
+ } else {
+ TypeRegistry.EmitWrite(para.ParameterType, il, ctx, para);
+ }
+ }
+ }
+
+ // update message offset
+ il.Append(Ldloc(message));
+ il.Append(Ldflda(asm.SimulationMessage.GetFieldOrThrow(nameof(SimulationMessage.Offset))));
+ il.Append(Ldloc(ctx.OffsetVariable));
+ il.Append(Ldc_I4(8));
+ il.Append(Mul());
+ il.Append(Stind_I4());
+
+ // send message
+
+ il.AppendMacro(ctx.LoadRunner());
+
+ if (rpcTargetParameter != null) {
+ il.Append(Ldloc(message));
+ il.Append(Ldarg(rpcTargetParameter));
+ il.Append(Call(asm.SimulationMessage.GetMethod(nameof(SimulationMessage.SetTarget))));
+ }
+
+ if (channel == RpcChannel.Unreliable) {
+ il.Append(Ldloc(message));
+ il.Append(Call(asm.SimulationMessage.GetMethod(nameof(SimulationMessage.SetUnreliable))));
+ }
+
+ if (!tickAligned) {
+ il.Append(Ldloc(message));
+ il.Append(Call(asm.SimulationMessage.GetMethod(nameof(SimulationMessage.SetNotTickAligned))));
+ }
+
+ if (rpc.IsStatic) {
+ il.Append(Ldloc(message));
+ il.Append(Call(asm.SimulationMessage.GetMethod(nameof(SimulationMessage.SetStatic))));
+ }
+
+ // send the rpc
+ il.Append(Ldloc(message));
+
+ if (ctx.RpcInvokeInfoVariable != null) {
+ il.Append(Ldloca(ctx.RpcInvokeInfoVariable));
+ il.Append(Ldflda(asm.RpcInvokeInfo.GetFieldOrThrow(nameof(RpcInvokeInfo.SendResult))));
+ il.Append(Call(asm.NetworkRunner.GetMethod(nameof(NetworkRunner.SendRpc), 2)));
+ } else {
+ il.Append(Call(asm.NetworkRunner.GetMethod(nameof(NetworkRunner.SendRpc), 1)));
+ }
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(RpcSendCullResult.NotCulled));
+
+ il.Append(afterSend);
+
+ // .. hmm
+ if (invokeLocal) {
+
+ if (targetedInvokeLocal != null) {
+ il.Append(Br(ret));
+ il.Append(targetedInvokeLocal);
+ }
+
+ if (!rpc.IsStatic) {
+ var checkDone = Nop();
+ il.Append(Ldloc(localAuthorityMask));
+ il.Append(Ldc_I4(targets));
+ il.Append(And());
+ il.Append(Brtrue_S(checkDone));
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(true, RpcLocalInvokeResult.InsufficientTargetAuthority));
+
+ il.Append(Br(ret));
+
+ il.Append(checkDone);
+ }
+
+ il.Append(prepareInv);
+
+ foreach (var param in rpc.Parameters) {
+ if (param.ParameterType.IsSame()) {
+ // need to fill it now
+ il.AppendMacro(ctx.LoadRunner());
+ il.Append(Ldc_I4((int)channel));
+ il.Append(Ldc_I4((int)hostMode));
+ il.Append(Call(asm.RpcInfo.GetMethod(nameof(RpcInfo.FromLocal))));
+ il.Append(Starg_S(param));
+ }
+ }
+
+ il.AppendMacro(ctx.SetRpcInvokeInfoStatus(true, RpcLocalInvokeResult.Invoked));
+
+ // invoke
+ il.Append(Br(inv));
+ }
+
+ foreach (var instruction in returnInstructions) {
+ il.Append(instruction);
+ }
+ }
+
+ var invoker = new MethodDefinition(InvokerMethodName(rpc.Name, invokerNameCounter), MethodAttributes.Family | MethodAttributes.Static, asm.Import(typeof(void)));
+ using (var ctx = new RpcMethodContext(asm, invoker, rpc.IsStatic)) {
+
+ // create invoker delegate
+ if (rpc.IsStatic) {
+ var runner = new ParameterDefinition("runner", ParameterAttributes.None, asm.NetworkRunner.Reference);
+ invoker.Parameters.Add(runner);
+ } else {
+ var behaviour = new ParameterDefinition("behaviour", ParameterAttributes.None, asm.NetworkedBehaviour.Reference);
+ invoker.Parameters.Add(behaviour);
+ }
+ var message = new ParameterDefinition("message", ParameterAttributes.None, asm.SimulationMessage.Reference.MakePointerType());
+ invoker.Parameters.Add(message);
+
+ // add attribute
+ if (rpc.IsStatic) {
+ Log.Assert(instanceRpcKey < 0);
+ invoker.AddAttribute(asm, rpc.ToString());
+ } else {
+ Log.Assert(instanceRpcKey >= 0);
+ invoker.AddAttribute(asm, instanceRpcKey, sources, targets);
+ }
+
+#if UNITY_EDITOR
+ invoker.AddAttribute(asm);
+#endif
+
+ // put on type
+ invoker.AddTo(type);
+
+ // local variables
+ ctx.DataVariable = new VariableDefinition(asm.Import(typeof(byte)).MakePointerType());
+ ctx.OffsetVariable = new VariableDefinition(asm.Import(typeof(int)));
+ var parameters = new VariableDefinition[rpc.Parameters.Count];
+
+ for (int i = 0; i < parameters.Length; ++i) {
+ invoker.Body.Variables.Add(parameters[i] = new VariableDefinition(rpc.Parameters[i].ParameterType));
+ }
+
+ invoker.Body.Variables.Add(ctx.DataVariable);
+ invoker.Body.Variables.Add(ctx.OffsetVariable);
+ invoker.Body.InitLocals = true;
+
+ var il = invoker.Body.GetILProcessor();
+
+ // grab data from message and store in local
+ il.Append(Ldarg_1());
+ il.Append(Ldc_I4(SimulationMessage.SIZE));
+ il.Append(Add());
+ il.Append(Stloc(ctx.DataVariable));
+
+ il.Append(Ldc_I4(RpcHeader.SIZE));
+ il.Append(Stloc(ctx.OffsetVariable));
+
+ for (int i = 0; i < parameters.Length; ++i) {
+ var para = parameters[i];
+
+ if (rpc.IsStatic && i == 0) {
+ il.Append(Ldarg_0());
+ il.Append(Stloc(para));
+ continue;
+ }
+
+ if (rpcTargetParameter == rpc.Parameters[i]) {
+ il.Append(Ldarg_1());
+ il.Append(Ldfld(asm.SimulationMessage.GetFieldOrThrow(nameof(SimulationMessage.Target))));
+ il.Append(Stloc(para));
+ } else if (para.VariableType.IsSame()) {
+ il.AppendMacro(ctx.LoadRunner());
+ il.Append(Ldarg_1());
+ il.Append(Ldc_I4((int)hostMode));
+ il.Append(Call(asm.RpcInfo.GetMethod(nameof(RpcInfo.FromMessage))));
+ il.Append(Stloc(para));
+ } else if (para.VariableType.IsArray) {
+ EmitRpcReadArray(il, ctx, rpc.Parameters[i], para.VariableType.GetElementTypeWithGenerics(), para);
+ } else {
+ using (ctx.TargetVariableAddr(para)) {
+ TypeRegistry.EmitRead(para.VariableType, il, ctx, rpc.Parameters[i]);
+ if (!ctx.TargetAddrUsed) {
+ il.Append(Stloc(para));
+ }
+ }
+ }
+ }
+
+ if (rpc.IsStatic) {
+ il.Append(Ldc_I4(1));
+ il.Append(Stsfld(asm.NetworkBehaviourUtils.GetFieldOrThrow(nameof(NetworkBehaviour.InvokeRpc))));
+ } else {
+ il.Append(Ldarg_0());
+ il.Append(Ldc_I4(1));
+ il.Append(Stfld(asm.NetworkedBehaviour.GetFieldOrThrow(nameof(NetworkBehaviour.InvokeRpc))));
+ }
+
+ var callableRpc = rpc.GetCallable();
+ if (!rpc.IsStatic) {
+ il.Append(Ldarg_0());
+ il.Append(Instruction.Create(OpCodes.Castclass, callableRpc.DeclaringType));
+ }
+
+ for (int i = 0; i < parameters.Length; ++i) {
+ il.Append(Ldloc(parameters[i]));
+ }
+ il.Append(Call(callableRpc));
+ if (returnsRpcInvokeInfo) {
+ il.Append(Pop());
+ }
+ il.Append(Ret());
+ }
+ }
+
+ {
+ Log.Assert(_rpcCount.TryGetValue(type, out int count) == false || count == instanceRpcKeys);
+ _rpcCount[type] = instanceRpcKeys;
+ }
+ }
+
+ private int GetInstanceRpcCount(TypeReference type) {
+ if (_rpcCount.TryGetValue(type, out int result)) {
+ return result;
+ }
+
+ result = 0;
+
+ var typeDef = type.Resolve();
+
+ if (typeDef.BaseType != null) {
+ result += GetInstanceRpcCount(typeDef.BaseType);
+ }
+
+ result += typeDef.GetMethods()
+ .Where(x => !x.IsStatic)
+ .Where(x => x.HasAttribute())
+ .Count();
+
+ _rpcCount.Add(type, result);
+ return result;
+ }
+
+ private bool IsInvokeOnlyParameter(ParameterDefinition para) {
+ if (para.ParameterType.IsSame()) {
+ return true;
+ }
+ return false;
+ }
+
+ void EmitRpcWriteArray(ILProcessor il, MethodContext context, ICustomAttributeProvider member, TypeReference elementType) {
+ // store array length
+ il.AppendMacro(context.LoadAddress());
+ il.AppendMacro(context.LoadValue());
+ il.Append(Ldlen());
+ il.Append(Conv_I4());
+ il.Append(Stind_I4());
+ il.AppendMacro(context.AddOffset(sizeof(int)));
+
+ if (TypeRegistry.GetInfo(elementType).IsTriviallyCopyable) {
+ il.AppendMacro(context.LoadAddress());
+ il.AppendMacro(context.LoadValue());
+ var memCpy = new GenericInstanceMethod(context.Assembly.Native.GetMethod(nameof(Native.CopyFromArray), 2));
+ memCpy.GenericArguments.Add(elementType);
+ il.Append(Call(memCpy));
+ il.AppendMacro(context.AddOffset());
+ } else {
+ il.AppendMacro(
+ context.For(
+ start: il => il.Append(Ldc_I4(0)),
+ stop: il => {
+ il.AppendMacro(context.LoadValue());
+ il.Append(Ldlen());
+ il.Append(Conv_I4());
+ },
+ body: (il, i) => {
+ using (context.ValueGetter((il, old) => {
+ old(il);
+ il.Append(Ldloc(i));
+ il.Append(Ldelem(elementType));
+ })) {
+ TypeRegistry.EmitWrite(elementType, il, context, member);
+ }
+ }
+ )
+ );
+ }
+ }
+
+ void EmitRpcReadArray(ILProcessor il, MethodContext context, ICustomAttributeProvider member, TypeReference elementType, VariableDefinition arrayVar) {
+ // alloc array
+ il.AppendMacro(context.LoadAddress());
+ il.Append(Ldind_I4());
+ il.Append(Instruction.Create(OpCodes.Newarr, elementType));
+ il.Append(Stloc(arrayVar));
+ il.AppendMacro(context.AddOffset(sizeof(int)));
+
+ if (TypeRegistry.GetInfo(elementType).IsTriviallyCopyable) {
+ il.Append(Ldloc(arrayVar));
+ il.AppendMacro(context.LoadAddress());
+
+ var memCpy = new GenericInstanceMethod(context.Assembly.Native.GetMethod(nameof(Native.CopyToArray), 2));
+ memCpy.GenericArguments.Add(elementType);
+ il.Append(Call(memCpy));
+ il.AppendMacro(context.AddOffset());
+
+ } else {
+ il.AppendMacro(
+ context.For(
+ start: il => il.Append(Ldc_I4(0)),
+ stop: il => {
+ il.Append(Ldloc(arrayVar));
+ il.Append(Ldlen());
+ il.Append(Conv_I4());
+ },
+ body: (il, i) => {
+ var placeholder = Nop();
+ il.Append(placeholder);
+
+ using (context.TargetVariableAddr(arrayVar, i, elementType)) {
+ TypeRegistry.EmitRead(elementType, il, context, member);
+ if (!context.TargetAddrUsed) {
+ il.InsertAfter(placeholder, Ldloc(i));
+ il.InsertAfter(placeholder, Ldloc(arrayVar));
+ il.Append(Stelem(elementType));
+ }
+ }
+ il.Remove(placeholder);
+
+ }
+ )
+ );
+ }
+ }
+
+ void EmitRpcArrayByteSize(ILProcessor il, MethodContext context, ICustomAttributeProvider member, TypeReference elementType) {
+ var elementTypeData = TypeRegistry.GetInfo(elementType);
+
+ if (elementTypeData.HasDynamicRpcSize) {
+ var totalSize = context.CreateVariable(context.Assembly.Import());
+
+ il.Append(Ldc_I4(sizeof(Int32)));
+ il.Append(Stloc(totalSize));
+
+ il.AppendMacro(
+ context.For(
+ start: il => il.Append(Ldc_I4(0)),
+ stop: il =>
+ {
+ il.AppendMacro(context.LoadValue());
+ il.Append(Ldlen());
+ il.Append(Conv_I4());
+ },
+ (il, counter) => {
+ il.Append(Ldloc(totalSize));
+
+ using (context.ValueGetter((il, old) => {
+ old(il);
+ il.Append(Ldloc(counter));
+ il.Append(Ldelem(elementType));
+ })) {
+ TypeRegistry.EmitRpcByteCount(elementType, il, context, member, wordAligned: true);
+ }
+
+ il.Append(Add());
+ il.Append(Stloc(totalSize));
+ }
+ )
+ );
+
+ il.Append(Ldloc(totalSize));
+
+ } else {
+ // array length
+ il.AppendMacro(context.LoadValue());
+ il.Append(Ldlen());
+ il.Append(Conv_I4());
+ TypeRegistry.EmitRpcByteCount(elementType, il, context, member, wordAligned: false);
+ il.Append(Mul());
+
+ // store length as well
+ il.Append(Ldc_I4(sizeof(Int32)));
+ il.Append(Add());
+
+ // align
+ il.AppendMacro(context.AlignToWordSize());
+ }
+ }
+
+ public void WeaveSimulation(ILWeaverAssembly asm, TypeDefinition type) {
+ EnsureTypeRegistry(asm);
+ WeaveRpcs(asm, type, allowInstanceRpcs: false);
+ WeaveUnityMessages(asm, type);
+ }
+
+ public static bool IsFieldOperand(Instruction instruction, FieldDefinition field, TypeReference declaringType) {
+ var storeField = instruction.Operand as FieldReference;
+ if (storeField == null) {
+ return false;
+ }
+ if (storeField == field) {
+ return true;
+ }
+ if (storeField.Name == field.Name && storeField.DeclaringType.Is(declaringType)) {
+ return true;
+ }
+ return false;
+ }
+
+ private Instruction[] GetInlineFieldInit(MethodDefinition constructor, FieldDefinition field, TypeDefinition declaringType) {
+ if (field == null) {
+ throw new ArgumentNullException(nameof(field));
+ }
+ if (constructor == null) {
+ throw new ArgumentNullException(nameof(constructor));
+ }
+
+ var instructions = constructor.Body.Instructions;
+
+ int ldarg0Index = 0;
+ for (int i = 0; i < instructions.Count; ++i) {
+ var instruction = instructions[i];
+ if (instruction.OpCode == OpCodes.Ldarg_0) {
+ ldarg0Index = i;
+ } else if (instruction.OpCode == OpCodes.Stfld && IsFieldOperand(instruction, field, declaringType)) {
+ // regular init
+ return instructions.Skip(ldarg0Index).Take(i - ldarg0Index + 1).ToArray();
+ } else if (instruction.OpCode == OpCodes.Initobj && instruction.Previous?.OpCode == OpCodes.Ldflda && IsFieldOperand(instruction.Previous, field, declaringType)) {
+ // init with default constructor
+ return instructions.Skip(ldarg0Index).Take(i - ldarg0Index + 1).ToArray();
+ } else if (instruction.IsBaseConstructorCall(constructor.DeclaringType)) {
+ // base constructor init
+ break;
+ }
+ }
+ return Array.Empty();
+ }
+
+ private Instruction[] RemoveInlineFieldInit(TypeDefinition type, FieldDefinition field) {
+ var constructors = type.GetConstructors().Where(x => !x.IsStatic);
+ if (!constructors.Any()) {
+ return Array.Empty();
+ }
+
+ var firstConstructor = constructors.First();
+ var firstInlineInit = GetInlineFieldInit(firstConstructor, field, type).ToArray();
+ if (firstInlineInit.Length != 0) {
+ Log.Debug($"Found {field} inline init: {(string.Join("; ", firstInlineInit.Cast