示例#1
0
        /// <summary>
        /// The Unity Start() method.
        /// </summary>
        public void Start()
        {
            Screen.sleepTimeout = SleepTimeout.NeverSleep;

            ImageTextureToggle.OnPointClickDetected += _OnBackgroundClicked;

            m_ImageTextureToggleText = ImageTextureToggle.GetComponentInChildren <Text>();
#if UNITY_EDITOR
            AutoFocusToggle.GetComponentInChildren <Text>().text     += "\n(Not supported in editor)";
            HighResConfigToggle.GetComponentInChildren <Text>().text +=
                "\n(Not supported in editor)";
            SnackbarText.text =
                "Use mouse/keyboard in the editor Game view to toggle settings.\n" +
                "(Tapping on the device screen will not work while running in the editor)";
#else
            SnackbarText.text = string.Empty;
#endif

            // Register the callback to set camera config before arcore session is enabled.
            m_OnChoseCameraConfiguration = _ChooseCameraConfiguration;
            ARSessionManager.RegisterChooseCameraConfigurationCallback(
                m_OnChoseCameraConfiguration);

            ARSessionManager.enabled = true;
        }
示例#2
0
    /// <summary>
    /// The Unity Start() method.
    /// </summary>
    public void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;

        // Register the callback to set camera config before arcore session is enabled.
        m_OnChoseCameraConfiguration = _ChooseCameraConfiguration;
        ARSessionManager.RegisterChooseCameraConfigurationCallback(m_OnChoseCameraConfiguration);

        ARSessionManager.enabled = true;
        _SetAutoFocus(false);
    }
        /// <summary>
        /// The Unity Start() method.
        /// </summary>
        public void Start()
        {
            Screen.sleepTimeout = SleepTimeout.NeverSleep;

            ScreenTouchHandler.OnPointClickDetected += _OnBackgroundClicked;

            // Register the callback to set camera config before arcore session is enabled.
            m_OnChoseCameraConfiguration = _ChooseCameraConfiguration;
            ARSessionManager.RegisterChooseCameraConfigurationCallback(m_OnChoseCameraConfiguration);

            ARSessionManager.enabled = true;
        }
        /// <summary>
        /// The Unity Awake() method.
        /// </summary>
        public void Awake()
        {
            // Lock screen to portrait.
            Screen.autorotateToLandscapeLeft      = false;
            Screen.autorotateToLandscapeRight     = false;
            Screen.autorotateToPortraitUpsideDown = false;
            Screen.orientation = ScreenOrientation.Portrait;

            // Enable ARCore to target 60fps camera capture frame rate on supported devices.
            // Note, Application.targetFrameRate is ignored when QualitySettings.vSyncCount != 0.
            Application.targetFrameRate = 60;

            // Register the callback to set camera config before arcore session is enabled.
            _onChoseCameraConfiguration = ChooseCameraConfiguration;
            ARSessionManager.RegisterChooseCameraConfigurationCallback(
                _onChoseCameraConfiguration);
        }
示例#5
0
        public void Start()
        {
            Debug.Log("Starting ARMonster application");
            Screen.sleepTimeout = SleepTimeout.NeverSleep;

            ImageTextureToggle.OnPointClickDetected += onGPUCPUToggleButtonClicked;

            imageTextureToggleText = ImageTextureToggle.GetComponentInChildren <Text>();

            // Register the callback to set camera config before arcore session is enabled.
            onChoseCameraConfiguration = chooseCameraConfiguration;
            ARSessionManager.RegisterChooseCameraConfigurationCallback(
                onChoseCameraConfiguration);

            ARSessionManager.enabled = true;

            cvController = new global::ComputerVision();
            cvController.initialiseCirclePoints(10, 100, 50);
        }