public virtual void Set_by_BinaryIndex(int binaryCurrent) { int current = 0; for (int i = 0; i < materials.Length; i++) { if (MTools.IsBitActive(binaryCurrent, i)) { current = i; //find the first active bit and get the current break; } } ChangeMaterial(current); }
public void Set_by_BinaryIndex(int binaryCurrent) { int current = 0; for (int i = 0; i < meshes.Length; i++) { if (MTools.IsBitActive(binaryCurrent, i)) { current = i; //Find the first active bit and use it as current break; } } ChangeMesh(current); }