Photon Fusion 0.7.0

Namespaces | Classes | Enumerations | Functions
Fusion Namespace Reference

Classes

class  AccuracyAttribute
 Additional companion attribute to NetworkedAttribute, which indicates how floats should be compressed. More...
 
class  BehaviourActionAttribute
 Attribute for use on Fusion.Behaviour classes. Automatically runs this method when the inspector refreshes. GUILayout calls be in the method and will render into the inspector. Allows for editor code to be added to a component, without requiring a custom Editor script. More...
 
class  BehaviourButtonActionAttribute
 Attribute for use on Fusion.Behaviour classes. Automatically creates a button in the inspector of Behaviour derived classes. Can be used on Fields or Method member types. For fields, the name of the method the button will execute must be supplied. When used on methods, that method will be called. More...
 
class  BehaviourWarnAttribute
 Attribute for use on Fusion.Behaviour classes. Automatically draws a warning box in the inspector if the conditions are met. More...
 
class  DrawIfAttribute
 Fusion editor attribute for selectively drawing/hiding fields. Condition member can be a property, field or method (with a return value). More...
 
class  EditorDisabledAttribute
 Fusion editor attribute for disabling fields. More...
 
class  EnumMaskAttribute
 Attribute that indicates an enum should render as multi-select mask drop list in the inspector More...
 
class  NetworkedAttribute
 Flags a property of NetworkBehaviour for network state synchronization. The property should have empty get and set defines, which will automatically be replaced with networking code. More...
 
class  NetworkStructWeavedAttribute
 Describes the total number of WORDs a Fusion.INetworkedStruct uses. More...
 
class  Pow2SliderAttribute
 Attribute used to mark a field that needs to change based on an exponent via a UI slider More...
 
class  UnitAttribute
 Unit Attribute class. Used to mark a field with the respective Fusion.Units More...
 
class  DoIfAttribute
 Fusion editor attribute for selective editor rendering. Condition member can be a property, field or method (with a return value). More...
 
class  WarnIfAttribute
 Fusion editor attribute for selective editor rendering of warnings/info boxes in the inspector. Condition member can be a property, field or method (with a return value). More...
 
struct  WriteAccuracy
 Float compression value, used when writing to the fusion allocator. More...
 
struct  ReadAccuracy
 Float decompression value, used when reading from the fusion allocator. More...
 
struct  Accuracy
 Indicates the rounding factor of compressed values. All values will be truncated to the nearest multiple of this. More...
 
class  NetworkAreaOfInterestBehaviour
 Base class for network behaviours that provide a position offset for area of interest. A NetworkObject is required on this GameObject or a parent of this GameObject. More...
 
class  NetworkBehaviour
 Base class for Fusion network components, which are associated with a NetworkObject. More...
 
struct  NetworkBehaviourCallbackReference
 Reference to an OnChange callback added to a NetworkBehaviour More...
 
