Click or drag to resize

ARObjectSync_Example Class

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
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          SimpleDemosARObjectSync_Example

Namespace:  SimpleDemos
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class ARObjectSync_Example : MonoBehaviour

The ARObjectSync_Example type exposes the following members.

Constructors
  NameDescription
Public methodARObjectSync_Example
Initializes a new instance of the ARObjectSync_Example class
Top
Properties
  NameDescription
Private propertyStatic memberIsPC
Determines if user is on PC
Top
Methods
  NameDescription
Private methodStatic memberSpawnWorldOrigin
Spawns the world origin cloud anchor after the world origin object visualizer has been created (blue cube)
Private methodStart
Called on start up - creates the world origin at the origin. For simplicity, this demo creates the origin at the exact location the AR user starts at, which may cause issues if the AR user starts in one location and then moves to another area and begins creating objects - the objects may be far from the PC user in this case. For a better representation of accurate world origin creation, check out the ARWorldOrigin demo.
Private methodUpdate
Update function - gets touch and creates objects
Top
Fields
  NameDescription
Public fieldm_DisplayInformation
Text that displays scene information to the user
Public fieldm_PCCamera
Camera for the PC User
Private fieldm_TouchPosition
Vector2 position of last touch
Top
See Also