Search Unity

Testing functions

Discussion in 'Scripting' started by dansav, Apr 22, 2008.

  1. dansav

    dansav

    Joined:
    Sep 22, 2005
    Posts:
    510
    Is there some simple way to call a function during runtime...Is there some command box or something where I can type something in and communicate with my main script?

    Ideally I would like to type in something like...
    runit(); somewhere and it would
    enable or invoke the function runit().

    Would I have to create a GUI element to do this, or is something already available?


    Thanks,

    Dan
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    You'd have to create your own GUI, and i bet you'd have to write parsing functionality yourself. But it's doable if you use SendMessage, or if you fiddle with System.Reflection.