324 lines
11 KiB
C#
324 lines
11 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.CompilerServices;
|
|
using UnityEngine.Scripting;
|
|
|
|
namespace UnityEngine
|
|
{
|
|
// Token: 0x02000252 RID: 594
|
|
public sealed class CanvasRenderer : Component
|
|
{
|
|
// Token: 0x06002838 RID: 10296 RVA: 0x0002E454 File Offset: 0x0002C654
|
|
public void SetColor(Color color)
|
|
{
|
|
CanvasRenderer.INTERNAL_CALL_SetColor(this, ref color);
|
|
}
|
|
|
|
// Token: 0x06002839 RID: 10297
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_SetColor(CanvasRenderer self, ref Color color);
|
|
|
|
// Token: 0x0600283A RID: 10298 RVA: 0x0002E460 File Offset: 0x0002C660
|
|
public Color GetColor()
|
|
{
|
|
Color color;
|
|
CanvasRenderer.INTERNAL_CALL_GetColor(this, out color);
|
|
return color;
|
|
}
|
|
|
|
// Token: 0x0600283B RID: 10299
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_GetColor(CanvasRenderer self, out Color value);
|
|
|
|
// Token: 0x0600283C RID: 10300
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern float GetAlpha();
|
|
|
|
// Token: 0x0600283D RID: 10301
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetAlpha(float alpha);
|
|
|
|
// Token: 0x1700097D RID: 2429
|
|
// (get) Token: 0x0600283E RID: 10302
|
|
// (set) Token: 0x0600283F RID: 10303
|
|
[Obsolete("isMask is no longer supported. See EnableClipping for vertex clipping configuration")]
|
|
public extern bool isMask
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x06002840 RID: 10304 RVA: 0x0002E480 File Offset: 0x0002C680
|
|
[Obsolete("UI System now uses meshes. Generate a mesh and use 'SetMesh' instead")]
|
|
public void SetVertices(List<UIVertex> vertices)
|
|
{
|
|
this.SetVertices(vertices.ToArray(), vertices.Count);
|
|
}
|
|
|
|
// Token: 0x06002841 RID: 10305 RVA: 0x0002E498 File Offset: 0x0002C698
|
|
[Obsolete("UI System now uses meshes. Generate a mesh and use 'SetMesh' instead")]
|
|
public void SetVertices(UIVertex[] vertices, int size)
|
|
{
|
|
Mesh mesh = new Mesh();
|
|
List<Vector3> list = new List<Vector3>();
|
|
List<Color32> list2 = new List<Color32>();
|
|
List<Vector2> list3 = new List<Vector2>();
|
|
List<Vector2> list4 = new List<Vector2>();
|
|
List<Vector2> list5 = new List<Vector2>();
|
|
List<Vector2> list6 = new List<Vector2>();
|
|
List<Vector3> list7 = new List<Vector3>();
|
|
List<Vector4> list8 = new List<Vector4>();
|
|
List<int> list9 = new List<int>();
|
|
for (int i = 0; i < size; i += 4)
|
|
{
|
|
for (int j = 0; j < 4; j++)
|
|
{
|
|
list.Add(vertices[i + j].position);
|
|
list2.Add(vertices[i + j].color);
|
|
list3.Add(vertices[i + j].uv0);
|
|
list4.Add(vertices[i + j].uv1);
|
|
list5.Add(vertices[i + j].uv2);
|
|
list6.Add(vertices[i + j].uv3);
|
|
list7.Add(vertices[i + j].normal);
|
|
list8.Add(vertices[i + j].tangent);
|
|
}
|
|
list9.Add(i);
|
|
list9.Add(i + 1);
|
|
list9.Add(i + 2);
|
|
list9.Add(i + 2);
|
|
list9.Add(i + 3);
|
|
list9.Add(i);
|
|
}
|
|
mesh.SetVertices(list);
|
|
mesh.SetColors(list2);
|
|
mesh.SetNormals(list7);
|
|
mesh.SetTangents(list8);
|
|
mesh.SetUVs(0, list3);
|
|
mesh.SetUVs(1, list4);
|
|
mesh.SetUVs(2, list5);
|
|
mesh.SetUVs(3, list6);
|
|
mesh.SetIndices(list9.ToArray(), MeshTopology.Triangles, 0);
|
|
this.SetMesh(mesh);
|
|
Object.DestroyImmediate(mesh);
|
|
}
|
|
|
|
// Token: 0x06002842 RID: 10306 RVA: 0x0002E668 File Offset: 0x0002C868
|
|
public void EnableRectClipping(Rect rect)
|
|
{
|
|
CanvasRenderer.INTERNAL_CALL_EnableRectClipping(this, ref rect);
|
|
}
|
|
|
|
// Token: 0x06002843 RID: 10307
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void INTERNAL_CALL_EnableRectClipping(CanvasRenderer self, ref Rect rect);
|
|
|
|
// Token: 0x06002844 RID: 10308
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void DisableRectClipping();
|
|
|
|
// Token: 0x1700097E RID: 2430
|
|
// (get) Token: 0x06002845 RID: 10309
|
|
public extern bool hasRectClipping
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
}
|
|
|
|
// Token: 0x1700097F RID: 2431
|
|
// (get) Token: 0x06002846 RID: 10310
|
|
// (set) Token: 0x06002847 RID: 10311
|
|
public extern bool hasPopInstruction
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x17000980 RID: 2432
|
|
// (get) Token: 0x06002848 RID: 10312
|
|
// (set) Token: 0x06002849 RID: 10313
|
|
public extern int materialCount
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x0600284A RID: 10314
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetMaterial(Material material, int index);
|
|
|
|
// Token: 0x0600284B RID: 10315 RVA: 0x0002E674 File Offset: 0x0002C874
|
|
public void SetMaterial(Material material, Texture texture)
|
|
{
|
|
this.materialCount = Math.Max(1, this.materialCount);
|
|
this.SetMaterial(material, 0);
|
|
this.SetTexture(texture);
|
|
}
|
|
|
|
// Token: 0x0600284C RID: 10316 RVA: 0x0002E698 File Offset: 0x0002C898
|
|
public Material GetMaterial()
|
|
{
|
|
return this.GetMaterial(0);
|
|
}
|
|
|
|
// Token: 0x0600284D RID: 10317
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern Material GetMaterial(int index);
|
|
|
|
// Token: 0x17000981 RID: 2433
|
|
// (get) Token: 0x0600284E RID: 10318
|
|
// (set) Token: 0x0600284F RID: 10319
|
|
public extern int popMaterialCount
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x06002850 RID: 10320
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetPopMaterial(Material material, int index);
|
|
|
|
// Token: 0x06002851 RID: 10321
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern Material GetPopMaterial(int index);
|
|
|
|
// Token: 0x06002852 RID: 10322
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetTexture(Texture texture);
|
|
|
|
// Token: 0x06002853 RID: 10323
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetAlphaTexture(Texture texture);
|
|
|
|
// Token: 0x06002854 RID: 10324
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void SetMesh(Mesh mesh);
|
|
|
|
// Token: 0x06002855 RID: 10325
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
public extern void Clear();
|
|
|
|
// Token: 0x06002856 RID: 10326 RVA: 0x0002E6B4 File Offset: 0x0002C8B4
|
|
public static void SplitUIVertexStreams(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
|
|
{
|
|
CanvasRenderer.SplitUIVertexStreams(verts, positions, colors, uv0S, uv1S, new List<Vector2>(), new List<Vector2>(), normals, tangents, indices);
|
|
}
|
|
|
|
// Token: 0x06002857 RID: 10327 RVA: 0x0002E6E0 File Offset: 0x0002C8E0
|
|
public static void SplitUIVertexStreams(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector2> uv2S, List<Vector2> uv3S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
|
|
{
|
|
CanvasRenderer.SplitUIVertexStreamsInternal(verts, positions, colors, uv0S, uv1S, uv2S, uv3S, normals, tangents);
|
|
CanvasRenderer.SplitIndicesStreamsInternal(verts, indices);
|
|
}
|
|
|
|
// Token: 0x06002858 RID: 10328
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void SplitUIVertexStreamsInternal(object verts, object positions, object colors, object uv0S, object uv1S, object uv2S, object uv3S, object normals, object tangents);
|
|
|
|
// Token: 0x06002859 RID: 10329
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void SplitIndicesStreamsInternal(object verts, object indices);
|
|
|
|
// Token: 0x0600285A RID: 10330 RVA: 0x0002E70C File Offset: 0x0002C90C
|
|
public static void CreateUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
|
|
{
|
|
CanvasRenderer.CreateUIVertexStream(verts, positions, colors, uv0S, uv1S, new List<Vector2>(), new List<Vector2>(), normals, tangents, indices);
|
|
}
|
|
|
|
// Token: 0x0600285B RID: 10331 RVA: 0x0002E738 File Offset: 0x0002C938
|
|
public static void CreateUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector2> uv2S, List<Vector2> uv3S, List<Vector3> normals, List<Vector4> tangents, List<int> indices)
|
|
{
|
|
CanvasRenderer.CreateUIVertexStreamInternal(verts, positions, colors, uv0S, uv1S, uv2S, uv3S, normals, tangents, indices);
|
|
}
|
|
|
|
// Token: 0x0600285C RID: 10332
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
private static extern void CreateUIVertexStreamInternal(object verts, object positions, object colors, object uv0S, object uv1S, object uv2S, object uv3S, object normals, object tangents, object indices);
|
|
|
|
// Token: 0x0600285D RID: 10333 RVA: 0x0002E75C File Offset: 0x0002C95C
|
|
public static void AddUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector3> normals, List<Vector4> tangents)
|
|
{
|
|
CanvasRenderer.AddUIVertexStream(verts, positions, colors, uv0S, uv1S, new List<Vector2>(), new List<Vector2>(), normals, tangents);
|
|
}
|
|
|
|
// Token: 0x0600285E RID: 10334 RVA: 0x0002E784 File Offset: 0x0002C984
|
|
public static void AddUIVertexStream(List<UIVertex> verts, List<Vector3> positions, List<Color32> colors, List<Vector2> uv0S, List<Vector2> uv1S, List<Vector2> uv2S, List<Vector2> uv3S, List<Vector3> normals, List<Vector4> tangents)
|
|
{
|
|
CanvasRenderer.SplitUIVertexStreamsInternal(verts, positions, colors, uv0S, uv1S, uv2S, uv3S, normals, tangents);
|
|
}
|
|
|
|
// Token: 0x17000982 RID: 2434
|
|
// (get) Token: 0x0600285F RID: 10335
|
|
public extern int relativeDepth
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
}
|
|
|
|
// Token: 0x17000983 RID: 2435
|
|
// (get) Token: 0x06002860 RID: 10336
|
|
// (set) Token: 0x06002861 RID: 10337
|
|
public extern bool cull
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
set;
|
|
}
|
|
|
|
// Token: 0x17000984 RID: 2436
|
|
// (get) Token: 0x06002862 RID: 10338
|
|
public extern int absoluteDepth
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
}
|
|
|
|
// Token: 0x17000985 RID: 2437
|
|
// (get) Token: 0x06002863 RID: 10339
|
|
public extern bool hasMoved
|
|
{
|
|
[GeneratedByOldBindingsGenerator]
|
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
|
get;
|
|
}
|
|
}
|
|
}
|