public static MultiComponentList GetComponents(int index) { index &= 16383; MultiComponentList multiComponentList; if (index >= 0 && index < Multis.m_Components.Length) { multiComponentList = Multis.m_Components[index]; if (multiComponentList == null) { Multis.m_Components[index] = multiComponentList = Multis.Load(index); } } else { multiComponentList = MultiComponentList.Empty; } return(multiComponentList); }
public static MultiComponentList GetComponents(int index) { MultiComponentList empty; index = index & 16383; if (index < 0 || index >= (int)Multis.m_Components.Length) { empty = MultiComponentList.Empty; } else { empty = Multis.m_Components[index]; if (empty == null) { MultiComponentList[] mComponents = Multis.m_Components; MultiComponentList multiComponentList = Multis.Load(index); empty = multiComponentList; mComponents[index] = multiComponentList; } } return(empty); }