Search Unity

  1. Unity 2019.2 is now released.
    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,201
    Yeah, you always have to run any automated test that calls Unity APIs from inside of Unity.