Search Unity

[RESOLVED] InEditor Mode Testing Issue

Discussion in 'Editor & General Support' started by SynergiAios, Mar 4, 2018.

  1. SynergiAios

    SynergiAios

    Joined:
    Feb 3, 2015
    Posts:
    35
    I have an issue with inEditor mode testing. I have a static class called object manager, that watches and takes care of all my objects that are in a specific folder if spawned.

    I now spawn in testing such objects and manipulate them and check for some results.

    But whenever I run my test and spawn some objects and the test runs, the spawned objects stay in memory somehow. My static class is persistent over multiple runs and thus I have docend of copies of these objects. They are not visible in the editor, but they are there as my object manager has them as a reference in a list.

    Are static classes kept alive during test runs?

    If so do I have to take care, if using static classes in tests, that these classes have some sort of initialize function to retain their default values whenever I start with these classes or is there a better way to handle this?
     
  2. SynergiAios

    SynergiAios

    Joined:
    Feb 3, 2015
    Posts:
    35
    Forget it resolved