Click or drag to resize

ASLHelperCreateARCoreCloudAnchor Method

Creates an ARCore Cloud Anchor at the location the user tapped and passed into it. This function can be used to set the world origin or just a normal cloud anchor. It is advisable to only have 1 user in your application set cloud anchors.

Namespace:  ASL
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public static void CreateARCoreCloudAnchor(
	Pose? _hitResults,
	ASLObject _anchorObjectPrefab = null,
	ASLObjectPostCreateCloudAnchorFunction _myPostCreateCloudAnchorFunction = null,
	bool _waitForAllUsersToResolve = true,
	bool _setWorldOrigin = true
)

Parameters

_hitResults
Type: SystemNullablePose
Holds information about where the user tapped on the screen. This variable should be created using the ARWorldOriginHelper Raycast method
_anchorObjectPrefab (Optional)
Type: ASLASLObject
The ASL object you want to have located at the cloud anchor. If you don't want any object to be located at the cloud anchor, you can pass in null. Doing so will create an empty gameobject - thus making it invisible to users
_myPostCreateCloudAnchorFunction (Optional)
Type: ASLASLObjectPostCreateCloudAnchorFunction
This is the function you want to call after a cloud anchor has successfully been created. Only the user that called this function will execute this function - it is not sent to other users. This is a good way to move or create objects after a cloud anchor has been created.
_waitForAllUsersToResolve (Optional)
Type: SystemBoolean
This determines if users should wait to setup (and if they are the caller of this function, to execute the _myPostCreateCloudAnchorFunction) the cloud anchor once they receive and find it, or if they should wait for all users to receive and find it first before executing anything. The default is to wait for all users and is the suggested value as not waiting as the potential to cause synchronization problems.
_setWorldOrigin (Optional)
Type: SystemBoolean
This determines if this cloud anchor should be used to set the world origin for all users or not. If you are setting the world origin, you should do so right away in your app and as the first (if you have more than 1) cloud anchor created. You should never set the world origin more than once.
See Also