|
static bool | IsOwner (VRCPlayerApi player, GameObject obj) |
| Tells you whether a Player is the Owner of a given GameObject, important for Sync. More...
|
|
static bool | IsOwner (GameObject obj) |
| Tells you whether the local Player is the Owner of a given GameObject, important for Sync. More...
|
|
static VRCPlayerApi | GetOwner (GameObject obj) |
| Returns the VRC.SDKBase.VRCPlayerApi object of the owner of a given GameObject. More...
|
|
static void | SetOwner (VRCPlayerApi player, GameObject obj) |
| Sets the owner of a given GameObject to a given player. More...
|
|
static bool | IsObjectReady (GameObject obj) |
| Returns whether a given GameObject is ready for use. More...
|
|
static GameObject | Instantiate (VRC_EventHandler.VrcBroadcastType broadcast, string prefabPathOrDynamicPrefabName, Vector3 position, Quaternion rotation) |
|
static void | RPC (RPC.Destination targetClients, GameObject targetObject, string methodName, params object[] parameters) |
|
static void | RPC (VRCPlayerApi targetPlayer, GameObject targetObject, string methodName, params object[] parameters) |
|
static byte[] | EncodeParameters (params object[] parameters) |
|
static object[] | DecodeParameters (byte[] encodedData) |
|
static void | Destroy (GameObject obj) |
|
static string | GetUniqueName (GameObject obj) |
| Returns a unique name for a given GameObject. More...
|
|
static bool | GoToRoom (string roomID) |
|
static DateTime | GetNetworkDateTime () |
| Returns the current network time as a System.DateTime object. More...
|
|
static double | GetServerTimeInSeconds () |
| Returns the current server time in seconds. More...
|
|
static int | GetServerTimeInMilliseconds () |
| Returns the current server time in milliseconds. More...
|
|
static double | CalculateServerDeltaTime (double timeInSeconds, double previousTimeInSeconds) |
| Calculates the difference between two server time stamps as returned by VRC.SDKBase.Networking.GetServerTimeInSeconds. More...
|
|
static Coroutine | SafeStartCoroutine (IEnumerator target) |
|
static VRC_EventDispatcher | GetEventDispatcher () |
|
static float | SimulationTime (GameObject target) |
| returns the current simulation time of a object with networking components. Simulation time is a timestamp that refers to how far back in time an object is simulated. More...
|
|
static float | SimulationTime (VRCPlayerApi target) |
| returns the current simulation time of a player. Simulation time is a timestamp that refers to how far back in time an object is simulated. More...
|
|
static GameObject[] | GetPlayerObjects (VRCPlayerApi target) |
|
static Component | FindComponentInPlayerObjects (VRCPlayerApi target, Component referenceComponent) |
|
Networking is a class that provides a set of static methods relating to the networking of UdonBehaviours.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 10341 of file VRCSDKBase.cs.
static float VRC.SDKBase.Networking.SimulationTime |
( |
GameObject |
target | ) |
|
|
static |
returns the current simulation time of a object with networking components. Simulation time is a timestamp that refers to how far back in time an object is simulated.
This value is used internally for VRCObjectSync and players, but can be used in Udon scripts as well. For example, if your Time.realtimeSinceStartup is 45 and the SimulationTime of an object is 44.5, then VRChat believes 500ms of delay is necessary to smoothly replicate the object at that moment. You can use that number to learn some information about what VRCObjectSync is doing, or to create your own system similar to VRCObjectSync. For example, if you do Time.realTimeSinceStartup - SimulationTime(player) then that will tell you exactly how much latency that player has at that moment. Simulation time is frequently adjusted depending on network conditions, including many factors such as latency, reliability, and frequency of the packets being received. The goal of this adjustment is to be as close to real-time as possible to reduce latency, but to leave enough room to prevent hitching. There are a variety of factors that can cause hitching, but one example can be running out of received packets from the owner.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
- Parameters
-
obj | The GameObject to get the simulation time of. |
- Returns
- The current simulation time of the object. This MAY be UnityEngine.Time.time
Definition at line 10862 of file VRCSDKBase.cs.
static float VRC.SDKBase.Networking.SimulationTime |
( |
VRCPlayerApi |
target | ) |
|
|
static |
returns the current simulation time of a player. Simulation time is a timestamp that refers to how far back in time an object is simulated.
This value is used internally for VRCObjectSync and players, but can be used in Udon scripts as well. For example, if your Time.realtimeSinceStartup is 45 and the SimulationTime of an object is 44.5, then VRChat believes 500ms of delay is necessary to smoothly replicate the object at that moment. You can use that number to learn some information about what VRCObjectSync is doing, or to create your own system similar to VRCObjectSync. For example, if you do Time.realTimeSinceStartup - SimulationTime(player) then that will tell you exactly how much latency that player has at that moment. Simulation time is frequently adjusted depending on network conditions, including many factors such as latency, reliability, and frequency of the packets being received. The goal of this adjustment is to be as close to real-time as possible to reduce latency, but to leave enough room to prevent hitching. There are a variety of factors that can cause hitching, but one example can be running out of received packets from the owner.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
- Parameters
-
target | The player to get the simulation time of. |
- Returns
- The current simulation time of the object. This MAY be UnityEngine.Time.time
Definition at line 10894 of file VRCSDKBase.cs.
bool VRC.SDKBase.Networking.IsInstanceOwner |
|
staticget |
This Property has known issues, check the listed cannys for more information, as its behaviour may not work as documented/expected.
if the local Player is the one who created the instance.
Canny Post | Description |
Canny Post #1 |
This property is currently broken, and will always return true! use
VRC.SDKBase.VRCPlayerApi.isInstanceOwner instead.
Will be False when in Build & Test and Unity Playmode.
Check the VRChat documentation for more information.
Docs generated by the VRChat SDK Documentation Project.
Definition at line 10516 of file VRCSDKBase.cs.