TNet 3  3.0.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
TNet.TNBehaviour Class Reference

If your MonoBehaviour will need to use a TNObject, deriving from this class will make it easier. More...

Inheritance diagram for TNet.TNBehaviour:
ColoredObject DraggedObject ExampleChaseCamera ExampleChat ExampleDestroy MoveSpinObject TNet.TNAutoSync TNet.TNSyncRigidbody

Public Member Functions

Get< T > (string name)
 Get the object-specific data. More...
 
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...
 

Public Attributes

bool ignoreMissingTNO = false
 

Protected Member Functions

virtual void Awake ()
 Cache the TNObject if it exists. More...
 
virtual void Start ()
 Create the TNObject if it hasn't been found already. More...
 
void CreateTNObject ()
 Create the TNObject. More...
 

Properties

TNObject tno [get]
 

Detailed Description

If your MonoBehaviour will need to use a TNObject, deriving from this class will make it easier.

Member Function Documentation

virtual void TNet.TNBehaviour.Awake ( )
protectedvirtual

Cache the TNObject if it exists.

Reimplemented in TNet.TNAutoSync, TNet.TNSyncRigidbody, ColoredObject, and DraggedObject.

void TNet.TNBehaviour.CreateTNObject ( )
protected

Create the TNObject.

virtual void TNet.TNBehaviour.DestroySelf ( )
virtual

Destroy this game object.

void TNet.TNBehaviour.DestroySelf ( float  delay,
bool  onlyIfOwner = true 
)

Destroy this game object on all connected clients and remove it from the server.

T TNet.TNBehaviour.Get< T > ( string  name)

Get the object-specific data.

T TNet.TNBehaviour.Get< T > ( string  name,
defVal 
)

Get the object-specific data.

void TNet.TNBehaviour.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.

void TNet.TNBehaviour.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.

void TNet.TNBehaviour.RemoveAllSavedRFCs ( )

Immediately remove all saved RFCs. Use this if you want to clear all saved RFCs for any reason.

void TNet.TNBehaviour.Set ( string  name,
object  val 
)

Set the object-specific data.

void TNet.TNBehaviour.Set ( string  text)

Convenience function to set the data using a single string notation such as "key = value".

virtual void TNet.TNBehaviour.Start ( )
protectedvirtual

Create the TNObject if it hasn't been found already.

Reimplemented in ExampleChaseCamera.

Member Data Documentation

bool TNet.TNBehaviour.ignoreMissingTNO = false

Property Documentation

TNObject TNet.TNBehaviour.tno
get

The documentation for this class was generated from the following file: