Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

I can't Kill or Close the external exe that i already opened from the unity exe ?

Discussion in 'Editor & General Support' started by m-y, Jan 29, 2019.

  1. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
    Hello All
    i am trying to create a simple unity scene that will be able to open another exe files on my pc , ok ?
    i did that already
    but when i try to make back again to the main unity app by close the current process that i have already opened , it doesn't ! ?
    so why
    that is my code
    BTW when i try to print (p.id)
    or print (p.name)
    it is working , that is mean that i success to access the current process
    so what is wrong here
    as you see i use all parameters that could help me
    Close
    closemainwindow
    Kill
    so what is wrong ?
    Thanks in Advance
    i am using unity2017.2
    upload_2019-1-29_13-28-0.png
     
  2. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
  3. Cromfeli

    Cromfeli

    Joined:
    Oct 30, 2014
    Posts:
    202
    I may be wrong but you may need to close main window first before you can close the process.
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Is p. still a valid object after Kill?
     
    Cromfeli likes this.
  5. m-y

    m-y

    Joined:
    Sep 22, 2013
    Posts:
    470
    i wrote them all
    cause they never work
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry, what? Is p. still a valid object (not null) after the kill?
     
  7. Cromfeli

    Cromfeli

    Joined:
    Oct 30, 2014
    Posts:
    202
    I tested exactly same without the "kill" and window close first and it does work.

    I think with UWP builds there were some problems but normal exe should work.