ASLObject Class |
Namespace: ASL
The ASLObject type exposes the following members.
Name | Description | |
---|---|---|
m_AnchorID | The anchor point for AR applications for this object | |
m_ASLGameObjectCreatedCallback | Callback to be executed after an ASL Object is instantiated - this callback is only ever executed by the creator of the object | |
m_ClaimCallback | Callback to be executed once a player successfully claims this object | |
m_ClaimCancelledRecoveryCallback | Callback to be executed when a claim is rejected | |
m_FloatCallback | Callback to be executed when a user passes a float value | |
m_Id | The unique id of this object. This id is synced with all other players | |
m_Mine | Flag indicating whether or not this player currently owns this object or not | |
m_OutstandingClaimCallbackCount | The number of outstanding claims for this object. | |
m_OutStandingClaims | Flag indicating whether or not there are any outstanding (not recognized by other users) claims on this object | |
m_PostDownloadFunction | Callback to be executed after a Texture2D download is successful | |
m_ReleaseFunction | Callback to be executed when an object is released. After the callback is executed, it will be set to null to prevent multiple callback's from stacking
on this object after each release. To ensure you aren't attempting to execute this callback after its been set to null, make sure you always reset the callback
when you obtain it if is important to have a release function of some sort | |
m_ResolvedCloudAnchor | Flag indicating if the cloud anchor that is attempting to be resolved has been resolved yet or not |
Name | Description | |
---|---|---|
_LocallyRemoveClaimCallbacks |
Removes any outstanding claim callbacks for this object as well as sets the outstanding claim flag to false
| |
_LocallyRemoveReleaseCallback |
This function will only update the local player, not all players. Removes any release functions that may be attached to this object
| |
_LocallySetAnchorID |
This function should NOT be called by the user as it will only update the local player, it will not update all players. Sets the anchor point for this ASL Object.
This function is used when an incoming packet from the relay server needs to update the anchor point of this objects.
| |
_LocallySetClaim |
This function should NOT be called by the user as it will only update the local player, it will not update all players. Claim the object as our own or give up the object.
This function is used when an incoming packet from the relay server needs to update the claim of this objects.
| |
_LocallySetClaimCancelledRecoveryCallback |
This function will only update the local player, not all players. Sets the claim cancelled recovery callback function for this object.
| |
_LocallySetCloudAnchorResolved |
Locally sets the flag that allows this object to continue processing the cloud anchor
| |
_LocallySetFloatCallback |
This function will only update the local player, not all players. Sets the float callback function for this object.
| |
_LocallySetGameObjectCreatedCallback |
This function will only update the local player, not all players. Sets callback function that will be called upon object creation for this object.
| |
_LocallySetID |
This function should NOT be called by the user as it will only update the local player, it will not update all players. Set the unique ID of this object.
This function is used when an incoming packet from the relay server needs to update the id of this object, this happens when the object is created.
| |
_LocallySetPostDownloadFunction |
This function will only update the local player, not all players. It sets the function to be called after an image as been downloaded from the server
| |
_LocallySetReleaseFunction |
This function will only update the local player, not all players. Set the release function to be executed upon this object's release (when claim switches to false)
| |
Awake | Function that is executed upon object initialization | |
DeleteObject |
Deletes this object for all users
| |
OnDestroy |
Gets called right before an object is destroyed. Used to remove this object from the dictionary
| |
SendAndIncrementLocalPosition |
Sends and adds to the local transform of this object for all users
| |
SendAndIncrementLocalRotation |
Sends and adds to the local rotation of this object for all users
| |
SendAndIncrementLocalScale |
Send and add to the local scale of this object for all users
| |
SendAndIncrementWorldPosition |
Sends and adds to the world transform of this object for all users
| |
SendAndIncrementWorldRotation |
Sends and adds to the world rotation of this object for all users
| |
SendAndIncrementWorldScale |
Send and add to the world scale of this object for all users. To set world scale, the object must be de-parented
and then have its scale set, then re-parented. It is not advised to use this function as its behavior, especially
when the parent object is rotated, can cause strange, though correct, behavior.
| |
SendAndSetAnchorID |
Send and set the AR anchor id for this object for all users. Normally, you will not need to call this function
as creating an AR Anchor is done through CreateARCoreCloudAnchor(NullablePose, ASLObject, ASLObjectPostCreateCloudAnchorFunction, Boolean, Boolean)
But if for some reason you want to change Anchors, you can do so via this function
| |
SendAndSetClaim(ASLObjectClaimCallback) |
Claims an object for the user until someone steals it or the passed in claim time is reached. Changing the time you hold onto an object and
deciding to reset or not the current amount of time you have held it is generally not recommended, but does have occasional applications
| |
SendAndSetClaim(ASLObjectClaimCallback, GameLiftManagerOpFunctionCallback) |
Claims an object for the user until someone steals it or the passed in claim time is reached. Changing the time you hold onto an object and
deciding to reset or not the current amount of time you have held it is generally not recommended, but does have occasional applications
| |
SendAndSetClaim(ASLObjectClaimCallback, Int32, Boolean, GameLiftManagerOpFunctionCallback) |
Claims an object for the user until someone steals it or the passed in claim time is reached. Changing the time you hold onto an object and
deciding to reset or not the current amount of time you have held it is generally not recommended, but does have occasional applications
| |
SendAndSetLocalPosition |
Sends and sets the local transform for this object for all users
| |
SendAndSetLocalRotation |
Sends and sets the local rotation for this object for all users
| |
SendAndSetLocalScale |
Send and set the local scale for this object for all users
| |
SendAndSetObjectColor |
Send and sets this objects color for the user who called this function and for all other players
| |
SendAndSetTag |
Send and set the tag for this object for all users. As Unity does not all users to create tags at runtime, all players must have this tag defined
| |
SendAndSetTexture2D | Sends a Texture2D to other users and then calls the sent function once it is successfully recreated | |
SendAndSetWorldPosition |
Sends and sets the world position for this object for all users
| |
SendAndSetWorldRotation |
Sends and sets the world rotation for this object for all users
| |
SendAndSetWorldScale |
Send and set the world scale for this object for all users. To set world scale, the object must be de-parented
and then have its scale set, then re-parented. It is not advised to use this function as its behavior, especially
when the parent object is rotated, can cause strange, though correct, behavior.
| |
SendARPlaneAsMesh |
Send and set an AR Plane's vertices on a Mesh.
The Vector3 array of vertices of the AR Plane mesh to be sent to others | |
SendCloudAnchorToResolve |
Used by ASLHelper to send information about the Cloud Anchor that was just created to all users so that they can resolve it and handle it accordingly on their end
| |
SendFloatArray |
Send and set up to a maximum of 1000 float value(s). The float value(s) will then be processed by a user defined function.
If you need to send more than 1000 floats with this object, or you need this object to perform more than one action with this function,
then a switch statement is a good way to implement what you need.
| |
Start | Function that is executed upon object start | |
Update |
Currently counts down this object's claim time and releases the object back to the relay server after the specified amount of time has passed.
Update is called once per frame
|
Name | Description | |
---|---|---|
m_ClaimReleaseTimer | How long a claim has been active on this object. This gets reset, unless otherwise specified, every time a player claims an object | |
m_ClaimTime | How long a claim can be held for this object. This gets set every time a player claims an object | |
m_HaventSetACloudAnchor |
Flag indicating if this ASL object has been used to set/send a cloud anchor. Since cloud anchors are asynchronous, this prevents an ASL object from
potentially being used set to multiple anchors and causing errors once those anchors are created
|