using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using UnityEngine;

namespace MTAssets.UltimateLODSystem
{
	// Token: 0x0200061B RID: 1563
	public class UltimateLevelOfDetailMeshes : MonoBehaviour
	{
		// Token: 0x0600A031 RID: 41009 RVA: 0x002900D0 File Offset: 0x0028E2D0
		[CallerCount(10)]
		[CachedScanResults(RefRangeStart = 7233, RefRangeEnd = 7243, XrefRangeStart = 7233, XrefRangeEnd = 7243, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe UltimateLevelOfDetail GetResponsibleUlodComponent()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetResponsibleUlodComponent_Public_UltimateLevelOfDetail_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			IntPtr intPtr3 = intPtr;
			return (intPtr3 != 0) ? new UltimateLevelOfDetail(intPtr3) : null;
		}

		// Token: 0x0600A032 RID: 41010 RVA: 0x00290128 File Offset: 0x0028E328
		[CallerCount(0)]
		public unsafe int GetQuantityOfLods()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetQuantityOfLods_Public_Int32_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A033 RID: 41011 RVA: 0x00290178 File Offset: 0x0028E378
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 624142, XrefRangeEnd = 624159, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void SetMeshOfThisLodGroup(int level, Mesh newMesh)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref level;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(newMesh);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_SetMeshOfThisLodGroup_Public_Void_Int32_Mesh_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A034 RID: 41012 RVA: 0x002901E4 File Offset: 0x0028E3E4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 624159, XrefRangeEnd = 624163, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Mesh GetMeshOfThisLodGroup(int level)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref level;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetMeshOfThisLodGroup_Public_Mesh_Int32_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Mesh(intPtr3) : null;
			}
		}

