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

namespace MTAssets.UltimateLODSystem
{
	// Token: 0x02000610 RID: 1552
	public class RuntimeInstancesDetector : MonoBehaviour
	{
		// Token: 0x06009F53 RID: 40787 RVA: 0x0028C7EC File Offset: 0x0028A9EC
		[CallerCount(1)]
		[CachedScanResults(RefRangeStart = 623082, RefRangeEnd = 623083, XrefRangeStart = 623072, XrefRangeEnd = 623082, 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: 0x06009F54 RID: 40788 RVA: 0x0028C848 File Offset: 0x0028AA48
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 623083, XrefRangeEnd = 623098, 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: 0x06009F55 RID: 40789 RVA: 0x0028C894 File Offset: 0x0028AA94
		// 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, 100675556);
			RuntimeInstancesDetector.NativeMethodInfoPtr__ctor_Public_Void_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<RuntimeInstancesDetector>.NativeClassPtr, 100675557);
		}

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

		// Token: 0x1700360F RID: 13839
		// (get) Token: 0x06009F57 RID: 40791 RVA: 0x0028C914 File Offset: 0x0028AB14
		// (set) Token: 0x06009F58 RID: 40792 RVA: 0x0028C948 File Offset: 0x0028AB48
		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: 0x17003610 RID: 13840
		// (get) Token: 0x06009F59 RID: 40793 RVA: 0x0028C970 File Offset: 0x0028AB70
		// (set) Token: 0x06009F5A RID: 40794 RVA: 0x0028C9A4 File Offset: 0x0028ABA4
		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: 0x04006AAF RID: 27311
		private static readonly IntPtr NativeFieldInfoPtr_instancesOfUlodInThisScene;

		// Token: 0x04006AB0 RID: 27312
		private static readonly IntPtr NativeFieldInfoPtr_instancesOfUlodOptimizerInThisScene;

		// Token: 0x04006AB1 RID: 27313
		private static readonly IntPtr NativeMethodInfoPtr_RegisterNewUlodOptimizerInThisScene_Public_Void_UltimateLevelOfDetailOptimizer_0;

		// Token: 0x04006AB2 RID: 27314
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_0;
	}
}
