Click or drag to resize

ASLObjectSendAndSetAnchorID Method

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

Namespace:  ASL
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public void SendAndSetAnchorID(
	string _anchorID
)

Parameters

_anchorID
Type: SystemString
The anchor id for this object to reference
Examples
void SomeFunction()
{
    //Claim the object first
    gameobject.GetComponent<ASL.ASLObject>().SendAndSetClaim(() =>
    {
        //Send and then set (=) the id of the AR Anchor you want this object to have. Note that the object does not move to this scale until
        //it receives the packet from the server, even though it is the  caller of this function.
        gameobject.GetComponent<ASL.ASLObject>().SendAndSetAnchorID("Your Anchor id Here");
    });
}
See Also