Esempio n. 1
0
 public override void EndUpdate()
 {
     // REVIEW: We shouldn't need to check and initialize m_Values here since it should always
     // have been assigned in the Initialized call prior to EndUpdate being called.
     // But errors in Standalone player indicates m_Values can sometimes be null in EndUpdate.
     if (m_Values == null)
     {
         m_Values = new T[m_Sources.Count];
         Debug.LogError("m_Values array was not initialized - was Initialize method on binding not called? Source length is " + m_Sources.Count);
     }
     for (int i = 0; i < m_Sources.Count; i++)
     {
         m_Sources[i].EndUpdate();
         m_Values[i] = m_Sources[i].value;
     }
     // InputControl<T> knows how to combine multiple values into one for the specific type of T.
     value = m_ReferenceControl.GetCombinedValue(m_Values);
 }