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)
Constructs a ConjureKit instance
boolIsInitialized(string configUri, out string reason)
Determines if ConjureKit and all of its modules are initialized for a specific given configuration URI. Returns also a reason for not being initialized.
boolIsInitialized(out string reason)
Determines if ConjureKit and all of its modules are initialized for the configuration currently being available or used. Returns also a reason for not being initialized.
boolIsInitialized(string configUri ="")
Determines if ConjureKit and all of its modules are initialized for the configuration currently being used or, when a URI is provided, for the given configuration URI.
voidInit(string configUri, Action onComplete =null, Action< string > onFailed =null)
Optional manual initialization ConjureKit and its modules for a non-default configUrl. Note that one must be in a Disconnected or Initializing state to call this function.
voidInit(ConjureKitConfiguration configuration, Action onComplete =null, Action< string > onFailed =null)
Optional manual initialization of ConjureKit and its modules for a given ConjureKitConfiguration object. One must be in a Disconnected or Initializing state to call this function.
voidConnect(Action< Session > onComplete =null, Action< string > onFailed =null)
Call when you want to connect to the Aukiverse with the default or current ConjureKitConfiguration. The onComplete callback is invoked with the same argument as ConjureKit.OnJoined, prior to ConjureKit.OnJoined.
voidConnect(string sessionId, Action< Session > onComplete =null, Action< string > onFailed =null)
Call when you want to connect to the Aukiverse to a specific session with the default or current ConjureKitConfiguration. The session argument can also be set to the empty string in which case a new session will be created.
voidConnect(string sessionId, string configUri, Action< Session > onComplete =null, Action< string > onFailed =null)
Call when you want to connect to the Aukiverse to a specific session with a custom ConjureKitConfiguration URI. The initialization process related to the configUri is idempotent, and will not result in re-initialization if the same URI is provided twice.
voidConnect(string sessionId, ConjureKitConfiguration configuration, Action< Session > onComplete =null, Action< string > onFailed =null)
Call when you want to connect to the Aukiverse to a specific session with a custom ConjureKitConfiguration struct. The initialization process related to the configUri is idempotent, and will not result in re-initialization if the same struct is provided twice.
boolConnectionErrorMessageIsInternetConnectivityIssue(string message)
Tells whether a string returned by the onError callback of ConjureKit.Connect() denotes an internet connectivity issue.
voidNotifyARCameraCalibrated()
Notify Auki calibration has been achieved.
voidDisconnect()
Call to disconnect from a session.
voidSetHagallFeatureConfiguration(IEnumerable< string > modules =null, IEnumerable< string > featureFlags =null)
Sets lists of required Hagall modules and feature flags.
voidSetHagallMinVersion(string version)
Sets application-side request for minimum Hagall version.
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.
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.
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.
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.
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.
uintGetNewRequestId()
(Internal) Returns a new request id.
voidRequest(uint requestId, MsgType msgType, byte[] request, Action< byte[]> onResponse, Action< string > onError)
(Internal) Sends a request to the server.
voidRequest(uint requestId, byte[] request, Action< byte[]> onResponse, Action< string > onError)
(Internal) Sends a request to the server. Deprecated version without the message type.
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
Action< Participant >OnParticipantJoined
Action< uint >OnParticipantLeft
Action< Entity >OnEntityAdded
Action< Entity >OnEntityAddedResponse
Action< uint >OnEntityDeleted
Action< ComponentUpdateBroadcast >OnComponentUpdate
Action< ComponentAddBroadcast >OnComponentAdd
Action< ComponentDeleteBroadcast >OnComponentDelete
Action< uint >OnEntityDeletedResponse
Action< Session >OnJoined
Action< Entity >OnParticipantEntityCreated
Action< Session >OnLeft
Action< State**
Action< Entity >OnEntityUpdatePose
Action< CustomMessageBroadcast >OnCustomMessageBroadcast
ActionOnApplicationBackground
ActionOnApplicationForeground

Public Functions Documentation​

function GetCredentials​

AukiCredentials GetCredentials()

Gets the current credentials.

