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 | |
---|---|
AukiCredentials | GetCredentials() Gets the current credentials. |
NetworkQuality | GetNetworkQuality() Returns the current NetworkQuality object. |
ConjureKitConfiguration | GetConfiguration() Gets the current configuration. |
Transform | GetCameraTransform() Gets the camera transform. |
State State. | |
ConjureKitBridge | GetConjureKitBridge() Gets an object with common Unity callbacks. |
Session | GetSession() Gets currently joined Session object. |
void | RegisterModule(IConjureKitModule module) (Internal) Registers IAukiModule-conforming objects so they get updated and receive messages. |
Timestamp | GetNowAsProtobufTimestamp() Standard way of getting the current time. |
long | GetNowMilliseconds() Gets current time in milliseconds. |
ConjureKit(Transform mainCamera, string appKey, string appSecret, AukiDebug.LogLevel logLevel =AukiDebug.LogLevel.DEBUG) Constructs a ConjureKit instance | |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
bool | ConnectionErrorMessageIsInternetConnectivityIssue(string message) Tells whether a string returned by the onError callback of ConjureKit.Connect() denotes an internet connectivity issue. |
void | NotifyARCameraCalibrated() Notify Auki calibration has been achieved. |
void | Disconnect() Call to disconnect from a session. |
void | SetHagallFeatureConfiguration(IEnumerable< string > modules =null, IEnumerable< string > featureFlags =null) Sets lists of required Hagall modules and feature flags. |
void | SetHagallMinVersion(string version) Sets application-side request for minimum Hagall version. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
uint | GetNewRequestId() (Internal) Returns a new request id. |
void | Request(uint requestId, MsgType msgType, byte[] request, Action< byte[]> onResponse, Action< string > onError) (Internal) Sends a request to the server. |
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. |
void | _SendBytes(byte[] data) (Internal) Sends a message directly to Hagall. |
bool | SendCustomMessage(uint[] participantIds, byte[] data) Sends a custom message to other Participants. |
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(). |
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 |
Action | OnApplicationBackground |
Action | OnApplicationForeground |
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;