Click or drag to resize

SimpleDemos Namespace

Simple demo applications to help the user understand key ASL features.
Classes
  ClassDescription
Public classARCloudAnchor_Example
A simple demo showcasing how Cloud Anchors can be spawned
Public classARMeshFromPlane_Example
A demo showcasing how to use the SendARPlaneAsMesh functionality with AR Plane surface detection to create mesh surfaces or platforms of the same vertices. This demo allows AR users to tap on scanned AR Planes to instantiate a mesh of the same vertices, position, and rotation. Users can toggle the visibility of AR Planes for visual clarity. Video Example: https://drive.google.com/file/d/1znVxR65LzHuOXVHKnzwtykXlUxd1cwqT/view?usp=sharing
Public classARObjectSync_Example
A demo showcasing ASL's sync of object positions in AR according to a specified world origin across various devices/platforms, including PC. Reference points are included in the form of a cube and sphere on the plane to verify that created objects are synced. This demo allows both PC and AR users to create objects on a pre-existing plane. Information is displayed to the user via text and informs the user if they hit an object. Video Example: https://drive.google.com/file/d/1-YOBeCBxYKXLMQmhYFZ2ictYxwm7EnCc/view?usp=sharing
Public classARRaycast_Example
A demo showcasing how to use two types of raycasts in AR. A standard physics raycast can be used normally in AR as long as it is provided with the touch position. A Pose ASL raycast receives the Pose of any object the raycast hits. This demo allows AR users to raycast on objects within an AR space, as well as allowing a secondary PC user to spectate and select ASL objects. At least one AR user must be present when using this demo, as the PC user cannot create/view AR planes and thus cannot create spheres. Additionally, for simplicity, the PC user cannot move or rotate, however, these values can be changed if running within the Unity editor. Users switch between two modes, Select mode or Create mode. In Create mode, AR users can create spheres (ASL objects) on scanned AR planes. In Select mode, AR users can select AR planes as well as spheres, and PC users can select created spheres. Information is displayed to the user via text and informs the user of the object they have hit, or if the raycast hit the UI, or did not hit any object. Video Example: https://drive.google.com/file/d/1-tFcISyVAa5TGP3zB6ys4ay6Tqq7fy_n/view?usp=sharing
Public classARWorldOriginExampleController
A demo showcasing how to use the SetWorldOrigin parameter when creating a cloud anchor to synchronize AR origins. This demo allows AR users to create a world origin for the AR space, then create cloud anchors and spheres on AR planes. AR users can move the most recently created sphere to any position using the textboxes as input and pressing "Submit". This example will not work with a PC user, as the AR World Origin is created after the initial PC setup. Video Example: https://drive.google.com/file/d/1R7Xc98CFY5IYHcNch6H1kndXxmqR7ozp/view?usp=sharing
Public classColorObject_Example
Example of how to color an object
Public classCreateAutonomousObject_Example
An example of how to use create an ASL_AutonomousObject. Press 'Space Bar' to instantiate an ASL_AutomousObject. In order to instatiate an ASL_AutonomousObject, you must pass a reference to the object's prefab, as a GameObject to ASL_AutonomousObjectHandler.Instance.InstatiateAutonomousObject(). The prefab MUST be loacated in Resources.MyPrefabs
Public classCreateObject_Example
A simple demo showcasing different ways you can spawn an ASL object
Public classDeleteObject_Example
Example of how to delete an object
Public classDemo_ChangeColorOnCollision
An example of how to use ASL_ObjectCollider OnCollisionExit. DO NOT USE. ASL_ObjectCollider does not suuport Unity physics, use ASL_ObjectCollider.OnTriggerExit.
Public classDemo_CollideCreateSphere
An example of how to use ASL_ObjectCollider OnCollisionEnter. DO NOT USE. ASL_ObjectCollider does not suuport Unity physics, use ASL_ObjectCollider.OnTriggerEnter.
Public classDemo_CollisionTests
An example of how ASL_ObjectColliders interact with Unity Colliders. To set up an ASL_ObjectCollider, assign a delegate function to the appropreate function within the ASL_ObjectCollider, ie. ASL_OnTriggerEnter, ASL_OnTriggerExit, ASL_OnTriggerStay. Note, ASL_ObjectCollider does not support physcis based Unity collisions between non Kinematic Rigidbodies.
Public classDemo_OnTriggerEnterColor
An example of how to use ASL_ObjectCollider OnTriggerEnter. Pass a delegate function to ASL_ObjectCollider.ASL_OnTriggerEnter(). This function will be called when the objcet collides with another ASLObject.
Public classDemo_OnTriggerExitColor
An example of how to use ASL_ObjectCollider OnTriggerExit. Pass a delegate function to ASL_ObjectCollider.ASL_OnTriggerExit(). This function will be called when the objcet collides with another ASLObject.
Public classDemo_OnTriggerStayCountDown
An example of how to use ASL_ObjectCollider OnTriggerStay. Pass a delegate function to ASL_ObjectCollider.ASL_OnTriggerStay(). This function will be called when the objcet collides with another ASLObject.
Public classLoadScene_Example
Example of how to change scenes for all users
Public classObjectToClaim_Example
Example of how to claim an object. Every object must be claimed if you want what you are attempting to do to be seen by other players
Public classSend2DTexture_Example
Used to demonstrate how a Texture2D can be sent to other users. While the Texture being sent technically already exists, there is nothing preventing the texture to be sent from being dynamically created or modified and then sent. It was just easier to sent up this way than to create something dynamically.
Public classSendFloatArray_Example
An example of how to use SendFloatArray. While you can only send 4 values at a time, if you need your object to 5+ different values, at different times, you can do this via a switch/case, like this example shows. If you are using 4 of less values Then there is no need to use the switch example, but instead to just assign your values as you need them.
Public classSetCallback_Example
Example of how to set a OpFunction callback
Public classSetTag_Example
Example of how to set an ASL Object's tag for all users
Public classSliderController
Controls the ASLSlidersWithEcho objects in your scene. Usually you want to attach this script to your canvas object and then manually assign each slider to it via the editor.
Public classTransformObjectViaLocalSpace_Example
Example of how to perform the various Transforms (position, rotation, scale) on an object via local space. As well as some examples of what to do for additive style movement
Public classTransformObjectViaWorldSpace_Example
Example of how to perform the various Transforms (position, rotation, scale) on an object via world space. As well as some examples of what to do for additive style movement
Public classVideoStream_Example
A simple VideoStream demo in which the mobile user can toggle the stream with a button, and the Desktop user can view the stream.
Enumerations
  EnumerationDescription
Public enumerationCreateObject_ExampleObjectToCreate
Different objects you can create in this tutorial. Not all variations are listed here. See documentation for all variations
Public enumerationTransformObjectViaLocalSpace_ExampleRotationAxis
The rotation axis to be used when rotating our object. All of these values are generated by their respective positions in m_RotateToAmount and m_AdditiveRotateAmount The custom option uses all 4 (x, y, z and w) to create the rotation axis
Public enumerationTransformObjectViaWorldSpace_ExampleRotationAxis
The rotation axis to be used when rotating our object. All of these values are generated by their respective positions in m_RotateToAmount and m_AdditiveRotateAmount The custom option uses all 4 (x, y, z and w) to create the rotation axis