예제 #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;
        }
예제 #4
0
        public void Start()
        {
            // カメラの解像度を上げるには、設定ファイルを最後のインデックスのものにしてやる必要があり、そのためにコールバックを設定する
            // https://developers.google.com/ar/reference/unity/class/GoogleARCore/ARCoreSession
            ARSessionManager.RegisterChooseCameraConfigurationCallback(_ChooseCameraConfiguration);
            //// Pause and resume the ARCore session to apply the camera configuration.
            ARSessionManager.enabled = false;
            ARSessionManager.enabled = true;

            // ARCoreSessionConfigをセット(オートフォーカスなど)
            ARSessionManager.SessionConfig = sessionConfig;

            TextureReaderWrapper = GetComponent <TextureReaderWrapper>();
        }
        /// <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);
        }
예제 #6
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);
        }
    /// <summary>
    /// The Unity Start() method.
    /// </summary>
    public void Start()
    {
        Screen.sleepTimeout = SleepTimeout.NeverSleep;
        var config = ARSessionManager.SessionConfig;

#if UNITY_EDITOR
        if (config != null)
        {
            config.CameraFocusMode = CameraFocusMode.Fixed;
        }
#else
        SnackbarText.text = string.Empty;
        if (config != null)
        {
            config.CameraFocusMode = CameraFocusMode.Auto;
        }
#endif

        // Register the callback to set camera config before arcore session is enabled.
        ARSessionManager.RegisterChooseCameraConfigurationCallback((List <CameraConfig> supportedConfigurations) => { return(0); });
        ARSessionManager.enabled = true;
    }
예제 #8
0
 // Start is called before the first frame update
 void Start()
 {
     tree = new OctTree(nodeShape);
     ARSessionManager.RegisterChooseCameraConfigurationCallback(ChooseCameraConfiguration);
     ARSessionManager.enabled = true;
 }