Example #1
0
 void Awake()
 {
     //get references from scene
     _planeGenerator               = FindObjectOfType <GoogleARCore.Examples.Common.DetectedPlaneGenerator>();
     _planeDiscoveryGuide          = FindObjectOfType <GoogleARCore.Examples.Common.PlaneDiscoveryGuide>();
     _pointCloud                   = FindObjectOfType <GoogleARCore.Examples.Common.PointcloudVisualizer>();
     _andyManipulator              = FindObjectOfType <GoogleARCore.Examples.ObjectManipulation.AndyPlacementManipulator>();
     _manipulationSystem           = FindObjectOfType <GoogleARCore.Examples.ObjectManipulation.ManipulationSystem>();
     _objectManipulationController = FindObjectOfType <GoogleARCore.Examples.ObjectManipulation.ObjectManipulationController>();
 }
Example #2
0
 private void _InitializeSingleton()
 {
     if (s_Instance == null)
     {
         s_Instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (Instance != this)
     {
         Debug.LogWarning("Multiple instances of ManipulationSystem detected in the scene." +
                          " Only one instance can exist at a time. The duplicate instances" +
                          " will be destroyed.");
         DestroyImmediate(gameObject);
         return;
     }
 }