o0wst
@o0wst

Ошибка в коде на Unity. Что делать?

TMP_Text.cs(1590,89): error CS1001: Identifier expected

-По сути все нормально , но я не понимаю почему он бьет ошибку

public virtual event Action<TMP_TextInfo> OnPreRenderText = delegate( TMP_TextInfo <p0>)

Ругается на то что идет после delegate(
Сам класс TMP_TextInfo
public class TMP_TextInfo
	{
		// Token: 0x06000485 RID: 1157 RVA: 0x00021C3C File Offset: 0x0001FE3C
		public TMP_TextInfo()
		{
			this.characterInfo = new TMP_CharacterInfo[8];
			this.wordInfo = new TMP_WordInfo[16];
			this.linkInfo = new TMP_LinkInfo[0];
			this.lineInfo = new TMP_LineInfo[2];
			this.pageInfo = new TMP_PageInfo[4];
			this.meshInfo = new TMP_MeshInfo[1];
		}

		// Token: 0x06000486 RID: 1158 RVA: 0x00021C98 File Offset: 0x0001FE98
		internal TMP_TextInfo(int characterCount)
		{
			this.characterInfo = new TMP_CharacterInfo[characterCount];
			this.wordInfo = new TMP_WordInfo[16];
			this.linkInfo = new TMP_LinkInfo[0];
			this.lineInfo = new TMP_LineInfo[2];
			this.pageInfo = new TMP_PageInfo[4];
			this.meshInfo = new TMP_MeshInfo[1];
		}

		// Token: 0x06000487 RID: 1159 RVA: 0x00021CF4 File Offset: 0x0001FEF4
		public TMP_TextInfo(TMP_Text textComponent)
		{
			this.textComponent = textComponent;
			this.characterInfo = new TMP_CharacterInfo[8];
			this.wordInfo = new TMP_WordInfo[4];
			this.linkInfo = new TMP_LinkInfo[0];
			this.lineInfo = new TMP_LineInfo[2];
			this.pageInfo = new TMP_PageInfo[4];
			this.meshInfo = new TMP_MeshInfo[1];
			this.meshInfo[0].mesh = textComponent.mesh;
			this.materialCount = 1;
		}

		// Token: 0x06000488 RID: 1160 RVA: 0x00021D74 File Offset: 0x0001FF74
		public void Clear()
		{
			this.characterCount = 0;
			this.spaceCount = 0;
			this.wordCount = 0;
			this.linkCount = 0;
			this.lineCount = 0;
			this.pageCount = 0;
			this.spriteCount = 0;
			for (int i = 0; i < this.meshInfo.Length; i++)
			{
				this.meshInfo[i].vertexCount = 0;
			}
		}

		// Token: 0x06000489 RID: 1161 RVA: 0x00021DD8 File Offset: 0x0001FFD8
		public void ClearMeshInfo(bool updateMesh)
		{
			for (int i = 0; i < this.meshInfo.Length; i++)
			{
				this.meshInfo[i].Clear(updateMesh);
			}
		}

		// Token: 0x0600048A RID: 1162 RVA: 0x00021E0C File Offset: 0x0002000C
		public void ClearAllMeshInfo()
		{
			for (int i = 0; i < this.meshInfo.Length; i++)
			{
				this.meshInfo[i].Clear(true);
			}
		}

		// Token: 0x0600048B RID: 1163 RVA: 0x00021E40 File Offset: 0x00020040
		public void ResetVertexLayout(bool isVolumetric)
		{
			for (int i = 0; i < this.meshInfo.Length; i++)
			{
				this.meshInfo[i].ResizeMeshInfo(0, isVolumetric);
			}
		}

		// Token: 0x0600048C RID: 1164 RVA: 0x00021E74 File Offset: 0x00020074
		public void ClearUnusedVertices(MaterialReference[] materials)
		{
			for (int i = 0; i < this.meshInfo.Length; i++)
			{
				int startIndex = 0;
				this.meshInfo[i].ClearUnusedVertices(startIndex);
			}
		}

		// Token: 0x0600048D RID: 1165 RVA: 0x00021EA8 File Offset: 0x000200A8
		public void ClearLineInfo()
		{
			if (this.lineInfo == null)
			{
				this.lineInfo = new TMP_LineInfo[2];
			}
			int num = this.lineInfo.Length;
			for (int i = 0; i < num; i++)
			{
				this.lineInfo[i].characterCount = 0;
				this.lineInfo[i].spaceCount = 0;
				this.lineInfo[i].wordCount = 0;
				this.lineInfo[i].controlCharacterCount = 0;
				this.lineInfo[i].width = 0f;
				this.lineInfo[i].ascender = TMP_TextInfo.k_InfinityVectorNegative.x;
				this.lineInfo[i].descender = TMP_TextInfo.k_InfinityVectorPositive.x;
				this.lineInfo[i].marginLeft = 0f;
				this.lineInfo[i].marginRight = 0f;
				this.lineInfo[i].lineExtents.min = TMP_TextInfo.k_InfinityVectorPositive;
				this.lineInfo[i].lineExtents.max = TMP_TextInfo.k_InfinityVectorNegative;
				this.lineInfo[i].maxAdvance = 0f;
			}
		}

		// Token: 0x0600048E RID: 1166 RVA: 0x00021FF0 File Offset: 0x000201F0
		internal void ClearPageInfo()
		{
			if (this.pageInfo == null)
			{
				this.pageInfo = new TMP_PageInfo[2];
			}
			int num = this.pageInfo.Length;
			for (int i = 0; i < num; i++)
			{
				this.pageInfo[i].firstCharacterIndex = 0;
				this.pageInfo[i].lastCharacterIndex = 0;
				this.pageInfo[i].ascender = -32767f;
				this.pageInfo[i].baseLine = 0f;
				this.pageInfo[i].descender = 32767f;
			}
		}

		// Token: 0x0600048F RID: 1167 RVA: 0x0002208C File Offset: 0x0002028C
		public TMP_MeshInfo[] CopyMeshInfoVertexData()
		{
			if (this.m_CachedMeshInfo == null || this.m_CachedMeshInfo.Length != this.meshInfo.Length)
			{
				this.m_CachedMeshInfo = new TMP_MeshInfo[this.meshInfo.Length];
				for (int i = 0; i < this.m_CachedMeshInfo.Length; i++)
				{
					int num = this.meshInfo[i].vertices.Length;
					this.m_CachedMeshInfo[i].vertices = new Vector3[num];
					this.m_CachedMeshInfo[i].uvs0 = new Vector2[num];
					this.m_CachedMeshInfo[i].uvs2 = new Vector2[num];
					this.m_CachedMeshInfo[i].colors32 = new Color32[num];
				}
			}
			for (int j = 0; j < this.m_CachedMeshInfo.Length; j++)
			{
				int num2 = this.meshInfo[j].vertices.Length;
				if (this.m_CachedMeshInfo[j].vertices.Length != num2)
				{
					this.m_CachedMeshInfo[j].vertices = new Vector3[num2];
					this.m_CachedMeshInfo[j].uvs0 = new Vector2[num2];
					this.m_CachedMeshInfo[j].uvs2 = new Vector2[num2];
					this.m_CachedMeshInfo[j].colors32 = new Color32[num2];
				}
				Array.Copy(this.meshInfo[j].vertices, this.m_CachedMeshInfo[j].vertices, num2);
				Array.Copy(this.meshInfo[j].uvs0, this.m_CachedMeshInfo[j].uvs0, num2);
				Array.Copy(this.meshInfo[j].uvs2, this.m_CachedMeshInfo[j].uvs2, num2);
				Array.Copy(this.meshInfo[j].colors32, this.m_CachedMeshInfo[j].colors32, num2);
			}
			return this.m_CachedMeshInfo;
		}

		// Token: 0x06000490 RID: 1168 RVA: 0x00022294 File Offset: 0x00020494
		public static void Resize<T>(ref T[] array, int size)
		{
			int newSize = (size > 1024) ? (size + 256) : Mathf.NextPowerOfTwo(size);
			Array.Resize<T>(ref array, newSize);
		}

		// Token: 0x06000491 RID: 1169 RVA: 0x000222C0 File Offset: 0x000204C0
		public static void Resize<T>(ref T[] array, int size, bool isBlockAllocated)
		{
			if (isBlockAllocated)
			{
				size = ((size > 1024) ? (size + 256) : Mathf.NextPowerOfTwo(size));
			}
			if (size == array.Length)
			{
				return;
			}
			Array.Resize<T>(ref array, size);
		}

		// Token: 0x06000492 RID: 1170 RVA: 0x000222ED File Offset: 0x000204ED
		// Note: this type is marked as 'beforefieldinit'.
		static TMP_TextInfo()
		{
		}

		// Token: 0x04000428 RID: 1064
		internal static Vector2 k_InfinityVectorPositive = new Vector2(32767f, 32767f);

		// Token: 0x04000429 RID: 1065
		internal static Vector2 k_InfinityVectorNegative = new Vector2(-32767f, -32767f);

		// Token: 0x0400042A RID: 1066
		public TMP_Text textComponent;

		// Token: 0x0400042B RID: 1067
		public int characterCount;

		// Token: 0x0400042C RID: 1068
		public int spriteCount;

		// Token: 0x0400042D RID: 1069
		public int spaceCount;

		// Token: 0x0400042E RID: 1070
		public int wordCount;

		// Token: 0x0400042F RID: 1071
		public int linkCount;

		// Token: 0x04000430 RID: 1072
		public int lineCount;

		// Token: 0x04000431 RID: 1073
		public int pageCount;

		// Token: 0x04000432 RID: 1074
		public int materialCount;

		// Token: 0x04000433 RID: 1075
		public TMP_CharacterInfo[] characterInfo;

		// Token: 0x04000434 RID: 1076
		public TMP_WordInfo[] wordInfo;

		// Token: 0x04000435 RID: 1077
		public TMP_LinkInfo[] linkInfo;

		// Token: 0x04000436 RID: 1078
		public TMP_LineInfo[] lineInfo;

		// Token: 0x04000437 RID: 1079
		public TMP_PageInfo[] pageInfo;

		// Token: 0x04000438 RID: 1080
		public TMP_MeshInfo[] meshInfo;

		// Token: 0x04000439 RID: 1081
		private TMP_MeshInfo[] m_CachedMeshInfo;
	}
}
  • Вопрос задан
  • 70 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы
31 июл. 2021, в 02:20
7000 руб./за проект
31 июл. 2021, в 01:10
5000 руб./за проект
31 июл. 2021, в 00:11
3500 руб./за проект