Click or drag to resize

ASLObject Methods

The ASLObject type exposes the following members.

Methods
  NameDescription
Public method_LocallyRemoveClaimCallbacks
Removes any outstanding claim callbacks for this object as well as sets the outstanding claim flag to false
Public method_LocallyRemoveReleaseCallback
This function will only update the local player, not all players. Removes any release functions that may be attached to this object
Public method_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.
Public method_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.
Public method_LocallySetClaimCancelledRecoveryCallback
This function will only update the local player, not all players. Sets the claim cancelled recovery callback function for this object.
Public method_LocallySetCloudAnchorResolved
Locally sets the flag that allows this object to continue processing the cloud anchor
Public methodCode example_LocallySetFloatCallback
This function will only update the local player, not all players. Sets the float callback function for this object.
Public method_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.
Public method_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.
Public method_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
Public method_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)
Private methodAwake
Function that is executed upon object initialization
Public methodCode exampleDeleteObject
Deletes this object for all users
Private methodOnDestroy
Gets called right before an object is destroyed. Used to remove this object from the dictionary
Public methodCode exampleSendAndIncrementLocalPosition
Sends and adds to the local transform of this object for all users
Public methodCode exampleSendAndIncrementLocalRotation
Sends and adds to the local rotation of this object for all users
Public methodCode exampleSendAndIncrementLocalScale
Send and add to the local scale of this object for all users
Public methodCode exampleSendAndIncrementWorldPosition
Sends and adds to the world transform of this object for all users
Public methodCode exampleSendAndIncrementWorldRotation
Sends and adds to the world rotation of this object for all users
Public methodCode exampleSendAndIncrementWorldScale
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.
Public methodCode exampleSendAndSetAnchorID
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
Public methodSendAndSetClaim(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
Public methodSendAndSetClaim(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
Public methodCode exampleSendAndSetClaim(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
Public methodCode exampleSendAndSetLocalPosition
Sends and sets the local transform for this object for all users
Public methodCode exampleSendAndSetLocalRotation
Sends and sets the local rotation for this object for all users
Public methodCode exampleSendAndSetLocalScale
Send and set the local scale for this object for all users
Public methodCode exampleSendAndSetObjectColor
Send and sets this objects color for the user who called this function and for all other players
Public methodCode exampleSendAndSetTag
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
Public methodCode exampleSendAndSetTexture2D
Sends a Texture2D to other users and then calls the sent function once it is successfully recreated
Public methodCode exampleSendAndSetWorldPosition
Sends and sets the world position for this object for all users
Public methodCode exampleSendAndSetWorldRotation
Sends and sets the world rotation for this object for all users
Public methodCode exampleSendAndSetWorldScale
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.
Public methodSendARPlaneAsMesh
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
Public methodSendCloudAnchorToResolve
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
Public methodCode exampleSendFloatArray
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.
Private methodStart
Function that is executed upon object start
Private methodUpdate
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
Top
See Also