API Reference
A quick-reference guide to all major GONet classes, attributes, configuration options, and constants. Use this page as a lookup while building your multiplayer game.
GONetParticipant
ComponentAttached to any GameObject that participates in network synchronization. Identifies the object and its owner across the network.
Properties
| GONetId | Unique network identifier assigned at runtime |
| OwnerAuthorityId | Authority ID of the owning client or server |
| IsMine | True if the local machine owns this participant |
| IsPositionSyncd | Whether position is being synchronized |
| IsRotationSyncd | Whether rotation is being synchronized |
| CodeGenerationId | Identifier linking to generated sync code |
Constants
| GONetId_Unset | 0 -- default value before assignment |
| OwnerAuthorityId_Server | 1023 -- reserved for server-owned objects |
| GONET_ID_BIT_COUNT_USED | 22 bits -- supports up to ~4 million objects |
| OWNER_AUTHORITY_ID_BIT_COUNT_USED | 10 bits -- supports up to 1023 clients |
GONetAutoMagicalSync
AttributeMarks a field or property for automatic network synchronization. Supports quantization, blending, velocity sync, and reliability configuration. Limit: 256 synced members per GONetParticipant.
Properties
| SettingsProfileTemplateName | Name of a reusable sync profile template |
| SyncChangesEverySeconds | How often changes are sent (in seconds) |
| Reliability | Reliable or unreliable delivery |
| ShouldBlendBetweenValuesReceived | Enable smooth interpolation on receivers |
| ProcessingPriority | Priority order for processing sync updates |
| QuantizeDownToBitCount | Number of bits to quantize to (e.g., 16, 8) |
| QuantizeLowerBound | Minimum value of the quantization range |
| QuantizeUpperBound | Maximum value of the quantization range |
| IsVelocityEligible | Enable velocity-augmented sync for this value |
| PhysicsUpdateInterval | Interval for physics-based sync updates |
| EnablePhysicsSnapping | Snap to exact values on physics updates |
Supported Types
bool, byte, sbyte, short, ushort, int, uint, long, ulong, float, double, Vector2, Vector3, Vector4, Quaternion
GONetBehaviour
Base ClassBase class providing GONet lifecycle hooks and access to core systems. Extend this for scripts that need network awareness without being tied to a specific GONetParticipant.
Lifecycle Methods
| OnGONetClientVsServerStatusKnown | Called when the local role (client or server) is determined |
| OnGONetParticipantEnabled | Called when the associated participant is enabled |
| OnGONetParticipantStarted | Called when the associated participant starts |
| OnGONetParticipantDeserializeInitAllCompleted | Called after all initial state has been deserialized |
| OnGONetReady | Called when the participant is fully initialized and ready for networking |
| OnGONetParticipantDisabled | Called when the associated participant is disabled |
Update Methods
| UpdateAfterGONetReady | Efficient per-frame update, batched internally |
| FixedUpdateAfterGONetReady | Fixed timestep update, batched internally |
| LateUpdateAfterGONetReady | Late update, batched internally |
Properties
| IsServer | True if running as the server |
| IsClient | True if running as a client |
| EventBus | Access to the GONet event system |
| SceneManager | Access to the GONet scene manager |
GONetParticipantCompanionBehaviour
extends GONetBehaviourA GONetBehaviour that automatically binds to the GONetParticipant on the same GameObject. Use this as the base class for most networked gameplay scripts.
Properties
| IsMine | True if the local machine owns the associated participant |
| GONetParticipant | Reference to the associated GONetParticipant component |
| WasAddedAtRuntime | True if this component was added dynamically |
| IsReadyForGONetOperations | True if networking is initialized and ready |
Methods
| CallRpc | Invoke a remote procedure call (0-8 parameters) |
| CallRpcAsync | Invoke an RPC with async/await support (0-8 parameters) |
| SetAnimatorTrigger | Network-synchronized animator trigger |
| ResetAnimatorTrigger | Network-synchronized animator trigger reset |
| ValidateOnGONetReadyPreconditions | Override to add custom readiness checks |
GONetMain
StaticThe central static class for all GONet operations. Use it to instantiate objects, access the event bus, query authority, and manage the network lifecycle.
Properties
| Global | Reference to the GONetGlobal singleton configuration |
| SceneManager | Access to server-authoritative scene management |
| EventBus | Publish and subscribe to network events |
| IsServer | True if the local instance is the server |
| IsClient | True if the local instance is a client |
| MyAuthorityId | The local authority ID (ushort) |
| gonetServer | Reference to the server instance (null on clients) |
| GONetClient | Reference to the client instance (null on server) |
Methods
| Instantiate | Network-aware object instantiation (replicated to all clients) |
| DespawnGONetParticipant | Remove a networked object across all clients |
| DestroyImmediate | Immediately destroy a networked object |
| TryGetGONetParticipantByGONetId | Look up a participant by its network ID |
| ReparentGameObject | Network-synchronized reparenting |
| SendBytesToRemoteConnection | Send raw bytes to a specific remote connection |
| SendBytesToAllRemoteConnections | Broadcast raw bytes to all remote connections |
Diagnostics
| EnableDetailedReliableTransportLogging | Toggle verbose reliable transport logs |
| EnableSceneLoadCompleteTracing | Toggle scene load completion trace logs |
GONetLocal
Per-AuthorityPer-authority state lookup. Each connected authority (client or server) has a GONetLocal instance indexed by its authority ID.
Static Members
| LookupByAuthorityId[ushort] | Retrieve the GONetLocal instance for a given authority ID |
Methods
| GetAllKeys() | Returns all authority IDs with active GONetLocal instances |
GONetSceneManager
Scene ManagementServer-authoritative scene loading and unloading. Supports Build Settings scenes and Unity Addressables with automatic late-joiner synchronization.
Methods
| LoadSceneFromBuildSettings | Load a scene registered in Build Settings |
| LoadSceneFromAddressables | Load a scene via Unity Addressables |
| UnloadScene | Unload an additively-loaded scene |
| RequestLoadScene | Client-side request to load a scene (requires server approval) |
| IsSceneLoading | Check if a specific scene is currently loading |
| GetCurrentScene | Get the name of the currently active scene |
| GetLoadingScenes | Get all scenes currently in the loading state |
Events
| OnValidateSceneLoad | Server-side hook to approve or deny client scene load requests |
RPC Attributes
AttributesAttributes for declaring remote procedure calls. Applied to methods on GONetParticipantCompanionBehaviour subclasses.
ServerRpc
Called by a client, executed on the server.
| IsMineRequired | Only the owner can invoke this RPC |
| IsReliable | Guarantee delivery (default: true) |
| IsPersistent | Replay for late-joining clients |
| RunLocally | Also execute on the calling client |
ClientRpc
Called by the server, executed on all clients.
| IsReliable | Guarantee delivery (default: true) |
| IsPersistent | Replay for late-joining clients |
TargetRpc
Called by the server, executed on a specific target.
| RpcTarget | Owner, Others, All, SpecificAuthority |
Common (all RPC types)
| ProcessingPriority | Priority order for RPC processing |
| ValidationHandlerType | Custom server-side validation handler type |
GONetConfig
Static SettingsGlobal configuration constants for RPC behavior, reparenting limits, and validation. These are compile-time or startup-time settings.
RPC Settings
| RpcDeferralTimeoutSeconds | Seconds before a deferred RPC times out (default: 5) |
| MaxDeferredRpcsPerParticipant | Max queued RPCs per participant (default: 100) |
| ThrowOnInvalidRpc | Throw an exception on invalid RPC calls |
| EnableRpcPreSendValidation | Validate RPC parameters before sending |
| EnableRpcDeferralForUnknownParticipants | Queue RPCs for participants not yet known |
Reparenting Settings
| PendingReparentTimeoutSeconds | Seconds before a pending reparent times out (default: 30) |
| MaxReparentsPerSecondPerAuthority | Rate limit for reparenting operations (default: 10) |
Validation Settings
| ThrowOnGONetReadyViolations | Throw if networking operations are called before ready |
| EnableOnGONetReadyValidation | Enable runtime checks for GONetReady preconditions |
Event Interfaces
InterfacesInterfaces for GONet's event system. Implement these on your custom event types to control delivery behavior, persistence, and cancellation.
Core Interfaces
| IGONetEvent | Base interface. Provides OccurredAtElapsedTicks for event timing. |
| ITransientEvent | One-shot event. IsSingularRecipientOnly controls whether it goes to one or many subscribers. |
| IPersistentEvent | Replayed for late-joining clients. No additional members beyond IGONetEvent. |
| ICancelOutOtherEvents | Cancels other events. OtherEventTypesCancelledOut lists types; DoesCancelOutOtherEvent provides custom logic. |
| ILocalOnlyPublish | Marker interface. Events with this are never sent over the network. |
| IGONetPoolResettable | For pooled events. ResetForPoolBorrow and ResetForPoolReturn clear state between uses. |