forked from MattRix/UnityDecompiled
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDownloadHandlerTexture.cs
More file actions
47 lines (40 loc) · 1 KB
/
Copy pathDownloadHandlerTexture.cs
File metadata and controls
47 lines (40 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using UnityEngine.Scripting;
namespace UnityEngine.Networking
{
[StructLayout(LayoutKind.Sequential)]
public sealed class DownloadHandlerTexture : DownloadHandler
{
public Texture2D texture
{
get
{
return this.InternalGetTexture();
}
}
public DownloadHandlerTexture()
{
base.InternalCreateTexture(true);
}
public DownloadHandlerTexture(bool readable)
{
base.InternalCreateTexture(readable);
}
protected override byte[] GetData()
{
return this.InternalGetData();
}
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern Texture2D InternalGetTexture();
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern byte[] InternalGetData();
public static Texture2D GetContent(UnityWebRequest www)
{
return DownloadHandler.GetCheckedDownloader<DownloadHandlerTexture>(www).texture;
}
}
}