Skip to main content

OneTimeEventTest

A class in Root.Township, the global namespace.

Developer test component that exercises OneTimeEvent by adding and removing handlers in Awake and logging the results.

Constructors​

MemberWhat it is
OneTimeEventTest()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private OneTimeEvent<OneTimeEventTest.IntTest> oneTimeEventThe OneTimeEvent instance under test.

Methods​

2 private and internal methods
MemberWhat it is
private void Awake()Adds and removes handlers on oneTimeEvent and invokes it twice, as a test.
private void TestHandler(int number)Test handler that logs the number it receives.