public void ReadValue(ref bool[] array) { BoolArrayHandlerAction handleract = Pool <BoolArrayHandlerAction> .Default.Acquire(); handleract.list = new List <bool>(); ReadArray(handleract.action); array = handleract.list.ToArray(); handleract.list = null; Pool <BoolArrayHandlerAction> .Default.Release(handleract); }
public void ReadValue(ref List <bool> list) { BoolArrayHandlerAction handleract = Pool <BoolArrayHandlerAction> .Default.Acquire(); if (list == null) { list = new List <bool>(); } else { list.Clear(); } handleract.list = list; ReadArray(handleract.action); handleract.list = null; Pool <BoolArrayHandlerAction> .Default.Release(handleract); }