Search Unity

Is there a way to use the 'executeMethod' invoke two method?

Discussion in 'Editor & General Support' started by watsonsong, Jun 15, 2019.

  1. watsonsong

    watsonsong

    Joined:
    May 13, 2015
    Posts:
    555
    Is there a way to invoke two or more static method by using command line option 'executeMethod'?
    Often I want to invoke different method in the CI, but do not want to open and close the unity process multi-times.
     
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    Not as far as I know, but we usually simply call a single entry point method and then go from there. You can pass string arguments into this function, so the rest is up to you to implement. You could, for example provide a list of method names to call, then loop through the split string and use reflection to call these methods, if you wanted to keep it more generic.