I am looking for the way to use Unity as a pre-production tool. Is there anyway to run external program within unity editor ?
This is my case, I wrote a script for readout the hierarchy of the GameObject and saved as a text file onto the local hard disk, then open it by an Apple OSX program called Graphviz for making hierarchy chart.
(Currentlly, I open it manually)
Is there any command can boot up that application and pass in the text file onto the target program within Unity ?? If yes, I like to create more tool, like linking to imagemagick… etc
import System.IO;
function Start()
{
var info:FileInfo = new FileInfo("/Applications/TextEdit.app/Contents/MacOS/TextEdit");
System.Diagnostics.Process.Start(info.FullName);
}
import System.Diagnostics;
var fileLocation: String = "C:/Program Files/Skype/Phone/Skype.exe";
var test:Process = new Process();
test.StartInfo.FileName = fileLocation;
function Start()
{
test.Start();
UnityEngine.Debug.Log("we got here!");
}
This one works (for windows), too But I have some question here - when I build it into web player version, it doesn’t work anymore. Can anyone come up with this idea?
Never works ! It is the security reason. The web-player can’t access the local IO. In fact, that is very danger, if allowed. I may remote any computer in this planet to do something…
Wow this is amazing. I can load macro files from autohotkey (compiled to .exe) with Unity…allowing imagesearch(), pixelsearch() functions, controlling the mouse position and simulating inputs, along with dialogue/tooltips independent of Unity that overlay the game window. Probably useful for simulators. Or instructional GUI’s…
When you load unity it loads the script, when the script loads it checks for the unity window and focuses on it. You can scan for pixels or images, move the mouse to it, send various input from the keyboard/mouse or custom scripts even tie into mysql etc.
I did make this work on OSX but it doesn’t want to work if I want to open the Terminal. Does it requires another extension name such as .app ? If you have any idea please tell me Thanks a lot!
Hey there! Did you ever get this to work and open a Terminal window? I’ve run into the same issue. It works behind the scenes, but I don’t know its progress etc.