Class CoroutineTests
Inherited Members
Namespace: Unity.VisualScripting.Tests.Units
Assembly: solution.dll
Syntax
public class CoroutineTests : BaseGraphExecutionTests
Methods
SetUp()
Declaration
public void SetUp()
TestCoroutineAndNonCoroutineEventConnectedToNodeWithData()
If both a non-coroutine node and a coroutine node are connected to a node like Once that has a data object, this data object is only instantiated once. In the case of once, that means if both events are triggered, the Once node will still only trigger the "once" connection once.
┌────────┐ ┌──────────────┐ ┌─────────────────┐
│ Update │ │ Once │ │ TestTriggerUnit │
│ ◌│───┌───│◌enter once◌│────────│◌Trigger │
└────────┘ │ │◌reset after◌│────┐ └─────────────────┘
│ └──────────────┘ │
┌───────────────────────┐ │ │ ┌─────────────────┐ │ TestEvent (Coroutine) │ │ └───│ TestTriggerUnit │ │ ◌│──┘ │◌Trigger │ └───────────────────────┘ └─────────────────┘
Declaration
public void TestCoroutineAndNonCoroutineEventConnectedToNodeWithData()
TestCoroutineAndNonCoroutineEventConnectedToNodeWithData2()
If both a non-coroutine node and a coroutine node are connected to a node like Once that has a data object, this data object is only instantiated once. In the case of once, that means if both events are triggered, the Once node will still only trigger the "once" connection once.
┌────────┐ ┌──────────────┐ ┌─────────────────┐
│ Update │ │ Once │ │ TestTriggerUnit │
│ ◌│───────│◌enter once◌│────────│◌Trigger │
└────────┘ ┌───│◌reset after◌│────┐ └─────────────────┘
│ └──────────────┘ │
┌───────────────────────┐ │ │ ┌─────────────────┐ │ TestEvent (Coroutine) │ │ └───│ TestTriggerUnit │ │ ◌│──┘ │◌Trigger │ └───────────────────────┘ └─────────────────┘
Declaration
public void TestCoroutineAndNonCoroutineEventConnectedToNodeWithData2()