Reimplements: Auki::ConjureKit::IConjureKit::GetCredentials

function GetNetworkQuality​

NetworkQuality GetNetworkQuality()

Returns the current NetworkQuality object.

Reimplements: Auki::ConjureKit::IConjureKit::GetNetworkQuality

function GetConfiguration​

ConjureKitConfiguration GetConfiguration()

Gets the current configuration.

Reimplements: Auki::ConjureKit::IConjureKit::GetConfiguration

function GetCameraTransform​

Transform GetCameraTransform()

Gets the camera transform.

Reimplements: Auki::ConjureKit::IConjureKit::GetCameraTransform

function GetState​

State GetState()

Gets current ConjureKit State.

Reimplements: Auki::ConjureKit::IConjureKit::GetState

function GetConjureKitBridge​

ConjureKitBridge GetConjureKitBridge()

Gets an object with common Unity callbacks.

Reimplements: Auki::ConjureKit::IConjureKit::GetConjureKitBridge

function GetSession​

Session GetSession()

Gets currently joined Session object.

Reimplements: Auki::ConjureKit::IConjureKit::GetSession

function RegisterModule​

void RegisterModule(
IConjureKitModule module
)

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

Reimplements: Auki::ConjureKit::IConjureKit::RegisterModule

function GetNowAsProtobufTimestamp​

Timestamp GetNowAsProtobufTimestamp()

Standard way of getting the current time.

Reimplements: Auki::ConjureKit::IConjureKit::GetNowAsProtobufTimestamp

function GetNowMilliseconds​

long GetNowMilliseconds()

Gets current time in milliseconds.

Reimplements: Auki::ConjureKit::IConjureKit::GetNowMilliseconds

function ConjureKit​

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

Constructs a ConjureKit instance

Parameters:

  • mainCamera Main Scene camera
  • appKey App key
  • appSecret App secret
  • logLevel Preferred log level

function IsInitialized​

bool IsInitialized(
string configUri,
out string reason
)

Determines if ConjureKit and all of its modules are initialized for a specific given configuration URI. Returns also a reason for not being initialized.

Reimplements: Auki::ConjureKit::IConjureKit::IsInitialized

function IsInitialized​

bool IsInitialized(
out string reason
)

Determines if ConjureKit and all of its modules are initialized for the configuration currently being available or used. Returns also a reason for not being initialized.

Reimplements: Auki::ConjureKit::IConjureKit::IsInitialized

function IsInitialized​

bool IsInitialized(
string configUri =""
)

Determines if ConjureKit and all of its modules are initialized for the configuration currently being used or, when a URI is provided, for the given configuration URI.

Reimplements: Auki::ConjureKit::IConjureKit::IsInitialized

function Init​

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

Optional manual initialization ConjureKit and its modules for a non-default configUrl. Note that one must be in a Disconnected or Initializing state to call this function.

Reimplements: Auki::ConjureKit::IConjureKit::Init

function Init​

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

Optional manual initialization of ConjureKit and its modules for a given ConjureKitConfiguration object. One must be in a Disconnected or Initializing state to call this function.

Reimplements: Auki::ConjureKit::IConjureKit::Init

function Connect​

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

Call when you want to connect to the Aukiverse with the default or current ConjureKitConfiguration. The onComplete callback is invoked with the same argument as ConjureKit.OnJoined, prior to ConjureKit.OnJoined.

Reimplements: Auki::ConjureKit::IConjureKit::Connect

function Connect​

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

Call when you want to connect to the Aukiverse to a specific session with the default or current ConjureKitConfiguration. The session argument can also be set to the empty string in which case a new session will be created.

Reimplements: Auki::ConjureKit::IConjureKit::Connect

function Connect​

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

Call when you want to connect to the Aukiverse to a specific session with a custom ConjureKitConfiguration URI. The initialization process related to the configUri is idempotent, and will not result in re-initialization if the same URI is provided twice.

Reimplements: Auki::ConjureKit::IConjureKit::Connect

function Connect​

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

