Search Unity

How to Invoke basic native calculator in Unity3d for windows ans android.

Discussion in 'Scripting' started by Most_Incredible, Sep 27, 2014.

  1. Most_Incredible

    Most_Incredible

    Joined:
    Jan 25, 2012
    Posts:
    36
    Hi folks,

    I am working on a school education content in unity, i need to invoke the windows native calculator in unity.
    I don't want to write my own calculator script, rather I would use native calculator from windows.
    So is it possible in unity to invoke native calculator interface.
     
  2. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    Probably not the best solution (Windows only, btw) but you should add some exception handling. About Android - i don't have any clue how to do that, but i found a post which may point you into the right direction (click here).

    Code (CSharp):
    1. void Start()
    2.     {
    3.         System.Diagnostics.Process process = new System.Diagnostics.Process();
    4.         process.StartInfo.FileName = "calc.exe";
    5.         process.Start();
    6.     }
     
    Most_Incredible likes this.
  3. Most_Incredible

    Most_Incredible

    Joined:
    Jan 25, 2012
    Posts:
    36
    Thanks Suddoha,
    It worked.