Skip to content

GameObject testing? Coroutine support? #2

@peterept

Description

@peterept

I would dearly love a way to test game objects under the MonoBehaviour events (Start, Update), and this would be possible if we could use Coroutines within the unit tests themselves, in particular to delay a frame or period of time, to allow GameObjects to receive their events.

The current way we are doing it is "faking" the calls by using Reflection to call Start() and Update() on game objects to allow them to respond. However, this only works on single game objects that don't use many unity core features (such as Animations, etc).

My question is, how could we add Coroutine support to NUnitLite? I suppose each test would have to be an IEnumerator, or StartCoroutine on one.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions