This script makes it easy to sync rigidbodies across the network. Use this script on all the objects in your scene that have a rigidbody and can move as a result of physics-based interaction with other objects. Note that any user-based interaction (such as applying a force of any kind) should still be sync'd via an explicit separate RFC call for optimal results.
More...
|
| void | Sync () |
| | Send out an update to everyone on the network. More...
|
| |
| T | Get< T > (string name) |
| | Get the object-specific data. More...
|
| |
| T | Get< T > (string name, T defVal) |
| | Get the object-specific data. More...
|
| |
| void | Set (string name, object val) |
| | Set the object-specific data. More...
|
| |
| void | Set (string text) |
| | Convenience function to set the data using a single string notation such as "key = value". More...
|
| |
| virtual void | DestroySelf () |
| | Destroy this game object. More...
|
| |
| void | DestroySelf (float delay, bool onlyIfOwner=true) |
| | Destroy this game object on all connected clients and remove it from the server. More...
|
| |
| void | Instantiate (int rccID, string path, bool persistent, params object[] objs) |
| | Convenience method mirroring TNManager.Instantiate. Instantiate a new game object in the behaviour's channel on all connected players. More...
|
| |
| void | Instantiate (string funcName, string path, bool persistent, params object[] objs) |
| | Convenience method mirroring TNManager.Instantiate. Instantiate a new game object in the behaviour's channel on all connected players. More...
|
| |
| void | RemoveAllSavedRFCs () |
| | Immediately remove all saved RFCs. Use this if you want to clear all saved RFCs for any reason. More...
|
| |
|
| float | updatesPerSecond = 10f |
| | How many times per second to send updates. The actual number of updates sent may be higher (if new players connect) or lower (if the rigidbody is still). More...
|
| |
| bool | isImportant = false |
| | Whether to send through UDP or TCP. If it's important, TCP will be used. If not, UDP. If you have a lot of frequent updates, mark it as not important. More...
|
| |
| bool | isActive = true |
| | Set this to 'false' to stop sending updates. More...
|
| |
| bool | ignoreMissingTNO = false |
| |
This script makes it easy to sync rigidbodies across the network. Use this script on all the objects in your scene that have a rigidbody and can move as a result of physics-based interaction with other objects. Note that any user-based interaction (such as applying a force of any kind) should still be sync'd via an explicit separate RFC call for optimal results.
| override void TNet.TNSyncRigidbody.Awake |
( |
| ) |
|
|
protectedvirtual |
| void TNet.TNSyncRigidbody.Sync |
( |
| ) |
|
Send out an update to everyone on the network.
| bool TNet.TNSyncRigidbody.isActive = true |
Set this to 'false' to stop sending updates.
| bool TNet.TNSyncRigidbody.isImportant = false |
Whether to send through UDP or TCP. If it's important, TCP will be used. If not, UDP. If you have a lot of frequent updates, mark it as not important.
| float TNet.TNSyncRigidbody.updatesPerSecond = 10f |
How many times per second to send updates. The actual number of updates sent may be higher (if new players connect) or lower (if the rigidbody is still).
The documentation for this class was generated from the following file: