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.
NetworkQualityGetNetworkQuality()
Returns the current NetworkQuality object.
ConjureKitConfigurationGetConfiguration()
Gets the current configuration.
TransformGetCameraTransform()
Gets the camera transform
State State.
ConjureKitBridgeGetConjureKitBridge()
Gets an object with common Unity callbacks.
SessionGetSession()
Gets currently joined Session object.
voidRegisterModule(IConjureKitModule module)
(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.
ConjureKit(Transform mainCamera, string appKey, string appSecret, AukiDebug.LogLevel logLevel =AukiDebug.LogLevel.DEBUG)
voidInit(string configUri, Action onComplete =null, Action< string > onFailed =null)
voidInit(ConjureKitConfiguration configuration, Action onComplete =null, Action< string > onFailed =null)
voidConnect(Action< Session > onComplete =null, Action< string > onFailed =null)
voidConnect(string sessionId, Action< Session > onComplete =null, Action< string > onFailed =null)
voidConnect(string sessionId, string configUri, Action< Session > onComplete =null, Action< string > onFailed =null)
voidConnect(string sessionId, ConjureKitConfiguration configuration, Action< Session > onComplete =null, Action< string > onFailed =null)
boolConnectionErrorMessageIsInternetConnectivityIssue(string message)
voidNotifyARCameraCalibrated()
Notify Auki calibration has been achieved.
voidDisconnect()
Call when you want to disconnect from the Aukiverse.
voidSetHagallFeatureConfiguration(IEnumerable< string > modules =null, IEnumerable< string > featureFlags =null)
Sets lists of required Hagall modules and feature flags.
voidAddComponentType(string componentTypeName, Action< uint > onComplete, Action< string > onError =null)
Low-level ECS method to add a component type to the Session. This method is obsolete and is scheduled for deletion. It is replaced by Session::AddComponentType().
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. This method is obsolete and is scheduled for deletion. It is replaced by Session::GetComponentTypeId().
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. This method is obsolete and is scheduled for deletion. It is replaced by Session::GetComponentTypeName().
voidAddComponent(uint componentTypeId, uint entityId, byte[] data, Action onComplete, Action< string > onError =null)
Low-level ECS method to add a component type to the Session. This method is obsolete and is scheduled for deletion. It is replaced by Session::AddComponent().
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. This method is obsolete and is scheduled for deletion. It is replaced by Session::DeleteComponent().
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. This method is obsolete and is scheduled for deletion. It is replaced by Session::GetComponents().
boolUpdateComponent(uint componentTypeId, uint entityId, byte[] data)
Low-level ECS method to update a component on an Entity in a Session. This method is obsolete and is scheduled for deletion. It is replaced by Session::UpdateComponent().
voidSubscribeToComponentType(uint componentTypeId, Action onComplete, Action< string > onError =null)
Low-level ECS method to subscribe to updates of a component type This method is obsolete and is scheduled for deletion. It is replaced by Session::SubscribeToComponentType().
voidUnsubscribeToComponentType(uint componentTypeId, Action onComplete, Action< string > onError =null)
Low-level ECS method to unsubscribe to updates of a component type This method is obsolete and is scheduled for deletion. It is replaced by Session::UnsubscribeToComponentType().
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.
void_SendBytes(byte[] data)
(Internal) Sends a message directly to Hagall.
boolSendCustomMessage(uint[] participantIds, byte[] data)
Sends a custom message to other Participants.
voidMeasurePing(Action< double > onComplete =null, Action< string > onError =null)
Perform a millisecond ping measurement of the current session. The measurement is aggregated to ConjureKit's NetworkQuality object, accessible via ConjureKit.GetNetworkQuality().

Public Properties

Name
Action< ConjureKitConfiguration >OnInit
Called after successful initialization or re-initialization of ConjureKit and its modules. The argument passed to OnInit is the configuration for which initialization took place.
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 GetNetworkQuality

NetworkQuality GetNetworkQuality()

Returns the current NetworkQuality object.

Return: NetworkQuality object

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 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 module
)

(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 ConjureKit

ConjureKit(
Transform mainCamera,
string appKey,
string appSecret,
AukiDebug.LogLevel logLevel =AukiDebug.LogLevel.DEBUG
)

function Init

void Init(
string configUri,
Action onComplete =null,
Action< string > onFailed =null
)

function Init

void Init(
ConjureKitConfiguration configuration,
Action onComplete =null,
Action< string > onFailed =null
)

function Connect

void Connect(
Action< Session > onComplete =null,
Action< string > onFailed =null
)

function Connect

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

function Connect

void Connect(
string sessionId,
string configUri,
Action< Session > onComplete =null,
Action< string > onFailed =null
)

function Connect

void Connect(
string sessionId,
ConjureKitConfiguration configuration,
Action< Session > onComplete =null,
Action< string > onFailed =null
)

function ConnectionErrorMessageIsInternetConnectivityIssue

bool ConnectionErrorMessageIsInternetConnectivityIssue(
string message
)

function NotifyARCameraCalibrated

void NotifyARCameraCalibrated()

Notify Auki calibration has been achieved.

function Disconnect

void Disconnect()

Call when you want to disconnect from the Aukiverse.

function SetHagallFeatureConfiguration

void SetHagallFeatureConfiguration(
IEnumerable< string > modules =null,
IEnumerable< string > featureFlags =null
)

Sets lists of required Hagall modules and feature flags.

Parameters:

  • modules List of required Hagall modules, default is null for none
  • featureFlags List of required Hagall feature flags, default is null for none

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. This method is obsolete and is scheduled for deletion. It is replaced by Session::AddComponentType().

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. This method is obsolete and is scheduled for deletion. It is replaced by Session::GetComponentTypeId().

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. This method is obsolete and is scheduled for deletion. It is replaced by Session::GetComponentTypeName().

function AddComponent

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

Low-level ECS method to add a component type to the Session. This method is obsolete and is scheduled for deletion. It is replaced by Session::AddComponent().

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. This method is obsolete and is scheduled for deletion. It is replaced by Session::DeleteComponent().

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. This method is obsolete and is scheduled for deletion. It is replaced by Session::GetComponents().

function UpdateComponent

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

Low-level ECS method to update a component on an Entity in a Session. This method is obsolete and is scheduled for deletion. It is replaced by Session::UpdateComponent().

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

function SubscribeToComponentType

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

Low-level ECS method to subscribe to updates of a component type This method is obsolete and is scheduled for deletion. It is replaced by Session::SubscribeToComponentType().

function UnsubscribeToComponentType

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

Low-level ECS method to unsubscribe to updates of a component type This method is obsolete and is scheduled for deletion. It is replaced by Session::UnsubscribeToComponentType().

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 _SendBytes

void _SendBytes(
byte[] data
)

(Internal) Sends a message directly to Hagall.

Parameters:

  • data

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 MeasurePing

void MeasurePing(
Action< double > onComplete =null,
Action< string > onError =null
)

Perform a millisecond ping measurement of the current session. The measurement is aggregated to ConjureKit's NetworkQuality object, accessible via ConjureKit.GetNetworkQuality().

Parameters:

  • onComplete Callback on success, invoked with millisecond amount
  • onError Callback on failure

Public Property Documentation

property OnInit

Action< ConjureKitConfiguration > OnInit;

Called after successful initialization or re-initialization of ConjureKit and its modules. The argument passed to OnInit is the configuration for which initialization took place.

Return: Joining Participant object

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.