Skip to main content

Auki::ConjureKit::ConjureKit

ConjureKit main module - provides basic networking and can be used in combination with other modules to provide more functionality.

Inherits from Auki.ConjureKit.IConjureKit

Public Functions

Name
AukiCredentialsGetCredentials()
Gets the current credentials.
ConjureKitConfigurationGetConfiguration()
Gets the current configuration.
TransformGetCameraTransform()
Gets the camera transform
State State.
ConjureKit(ConjureKitConfiguration configuration, Transform mainCamera, string appKey, string appSecret, AukiDebug.LogLevel logLevel =AukiDebug.LogLevel.INFO)
voidSetParticipantPoseUpdatesPerSecond(int participantPoseUpdatesPerSecond)
Sets the amount of Participant Pose updates that will be sent per second.
intGetParticipantPoseUpdatesPerSecond()
Gets the amount of set Participant Pose updates per second.
ConjureKitBridgeGetConjureKitBridge()
Gets an object with common Unity callbacks.
SessionGetSession()
Gets currently joined Session object.
voidRegisterModule(IConjureKitModule conjureKitModule)
(Internal) Registers IAukiModule-conforming objects so they get updated and receive messages.
TimestampGetNowAsProtobufTimestamp()
Standard way of getting the current time.
longGetNowMilliseconds()
Gets current time in milliseconds.
uintGetNewRequestId()
(Internal) Returns a new request id.
voidRequest(uint requestId, byte[] request, Action< byte[]> onResponse, Action< string > onError)
(Internal) Sends a request to the server.
voidSendMessage(byte[] data)
(Internal) Sends a message directly to Hagall.
voidAddEntity(Pose pose, Action< Entity > onComplete, Action< string > onError)
Call when you want to add an Entity to the current Session.
voidAddEntity(Pose pose, bool persistent, Action< Entity > onComplete, Action< string > onError)
Call when you want to add an Entity to the current Session.
voidDeleteEntity(uint entityId, Action onComplete)
Call when you want to delete an Entity from the current Session.
boolUpdateEntityPose(uint entityId, Pose pose)
Call when you want to update an Entity's Pose.
boolSendCustomMessage(uint[] participantIds, byte[] data)
Sends a custom message to other Participants.
voidConnect(string sessionId ="", Action< string > onFailed =null)
Call when you want to connect to the Aukiverse.
voidNotifyARCameraCalibrated()
Notify Auki calibration has been achieved.
voidDisconnect()
Call when you want to disconnect from the Aukiverse.
voidGetComponentTypeId(string componentTypeName, Action< uint > onComplete, Action< string > onError =null)
Low-level ECS method to get the id of a component type by name from a Session. Might later be replaced by Systems.
voidGetComponentTypeName(uint componentTypeId, Action< string > onComplete, Action< string > onError =null)
Low-level ECS method to get the name of a component type by id from a Hagall Session. Might later be replaced by Systems.
voidAddComponentType(string componentTypeName, Action< uint > onComplete, Action< string > onError =null)
Low-level ECS method to add a component type to the Session. Might later be replaced by Systems.
voidAddComponent(uint componentTypeId, uint entityId, byte[] data, Action onComplete, Action< string > onError =null)
Low-level ECS method to add a component to an Entity in a Session. Might later be replaced by Systems.
voidDeleteComponent(uint componentTypeId, uint entityId, Action onComplete, Action< string > onError =null)
Low-level ECS method to delete a component from an Entity in a Session. Might later be replaced by Systems.
voidGetComponents(uint componentTypeId, Action< List< EntityComponent >> onComplete, Action< string > onError =null)
Low-level ECS method to get all components of a component type in a Session. Might later be replaced by Systems.
voidSubscribeToComponentType(uint componentTypeId, Action onComplete, Action< string > onError =null)
Low-level ECS method to subscribe to updates of a component type Might later be replaced by Systems.
voidUnsubscribeToComponentType(uint componentTypeId, Action onComplete, Action< string > onError =null)
Low-level ECS method to unsubscribe to updates of a component type Might later be replaced by Systems.
boolUpdateComponent(uint componentTypeId, uint entityId, byte[] data)
Low-level ECS method to update a component on an Entity in a Session. Might later be replaced by Systems.
ConjureKitBridgeMakeConjureKitBridge(Action onGUI, Action< bool > onApplicationPause, Action onDestroy, Action onUpdate)

