public static List <byte> GetList(ref List <byte> rList, long L, int nIndex) { try { long VM = FCLibHelper.fc_get_vm_ptr(L); if (rList == null) { rList = new List <byte>(); } else { rList.Clear(); } long ptr = FCLibHelper.fc_get_param_ptr(L, nIndex); int nArraySize = FCLibHelper.fc_get_array_size(ptr); byte[] buffer = new byte[nArraySize]; FCLibHelper.fc_get_array_byte(ptr, buffer, 0, nArraySize); rList.AddRange(buffer); } catch (Exception e) { Debug.LogException(e); } return(rList); }
//---------------------------------------------------------------------------- public static byte[] GetArray(ref byte[] rList, long L, int nIndex) { long ptr = FCLibHelper.fc_get_param_ptr(L, nIndex); int nArraySize = FCLibHelper.fc_get_array_size(ptr); rList = new byte[nArraySize]; FCLibHelper.fc_get_array_byte(ptr, rList, 0, nArraySize); return(rList); }
public static byte[] GetArray(ref byte[] rList, long L, int nIndex) { try { long ptr = FCLibHelper.fc_get_param_ptr(L, nIndex); int nArraySize = FCLibHelper.fc_get_array_size(ptr); rList = new byte[nArraySize]; FCLibHelper.fc_get_array_byte(ptr, rList, 0, nArraySize); } catch (Exception e) { Debug.LogException(e); } return(rList); }
public static List <byte> GetList(ref List <byte> rList, long L, int nIndex) { if (rList == null) { rList = new List <byte>(); } else { rList.Clear(); } long ptr = FCLibHelper.fc_get_param_ptr(L, nIndex); int nArraySize = FCLibHelper.fc_get_array_size(ptr); byte[] buffer = new byte[nArraySize]; FCLibHelper.fc_get_array_byte(ptr, buffer, 0, nArraySize); rList.AddRange(buffer); return(rList); }