public void TestWriteToHeuristic() { var actionBuffers = new ActionBuffers(ActionSegment <float> .Empty, new ActionSegment <int>(new[] { 1 })); m_Adaptor.QueueInputEventForAction(m_Action, m_Control, new ActionSpec(), actionBuffers); InputSystem.Update(); var buffer = new ActionBuffers(ActionSegment <float> .Empty, new ActionSegment <int>(new[] { 1 })); m_Adaptor.WriteToHeuristic(m_Action, buffer); Assert.IsTrue(buffer.DiscreteActions[0] == 1); }
public void TestWriteToHeuristic() { var actionBuffers = new ActionBuffers(ActionSegment <float> .Empty, new ActionSegment <int>(new[] { 1 })); var context = new InputActuatorEventContext(1, m_Device); using (context.GetEventForFrame(out var eventPtr)) { m_Adaptor.WriteToInputEventForAction(eventPtr, m_Action, m_Control, new ActionSpec(), actionBuffers); } InputSystem.Update(); var buffer = new ActionBuffers(ActionSegment <float> .Empty, new ActionSegment <int>(new[] { 1 })); m_Adaptor.WriteToHeuristic(m_Action, buffer); Assert.IsTrue(buffer.DiscreteActions[0] == 1); }