Class OdinClient
Client Wrapper for ODIN ffi OdinNative.Core.OdinLibrary.NativeMethods
Properties
Rooms
A collection of all OdinNative.Odin.Room.Room
EndPoint
Connection EndPoint. Default from OdinEditorConfig.
AccessKey
Client AccessKey for all new rooms. Default from OdinHandler config.
UserData
Client custom UserData
Methods
ReloadLibrary(bool)
Internal library reload
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | init | Idicates to directly initialize the library again after release |
JoinRoom(string, string)
Join or create a OdinNative.Odin.Room.Room by name via a gateway
Returns
Global.Task<OdinNative.Odin.Room.Room>
: OdinNative.Odin.Room.Room or null
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Room name |
System.String | userId | User ID |
JoinRoom(string, string, Action<Room>)
Join or create a OdinNative.Odin.Room.Room by name via a gateway
Returns
Global.Task<OdinNative.Odin.Room.Room>
: OdinNative.Odin.Room.Room or null
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Room name |
System.String | userId | Odin client ID |
Global.Action<OdinNative.Odin.Room.Room> | setup | will invoke to setup a room before adding or joining |
JoinRoom(string, string, IUserData, Action<Room>)
Join or create a OdinNative.Odin.Room.Room by name via a gateway
Returns
Global.Task<OdinNative.Odin.Room.Room>
: OdinNative.Odin.Room.Room or null
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Room name |
System.String | userId | Odin client ID |
OdinNative.Odin.IUserData | userData | Set new OdinNative.Odin.OdinClient.UserData on room join |
Global.Action<OdinNative.Odin.Room.Room> | setup | will invoke to setup a room before adding or joining |
JoinNamedRoom(string, string, IUserData, Action<Room>)
Join or create a named OdinNative.Odin.Room.Room by token via a gateway
Returns
Global.Task<OdinNative.Odin.Room.Room>
: OdinNative.Odin.Room.Room or null
Parameters
Type | Name | Description |
---|---|---|
System.String | roomalias | Room alias |
System.String | token | Room token |
OdinNative.Odin.IUserData | userData | Set new OdinNative.Odin.OdinClient.UserData on room join |
Global.Action<OdinNative.Odin.Room.Room> | setup | will invoke to setup a room before adding or joining |
JoinRoom(string, IUserData, Action<Room>)
Join or create a OdinNative.Odin.Room.Room by token via a gateway
Returns
Global.Task<OdinNative.Odin.Room.Room>
: OdinNative.Odin.Room.Room or null
Parameters
Type | Name | Description |
---|---|---|
System.String | token | Room token |
OdinNative.Odin.IUserData | userData | Set new OdinNative.Odin.OdinClient.UserData on room join |
Global.Action<OdinNative.Odin.Room.Room> | setup | will invoke to setup a room before adding or joining |
UpdateUserData(IUserData)
Updates the OdinNative.Odin.OdinClient.UserData for all OdinNative.Odin.OdinClient.Rooms for the current peer
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.IUserData | userData | OdinNative.Odin.UserData |
SetPositionScale(float)
Updates the OdinNative.Odin.Room.Room.SetPositionScale(float) for all OdinNative.Odin.OdinClient.Rooms
Parameters
Type | Name | Description |
---|---|---|
System.Single | scale | Per default, the room will use a distance of 1.0 fo proximity calculation |
UpdatePosition(float, float)
Updates the OdinNative.Odin.Room.Room.UpdatePosition(System.Single,System.Single)
for all OdinNative.Odin.OdinClient.Rooms
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | x postition |
System.Single | y | y postition |
LeaveRoom(string)
Leave a joined Room
Returns
Global.Task<System.Boolean>
: true if removed from OdinNative.Odin.OdinClient.Rooms or false
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Room name |
Close()
Completly closes this Client and all OdinNative.Odin.Room.Room associated.
Dispose(bool)
On dispose will free all OdinNative.Odin.Room.Room and OdinNative.Core.Imports.NativeMethods.Shutdown
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Indicates to dispose the library |
~OdinClient()
Default deconstructor
Dispose()
On dispose will free all OdinNative.Odin.Room.Room and OdinNative.Core.Imports.NativeMethods.Shutdown