Public Properties

Name
Action< Participant >OnParticipantJoined
Called when a new Participant joins the Session.
Action< uint >OnParticipantLeft
Called when a Participant left the Session.
Action< Entity >OnEntityAdded
Called when an Entity is added to the Session.
Action< Entity >OnEntityAddedResponse
Called when an Entity add request was successful.
Action< uint >OnEntityDeleted
Called when an Entity was deleted from the Session.
Action< ComponentUpdateBroadcast >OnComponentUpdate
Low-level ECS callback method that is called when a component update is broadcast from a Session. Might later be replaced by Systems.
Action< ComponentAddBroadcast >OnComponentAdd
Low-level ECS callback method that is called when a component is added to an Entity in a Session. Might later be replaced by Systems.
Action< ComponentDeleteBroadcast >OnComponentDelete
Low-level ECS callback method that is called when a component is deleted from an Entity in a Session. Might later be replaced by Systems.
Action< uint >OnEntityDeletedResponse
Called when an Entity delete request was successful.
Action< Session >OnJoined
Called when a Session was joined.
Action< Entity >OnParticipantEntityCreated
Called after calibration or immediately after joining a Session if this Participant is its host.
ActionOnLeft
Called when a Session was left.
Action< State state has changed.
Action< Entity, long >OnEntityUpdatePoseWithTimestamp
Called when an Entity's Pose has been updated.
Action< Entity >OnEntityUpdatePose
Called when an Entity's Pose has been updated.
Action< CustomMessageBroadcast >OnCustomMessageBroadcast
Called when a custom message broadcast has been received.
ActionOnApplicationBackground
Called when the application was sent to the background.
ActionOnApplicationForeground
Called when the application was sent to the foreground.

Public Functions Documentation

function GetCredentials

AukiCredentials GetCredentials()

Gets the current credentials.

Return: AukiCredentials struct

function GetConfiguration

ConjureKitConfiguration GetConfiguration()

Gets the current configuration.

Return: AukiConfiguration struct

function GetCameraTransform

Transform GetCameraTransform()

Gets the camera transform

Return: Transform

function GetState

State GetState()

Gets current ConjureKit State.

Return: ConjureKit State

function ConjureKit

ConjureKit(
ConjureKitConfiguration configuration,
Transform mainCamera,
string appKey,
string appSecret,
AukiDebug.LogLevel logLevel =AukiDebug.LogLevel.INFO
)

function SetParticipantPoseUpdatesPerSecond

void SetParticipantPoseUpdatesPerSecond(
int participantPoseUpdatesPerSecond
)

Sets the amount of Participant Pose updates that will be sent per second.

Parameters:

  • participantPoseUpdatesPerSecond An integer value representing Participant Pose updates per second

function GetParticipantPoseUpdatesPerSecond

int GetParticipantPoseUpdatesPerSecond()

Gets the amount of set Participant Pose updates per second.

Return: Integer value of Participant Pose updates per second that will be sent

function GetConjureKitBridge

ConjureKitBridge GetConjureKitBridge()

Gets an object with common Unity callbacks.

Return: ConjureKitBridge object

function GetSession

Session GetSession()

Gets currently joined Session object.

Return: Session object or null when not in a Session

function RegisterModule

void RegisterModule(
IConjureKitModule conjureKitModule
)

(Internal) Registers IAukiModule-conforming objects so they get updated and receive messages.

