### CustomPlayer Start Method Example (C#) Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.CustomPlayer.Start.htm Demonstrates the basic structure of a Start method within the CustomPlayer class in C#. This method is typically called once when the script instance is being loaded. ```csharp public void Start() { } ``` -------------------------------- ### Example Implementation Patterns Source: https://onlineobject.net/objectnet/docs/api/html/N-com.onlineobject.objectnet.examples.htm Documentation on the example classes provided in the ObjectNet framework to demonstrate player synchronization and event management. ```APIDOC ## Example Implementations ### Description The `com.onlineobject.objectnet.examples` namespace contains reference implementations for common networking tasks such as player input synchronization, animation syncing, and login validation. ### Key Classes - **ControllerAnimationSync**: Demonstrates how to synchronize animation states across the network. - **LoginValidationProvider**: Provides logic for validating user network IDs during the authentication flow. - **PlayerSynchronizedVariables**: Example of using network-aware variables to maintain state consistency. ### Usage These classes serve as templates for developers to implement custom networking logic within their Unity projects using the ObjectNet framework. ``` -------------------------------- ### NetworkVariablesPlayerExtended - Start Method Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkVariablesPlayerExtended.Start.htm Documentation for the Start method within the NetworkVariablesPlayerExtended class. ```APIDOC ## NetworkVariablesPlayerExtended - Start Method ### Description This method is part of the NetworkVariablesPlayerExtended class and is likely called during the initialization phase of a networked player object. ### Method `Start` ### Endpoint N/A (Class Method) ### Parameters None ### Request Example ```csharp // Example of calling the Start method (within the class context) public void Start() { // ... implementation details ... } ``` ### Response #### Success Response N/A (Method returns void) #### Response Example N/A ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.Send.htm Initializes the network connection and starts the network service. ```APIDOC ## POST /network/start ### Description Starts the network transport and initializes the network manager instance. ### Method POST ### Endpoint /network/start ### Request Body - **port** (int) - Required - The port to bind the network service to. ### Response #### Success Response (200) - **status** (string) - Indicates the network has started successfully. #### Response Example { "status": "success" } ``` -------------------------------- ### EventsExampleProvider Class Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkVariablesPlayerExtended.ActiveFixedUpdate.htm Provides examples for event handling. ```APIDOC ## EventsExampleProvider Class ### Description A class that offers example implementations and usage patterns for the event system. ``` -------------------------------- ### POST /server/start Source: https://onlineobject.net/objectnet/docs/api/html/AllMembers.T-com.onlineobject.objectnet.server.EmbeddedServer.htm Starts the embedded server instance with specified network configurations. ```APIDOC ## POST /server/start ### Description Initializes and starts the EmbeddedServer instance. This method binds the server to the specified port and configures transport settings. ### Method POST ### Endpoint /server/start ### Parameters #### Request Body - **port** (UInt16) - Required - The port number to listen on. - **maxConnections** (UInt16) - Required - Maximum number of concurrent connections. - **channelCount** (Byte) - Required - Number of communication channels. - **useEncryption** (Boolean) - Required - Whether to enable encryption for the server. ### Request Example { "port": 7777, "maxConnections": 32, "channelCount": 2, "useEncryption": true } ### Response #### Success Response (200) - **status** (string) - Server started successfully. #### Response Example { "status": "success" } ``` -------------------------------- ### Initialize NetworkTest Start Method Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.examples.NetworkTest.Start.htm The Start method is a standard Unity lifecycle hook used to initialize the NetworkTest component within the com.onlineobject.objectnet.examples namespace. ```C# public void Start() { // Initialization logic for NetworkTest } ``` -------------------------------- ### Start Server and Listen for Connections (C#) Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.server.ServerEmbedded.Connect.htm The Connect method of the ServerEmbedded class initiates the server and begins listening for incoming connections. It returns a boolean value indicating whether the server started successfully. This method is part of the com.onlineobject.objectnet.server namespace. ```csharp public bool Connect() { // Implementation details for starting the server and listening for connections return true; // Placeholder for actual return value } ``` -------------------------------- ### EventsManagerExamples Class Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkVariablesPlayerExtended.ActiveFixedUpdate.htm Examples related to the EventsManager. ```APIDOC ## EventsManagerExamples Class ### Description Demonstrates various ways to utilize the EventsManager for event coordination. ``` -------------------------------- ### Initialize PlayerSynchronizedVariables Start Method Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.PlayerSynchronizedVariables.Start.htm The Start method is used to initialize the synchronization state for player variables. It is part of the PlayerSynchronizedVariables class within the com.onlineobject.objectnet namespace. ```C# public void Start() { // Initialization logic for synchronized player variables } ``` -------------------------------- ### Start/Stop API Source: https://onlineobject.net/objectnet/docs/api/html/Methods.T-com.onlineobject.objectnet.Channel.htm APIs for starting and stopping the network server. ```APIDOC ## Start/Stop API ### Description Methods for controlling the lifecycle of the network server. ### Methods #### Start * **Description**: Starts the channel and initializes the transport layer. * **Method**: POST. * **Endpoint**: N/A (likely a method call on an object). #### Stop * **Description**: Stops the network server, terminates the server and disconnects all clients. * **Method**: POST or DELETE. * **Endpoint**: N/A (likely a method call on an object). ### Response Examples * **Success Response (200)**: Typically no content, indicating the operation was successful. * **Error Response (4xx/5xx)**: Details about the error. ``` -------------------------------- ### GET /com.onlineobject.objectnet.examples/UICustomEventsActivation/ReceivedText Source: https://onlineobject.net/objectnet/docs/api/html/F-com.onlineobject.objectnet.examples.UICustomEventsActivation.ReceivedText.htm Retrieves the ReceivedText field configuration from the UICustomEventsActivation class within the examples namespace. ```APIDOC ## GET /com.onlineobject.objectnet.examples/UICustomEventsActivation/ReceivedText ### Description Accesses the ReceivedText public field used for handling text-based network events within the UI layer. ### Method GET ### Endpoint /com.onlineobject.objectnet.examples/UICustomEventsActivation/ReceivedText ### Parameters #### Path Parameters - **None** ### Request Example N/A (Property Access) ### Response #### Success Response (200) - **ReceivedText** (Text) - The UI Text component instance associated with received network text events. #### Response Example { "ReceivedText": "[UnityEngine.UI.Text]" } ``` -------------------------------- ### GET /examples/rocketcontrol/explosion Source: https://onlineobject.net/objectnet/docs/api/html/F-com.onlineobject.objectnet.examples.RocketControl.explosion.htm Retrieves the explosion effect configuration for the RocketControl component within the ObjectNet examples namespace. ```APIDOC ## GET /examples/rocketcontrol/explosion ### Description Retrieves the GameObject reference assigned to the explosion field in the RocketControl class. ### Method GET ### Endpoint /com.onlineobject.objectnet.examples/RocketControl/explosion ### Parameters #### Path Parameters - **None** ### Request Example { "action": "get_field", "field": "explosion" } ### Response #### Success Response (200) - **explosion** (GameObject) - The explosion effect prefab or object instance. #### Response Example { "explosion": { "name": "ExplosionEffect", "active": true } } ``` -------------------------------- ### GET /DataStream/Read Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.DataStream.Read--1_1.htm Reads data of a specified type from the internal buffer starting at a given offset. ```APIDOC ## GET /DataStream/Read ### Description Reads data of type T from the buffer at a specific offset. This method is part of the DataStream class within the com.onlineobject.objectnet namespace. ### Method GET ### Endpoint /DataStream/Read ### Parameters #### Query Parameters - **offset** (Int32) - Required - The offset in the buffer from which to start reading. ### Request Example GET /DataStream/Read?offset=0 ### Response #### Success Response (200) - **data** (T) - The data read from the buffer. #### Response Example { "data": "value" } ### Exceptions - **Exception**: Thrown when the type T is not supported or does not have a reader. ``` -------------------------------- ### GET /examples/network-id-user Source: https://onlineobject.net/objectnet/docs/api/html/F-com.onlineobject.objectnet.examples.NetworkIdProvider.NetworkIdByUser.UserName.htm Retrieves user identification details from the NetworkIdByUser class within the examples namespace. ```APIDOC ## GET /examples/network-id-user ### Description Retrieves the username associated with a specific network ID user instance. ### Method GET ### Endpoint /com.onlineobject.objectnet.examples/NetworkIdByUser ### Parameters #### Path Parameters - **None** ### Response #### Success Response (200) - **UserName** (string) - The username associated with the network ID. #### Response Example { "UserName": "PlayerOne" } ``` -------------------------------- ### POST /EmbeddedServer/Start Source: https://onlineobject.net/objectnet/docs/api/html/Methods.T-com.onlineobject.objectnet.server.EmbeddedServer.htm Initializes and starts the embedded server instance with specified network configurations. ```APIDOC ## POST /EmbeddedServer/Start ### Description Starts the server instance to begin listening for incoming client connections. ### Method POST ### Endpoint /EmbeddedServer/Start ### Parameters #### Request Body - **port** (UInt16) - Required - The port number to listen on. - **maxConnections** (UInt16) - Required - Maximum number of concurrent connections. - **protocolVersion** (Byte) - Required - Version identifier for the protocol. - **useEncryption** (Boolean) - Required - Whether to enable secure transport. ### Request Example { "port": 7777, "maxConnections": 100, "protocolVersion": 1, "useEncryption": true } ### Response #### Success Response (200) - **status** (String) - Server started successfully. #### Response Example { "status": "success" } ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.GetConnection.htm Initializes the network connection for the client or server instance. ```APIDOC ## POST /network/start ### Description Starts the network transport layer and initializes the connection state based on the current configuration. ### Method POST ### Endpoint /network/start ### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). ### Response #### Success Response (200) - **status** (string) - The initialization status. #### Response Example { "status": "success" } ``` -------------------------------- ### GET /examples/NetworkTest/NomeDoCorno Source: https://onlineobject.net/objectnet/docs/api/html/F-com.onlineobject.objectnet.examples.NetworkTest.NomeDoCorno.htm Retrieves the value of the NomeDoCorno field within the NetworkTest class, which is part of the examples namespace. ```APIDOC ## GET /examples/NetworkTest/NomeDoCorno ### Description Accesses the string field 'NomeDoCorno' defined within the NetworkTest class in the com.onlineobject.objectnet.examples namespace. ### Method GET ### Endpoint /examples/NetworkTest/NomeDoCorno ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example N/A ### Response #### Success Response (200) - **value** (string) - The string value stored in the NomeDoCorno field. #### Response Example { "NomeDoCorno": "example_value" } ``` -------------------------------- ### Get Embedded Server Port (C#) Source: https://onlineobject.net/objectnet/docs/api/html/P-com.onlineobject.objectnet.server.Transports.IEmbeddedServer.Port.htm Retrieves the local port the embedded server is running on. This property is part of the IEmbeddedServer interface and is essential for network communication setup. ```csharp ushort Port { get; } ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.GetManagedInputs.htm Initializes the network connection using the configured transport settings. ```APIDOC ## POST /network/start ### Description Starts the network stack, initializing the transport layer and preparing the instance for connection. ### Method POST ### Endpoint /network/start ### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). ### Response #### Success Response (200) - **status** (string) - Indicates the network has started successfully. #### Response Example { "status": "success" } ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.SetTargetDatabase.htm Initializes the network connection and starts the transport layer for the client or server instance. ```APIDOC ## POST /network/start ### Description Starts the network service, initializing the transport layer and preparing the instance for communication. ### Method POST ### Endpoint /network/start ### Parameters #### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). - **port** (integer) - Required - The port number to bind the network service to. ### Request Example { "transportType": "UDP", "port": 7777 } ### Response #### Success Response (200) - **status** (string) - The current state of the network service. #### Response Example { "status": "running" } ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.GetActiveTransport.htm Initializes the network transport layer and begins the network lifecycle. ```APIDOC ## POST /network/start ### Description Starts the network services, initializing the transport layer and preparing the server or client for communication. ### Method POST ### Endpoint /network/start ### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). - **port** (int) - Required - The port number to bind the network service to. ### Response #### Success Response (200) - **status** (string) - Indicates successful network startup. #### Response Example { "status": "success", "message": "Network started on port 7777" } ``` -------------------------------- ### POST /IEmbeddedServer/Start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.server.Transports.IEmbeddedServer.Start.htm Initializes the transport layer and begins listening for incoming client connections on a specified port. ```APIDOC ## POST /IEmbeddedServer/Start ### Description Starts the transport layer and begins listening for incoming connections on the specified local port. ### Method POST ### Endpoint /IEmbeddedServer/Start ### Parameters #### Request Body - **port** (UInt16) - Required - The local port on which to listen for connections. ### Request Example { "port": 8080 } ### Response #### Success Response (200) - **status** (string) - Indicates that the server has started successfully. #### Response Example { "status": "success", "message": "Server started on port 8080" } ``` -------------------------------- ### Start Channel Communication in C# Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.ChannelBase.Start.htm The Start method initializes the network channel. It is a member of the ChannelBase class within the com.onlineobject.objectnet namespace and requires the ObjectNetAPI assembly. ```C# public void Start() ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.UpdateRemoteTick.htm Initializes the network transport layer and begins the connection lifecycle. ```APIDOC ## POST /network/start ### Description Starts the network service using the configured transport settings. ### Method POST ### Endpoint /network/start ### Parameters #### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UnityTransport). - **port** (int) - Required - The port to bind the network service to. ### Request Example { "transportType": "UnityTransport", "port": 7777 } ### Response #### Success Response (200) - **status** (string) - The operational status of the network. #### Response Example { "status": "started" } ``` -------------------------------- ### Start Channel Transport Layer (C#) Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.Channel.Start.htm Starts the channel and initializes the transport layer for the Channel class. This method is part of the com.onlineobject.objectnet namespace and is found in the ObjectNetAPI.dll assembly. ```csharp public void Start() ``` -------------------------------- ### POST /server/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.server.EmbeddedServer.Start_1.htm Initializes and starts the EmbeddedServer instance with specific network configuration and message handling settings. ```APIDOC ## POST /server/start ### Description Starts the EmbeddedServer to begin listening for client connections on a specified address and port. ### Method POST ### Endpoint /server/start ### Parameters #### Request Body - **address** (String) - Required - The IP address to bind the server to. - **port** (UInt16) - Required - The local port on which to start the server. - **maxClientCount** (UInt16) - Required - The maximum number of concurrent connections allowed. - **messageHandlerGroupId** (Byte) - Required - The ID of the message handler group to use. - **useMessageHandlers** (Boolean) - Required - Whether to enable the built-in message handler system (EmbeddedMessageHandlerAttribute). ### Request Example { "address": "127.0.0.1", "port": 7777, "maxClientCount": 100, "messageHandlerGroupId": 1, "useMessageHandlers": true } ### Response #### Success Response (200) - **status** (String) - Returns "Server Started" upon successful initialization. #### Response Example { "status": "Server Started" } ``` -------------------------------- ### Start Communication Channel in C# Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.IChannel.Start.htm The Start method initializes the communication channel for objects implementing the IChannel interface. It is part of the com.onlineobject.objectnet namespace and is defined within the ObjectNetAPI assembly. ```C# void Start() ``` -------------------------------- ### Get and Set TCP Port - C# Source: https://onlineobject.net/objectnet/docs/api/html/P-com.onlineobject.objectnet.NatHelper.TcpPort.htm Provides the syntax for getting and setting the TCP port property within the NatHelper class. This property is essential for configuring network connections. ```csharp public int TcpPort { get; set; } ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.SetServerAddress.htm Initializes the network transport layer and begins the server or client lifecycle. ```APIDOC ## POST /network/start ### Description Starts the network service using the configured transport settings. ### Method POST ### Endpoint /network/start ### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). ### Response #### Success Response (200) - **status** (string) - The operational status of the network. #### Response Example { "status": "started" } ``` -------------------------------- ### Start EmbeddedTcpServer with Address and Port (C#) Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.server.Transports.Tcp.EmbeddedTcpServer.Start_1.htm Starts the TCP transport layer, enabling the server to listen for incoming connections on a specified address and port. This method is crucial for initializing network communication. ```csharp public void Start( string address, ushort port ) ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.InAuthoritativeMode.htm Initializes the network transport layer and begins listening for connections or attempting to connect to a remote server. ```APIDOC ## POST /network/start ### Description Starts the network instance using the configured transport settings. ### Method POST ### Endpoint /network/start ### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). ### Response #### Success Response (200) - **status** (string) - Indicates the network has started successfully. #### Response Example { "status": "success", "message": "Network started" } ``` -------------------------------- ### Get and Set Local Ticks for NetworkManager (C#) Source: https://onlineobject.net/objectnet/docs/api/html/P-com.onlineobject.objectnet.NetworkManager.LocalTicks.htm This snippet demonstrates how to get and set the local tick count for the NetworkManager class. It is a property that allows for managing the internal tick system of the network. ```csharp public int LocalTicks { get; set; } ``` -------------------------------- ### POST /network/start Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.FixedUpdate.htm Initializes the network transport layer and begins the server or client connection process. ```APIDOC ## POST /network/start ### Description Starts the network service using the configured transport settings. ### Method POST ### Endpoint /network/start ### Request Body - **transportType** (string) - Required - The type of transport to initialize (e.g., UDP, TCP). - **port** (int) - Required - The port number to bind the network service to. ### Request Example { "transportType": "UDP", "port": 7777 } ### Response #### Success Response (200) - **status** (string) - The operational status of the network service. #### Response Example { "status": "started" } ``` -------------------------------- ### StarterAssetsInputs.OnLook Method Source: https://onlineobject.net/objectnet/docs/api/html/M-StarterAssets.StarterAssetsInputs.OnLook.htm Handles the look input for the player, typically used for camera control. ```APIDOC ## StarterAssetsInputs.OnLook Method ### Description Handles the look input for the player, typically used for camera control. ### Method *public void OnLook( InputValue value )* ### Parameters #### Path Parameters * **value** (InputValue) - Description of the value parameter ### Request Example ```json { "example": "No request body for this method" } ``` ### Response #### Success Response (200) * **None** - This method does not return a value. #### Response Example ```json { "example": "No response body for this method" } ``` ### See Also * StarterAssetsInputs Class * StarterAssets Namespace ``` -------------------------------- ### Start IEmbeddedServer with Address and Port (C#) Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.server.Transports.IEmbeddedServer.Start_1.htm Starts the embedded server transport, enabling it to listen for incoming connections on a specified network address and port. This method is crucial for initializing server-side network communication. ```csharp void Start( string address, ushort port ) ``` -------------------------------- ### POST /UnityClient/Connect Source: https://onlineobject.net/objectnet/docs/api/html/AllMembers.T-com.onlineobject.objectnet.UnityClient.htm Initiates a network connection to the server using the pre-configured IP address and port settings. ```APIDOC ## POST /UnityClient/Connect ### Description Initiates a connection to the server using the configured IP and port. ### Method POST ### Endpoint /UnityClient/Connect ### Parameters None ### Request Example { "action": "connect" } ### Response #### Success Response (200) - **status** (string) - Indicates if the connection attempt was successfully initiated. #### Response Example { "status": "connecting" } ``` -------------------------------- ### StarterAssetsInputs.OnMove Method Source: https://onlineobject.net/objectnet/docs/api/html/M-StarterAssets.StarterAssetsInputs.OnMove.htm Handles the input value for player movement. ```APIDOC ## StarterAssetsInputs.OnMove Method ### Description Handles the input value for player movement. ### Method public void OnMove( InputValue value ) ### Parameters #### Path Parameters - **value** (InputValue) - Description of the input value for movement. ``` -------------------------------- ### ShiftLeft DataStream Method in C# Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.DataStream.ShiftLeft.htm The ShiftLeft method shifts data within a buffer to the left starting from a specific index. It requires a starting index and a distance value to determine the scope of the shift operation. ```C# public void ShiftLeft( int start, int distance ) ``` -------------------------------- ### Instance Methods Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.OnMessageReceivedEvent.htm This section details various instance methods available for managing network instances and their states. ```APIDOC ## Instance Methods ### Description Provides methods for managing network instances, checking their validity, and controlling client-side instantiation. ### Methods - **InstanceIsValid**: Checks if the current network instance is valid. - **InstantiateOnClient**: Instantiates an object on the client side. ### Endpoint N/A (Instance Methods) ``` -------------------------------- ### Get and Set Event Name (C#) Source: https://onlineobject.net/objectnet/docs/api/html/P-com.onlineobject.objectnet.EventInformations.EventName.htm This C# code snippet demonstrates how to get and set the 'EventName' property of the EventInformations class. This property is used to retrieve or define the name of an event within the ObjectNet system. ```csharp public virtual string EventName { get; set; } ``` -------------------------------- ### Network Prefab and Instantiation Source: https://onlineobject.net/objectnet/docs/api/html/F-com.onlineobject.objectnet.EventsManagerExamples.Activate.htm Details on classes for managing network prefabs and the instantiation of network objects. ```APIDOC ## Network Prefab and Instantiation ### Description This section covers the components responsible for defining, managing, and instantiating network prefabs, which are pre-configured network objects. ### Classes - **NetworkPrefab**: Represents a network prefab. - **NetworkPrefabEntry**: An entry within a network prefab database. - **NetworkPrefabsDatabase**: Stores and manages network prefabs. - **NetworkPrefabsDatabaseWindow**: Editor window for the NetworkPrefabsDatabase. - **NetworkPrefabsManager**: Manages the instantiation and lifecycle of network prefabs. - **NetworkInstantiateCache**: Cache for instantiated network objects. - **NetworkInstantiateDetection**: Detects network object instantiations. ### Interfaces - **INetworkPrefab**: Interface for network prefabs. ``` -------------------------------- ### GET /GlobalResources/GetEventsDatabase Source: https://onlineobject.net/objectnet/docs/api/html/Methods.T-com.onlineobject.objectnet.GlobalResources.htm Retrieves the path to the events database. ```APIDOC ## GET /GlobalResources/GetEventsDatabase ### Description Retrieves the full path to the events database, defaulting to the default database if none is explicitly specified. ### Method GET ### Endpoint /GlobalResources/GetEventsDatabase ### Response #### Success Response (200) - **path** (string) - The path to the events database. #### Response Example { "path": "/data/databases/Events.db" } ``` -------------------------------- ### StarterAssetsInputs Members Source: https://onlineobject.net/objectnet/docs/api/html/AllMembers.T-StarterAssets.StarterAssetsInputs.htm Details the methods and fields available for the StarterAssetsInputs class, used for handling player input. ```APIDOC ## StarterAssetsInputs Members ### Description The StarterAssetsInputs type exposes the following members for managing player input. ### Methods | Name | Description | |---|---| | JumpInput | Handles jump input. | | LookInput | Handles look input. | | MoveInput | Handles movement input. | | OnJump | Event handler for jump actions. | | OnLook | Event handler for look actions. | | OnMove | Event handler for movement actions. | | OnSprint | Event handler for sprint actions. | | SprintInput | Handles sprint input. | ### Fields | Name | Description | |---|---| | analogMovement | Enables analog movement input. | | cursorInputForLook | Enables cursor input for look control. | | cursorLocked | Indicates if the cursor is locked. | | jump | Boolean flag for jump input. | | look | Vector2 for look input. | | move | Vector2 for movement input. | | sprint | Boolean flag for sprint input. | ### See Also * StarterAssetsInputs Class * StarterAssets Namespace ``` -------------------------------- ### Network Management Methods Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.GetObjectOnClient--1.htm This section covers methods related to initializing, starting, stopping, and updating the network system, as well as managing server instances and connections. ```APIDOC ## Network Management Methods ### Description Methods for initializing, starting, stopping, and updating the network system, managing server instances, and handling connections. ### InitializeServerInstance - **Method**: Any - **Endpoint**: N/A - **Description**: Initializes a server instance. ### InitializeSpawnedObjects - **Method**: Any - **Endpoint**: N/A - **Description**: Initializes spawned objects. ### InRelayMode - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the system is in relay mode. ### Instance - **Method**: Any - **Endpoint**: N/A - **Description**: Gets the network instance. ### InstanceIsValid - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the network instance is valid. ### InstantiateOnClient - **Method**: Any - **Endpoint**: N/A - **Description**: Instantiates an object on the client. ### IsAutoReconnectDisabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if auto-reconnect is disabled. ### IsBroadcastEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if an event is a broadcast event. ### IsClientConnection - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the current connection is a client connection. ### IsConnected - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the network is connected. ### IsConnectedOnLobbyServer - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if connected to the lobby server. ### IsConnectedOnRelayServer - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if connected to the relay server. ### IsDisconnectionDetected - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if a disconnection has been detected. ### IsEncryptionEnabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if encryption is enabled. ### IsLobbyControlEnabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if lobby control is enabled. ### IsLoginEnabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if login is enabled. ### IsMasterPlayer - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the current player is the master player. ### IsProcessingInputs - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if inputs are currently being processed. ### IsRemoteInputEnabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if remote input is enabled. ### IsRouterPortMapped - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the router port is mapped. ### IsRunningLogic - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the network logic is running. ### IsServerConnection - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the current connection is a server connection. ### IsServerModeDisabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if server mode is disabled. ### IsServerRestartDetectionEnabled - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if server restart detection is enabled. ### IsToControlCameras - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if cameras are to be controlled. ### IsToDetachPlayerCamera - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the player camera is to be detached. ### IsToUseCustomNetworkId - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if a custom network ID is to be used. ### IsToUseInternalNetworkId - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if an internal network ID is to be used. ### IsToValidateLogin - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if login validation is to be performed. ### IsValidLogin - **Method**: Any - **Endpoint**: N/A - **Description**: Checks if the login is valid. ### OnClientLobbyCreationFailedEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the client lobby creation failed event. ### OnClientLobbyCreationSucessEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the client lobby creation success event. ### OnClientLobbyJoinFailedEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the client lobby join failed event. ### OnClientLobbyJoinSucessEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the client lobby join success event. ### OnClientLoginFailedEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the client login failed event. ### OnClientLoginSucessEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the client login success event. ### OnLoginFailedEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the login failed event. ### OnLoginSucessEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the login success event. ### OnMessageReceivedEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Handles the message received event. ### RegisterBroadcastEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a broadcast event. ### RegisterConnection - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a network connection. ### RegisterDestroyedObject - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a destroyed network object. ### RegisterDetectedObject - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a detected network object. ### RegisterEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a network event. ### RegisterGarbageObject - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a garbage network object. ### RegisterNetworkClient - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a network client. ### RegisterNetworkPlayer - **Method**: Any - **Endpoint**: N/A - **Description**: Registers a network player. ### RenewServerInstance - **Method**: Any - **Endpoint**: N/A - **Description**: Renews the server instance. ### RequestLobbyCreate - **Method**: Any - **Endpoint**: N/A - **Description**: Requests the creation of a lobby. ### RequestLobbyJoin - **Method**: Any - **Endpoint**: N/A - **Description**: Requests to join a lobby. ### RequestLobbyRefresh - **Method**: Any - **Endpoint**: N/A - **Description**: Requests a lobby refresh. ### Send - **Method**: Any - **Endpoint**: N/A - **Description**: Sends a network message. ### SetConnectedOnRelayServer - **Method**: Any - **Endpoint**: N/A - **Description**: Sets the connection status on the relay server. ### SetServerAddress - **Method**: Any - **Endpoint**: N/A - **Description**: Sets the server address. ### SetTargetDatabase - **Method**: Any - **Endpoint**: N/A - **Description**: Sets the target database. ### SetTcpPort - **Method**: Any - **Endpoint**: N/A - **Description**: Sets the TCP port. ### SetUdpPort - **Method**: Any - **Endpoint**: N/A - **Description**: Sets the UDP port. ### SpawnClientPlayerOnServer - **Method**: Any - **Endpoint**: N/A - **Description**: Spawns a client player on the server. ### SpawnServerPlayer - **Method**: Any - **Endpoint**: N/A - **Description**: Spawns a server player. ### StartNetwork - **Method**: Any - **Endpoint**: N/A - **Description**: Starts the network system. ### StopNetwork - **Method**: Any - **Endpoint**: N/A - **Description**: Stops the network system. ### UnregisterBroadcastEvent - **Method**: Any - **Endpoint**: N/A - **Description**: Unregisters a broadcast event. ### UnregisterConnection - **Method**: Any - **Endpoint**: N/A - **Description**: Unregisters a network connection. ### UnregisterNetworkPlayer - **Method**: Any - **Endpoint**: N/A - **Description**: Unregisters a network player. ### Update - **Method**: Any - **Endpoint**: N/A - **Description**: Updates the network system. ### UpdateMasterPlayer - **Method**: Any - **Endpoint**: N/A - **Description**: Updates the master player. ### UpdateRemoteTick - **Method**: Any - **Endpoint**: N/A - **Description**: Updates the remote tick. ### UseAutomaticPrediction - **Method**: Any - **Endpoint**: N/A - **Description**: Enables automatic prediction. ### UseLatencyTolerance - **Method**: Any - **Endpoint**: N/A - **Description**: Enables latency tolerance. ### UseMovementPrediction - **Method**: Any - **Endpoint**: N/A - **Description**: Enables movement prediction. ### UseNetworkClock - **Method**: Any - **Endpoint**: N/A - **Description**: Uses the network clock. ### UsePhysicsPrediction - **Method**: Any - **Endpoint**: N/A - **Description**: Enables physics prediction. ### UseRemoteInput - **Method**: Any - **Endpoint**: N/A - **Description**: Enables remote input. ### UseTransformPrediction - **Method**: Any - **Endpoint**: N/A - **Description**: Enables transform prediction. ``` -------------------------------- ### Example Usage of DeletePortMapAsync (C#) Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NatDevice.DeletePortMapAsync.htm Demonstrates how to use the 'DeletePortMapAsync' method to remove a TCP port mapping. This example creates a new 'Mapping' object for TCP protocol on ports 1700 (external) and 1600 (internal) and then calls the method. ```csharp device.DeletePortMapAsync(new Mapping(Protocol.Tcp, 1700, 1600)); ``` -------------------------------- ### Implement PassiveStart Method in CustomPlayer Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.examples.CustomPlayer.PassiveStart.htm The PassiveStart method is a lifecycle hook executed when a CustomPlayer object enters Passive mode. It is part of the com.onlineobject.objectnet.examples namespace and is used to initialize components or states for non-active network objects. ```csharp public void PassiveStart() { // Initialization logic for passive mode } ``` -------------------------------- ### Network Instantiation and Spawning Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkTest.ActiveUpdate.htm Documentation for network instantiation and spawning mechanisms, including caching and detection of instantiated objects. ```APIDOC ## Network Instantiation and Spawning ### Description This section details the components responsible for instantiating and spawning network objects, including caching mechanisms and detection of newly spawned entities. ### Classes - **NetworkInstantiateCache**: Cache for network instantiated objects. - **NetworkInstantiateDetection**: Detects network instantiation events. ### Example Usage ```csharp // Example of using the instantiation cache NetworkInstantiateCache.Add(networkObject); ``` ``` -------------------------------- ### GET EmbeddedConnection.IsConnected Source: https://onlineobject.net/objectnet/docs/api/html/P-com.onlineobject.objectnet.server.EmbeddedConnection.IsConnected.htm Retrieves the current connection status of an EmbeddedConnection instance. ```APIDOC ## GET /server/connection/is_connected ### Description Returns the connection state of the current EmbeddedConnection instance. Indicates whether the peer is currently active and connected to the server. ### Method GET ### Endpoint /server/connection/is_connected ### Parameters #### Path Parameters - **connectionId** (string) - Required - The unique identifier of the connection. ### Request Example GET /server/connection/is_connected?connectionId=12345 ### Response #### Success Response (200) - **isConnected** (boolean) - Returns true if the connection is active, false otherwise. #### Response Example { "isConnected": true } ``` -------------------------------- ### Instance Methods Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.NetworkManager.GetCurrentInputValue--1.htm Documentation for various instance methods related to network state and validation. ```APIDOC ## Instance Methods ### Description Provides methods for checking the validity of an instance, managing client-side instantiation, and querying network connection states. ### Methods - **InstanceIsValid Method** - **Description**: Checks if the current network instance is valid. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **InstantiateOnClient Method** - **Description**: Instantiates an object on the client side. - **Method**: (Assumed POST or internal call) - **Endpoint**: N/A - **IsAutoReconnectDisabled Method** - **Description**: Checks if auto-reconnect is disabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsBroadcastEvent Method** - **Description**: Checks if an event is a broadcast event. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsClientConnection Method** - **Description**: Checks if the current connection is a client connection. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsConnected Method** - **Description**: Checks if the network is currently connected. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsConnectedOnLobbyServer Method** - **Description**: Checks if connected to a lobby server. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsConnectedOnRelayServer Method** - **Description**: Checks if connected to a relay server. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsDisconnectionDetected Method** - **Description**: Checks if a disconnection has been detected. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsEncryptionEnabled Method** - **Description**: Checks if encryption is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsLobbyControlEnabled Method** - **Description**: Checks if lobby control is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsLoginEnabled Method** - **Description**: Checks if login is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsMasterPlayer Method** - **Description**: Checks if the current player is the master player. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsProcessingInputs Method** - **Description**: Checks if inputs are currently being processed. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsRemoteInputEnabled Method** - **Description**: Checks if remote input is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsRouterPortMapped Method** - **Description**: Checks if router port mapping is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsRunningLogic Method** - **Description**: Checks if the network logic is currently running. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsServerConnection Method** - **Description**: Checks if the current connection is a server connection. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsServerModeDisabled Method** - **Description**: Checks if server mode is disabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsServerRestartDetectionEnabled Method** - **Description**: Checks if server restart detection is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsToControlCameras Method** - **Description**: Checks if camera control is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsToDetachPlayerCamera Method** - **Description**: Checks if player camera detachment is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsToUseCustomNetworkId Method** - **Description**: Checks if a custom network ID is being used. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsToUseInternalNetworkId Method** - **Description**: Checks if an internal network ID is being used. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsToValidateLogin Method** - **Description**: Checks if login validation is enabled. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A - **IsValidLogin Method** - **Description**: Checks if the current login is valid. - **Method**: (Assumed GET or internal check) - **Endpoint**: N/A ``` -------------------------------- ### Get Methods Source: https://onlineobject.net/objectnet/docs/api/html/Methods.T-com.onlineobject.objectnet.server.EmbeddedMessage.htm Methods for retrieving various data types from a message. ```APIDOC ## Get Methods ### Description Methods for retrieving various data types from a message. ### Method GET ### Endpoint /websites/onlineobject_net_objectnet_api/get ### Parameters #### Query Parameters - **dataType** (string) - Required - The data type to retrieve (e.g., Byte, Int32, String, array[]()[][]). - **index** (integer) - Optional - The index of the element to retrieve if it's an array. ### Response #### Success Response (200) - **value** (any) - The retrieved data. #### Response Example ```json { "value": 123 } ``` ``` -------------------------------- ### POST /UnityClient/Connect Source: https://onlineobject.net/objectnet/docs/api/html/M-com.onlineobject.objectnet.UnityClient.Connect.htm Establishes a connection to the network server using the UnityClient interface. ```APIDOC ## POST /UnityClient/Connect ### Description Initiates a connection request from the Unity client to a specified network server address. ### Method POST ### Endpoint /UnityClient/Connect ### Parameters #### Request Body - **address** (string) - Required - The IP address or hostname of the server. - **port** (int) - Required - The port number to connect to. ### Request Example { "address": "127.0.0.1", "port": 7777 } ### Response #### Success Response (200) - **status** (string) - Connection status message. - **connectionId** (string) - Unique identifier for the established session. #### Response Example { "status": "connected", "connectionId": "uuid-1234-5678" } ``` -------------------------------- ### POST /NetworkAnimationController/Initialize Source: https://onlineobject.net/objectnet/docs/api/html/Methods.T-com.onlineobject.objectnet.NetworkAnimationController.htm Initializes the NetworkAnimationController by setting up the animator and registering necessary network events. ```APIDOC ## POST /NetworkAnimationController/Initialize ### Description Initializes the NetworkAnimationController by setting up the animator and registering network events. ### Method POST ### Endpoint /NetworkAnimationController/Initialize ### Request Body - **animator** (Object) - Required - The animator component to be controlled. ### Response #### Success Response (200) - **status** (string) - Success message indicating initialization completion. ``` -------------------------------- ### GET /EmbeddedMessage/Get Source: https://onlineobject.net/objectnet/docs/api/html/Methods.T-com.onlineobject.objectnet.server.EmbeddedMessage.htm Methods for retrieving and deserializing data from an EmbeddedMessage instance. ```APIDOC ## GET /EmbeddedMessage/Get ### Description Retrieves a specific data type from the current message buffer based on the order of insertion. ### Method GET ### Endpoint /EmbeddedMessage/Get[Type] ### Parameters #### Query Parameters - **index** (int) - Optional - The position or identifier for the data retrieval. ### Response #### Success Response (200) - **data** (dynamic) - The retrieved value from the message. #### Response Example { "data": 123 } ```