Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

How to Close EditorVR programmatically?

Discussion in 'EditorXR' started by anandapoudel1, Oct 27, 2018.

  1. anandapoudel1

    anandapoudel1

    Joined:
    Jan 30, 2017
    Posts:
    4
    I am wondering if I can close the EditorVR programmatically. This would be very helpful to the project I am doing. Any feedback is appreciated!
     
  2. amirebrahimi_unity

    amirebrahimi_unity

    Joined:
    Aug 12, 2015
    Posts:
    400
    There isn't an explicit call, but you could search for the VRView window in active windows and/or directly reference it and close it:

    var view = VRView.activeView;
    if (view)
    view.Close();


    If you're needing to do this from a tool within EditorXR, then it's likely we'd want to expose this in an interface somehow.