		// Token: 0x0600A035 RID: 41013 RVA: 0x0029024C File Offset: 0x0028E44C
		[CallerCount(0)]
		public unsafe bool isMaterialChangesEnabledForThisMesh()
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_isMaterialChangesEnabledForThisMesh_Public_Boolean_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x0600A036 RID: 41014 RVA: 0x0029029C File Offset: 0x0028E49C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 624163, XrefRangeEnd = 624175, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void SetMaterialArrayOfThisLodGroup(int level, Il2CppReferenceArray<Material> newMaterialArray)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref level;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(newMaterialArray);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_SetMaterialArrayOfThisLodGroup_Public_Void_Int32_Il2CppReferenceArray_1_Material_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A037 RID: 41015 RVA: 0x00290308 File Offset: 0x0028E508
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 624175, XrefRangeEnd = 624180, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe Il2CppReferenceArray<Material> GetMaterialArrayOfThisLodGroup(int level)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref level;
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetMaterialArrayOfThisLodGroup_Public_Il2CppReferenceArray_1_Material_Int32_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				IntPtr intPtr3 = intPtr;
				return (intPtr3 != 0) ? new Il2CppReferenceArray<Material>(intPtr3) : null;
			}
		}

		// Token: 0x0600A038 RID: 41016 RVA: 0x00290370 File Offset: 0x0028E570
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 0, XrefRangeEnd = 0, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe UltimateLevelOfDetailMeshes()
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr))
		{
			IntPtr* ptr = null;
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(UltimateLevelOfDetailMeshes.NativeMethodInfoPtr__ctor_Public_Void_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x0600A039 RID: 41017 RVA: 0x002903BC File Offset: 0x0028E5BC
		// Note: this type is marked as 'beforefieldinit'.
		static UltimateLevelOfDetailMeshes()
		{
			Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem", "UltimateLevelOfDetailMeshes");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr);
			UltimateLevelOfDetailMeshes.NativeFieldInfoPtr_responsibleUlod = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, "responsibleUlod");
			UltimateLevelOfDetailMeshes.NativeFieldInfoPtr_idOfOriginalMeshItemOfThisInResponsibleUlod = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, "idOfOriginalMeshItemOfThisInResponsibleUlod");
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetResponsibleUlodComponent_Public_UltimateLevelOfDetail_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675621);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetQuantityOfLods_Public_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675622);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_SetMeshOfThisLodGroup_Public_Void_Int32_Mesh_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675623);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetMeshOfThisLodGroup_Public_Mesh_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675624);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_isMaterialChangesEnabledForThisMesh_Public_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675625);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_SetMaterialArrayOfThisLodGroup_Public_Void_Int32_Il2CppReferenceArray_1_Material_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675626);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetMaterialArrayOfThisLodGroup_Public_Il2CppReferenceArray_1_Material_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675627);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100675628);
		}

		// Token: 0x0600A03A RID: 41018 RVA: 0x0000351C File Offset: 0x0000171C
		public UltimateLevelOfDetailMeshes(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x1700365C RID: 13916
		// (get) Token: 0x0600A03B RID: 41019 RVA: 0x002904B4 File Offset: 0x0028E6B4
		// (set) Token: 0x0600A03C RID: 41020 RVA: 0x002904E8 File Offset: 0x0028E6E8
		public unsafe UltimateLevelOfDetail responsibleUlod
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(UltimateLevelOfDetailMeshes.NativeFieldInfoPtr_responsibleUlod);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new UltimateLevelOfDetail(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(UltimateLevelOfDetailMeshes.NativeFieldInfoPtr_responsibleUlod), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x1700365D RID: 13917
		// (get) Token: 0x0600A03D RID: 41021 RVA: 0x00290510 File Offset: 0x0028E710
		// (set) Token: 0x0600A03E RID: 41022 RVA: 0x00290538 File Offset: 0x0028E738
		public unsafe int idOfOriginalMeshItemOfThisInResponsibleUlod
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(UltimateLevelOfDetailMeshes.NativeFieldInfoPtr_idOfOriginalMeshItemOfThisInResponsibleUlod);
				return *intPtr;
			}
			set
			{
				*(IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(UltimateLevelOfDetailMeshes.NativeFieldInfoPtr_idOfOriginalMeshItemOfThisInResponsibleUlod)) = value;
			}
		}

		// Token: 0x04006B48 RID: 27464
		private static readonly IntPtr NativeFieldInfoPtr_responsibleUlod;

		// Token: 0x04006B49 RID: 27465
		private static readonly IntPtr NativeFieldInfoPtr_idOfOriginalMeshItemOfThisInResponsibleUlod;

		// Token: 0x04006B4A RID: 27466
		private static readonly IntPtr NativeMethodInfoPtr_GetResponsibleUlodComponent_Public_UltimateLevelOfDetail_0;

		// Token: 0x04006B4B RID: 27467
		private static readonly IntPtr NativeMethodInfoPtr_GetQuantityOfLods_Public_Int32_0;

		// Token: 0x04006B4C RID: 27468
		private static readonly IntPtr NativeMethodInfoPtr_SetMeshOfThisLodGroup_Public_Void_Int32_Mesh_0;

		// Token: 0x04006B4D RID: 27469
		private static readonly IntPtr NativeMethodInfoPtr_GetMeshOfThisLodGroup_Public_Mesh_Int32_0;

		// Token: 0x04006B4E RID: 27470
		private static readonly IntPtr NativeMethodInfoPtr_isMaterialChangesEnabledForThisMesh_Public_Boolean_0;

		// Token: 0x04006B4F RID: 27471
		private static readonly IntPtr NativeMethodInfoPtr_SetMaterialArrayOfThisLodGroup_Public_Void_Int32_Il2CppReferenceArray_1_Material_0;

		// Token: 0x04006B50 RID: 27472
		private static readonly IntPtr NativeMethodInfoPtr_GetMaterialArrayOfThisLodGroup_Public_Il2CppReferenceArray_1_Material_Int32_0;

		// Token: 0x04006B51 RID: 27473
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
