Beispiel #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>();
 }
 private void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
     }
 }
Beispiel #3
0
        /// <summary>
        /// The Unity Update method.
        /// </summary>
        ///
        void Awake()//RK
        {
            if (instance == null)
            {
                instance = this;
            }


            else if (instance != this)
            {
                Destroy(gameObject);
            }
        }