Call when you want to connect to the Aukiverse to a specific session with a custom ConjureKitConfiguration struct. The initialization process related to the configUri is idempotent, and will not result in re-initialization if the same struct is provided twice.

Reimplements: Auki::ConjureKit::IConjureKit::Connect

function ConnectionErrorMessageIsInternetConnectivityIssue​

bool ConnectionErrorMessageIsInternetConnectivityIssue(
string message
)

Tells whether a string returned by the onError callback of ConjureKit.Connect() denotes an internet connectivity issue.

Reimplements: Auki::ConjureKit::IConjureKit::ConnectionErrorMessageIsInternetConnectivityIssue

function NotifyARCameraCalibrated​

void NotifyARCameraCalibrated()

Notify Auki calibration has been achieved.

Reimplements: Auki::ConjureKit::IConjureKit::NotifyARCameraCalibrated

function Disconnect​

void Disconnect()

Call to disconnect from a session.

Reimplements: Auki::ConjureKit::IConjureKit::Disconnect

function SetHagallFeatureConfiguration​

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

Sets lists of required Hagall modules and feature flags.

Reimplements: Auki::ConjureKit::IConjureKit::SetHagallFeatureConfiguration

function SetHagallMinVersion​

void SetHagallMinVersion(
string version
)

Sets application-side request for minimum Hagall version.

Reimplements: Auki::ConjureKit::IConjureKit::SetHagallMinVersion

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.

Reimplements: Auki::ConjureKit::IConjureKit::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. Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::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. Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::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 to an Entity in a Session. Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::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. Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::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. Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::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. Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::UpdateComponent

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.

Reimplements: Auki::ConjureKit::IConjureKit::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 Might later be replaced by Systems.

Reimplements: Auki::ConjureKit::IConjureKit::UnsubscribeToComponentType

function GetNewRequestId​

uint GetNewRequestId()

(Internal) Returns a new request id.

Reimplements: Auki::ConjureKit::IConjureKit::GetNewRequestId

function Request​

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

(Internal) Sends a request to the server.

Reimplements: Auki::ConjureKit::IConjureKit::Request

function Request​

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

(Internal) Sends a request to the server. Deprecated version without the message type.

Reimplements: Auki::ConjureKit::IConjureKit::Request

function _SendBytes​

void _SendBytes(
byte[] data
)

(Internal) Sends a message directly to Hagall.

Reimplements: Auki::ConjureKit::IConjureKit::_SendBytes

function SendCustomMessage​

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

Sends a custom message to other Participants.

Reimplements: Auki::ConjureKit::IConjureKit::SendCustomMessage

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().

Reimplements: Auki::ConjureKit::IConjureKit::MeasurePing

Public Property Documentation​

property OnInit​

Action< ConjureKitConfiguration > OnInit;

property OnParticipantJoined​

Action< Participant > OnParticipantJoined;

property OnParticipantLeft​

Action< uint > OnParticipantLeft;

property OnEntityAdded​

Action< Entity > OnEntityAdded;

property OnEntityAddedResponse​

Action< Entity > OnEntityAddedResponse;

property OnEntityDeleted​

Action< uint > OnEntityDeleted;

property OnComponentUpdate​

Action< ComponentUpdateBroadcast > OnComponentUpdate;

property OnComponentAdd​

Action< ComponentAddBroadcast > OnComponentAdd;

property OnComponentDelete​

Action< ComponentDeleteBroadcast > OnComponentDelete;

property OnEntityDeletedResponse​

Action< uint > OnEntityDeletedResponse;

property OnJoined​

Action< Session > OnJoined;

property OnParticipantEntityCreated​

Action< Entity > OnParticipantEntityCreated;

property OnLeft​

Action< Session > OnLeft;

property OnStateChanged​

Action< State > OnStateChanged;

property OnEntityUpdatePose​

Action< Entity > OnEntityUpdatePose;

property OnCustomMessageBroadcast​

Action< CustomMessageBroadcast > OnCustomMessageBroadcast;

property OnApplicationBackground​

Action OnApplicationBackground;

property OnApplicationForeground​

Action OnApplicationForeground;