Auki::IConjureKit
Inherited by Auki.ConjureKit
Public Functions
Name | |
---|---|
AukiConfiguration | GetConfiguration() Gets the current configuration. |
AukiCredentials | GetCredentials() Gets the current credentials. |
State State. | |
void | RegisterModule(IAukiModule aukiModule) (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. |
uint | GetNewRequestId() (Internal) Returns a new request id. |
void | Request(uint requestId, byte[] request, Action< byte[]> onResponse, Action< string > onError) (Internal) Sends a request to the server. |
void | SendMessage(byte[] data) (Internal) Sends a message directly to Hagall. |
bool | SendCustomMessage(uint[] participantIds, byte[] data) Sends a custom message to other Participants. |
void | SetParticipantPoseUpdatesPerSecond(int participantPoseUpdatesPerSecond) Sets the amount of Participant Pose updates that will be sent per second. |
int | GetParticipantPoseUpdatesPerSecond() Gets the amount of set Participant Pose updates per second. |
void | NotifyARCameraCalibrated() Notify Auki that Session calibration has been achieved. |
AukiUnityBridge | GetUnityBridge() Gets an object with common Unity callbacks. |
SceneRig | GetSceneRig() Gets a SceneRig struct with Unity AR-related objects. |
Session | GetSession() Gets currently joined Session object. |
void | DeleteEntity(uint entityId, Action onComplete) Call when you want to delete an Entity from the current Session. |
void | AddEntity(Pose pose, Action< Entity > onComplete, Action< string > onError) Call when you want to add an Entity to the current Session. |
void | AddEntity(Pose pose, bool persistent, Action< Entity > onComplete, Action< string > onError) Call when you want to add an Entity to the current Session. |
bool | UpdateEntityPose(uint entityId, Pose pose) Call when you want to update an Entity's Pose. |
void | Connect(string sessionId ="", Action< string > onFailed =null) Call when you want to connect to the Aukiverse. |
void | Disconnect() Call when you want to disconnect from the Aukiverse. |
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. |
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< 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. |
Action | OnLeft 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. |
Action | OnApplicationBackground Called when the application was sent to the background. |
Action | OnApplicationForeground Called when the application was sent to the foreground. |
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. |
Public Functions Documentation
function GetConfiguration
AukiConfiguration GetConfiguration()
Gets the current configuration.
Return: AukiConfiguration struct
function GetCredentials
AukiCredentials GetCredentials()
Gets the current credentials.
Return: AukiCredentials struct
function GetState
State GetState()
Gets current ConjureKit State.
Return: ConjureKit State
function RegisterModule
void RegisterModule(
IAukiModule aukiModule
)
(Internal) Registers IAukiModule-conforming objects so they get updated and receive messages.
Parameters:
- aukiModule 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 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 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 NotifyARCameraCalibrated
void NotifyARCameraCalibrated()
Notify Auki that Session calibration has been achieved.
function GetUnityBridge
AukiUnityBridge GetUnityBridge()
Gets an object with common Unity callbacks.
Return: AukiUnityBridge object
function GetSceneRig
SceneRig GetSceneRig()
Gets a SceneRig struct with Unity AR-related objects.
Return: SceneRig struct
function GetSession
Session GetSession()
Gets currently joined Session object.
Return: Session object or null
when not in a Session
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 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 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 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 Disconnect
void Disconnect()
Call when you want to disconnect from the Aukiverse.
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 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 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 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 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.
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
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
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: Participant Entity 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.
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