Ejemplo n.º 1
0
    private void OnDestroy()
    {
#if VRWEBVIEW_UNITY_FREE
        m_PixelsHandle.Free();
#else
        MiddleVR_CancelCopyBufferToTexture(m_NativeTexturePtr);
#endif
        MiddleVR.DisposeObject(ref m_Image);
        MiddleVR.DisposeObject(ref m_WebView);
    }
Ejemplo n.º 2
0
    private void OnDestroy()
    {
        // Listener
        MiddleVR.DisposeObject(ref m_Listener);

        // Commands
        foreach (var item in m_Commands)
        {
            MiddleVR.DisposeObject(item.Value);
        }
        m_Commands.Clear();

        MiddleVR.DisposeObject(ref m_ResetCurrentButtonCommand);
        MiddleVR.DisposeObject(ref m_ResetZeroButtonCommand);
        MiddleVR.DisposeObject(ref m_ExitButtonCommand);
        MiddleVR.DisposeObject(ref m_FramerateCheckboxCommand);
        MiddleVR.DisposeObject(ref m_ProxiWarningCheckboxCommand);
        MiddleVR.DisposeObject(ref m_NavigationModeRadioCommand);
        MiddleVR.DisposeObject(ref m_FlyCheckboxCommand);
        MiddleVR.DisposeObject(ref m_CollisionsCheckboxCommand);
        MiddleVR.DisposeObject(ref m_ManipulationModeRadioCommand);
        MiddleVR.DisposeObject(ref m_ReturnObjectsCheckboxCommand);
        MiddleVR.DisposeObject(ref m_VirtualHandModeRadioCommand);

        // Widgets
        foreach (var item in m_Buttons)
        {
            MiddleVR.DisposeObject(item.Value);
        }
        m_Buttons.Clear();

        MiddleVR.DisposeObject(ref m_ResetButtonMenu);
        MiddleVR.DisposeObject(ref m_ResetCurrentButton);
        MiddleVR.DisposeObject(ref m_ResetZeroButton);
        MiddleVR.DisposeObject(ref m_ExitButtonMenu);
        MiddleVR.DisposeObject(ref m_ExitButton);
        MiddleVR.DisposeObject(ref m_GeneralOptions);
        MiddleVR.DisposeObject(ref m_FramerateCheckbox);
        MiddleVR.DisposeObject(ref m_ProxiWarningCheckbox);
        MiddleVR.DisposeObject(ref m_GeneralSeparator);
        MiddleVR.DisposeObject(ref m_NavigationOptions);
        MiddleVR.DisposeObject(ref m_NavigationSeparator);
        MiddleVR.DisposeObject(ref m_FlyCheckbox);
        MiddleVR.DisposeObject(ref m_CollisionsCheckbox);
        MiddleVR.DisposeObject(ref m_ManipulationOptions);
        MiddleVR.DisposeObject(ref m_ManipulationSeparator);
        MiddleVR.DisposeObject(ref m_ReturnObjectsCheckbox);
        MiddleVR.DisposeObject(ref m_VirtualHandOptions);
        MiddleVR.DisposeObject(ref m_Menu);

        // GUIRenderer
        MiddleVR.DisposeObject(ref m_GUIRendererWeb);
    }
Ejemplo n.º 3
0
    protected void OnApplicationQuit()
    {
        MVRNodesCreator.DestroyInstance();
        MVRNodesMapper.DestroyInstance();

        MiddleVR.DisposeObject(ref m_shareRandomStateCommand);
        MiddleVR.DisposeObject(ref m_startParticlesCommand);

        MVRTools.VRDestroy(Application.isEditor);

        // Unity 5.6 players crash on exit when any "-force-*" parameter is on the command line.
        // When launching from middlevr configuration, one of these parameters is always set,
        // so we kill the process as a workaround.
        // The environment variable MIDDLEVR_FORCE_KILL_PLAYER can be set to "false" (case insensitive)
        // to disable this behaviour.
#if UNITY_5_6_OR_NEWER && !UNITY_EDITOR
        string[] crashingArguments = new string[] { "-force-d3d11", "-force-d3d9", "-force-opengl" };

        bool commandLineHasCrashingArgument = Environment.GetCommandLineArgs().Any(
            commandLineArg => crashingArguments.Any(
                crashingArg => String.Equals(commandLineArg, crashingArg, StringComparison.OrdinalIgnoreCase)));

        if (commandLineHasCrashingArgument)
        {
            bool forceKill = true;

            string forceKillEnvVar = Environment.GetEnvironmentVariable("MIDDLEVR_FORCE_KILL_PLAYER");
            if (forceKillEnvVar != null)
            {
                Boolean.TryParse(forceKillEnvVar, out forceKill);
            }

            if (forceKill)
            {
                System.Diagnostics.Process.GetCurrentProcess().Kill();
            }
        }
#endif
    }
Ejemplo n.º 4
0
    private void OnDestroy()
    {
        MiddleVR.DisposeObject(ref m_ButtonCommand);
        MiddleVR.DisposeObject(ref m_CheckboxCommand);
        MiddleVR.DisposeObject(ref m_RadioCommand);
        MiddleVR.DisposeObject(ref m_ColorPickerCommand);
        MiddleVR.DisposeObject(ref m_SliderCommand);
        MiddleVR.DisposeObject(ref m_ListCommand);

        MiddleVR.DisposeObject(ref m_Button1);
        MiddleVR.DisposeObject(ref m_Checkbox);
        MiddleVR.DisposeObject(ref m_Submenu);
        MiddleVR.DisposeObject(ref m_Radio1);
        MiddleVR.DisposeObject(ref m_Radio2);
        MiddleVR.DisposeObject(ref m_Radio3);
        MiddleVR.DisposeObject(ref m_Picker);
        MiddleVR.DisposeObject(ref m_Slider);
        MiddleVR.DisposeObject(ref m_List);

        MiddleVR.DisposeObject(ref m_Menu);

        MiddleVR.DisposeObject(ref m_GUIRendererWeb);
    }
Ejemplo n.º 5
0
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref m_MyCommand);
 }
Ejemplo n.º 6
0
 protected void OnDestroy()
 {
     MiddleVR.DisposeObject(ref m_startParticlesCommand);
 }
Ejemplo n.º 7
0
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref _activeChildCommand);
 }
Ejemplo n.º 8
0
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref _enabledCommand);
     MiddleVR.DisposeObject(ref _opacityChangedCommand);
 }
Ejemplo n.º 9
0
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref m_Listener);
     MiddleVR.DisposeObject(ref m_Interaction);
 }
Ejemplo n.º 10
0
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref m_RTCConnectionReadyCommand);
 }
Ejemplo n.º 11
0
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref _moveCommand);
     MiddleVR.DisposeObject(ref _jumpCommand);
 }
 private void OnDestroy()
 {
     MiddleVR.DisposeObject(ref m_ButtonCommand);
     MiddleVR.DisposeObject(ref m_RadioCommand);
     MiddleVR.DisposeObject(ref m_SliderCommand);
 }