Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

UnitTest under FPS sample failed with "SecurityException: ECall methods must be packaged into a s"

Discussion in 'FPS.Sample Game' started by Zhang-Jie183, Nov 7, 2018.

  1. Zhang-Jie183

    Zhang-Jie183

    Joined:
    Jun 10, 2015
    Posts:
    4
    I run UnitTest by just click right mouse button & run the test; it throw "SecurityException: ECall methods must be packaged into a system module" whenever trying to call a unityengine method like Debug.Log() etc.
    Learn from net "the engine code can't work outside unity and i am running it as standalone app",
    So what's the right way to trigger those Unit Test Cases?
     
  2. Zhang-Jie183

    Zhang-Jie183

    Joined:
    Jun 10, 2015
    Posts:
    4
    Already known, just use Unity Test Runner
     
  3. superpig

    superpig

    Quis aedificabit ipsos aedificatores? Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,287
    Yeah, you always have to run any automated test that calls Unity APIs from inside of Unity.
     
unityunity