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

namespace MTAssets.UltimateLODSystem
{
	// Token: 0x02000673 RID: 1651
	public class UltimateLevelOfDetailMeshes : MonoBehaviour
	{
		// Token: 0x0600A884 RID: 43140 RVA: 0x002B2E0C File Offset: 0x002B100C
		[CallerCount(10)]
		[CachedScanResults(RefRangeStart = 7527, RefRangeEnd = 7537, XrefRangeStart = 7527, XrefRangeEnd = 7537, 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: 0x0600A885 RID: 43141 RVA: 0x002B2E64 File Offset: 0x002B1064
		[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: 0x0600A886 RID: 43142 RVA: 0x002B2EB4 File Offset: 0x002B10B4
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 656441, XrefRangeEnd = 656457, 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: 0x0600A887 RID: 43143 RVA: 0x002B2F20 File Offset: 0x002B1120
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 656457, XrefRangeEnd = 656461, 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: 0x0600A888 RID: 43144 RVA: 0x002B2F88 File Offset: 0x002B1188
		[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: 0x0600A889 RID: 43145 RVA: 0x002B2FD8 File Offset: 0x002B11D8
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 656461, XrefRangeEnd = 656473, 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: 0x0600A88A RID: 43146 RVA: 0x002B3044 File Offset: 0x002B1244
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 656473, XrefRangeEnd = 656478, 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: 0x0600A88B RID: 43147 RVA: 0x002B30AC File Offset: 0x002B12AC
		[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: 0x0600A88C RID: 43148 RVA: 0x002B30F8 File Offset: 0x002B12F8
		// 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, 100676334);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetQuantityOfLods_Public_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676335);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_SetMeshOfThisLodGroup_Public_Void_Int32_Mesh_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676336);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetMeshOfThisLodGroup_Public_Mesh_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676337);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_isMaterialChangesEnabledForThisMesh_Public_Boolean_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676338);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_SetMaterialArrayOfThisLodGroup_Public_Void_Int32_Il2CppReferenceArray_1_Material_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676339);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr_GetMaterialArrayOfThisLodGroup_Public_Il2CppReferenceArray_1_Material_Int32_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676340);
			UltimateLevelOfDetailMeshes.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<UltimateLevelOfDetailMeshes>.NativeClassPtr, 100676341);
		}

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

		// Token: 0x170038F7 RID: 14583
		// (get) Token: 0x0600A88E RID: 43150 RVA: 0x002B31F0 File Offset: 0x002B13F0
		// (set) Token: 0x0600A88F RID: 43151 RVA: 0x002B3224 File Offset: 0x002B1424
		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: 0x170038F8 RID: 14584
		// (get) Token: 0x0600A890 RID: 43152 RVA: 0x002B324C File Offset: 0x002B144C
		// (set) Token: 0x0600A891 RID: 43153 RVA: 0x002B3274 File Offset: 0x002B1474
		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: 0x040070F1 RID: 28913
		private static readonly IntPtr NativeFieldInfoPtr_responsibleUlod;

		// Token: 0x040070F2 RID: 28914
		private static readonly IntPtr NativeFieldInfoPtr_idOfOriginalMeshItemOfThisInResponsibleUlod;

		// Token: 0x040070F3 RID: 28915
		private static readonly IntPtr NativeMethodInfoPtr_GetResponsibleUlodComponent_Public_UltimateLevelOfDetail_0;

		// Token: 0x040070F4 RID: 28916
		private static readonly IntPtr NativeMethodInfoPtr_GetQuantityOfLods_Public_Int32_0;

		// Token: 0x040070F5 RID: 28917
		private static readonly IntPtr NativeMethodInfoPtr_SetMeshOfThisLodGroup_Public_Void_Int32_Mesh_0;

		// Token: 0x040070F6 RID: 28918
		private static readonly IntPtr NativeMethodInfoPtr_GetMeshOfThisLodGroup_Public_Mesh_Int32_0;

		// Token: 0x040070F7 RID: 28919
		private static readonly IntPtr NativeMethodInfoPtr_isMaterialChangesEnabledForThisMesh_Public_Boolean_0;

		// Token: 0x040070F8 RID: 28920
		private static readonly IntPtr NativeMethodInfoPtr_SetMaterialArrayOfThisLodGroup_Public_Void_Int32_Il2CppReferenceArray_1_Material_0;

		// Token: 0x040070F9 RID: 28921
		private static readonly IntPtr NativeMethodInfoPtr_GetMaterialArrayOfThisLodGroup_Public_Il2CppReferenceArray_1_Material_Int32_0;

		// Token: 0x040070FA RID: 28922
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