Parameters:

  • conjureKitModule Module to be registered

function GetNowAsProtobufTimestamp

Timestamp GetNowAsProtobufTimestamp()

Standard way of getting the current time.

Return: Current time

function GetNowMilliseconds

long GetNowMilliseconds()

Gets current time in milliseconds.

Return: Current time in milliseconds

function GetNewRequestId

uint GetNewRequestId()

(Internal) Returns a new request id.

Return: New request id

function Request

void Request(
uint requestId,
byte[] request,
Action< byte[]> onResponse,
Action< string > onError
)

(Internal) Sends a request to the server.

Parameters:

  • requestId Request id
  • request Byte array-encoded request
  • onResponse Callback on success
  • onError Callback on failure

function SendMessage

void SendMessage(
byte[] data
)

(Internal) Sends a message directly to Hagall.

Parameters:

  • data

function AddEntity

void AddEntity(
Pose pose,
Action< Entity > onComplete,
Action< string > onError
)

Call when you want to add an Entity to the current Session.

Parameters:

  • pose Desired Pose of Entity
  • onComplete Callback on success
  • onError Callback on error

function AddEntity

void AddEntity(
Pose pose,
bool persistent,
Action< Entity > onComplete,
Action< string > onError
)

Call when you want to add an Entity to the current Session.

Parameters:

  • pose Desired Pose of Entity
  • persistent true if the Entity should persist when you've left the Session, false if it should be removed
  • onComplete Callback on success
  • onError Callback on error

function DeleteEntity

void DeleteEntity(
uint entityId,
Action onComplete
)

Call when you want to delete an Entity from the current Session.

Parameters:

  • entityId Entity id
  • onComplete Callback on success

function UpdateEntityPose

bool UpdateEntityPose(
uint entityId,
Pose pose
)

Call when you want to update an Entity's Pose.

Parameters:

  • entityId Entity id
  • pose New Pose

Return: Strue on success, false on failure

function SendCustomMessage

bool SendCustomMessage(
uint[] participantIds,
byte[] data
)

Sends a custom message to other Participants.

Parameters:

  • participantIds An array of Participant Ids
  • data An array of custom data

Return: Success or failure

function Connect

void Connect(
string sessionId ="",
Action< string > onFailed =null
)

Call when you want to connect to the Aukiverse.

Parameters:

  • sessionId Desired Session id
  • onFailed Callback on failure

function NotifyARCameraCalibrated

void NotifyARCameraCalibrated()

Notify Auki calibration has been achieved.

function Disconnect

void Disconnect()

Call when you want to disconnect from the Aukiverse.

function GetComponentTypeId

void GetComponentTypeId(
string componentTypeName,
Action< uint > onComplete,
Action< string > onError =null
)

Low-level ECS method to get the id of a component type by name from a Session. Might later be replaced by Systems.

function GetComponentTypeName

void GetComponentTypeName(
uint componentTypeId,
Action< string > onComplete,
Action< string > onError =null
)

Low-level ECS method to get the name of a component type by id from a Hagall Session. Might later be replaced by Systems.

function AddComponentType

void AddComponentType(
string componentTypeName,
Action< uint > onComplete,
Action< string > onError =null
)

Low-level ECS method to add a component type to the Session. Might later be replaced by Systems.

function AddComponent

void AddComponent(
uint componentTypeId,
uint entityId,
byte[] data,
Action onComplete,
Action< string > onError =null
)

Low-level ECS method to add a component to an Entity in a Session. Might later be replaced by Systems.

function DeleteComponent

void DeleteComponent(
uint componentTypeId,
uint entityId,
Action onComplete,
Action< string > onError =null
)

Low-level ECS method to delete a component from an Entity in a Session. Might later be replaced by Systems.

function GetComponents

void GetComponents(
uint componentTypeId,
Action< List< EntityComponent >> onComplete,
Action< string > onError =null
)

