using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppSystem.Collections.Generic;
using UnityEngine;

namespace MTAssets.UltimateLODSystem
{
	// Token: 0x02000668 RID: 1640
	public class RuntimeInstancesDetector : MonoBehaviour
	{
		// Token: 0x0600A7A6 RID: 42918 RVA: 0x002AF528 File Offset: 0x002AD728
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 655384, RefRangeEnd = 655385, XrefRangeStart = 655374, XrefRangeEnd = 655384, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe void RegisterNewUlodOptimizerInThisScene(UltimateLevelOfDetailOptimizer optimizer)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(optimizer);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(RuntimeInstancesDetector.NativeMethodInfoPtr_RegisterNewUlodOptimizerInThisScene_Public_Void_UltimateLevelOfDetailOptimizer_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			}
		}

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

		// Token: 0x0600A7A8 RID: 42920 RVA: 0x002AF5D0 File Offset: 0x002AD7D0
		// Note: this type is marked as 'beforefieldinit'.
		static RuntimeInstancesDetector()
		{
			Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem", "RuntimeInstancesDetector");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr);
			RuntimeInstancesDetector.NativeFieldInfoPtr_instancesOfUlodInThisScene = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr, "instancesOfUlodInThisScene");
			RuntimeInstancesDetector.NativeFieldInfoPtr_instancesOfUlodOptimizerInThisScene = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr, "instancesOfUlodOptimizerInThisScene");
			RuntimeInstancesDetector.NativeMethodInfoPtr_RegisterNewUlodOptimizerInThisScene_Public_Void_UltimateLevelOfDetailOptimizer_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr, 100676269);
			RuntimeInstancesDetector.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr, 100676270);
		}

		// Token: 0x0600A7A9 RID: 42921 RVA: 0x0000351C File Offset: 0x0000171C
		public RuntimeInstancesDetector(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170038AA RID: 14506
		// (get) Token: 0x0600A7AA RID: 42922 RVA: 0x002AF650 File Offset: 0x002AD850
		// (set) Token: 0x0600A7AB RID: 42923 RVA: 0x002AF684 File Offset: 0x002AD884
		public unsafe List<UltimateLevelOfDetail> instancesOfUlodInThisScene
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(RuntimeInstancesDetector.NativeFieldInfoPtr_instancesOfUlodInThisScene);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new List<UltimateLevelOfDetail>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(RuntimeInstancesDetector.NativeFieldInfoPtr_instancesOfUlodInThisScene), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x170038AB RID: 14507
		// (get) Token: 0x0600A7AC RID: 42924 RVA: 0x002AF6AC File Offset: 0x002AD8AC
		// (set) Token: 0x0600A7AD RID: 42925 RVA: 0x002AF6E0 File Offset: 0x002AD8E0
		public unsafe List<UltimateLevelOfDetailOptimizer> instancesOfUlodOptimizerInThisScene
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(RuntimeInstancesDetector.NativeFieldInfoPtr_instancesOfUlodOptimizerInThisScene);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new List<UltimateLevelOfDetailOptimizer>(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(RuntimeInstancesDetector.NativeFieldInfoPtr_instancesOfUlodOptimizerInThisScene), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04007058 RID: 28760
		private static readonly IntPtr NativeFieldInfoPtr_instancesOfUlodInThisScene;

		// Token: 0x04007059 RID: 28761
		private static readonly IntPtr NativeFieldInfoPtr_instancesOfUlodOptimizerInThisScene;

		// Token: 0x0400705A RID: 28762
		private static readonly IntPtr NativeMethodInfoPtr_RegisterNewUlodOptimizerInThisScene_Public_Void_UltimateLevelOfDetailOptimizer_0;

		// Token: 0x0400705B RID: 28763
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