class  NetworkCharacterController
 Provides custom API and state replication for collider-based character controller movement (not related to Unity's CharacterController type). Replicates both the internal state (Velocity, MaxSpeed, etc) and the Unity Transform data from the NetworkObject.StateAuthority to all other peers. Add this component to a GameObject to control movement and sync the position and/or rotation accurately, including client-side prediction. More...
 
class  NetworkMecanimAnimator
 A component for synchronizing the Animator controller state from the State Authority to network proxies. Requires a Unity Animator component, and a NetworkObject component. NOTE: Animator Root Motion is not compatible with re-simulation and prediction. More...
 
class  NetworkPhysicsSimulation2D
 Fusion component for handling Physics2D.SyncTransforms() and Physics2D.Simulate(). Only used when NetworkProjectConfig.PhysicsEngines.Physics2D == true. More...
 
class  NetworkPhysicsSimulation3D
 Fusion component for handling Physics.SyncTransforms() and Physics.Simulate(). Only used when NetworkProjectConfig.PhysicsEngines.Physics3D == true. More...
 
class  NetworkRigidbody
 Replicates a Unity Rigidbody state from the NetworkObject.StateAuthority to all other peers. Add this component to a GameObject with a Rigidbody component. A NetworkObject is required on this GameObject or a parent of this GameObject. More...
 
class  NetworkRigidbody2D
 Replicates a Unity Rigidbody state from the NetworkObject.StateAuthority to all other peers. Add this component to a GameObject with a Rigidbody component. A NetworkObject is required on this GameObject or a parent of this GameObject. More...
 
class  NetworkTransform
 Replicates a Unity Transform state from the NetworkObject.StateAuthority to all other peers. Add this component to a GameObject to sync the position and/or rotation. A NetworkObject is required on this GameObject or a parent of this GameObject. More...
 
class  NetworkTransformAnchor
 Replicates Unity parenting. To network parent changes, the new parent must either be null or have a NetworkTransformAnchor or class derived from that on the GameObject, and the GameObject being re-parented also requires a NetworkTransformAnchor based Component. A NetworkObject is required on this GameObject or a parent of this GameObject. More...
 
class  OrderAttribute
 Base class for OrderBefore and OrderAfter attributes. More...
 
class  OrderAfterAttribute
 
class  OrderBeforeAttribute
 
interface  IRunnerVisibilityRecognizedType
 Flags a Unity component class as a RunnerVisibilityNodes recognized type. Will be included in NetworkRunner.IsVisible handling, and will be found by RunnerVisibilityNodes component finds. More...
 
class  RunnerVisibilityNode
 Identifies visible/audible components (such as renderers, canvases, lights) that should be enabled/disabled by NetworkRunner.IsVisible. Automatically added to scene objects and spawned objects during play if running in NetworkProjectConfig.PeerModes.Multiple. Additionally this component can be added manually at development time to identify specific Behaviours or Renderers you would like to restrict to one enabled copy at a time. More...
 
class  RunnerVisibilityNodes
 Automatically adds a RunnerVisibilityNode for each indicated component. These indicated components will be limited to no more than one enabled instance when running in Multi-Peer mode. More...
 
class  SimulationBehaviour
 Base class for a Fusion aware Behaviour (derived from UnityEngine.MonoBehavour). Objects derived from this object can be associated with a NetworkRunner and Simulation. If a parent NetworkObject is found, this component will also be associated with that network entity. More...
 
class  NestedComponentUtilities
 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. More...
 
interface  INetworkInput
 Flag interface for custom NetworkInput structs. More...
 
struct  NetworkInput
 Translates INetworkInput structs and represents them in Fusions's unsafe allocated memory. More...
 
class  Hitbox
 Represents a single lag-compensated collider. Multiple component instances can be added anywhere in the hierarchy of a NetworkObject which includes a HitboxRoot. More...
 
class  LagCompensationSettings
 Settings for lag compensation history. More...
 
class  HitboxManager
 Entry point for lag compensated Hitbox queries, which maintains a history buffer, and provides lag compensated raycast and overlap methods. Singleton instance is accessible through the property Runner.LagCompensation. More...
 
class  HitboxRoot
 Root Hitbox group container. Manages registering/unregistering hitboxes with the group, and defines the broadphase geometry for the group. More...
 
struct  LagCompensatedHit
 Defines a lag compensated query hit result. More...
 
struct  Angle
 A Networked fusion type for degrees. This can be used with the NetworkedAttribute, in RPCs, or in NetworkInput structs. More...
 
class  Behaviour
 Alternative base class to Unity's MonoBehaviour. This allows for components that work both in Unity, as well as the Photon relays. More...
 
struct  Changed
 Wrapping struct around changed behaviours which allows you to load old and new values. More...
 
struct  NetworkArray
 Fusion type for networking arrays. Sample Usage: More...
 
struct  NetworkRNG
 PCG32 random generator, 16 bytes in size. http://www.pcg-random.org More...
 
struct  PlayerRef
 Represents a Fusion player. More...
 
struct  NetworkId
 The unique identifier for a network entity. More...
 
class  NetworkObject
 The primary Fusion component for networked GameObject entities. This stores the object's network identity and manages the object's state and input authority. More...
 
class  NetworkPrefabAsset
 Represents a base class for "prefab assets" - assets that point to a prefab and provide a way to load them. More...
 
class  NetworkPrefabAssetMissing
 Placeholder kept after a prefab is removed or made not spawnable. If the prefab is restored/made spawnable again, the type of this asset will change to NetworkPrefabAsset. More...
 
class  AuthorityMasks
 Flag constants for input and state authority. More...
 
class  RpcAttribute
 Flags a method as being a networked Remote Procedure Call. Only usable in a NetworkBehaviour. More...
 
class  NetworkEvents
 Companion component for NetworkRunner. Exposes INetworkRunnerCallbacks as UnityEvents, which can be wired up to other components in the inspector. More...
 
class  NetworkProjectConfig
 The core Fusion config file that is shared with all peers at startup. More...
 
class  NetworkRunner
 Represents a Server or Client Simulation. More...
 
struct  StartGameArgs
 Fusion Start Arguments, used to configure the simulation mode and other settings More...
 
class  SessionInfo
 Holds information about the Game Session More...
 
class  NetworkRunnerCallbackArgs
 Stores data types used on the INetworkRunnerCallbacks interface More...
 
interface  INetworkRunnerCallbacks
 Interface for NetworkRunner callbacks. Register a class/struct instance which implements this interface with NetworkRunner.AddCallbacks(INetworkRunnerCallbacks[]). More...
 
class  AccuracyDefaults
 Class that contains global accuracy information. Built-in named defaults can be edited, or custom named defaults can be created. These defaults allow you to change accuracy settings across an entire project. More...
 
class  Simulation
 Main simulation class More...
 
class  SimulationConfig
 Project configuration settings specific to how the Simulation class behaves. More...
 
class  NetworkConfiguration
 Main network configuration class More...
 
class  NetworkSimulationConfiguration
 Configuration for network condition simulation More...
 
class  SimulationSnapshot
 Represents a snapshot of the simulation state More...
 

Enumerations

enum class  DrawIfHideType
 Options for hiding a field. More...
 
enum class  OnChangedTargets
 Defines the target authority mask for OnChanged callbacks More...
 
enum class  Units
 Unit Type for a certain field. This helps to identify the unit that a certain value represents, like Seconds or Percentage More...
 
enum class  DoIfCompareOperator
 Comparison method for evaluating condition member value against compareToValues. More...
 
enum class  HitOptions
 Per-query options for lag compensation (both raycast and overlap). More...
 
enum class  HitType
 Queries can hit either fusion's custom Hitbox or Unity's standard Physx colliders. More...
 
enum class  HitboxTypes
 Defines the collision geometry type of a Hitbox. More...
 
enum class  EditorHeaderIcon
 Icon to be rendered on the component graphic header in the Unity inspector. More...
 
enum class  EditorHeaderBackColor
 Color of the component graphic header in the Unity inspector. None indicates no header graphic should be used. More...
 
enum class  Spaces
 
enum class  NetworkObjectFlags : int
 
enum class  NetworkObjectHeaderFlags : int
 
enum class  NetworkObjectPacketFlags
 
enum class  RpcChannel
 
enum class  RpcSources
 
enum class  RpcTargets
 
enum class  RpcTargetStatus
 
enum class  GameMode
 Fusion Game Mode. More...
 
enum class  ConnectionType
 Defines the type of the current connection with the Remote Peer, either the Server or a Client More...
 
enum class  SessionLobby
 Session Lobby Type More...
 
enum class  ShutdownReason
 Describes a list of Reason why the Fusion Runner was Shutdown More...
 
enum class  SimulationMessageInternalTypes
 
enum class  SimulationModes
 Flags for The type of network peer a simulation represents. More...
 
enum class  SimulationStages
 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. More...
 

Functions

delegate void ChangedDelegate< T > (Changed< T > changed)
 Delegate definition for changed callbacks. More...
 
unsafe delegate void RpcInvokeDelegate (NetworkBehaviour behaviour, SimulationMessage *message)
 
unsafe delegate void RpcStaticInvokeDelegate (NetworkRunner runner, SimulationMessage *message)
 

Enumeration Type Documentation

◆ ConnectionType

enum ConnectionType
strong

Defines the type of the current connection with the Remote Peer, either the Server or a Client

Enumerator
None 

No connection is currently active

Relayed 

Connection was accomplished using the Photon Relay Services

Direct 

Connection was accomplished directly with the remote peer

◆ DoIfCompareOperator

enum DoIfCompareOperator
strong

Comparison method for evaluating condition member value against compareToValues.

Enumerator
Equal 

True if condition member value equals compareToValue.

NotEqual 

True if condition member value is not equal to compareToValue.

Less 

True if condition member value is less than compareToValue.

LessOrEqual 

True if condition member value is less than or equal to compareToValue.

GreaterOrEqual 

True if condition member value is greater than or equal to compareToValue.

Greater 

True if condition member value is greater than compareToValue.

◆ DrawIfHideType

enum DrawIfHideType
strong

Options for hiding a field.

Enumerator
ReadOnly 

Field will be disabled, but still visible.

Hide 

Field will be hidden.

◆ EditorHeaderBackColor

enum EditorHeaderBackColor
strong

Color of the component graphic header in the Unity inspector. None indicates no header graphic should be used.

◆ EditorHeaderIcon

enum EditorHeaderIcon
strong

Icon to be rendered on the component graphic header in the Unity inspector.

◆ GameMode

enum GameMode
strong

Fusion Game Mode.

Used to select how the local simulation will act.

Enumerator
Single 

Single Player Mode: it works very similar to Host Mode, but don't accept any connections.

Shared 

Shared Mode: starts a Game Client, which will connect to a Game Server running in the Photon Cloud using the Fusion Plugin.

Server 

Server Mode: starts a Dedicated Game Server with no local player.

Host 

Host Mode: starts a Game Server and allows a local player.

Client 

Client Mode: starts a Game Client, which will connect to a peer in either Server or Host Modes.

◆ HitboxTypes

enum HitboxTypes
strong

Defines the collision geometry type of a Hitbox.

Enumerator
None 

[Future Use] to represent a disabled Hitbox.

Box 

Geometry is a box, fill in Extents and (optional) Offset.

Sphere 

Geometry is a sphere, fill in Radius and (optional) Offset.

◆ HitOptions

enum HitOptions
strong

Per-query options for lag compensation (both raycast and overlap).

Enumerator
None 

Default, no extra options.

IncludePhysX 

Add this to include checks against PhysX colliders.

SubtickAccuracy 

Subtick accuracy query (exactly like seen by player).

DetailedHit 

Compute surface normal and distance of raycast hit.

◆ HitType

enum HitType
strong

Queries can hit either fusion's custom Hitbox or Unity's standard Physx colliders.

Enumerator
None 

Used when a raycast does not hit anything. Not used on overlaps.

Hitbox 

LagCompensatedHit is a Unity PhysX Collider.

PhysX 

LagCompensatedHit is a Fusion Hitbox.

◆ OnChangedTargets

enum OnChangedTargets
strong

Defines the target authority mask for OnChanged callbacks

Enumerator
StateAuthority 

Receive callback if you have state authority over the object

InputAuthority 

Receive callback if you have input authority over the object

Proxies 

Receive callback if you have neither input or state authority over the object

All 

Shorthand for StateAuthority|InputAuthority|Proxies

◆ RpcChannel

enum RpcChannel
strong
Enumerator
Reliable 

Rpc order preserved, delivery verified, resend in case of a failed delivery.

Unreliable 

Rpc order preserved, delivery not verified, no resend attempts.

◆ SessionLobby

enum SessionLobby
strong

Session Lobby Type

Enumerator
Invalid 

Invalid Session Lobby Type

ClientServer 

Server Client Lobby

Shared 

Shared Lobby

Custom 

Custom Lobby - works in conjuction with a Lobby Name/ID

◆ ShutdownReason

enum ShutdownReason
strong

Describes a list of Reason why the Fusion Runner was Shutdown

Enumerator
Ok 

OK Reason means Fusion was Shutdown by request

Error 

Shutdown was caused by some internal error

IncompatibleConfiguration 

Raised when the peer tries to Join a Room with a mismatching type between ClientServer Mode and Shared Mode.

ServerInRoom 

Raised when the local peer started as a Server and tried to join a Room that already has a Server peer.

DisconnectedByPluginLogic 

Raised when the Peer is disconnected or kicked by a Plugin Logic.

GameClosed 

Raised when the Game the Peer is trying to Join is Closed

GameNotFound 

Raised when the Game the Peer is trying to Join does not exist

MaxCcuReached 

Raised when all CCU available for the Photon Application are in use

InvalidRegion 

Raised when the peer is trying to connect to an unavailable or non-existent Region

GameIdAlreadyExists 

Raised when a Session with the same name was already created

GameIsFull 

Raised when a peer is trying to join a Room with already the max capacity of players

◆ SimulationModes

enum SimulationModes
strong

Flags for The type of network peer a simulation represents.

Enumerator
Server 

Simulation represents a server peer, with no local player.

Host 

Simulation represents a server peer, with a local player.

Client 

Simulation represents a client peer, with a local player.

◆ SimulationStages

enum SimulationStages
strong

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.

Enumerator
Forward 

Currently simulating a tick for the first time.

Resimulate 

Currently simulating a previously simulated tick again, with state corrections.

◆ Units

enum Units
strong

Unit Type for a certain field. This helps to identify the unit that a certain value represents, like Seconds or Percentage

Enumerator
None 
Ticks 
Seconds 
MilliSecs 
Kilobytes 
Megabytes 
Normalized 
Multiplier 
Percentage 
NormalizedPercentage 
Degrees 
PerSecond 
DegreesPerSecond 
Radians 
RadiansPerSecond 
TicksPerSecond 
Units 
Bytes 

Function Documentation

◆ ChangedDelegate< T >()

delegate void Fusion.ChangedDelegate< T > ( Changed< T >  changed)

Delegate definition for changed callbacks.

Type Constraints
T :NetworkBehaviour