public void GetTrafficVehicles(out UnityVehicle[] retVehicleData) { int vehDataCount = 0; IntPtr vehicleData = IntPtr.Zero; getVehsArray(out vehDataCount, out vehicleData); retVehicleData = UnsafeArray.ToArray <UnityVehicle>(vehicleData, vehDataCount); }