Low-level ECS method to get all components of a component type in a Session. Might later be replaced by Systems.

function SubscribeToComponentType

void SubscribeToComponentType(
uint componentTypeId,
Action onComplete,
Action< string > onError =null
)

Low-level ECS method to subscribe to updates of a component type Might later be replaced by Systems.

function UnsubscribeToComponentType

void UnsubscribeToComponentType(
uint componentTypeId,
Action onComplete,
Action< string > onError =null
)

Low-level ECS method to unsubscribe to updates of a component type Might later be replaced by Systems.

function UpdateComponent

bool UpdateComponent(
uint componentTypeId,
uint entityId,
byte[] data
)

Low-level ECS method to update a component on an Entity in a Session. Might later be replaced by Systems.

Return: bool indicating success or failure of putting update message on send queue

function MakeConjureKitBridge

static ConjureKitBridge MakeConjureKitBridge(
Action onGUI,
Action< bool > onApplicationPause,
Action onDestroy,
Action onUpdate
)

Public Property Documentation

property OnParticipantJoined

Action< Participant > OnParticipantJoined;

Called when a new Participant joins the Session.

Return: Joining Participant object

property OnParticipantLeft

Action< uint > OnParticipantLeft;

Called when a Participant left the Session.

Return: Id of Participant that left

property OnEntityAdded

Action< Entity > OnEntityAdded;

Called when an Entity is added to the Session.

Return: Added Entity object

Note: This event is triggered only for entities created by other participants in the session.

property OnEntityAddedResponse

Action< Entity > OnEntityAddedResponse;

Called when an Entity add request was successful.

Return: Added Entity object

property OnEntityDeleted

Action< uint > OnEntityDeleted;

Called when an Entity was deleted from the Session.

Return: Id of deleted Entity

Note: This event is triggered only for entities deleted by other participants in the session.

property OnComponentUpdate

Action< ComponentUpdateBroadcast > OnComponentUpdate;

Low-level ECS callback method that is called when a component update is broadcast from a Session. Might later be replaced by Systems.

Return: ComponentUpdateBroadcast

property OnComponentAdd

Action< ComponentAddBroadcast > OnComponentAdd;

Low-level ECS callback method that is called when a component is added to an Entity in a Session. Might later be replaced by Systems.

Return: ComponentAddBroadcast

property OnComponentDelete

Action< ComponentDeleteBroadcast > OnComponentDelete;

Low-level ECS callback method that is called when a component is deleted from an Entity in a Session. Might later be replaced by Systems.

Return: ComponentDeleteBroadcast

property OnEntityDeletedResponse

Action< uint > OnEntityDeletedResponse;

Called when an Entity delete request was successful.

Return: Id of deleted Entity

property OnJoined

Action< Session > OnJoined;

Called when a Session was joined.

property OnParticipantEntityCreated

Action< Entity > OnParticipantEntityCreated;

Called after calibration or immediately after joining a Session if this Participant is its host.

Return: ParticipantEntity object

property OnLeft

Action OnLeft;

Called when a Session was left.

property OnStateChanged

Action< State > OnStateChanged;

Called when the ConjureKit state has changed.

Return: New ConjureKit state

property OnEntityUpdatePoseWithTimestamp

Action< Entity, long > OnEntityUpdatePoseWithTimestamp;

Called when an Entity's Pose has been updated.

Return: Entity which got updated and timestamp for when it happened

property OnEntityUpdatePose

Action< Entity > OnEntityUpdatePose;

Called when an Entity's Pose has been updated.

property OnCustomMessageBroadcast

Action< CustomMessageBroadcast > OnCustomMessageBroadcast;

Called when a custom message broadcast has been received.

Return: CustomMessageBroadcast object

property OnApplicationBackground

Action OnApplicationBackground;

Called when the application was sent to the background.

property OnApplicationForeground

Action OnApplicationForeground;

Called when the application was sent to the foreground.