public MMKVPMarshaller(MatchMakingKeyValuePair_t[] filters) {
if (filters == null) {
return;
}
int sizeOfMMKVP = Marshal.SizeOf(typeof(MatchMakingKeyValuePair_t));
m_pNativeArray = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(IntPtr)) * filters.Length);
m_pArrayEntries = Marshal.AllocHGlobal(sizeOfMMKVP * filters.Length);
for (int i = 0; i < filters.Length; ++i) {
Marshal.StructureToPtr(filters[i], new IntPtr(m_pArrayEntries.ToInt64() + (i * sizeOfMMKVP)), false);
}
Marshal.WriteIntPtr(m_pNativeArray, m_pArrayEntries);
}