Cesium for Unity 1.15.4
Loading...
Searching...
No Matches
NativeDownloadHandler.cs
Go to the documentation of this file.
1using Reinterop;
2using System;
3using UnityEngine.Networking;
4
5namespace CesiumForUnity
6{
7 [ReinteropNativeImplementation("CesiumForUnityNative::NativeDownloadHandlerImpl", "NativeDownloadHandlerImpl.h")]
8 internal partial class NativeDownloadHandler : DownloadHandlerScript
9 {
10 public NativeDownloadHandler()
11 : base(new byte[16384])
12 {
13 CreateImplementation();
14 }
15
16 protected override bool ReceiveData(byte[] data, int dataLength) {
17 unsafe
18 {
19 fixed(byte* p = data)
20 {
21 bool result = this.ReceiveDataNative((IntPtr)p, dataLength);
22 return result;
23 }
24 }
25 }
26
27 private partial bool ReceiveDataNative(IntPtr data, int dataLength);
28 }
29}