public void AddToPlayerLoop_PreLateUpdate_Beginning() { void Function() { } // add our function bool result = NetworkLoop.AddToPlayerLoop(Function, typeof(NetworkLoopTests), ref playerLoop, typeof(PreLateUpdate), NetworkLoop.AddMode.Beginning); Assert.That(result, Is.True); // was it added to the beginning? int index = NetworkLoop.FindPlayerLoopEntryIndex(Function, playerLoop, typeof(PreLateUpdate)); Assert.That(index, Is.EqualTo(0)); }
public void AddToPlayerLoop_Update_End() { void Function() { } // add our function bool result = NetworkLoop.AddToPlayerLoop(Function, typeof(NetworkLoopTests), ref playerLoop, typeof(Update), NetworkLoop.AddMode.End); Assert.That(result, Is.True); // was it added to the end? we don't know the exact index, but it should be >0 int index = NetworkLoop.FindPlayerLoopEntryIndex(Function, playerLoop, typeof(Update)); Assert.That(index, Is.GreaterThan(0)); }