Decompiled source of CustomCharacters v1.0.1

FastSpringBone.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using Microsoft.CodeAnalysis;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.Jobs;
using UnityEngine.Profiling;
using VRM.FastSpringBones.Blittables;
using VRM.FastSpringBones.Components;
using VRM.FastSpringBones.NativeWrappers;
using VRM.FastSpringBones.Registries;
using VRM.FastSpringBones.Schedulers;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsUnmanagedAttribute : Attribute
	{
	}
}
namespace VRM.FastSpringBones.Schedulers
{
	public sealed class PullTransformJobScheduler : IDisposable
	{
		private struct Job : IJobParallelForTransform
		{
			[NativeDisableUnsafePtrRestriction]
			public unsafe BlittableTransform** TransformPointers;

			public unsafe void Execute(int index, TransformAccess transform)
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				TransformPointers[index]->PullFrom(transform);
			}
		}

		private unsafe BlittableTransform** _transformPointers;

		private TransformAccessArray _transformAccessArray;

		private readonly CustomSampler _sampler = CustomSampler.Create("Schedule CopyFromTransformJob", false);

		private readonly TransformRegistry _transformRegistry;

		private bool _dirty = true;

		private IReadOnlyList<NativeTransform> Targets => _transformRegistry.PullTargets;

		public PullTransformJobScheduler(TransformRegistry transformRegistry)
		{
			_transformRegistry = transformRegistry;
			_transformRegistry.SubscribeOnValueChanged(OnTransformChanged);
		}

		private void OnTransformChanged()
		{
			_dirty = true;
		}

		public unsafe JobHandle Schedule(JobHandle dependOn = default(JobHandle))
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			if (Targets.Count == 0)
			{
				return dependOn;
			}
			if (_dirty)
			{
				ReconstructBuffers();
				_dirty = false;
			}
			Job job = default(Job);
			job.TransformPointers = _transformPointers;
			return IJobParallelForTransformExtensions.Schedule<Job>(job, _transformAccessArray, dependOn);
		}

		private unsafe void ReconstructBuffers()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ReleaseBuffers();
			IReadOnlyList<NativeTransform> targets = Targets;
			_transformPointers = (BlittableTransform**)UnsafeUtility.Malloc((long)(sizeof(BlittableTransform*) * targets.Count), 16, (Allocator)4);
			_transformAccessArray = new TransformAccessArray(targets.Count, -1);
			for (int i = 0; i < targets.Count; i++)
			{
				_transformPointers[i] = targets[i].GetUnsafePtr();
				((TransformAccessArray)(ref _transformAccessArray)).Add(targets[i].Transform);
			}
		}

		public void Dispose()
		{
			ReleaseBuffers();
			_transformRegistry.UnSubscribeOnValueChanged(OnTransformChanged);
		}

		private unsafe void ReleaseBuffers()
		{
			if (((TransformAccessArray)(ref _transformAccessArray)).isCreated)
			{
				((TransformAccessArray)(ref _transformAccessArray)).Dispose();
			}
			if (_transformPointers != null)
			{
				UnsafeUtility.Free((void*)_transformPointers, (Allocator)4);
				_transformPointers = null;
			}
		}
	}
	public sealed class PushTransformJobScheduler : IDisposable
	{
		private struct Job : IJobParallelForTransform
		{
			[NativeDisableUnsafePtrRestriction]
			public unsafe BlittableTransform** TransformPointers;

			public unsafe void Execute(int index, TransformAccess transform)
			{
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				TransformPointers[index]->PushTo(transform);
			}
		}

		private unsafe BlittableTransform** _transformPointers;

		private TransformAccessArray _transformAccessArray;

		private readonly CustomSampler _sampler = CustomSampler.Create("Schedule CopyFromTransformJob", false);

		private readonly TransformRegistry _transformRegistry;

		private bool _dirty = true;

		private IReadOnlyList<NativeTransform> Targets => _transformRegistry.PushTargets;

		public PushTransformJobScheduler(TransformRegistry transformRegistry)
		{
			_transformRegistry = transformRegistry;
			_transformRegistry.SubscribeOnValueChanged(OnTransformChanged);
		}

		private void OnTransformChanged()
		{
			_dirty = true;
		}

		public unsafe JobHandle Schedule(JobHandle dependOn = default(JobHandle))
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			if (Targets.Count == 0)
			{
				return dependOn;
			}
			if (_dirty)
			{
				ReconstructBuffers();
				_dirty = false;
			}
			Job job = default(Job);
			job.TransformPointers = _transformPointers;
			return IJobParallelForTransformExtensions.Schedule<Job>(job, _transformAccessArray, dependOn);
		}

		private unsafe void ReconstructBuffers()
		{
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ReleaseBuffers();
			IReadOnlyList<NativeTransform> targets = Targets;
			_transformPointers = (BlittableTransform**)UnsafeUtility.Malloc((long)(sizeof(BlittableTransform*) * targets.Count), 16, (Allocator)4);
			_transformAccessArray = new TransformAccessArray(targets.Count, -1);
			for (int i = 0; i < targets.Count; i++)
			{
				_transformPointers[i] = targets[i].GetUnsafePtr();
				((TransformAccessArray)(ref _transformAccessArray)).Add(targets[i].Transform);
			}
		}

		public void Dispose()
		{
			ReleaseBuffers();
			_transformRegistry.UnSubscribeOnValueChanged(OnTransformChanged);
		}

		private unsafe void ReleaseBuffers()
		{
			if (((TransformAccessArray)(ref _transformAccessArray)).isCreated)
			{
				((TransformAccessArray)(ref _transformAccessArray)).Dispose();
			}
			if (_transformPointers != null)
			{
				UnsafeUtility.Free((void*)_transformPointers, (Allocator)4);
				_transformPointers = null;
			}
		}
	}
	public sealed class UpdateSpringBoneJobScheduler : IDisposable
	{
		private struct Job : IJobParallelFor
		{
			[NativeDisableUnsafePtrRestriction]
			public unsafe BlittableRootBone** RootBonePointers;

			public float DeltaTime;

			public unsafe void Execute(int index)
			{
				RootBonePointers[index]->Update(DeltaTime);
			}
		}

		private unsafe BlittableRootBone** _rootBonePointers;

		private readonly RootBoneRegistry _rootBoneRegistry;

		private readonly CustomSampler _sampler = CustomSampler.Create("Schedule CopyFromTransformJob", false);

		private bool _dirty = true;

		private IReadOnlyList<NativePointer<BlittableRootBone>> Targets => _rootBoneRegistry.Items;

		public UpdateSpringBoneJobScheduler(RootBoneRegistry rootBoneRegistry)
		{
			_rootBoneRegistry = rootBoneRegistry;
			_rootBoneRegistry.SubscribeOnValueChanged(OnRootBoneChanged);
		}

		public void Dispose()
		{
			ReleaseBuffer();
			_rootBoneRegistry.UnSubscribeOnValueChanged(OnRootBoneChanged);
		}

		private void OnRootBoneChanged()
		{
			_dirty = true;
		}

		public unsafe JobHandle Schedule(JobHandle dependOn = default(JobHandle))
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			if (Targets.Count == 0)
			{
				return dependOn;
			}
			if (_dirty)
			{
				ReconstructBuffers();
				_dirty = false;
			}
			Job job = default(Job);
			job.RootBonePointers = _rootBonePointers;
			job.DeltaTime = Time.deltaTime;
			return IJobParallelForExtensions.Schedule<Job>(job, Targets.Count, 0, dependOn);
		}

		private unsafe void ReconstructBuffers()
		{
			ReleaseBuffer();
			_rootBonePointers = (BlittableRootBone**)UnsafeUtility.Malloc((long)(sizeof(BlittableTransform*) * Targets.Count), 16, (Allocator)4);
			for (int i = 0; i < Targets.Count; i++)
			{
				_rootBonePointers[i] = Targets[i].GetUnsafePtr();
			}
		}

		private unsafe void ReleaseBuffer()
		{
			if (_rootBonePointers != null)
			{
				UnsafeUtility.Free((void*)_rootBonePointers, (Allocator)4);
				_rootBonePointers = null;
			}
		}
	}
}
namespace VRM.FastSpringBones.Registries
{
	public sealed class ColliderGroupRegistry : Registry<NativeColliderGroups>
	{
	}
	public class Registry<T>
	{
		private readonly List<T> _items = new List<T>();

		private Action _onValueChanged;

		public IReadOnlyList<T> Items => _items;

		public void Register(T value)
		{
			_items.Add(value);
			_onValueChanged?.Invoke();
		}

		public void Unregister(T value)
		{
			_items.Remove(value);
			_onValueChanged?.Invoke();
		}

		public void SubscribeOnValueChanged(Action action)
		{
			_onValueChanged = (Action)Delegate.Combine(_onValueChanged, action);
		}

		public void UnSubscribeOnValueChanged(Action action)
		{
			_onValueChanged = (Action)Delegate.Remove(_onValueChanged, action);
		}
	}
	public sealed class RootBoneRegistry : Registry<NativePointer<BlittableRootBone>>
	{
	}
	public sealed class TransformRegistry
	{
		private readonly List<NativeTransform> _transforms = new List<NativeTransform>();

		private readonly List<NativeTransform> _pullTargets = new List<NativeTransform>();

		private readonly List<NativeTransform> _pushTargets = new List<NativeTransform>();

		private Action _onValueChanged;

		public IReadOnlyList<NativeTransform> Transforms => _transforms;

		public IReadOnlyList<NativeTransform> PullTargets => _pullTargets;

		public IReadOnlyList<NativeTransform> PushTargets => _pushTargets;

		public void SubscribeOnValueChanged(Action action)
		{
			_onValueChanged = (Action)Delegate.Combine(_onValueChanged, action);
		}

		public void UnSubscribeOnValueChanged(Action action)
		{
			_onValueChanged = (Action)Delegate.Remove(_onValueChanged, action);
		}

		public void Register(NativeTransform nativeTransform, TransformSynchronizationType synchronizationType)
		{
			_transforms.Add(nativeTransform);
			switch (synchronizationType)
			{
			case TransformSynchronizationType.PullOnly:
				_pullTargets.Add(nativeTransform);
				break;
			case TransformSynchronizationType.PushOnly:
				_pushTargets.Add(nativeTransform);
				break;
			default:
				throw new ArgumentOutOfRangeException("synchronizationType", synchronizationType, null);
			}
			_onValueChanged?.Invoke();
		}

		public void Unregister(NativeTransform nativeTransform)
		{
			_transforms.Remove(nativeTransform);
			if (_pullTargets.Contains(nativeTransform))
			{
				_pullTargets.Remove(nativeTransform);
			}
			if (_pushTargets.Contains(nativeTransform))
			{
				_pushTargets.Remove(nativeTransform);
			}
			_onValueChanged?.Invoke();
		}
	}
	public enum TransformSynchronizationType
	{
		PullOnly,
		PushOnly
	}
}
namespace VRM.FastSpringBones.NativeWrappers
{
	public sealed class NativeColliderGroup : IDisposable
	{
		private readonly NativePointer<BlittableColliderGroup> _nativePointer;

		private NativeArray<BlittableCollider> Colliders { get; }

		public unsafe BlittableColliderGroup* GetUnsafePtr()
		{
			return _nativePointer.GetUnsafePtr();
		}

		public unsafe NativeColliderGroup(BlittableCollider[] colliders, NativeTransform nativeTransform)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			Colliders = new NativeArray<BlittableCollider>(colliders, (Allocator)4);
			_nativePointer = new NativePointer<BlittableColliderGroup>(new BlittableColliderGroup(Colliders, nativeTransform.GetUnsafePtr()));
		}

		public void Dispose()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			if (Colliders.IsCreated)
			{
				Colliders.Dispose();
			}
			_nativePointer.Dispose();
		}
	}
	public sealed class NativeColliderGroups : IDisposable
	{
		private readonly NativePointer<BlittableColliderGroups> _nativePointer = new NativePointer<BlittableColliderGroups>();

		private NativeArray<BlittableColliderGroup> _colliderGroupArray;

		private IReadOnlyList<FastSpringBoneColliderGroup> _colliderGroups;

		private bool _isDisposed;

		public IReadOnlyList<FastSpringBoneColliderGroup> ColliderGroups
		{
			get
			{
				return _colliderGroups;
			}
			set
			{
				_colliderGroups = value;
				UpdateColliderGroups();
			}
		}

		public unsafe BlittableColliderGroups* GetUnsafePtr()
		{
			return _nativePointer.GetUnsafePtr();
		}

		public void DrawGizmos()
		{
			_nativePointer.Value.DrawGizmos();
		}

		private void UpdateColliderGroups()
		{
			if (!_isDisposed)
			{
				if (_colliderGroupArray.IsCreated)
				{
					_colliderGroupArray.Dispose();
				}
				CreateColliderGroupArray(_colliderGroups);
				UpdateData();
			}
		}

		public NativeColliderGroups(IReadOnlyList<FastSpringBoneColliderGroup> colliderGroups)
		{
			_colliderGroups = colliderGroups;
			UpdateColliderGroups();
		}

		public void Dispose()
		{
			if (_colliderGroupArray.IsCreated)
			{
				_colliderGroupArray.Dispose();
				_isDisposed = true;
			}
			_nativePointer.Dispose();
		}

		private unsafe void CreateColliderGroupArray(IReadOnlyList<FastSpringBoneColliderGroup> colliderGroups)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			_colliderGroupArray = new NativeArray<BlittableColliderGroup>(colliderGroups.Count, (Allocator)4, (NativeArrayOptions)1);
			for (int i = 0; i < _colliderGroupArray.Length; i++)
			{
				_colliderGroupArray[i] = *colliderGroups[i].ColliderGroupPtr;
			}
		}

		private unsafe void UpdateData()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			_nativePointer.Value = new BlittableColliderGroups((BlittableColliderGroup*)NativeArrayUnsafeUtility.GetUnsafePtr<BlittableColliderGroup>(_colliderGroupArray), _colliderGroupArray.Length);
		}
	}
	public sealed class NativePointer<T> : IDisposable where T : unmanaged
	{
		private unsafe readonly T* _unsafePtr;

		public unsafe T Value
		{
			get
			{
				return *_unsafePtr;
			}
			set
			{
				*_unsafePtr = value;
			}
		}

		public unsafe T* GetUnsafePtr()
		{
			return _unsafePtr;
		}

		public unsafe NativePointer()
		{
			_unsafePtr = (T*)UnsafeUtility.Malloc((long)sizeof(T), 16, (Allocator)4);
		}

		public unsafe NativePointer(T value)
		{
			_unsafePtr = (T*)UnsafeUtility.Malloc((long)sizeof(T), 16, (Allocator)4);
			Value = value;
		}

		public unsafe void Dispose()
		{
			UnsafeUtility.Free((void*)_unsafePtr, (Allocator)4);
		}
	}
	public sealed class NativePoints : IDisposable
	{
		private readonly NativePointer<BlittablePoints> _nativePointer;

		private NativeArray<BlittablePoint> _buffer;

		public unsafe BlittablePoints* GetUnsafePtr()
		{
			return _nativePointer.GetUnsafePtr();
		}

		public unsafe NativePoints(IList<NativePointer<BlittablePoint>> points)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			_buffer = new NativeArray<BlittablePoint>(points.Count, (Allocator)4, (NativeArrayOptions)1);
			for (int i = 0; i < _buffer.Length; i++)
			{
				_buffer[i] = points[i].Value;
			}
			_nativePointer = new NativePointer<BlittablePoints>(new BlittablePoints((BlittablePoint*)NativeArrayUnsafeUtility.GetUnsafePtr<BlittablePoint>(_buffer), _buffer.Length));
		}

		public void Dispose()
		{
			if (_buffer.IsCreated)
			{
				_buffer.Dispose();
			}
			_nativePointer.Dispose();
		}
	}
	public sealed class NativeTransform : IDisposable
	{
		private readonly NativePointer<BlittableTransform> _nativePointer;

		private readonly TransformRegistry _transformRegistry;

		public Transform Transform { get; }

		public BlittableTransform Value => _nativePointer.Value;

		public unsafe BlittableTransform* GetUnsafePtr()
		{
			return _nativePointer.GetUnsafePtr();
		}

		public unsafe NativeTransform(TransformRegistry transformRegistry, TransformSynchronizationType transformSynchronizationType, Transform transform, NativeTransform parent = null)
		{
			_nativePointer = new NativePointer<BlittableTransform>(new BlittableTransform((parent != null) ? parent.GetUnsafePtr() : null, transform));
			Transform = transform;
			_transformRegistry = transformRegistry;
			_transformRegistry.Register(this, transformSynchronizationType);
		}

		public void Dispose()
		{
			_transformRegistry.Unregister(this);
			_nativePointer.Dispose();
		}
	}
}
namespace VRM.FastSpringBones.Components
{
	public sealed class FastSpringBoneColliderGroup : MonoBehaviour
	{
		private NativeTransform _nativeTransform;

		private NativeColliderGroup _nativeColliderGroup;

		public unsafe BlittableColliderGroup* ColliderGroupPtr => _nativeColliderGroup.GetUnsafePtr();

		public void Initialize(TransformRegistry transformRegistry, BlittableCollider[] colliders)
		{
			_nativeTransform = new NativeTransform(transformRegistry, TransformSynchronizationType.PullOnly, ((Component)this).transform);
			_nativeColliderGroup = new NativeColliderGroup(colliders, _nativeTransform);
		}

		private void OnDestroy()
		{
			_nativeTransform?.Dispose();
			_nativeColliderGroup?.Dispose();
		}
	}
	[DefaultExecutionOrder(11000)]
	public sealed class FastSpringBoneScheduler : MonoBehaviour
	{
		[SerializeField]
		private bool showGizmos;

		private CustomSampler _updateSampler;

		private PullTransformJobScheduler _pullTransformJobScheduler;

		private PushTransformJobScheduler _pushTransformJobScheduler;

		private UpdateSpringBoneJobScheduler _updateSpringBoneJobScheduler;

		private RootBoneRegistry _rootBoneRegistry;

		private ColliderGroupRegistry _colliderGroupRegistry;

		private JobHandle _prevJobHandle;

		public bool ShowGizmos
		{
			get
			{
				return showGizmos;
			}
			set
			{
				showGizmos = value;
			}
		}

		public void Initialize(RootBoneRegistry rootBoneRegistry, TransformRegistry transformRegistry, ColliderGroupRegistry colliderGroupRegistry)
		{
			_rootBoneRegistry = rootBoneRegistry;
			_colliderGroupRegistry = colliderGroupRegistry;
			_updateSampler = CustomSampler.Create("FastSpringBone(Update)", false);
			_pullTransformJobScheduler = new PullTransformJobScheduler(transformRegistry);
			_pushTransformJobScheduler = new PushTransformJobScheduler(transformRegistry);
			_updateSpringBoneJobScheduler = new UpdateSpringBoneJobScheduler(_rootBoneRegistry);
			_rootBoneRegistry.SubscribeOnValueChanged(OnRootBoneChanged);
		}

		private void OnDestroy()
		{
			_rootBoneRegistry.UnSubscribeOnValueChanged(OnRootBoneChanged);
			((JobHandle)(ref _prevJobHandle)).Complete();
			_pullTransformJobScheduler.Dispose();
			_pushTransformJobScheduler.Dispose();
			_updateSpringBoneJobScheduler.Dispose();
		}

		private void OnRootBoneChanged()
		{
			((JobHandle)(ref _prevJobHandle)).Complete();
		}

		private void LateUpdate()
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			((JobHandle)(ref _prevJobHandle)).Complete();
			JobHandle dependOn = _pullTransformJobScheduler.Schedule();
			dependOn = _updateSpringBoneJobScheduler.Schedule(dependOn);
			dependOn = _pushTransformJobScheduler.Schedule(dependOn);
			_prevJobHandle = dependOn;
		}
	}
	public sealed class FastSpringRootBone : IDisposable
	{
		private readonly TransformRegistry _transformRegistry;

		private readonly RootBoneRegistry _rootBoneRegistry;

		private readonly ColliderGroupRegistry _colliderGroupRegistry;

		private readonly Transform _transform;

		private float _radius;

		private NativeTransform _center;

		private IReadOnlyDictionary<Transform, int> _transformIndexMap;

		private NativeColliderGroups _nativeColliderGroups;

		private NativePoints _nativePoints;

		private NativePointer<BlittableRootBone> _rootBoneWrapper;

		private readonly IList<NativeTransform> _transformWrappers = new List<NativeTransform>();

		private readonly IList<NativePointer<BlittablePoint>> _points = new List<NativePointer<BlittablePoint>>();

		public IReadOnlyList<FastSpringBoneColliderGroup> ColliderGroups
		{
			get
			{
				return _nativeColliderGroups.ColliderGroups;
			}
			set
			{
				_nativeColliderGroups.ColliderGroups = value;
			}
		}

		public FastSpringRootBone(TransformRegistry transformRegistry, Transform transform, RootBoneRegistry rootBoneRegistry, ColliderGroupRegistry colliderGroupRegistry)
		{
			_transformRegistry = transformRegistry;
			_transform = transform;
			_rootBoneRegistry = rootBoneRegistry;
			_colliderGroupRegistry = colliderGroupRegistry;
		}

		public unsafe void Initialize(float gravityPower, Vector3 gravityDir, float dragForce, float stiffnessForce, IReadOnlyList<FastSpringBoneColliderGroup> colliderGroups, float radius, Transform center)
		{
			//IL_0081: Unknown result type (might be due to invalid IL or missing references)
			_radius = radius;
			if ((Object)(object)center != (Object)null)
			{
				_center = new NativeTransform(_transformRegistry, TransformSynchronizationType.PullOnly, center);
			}
			_nativeColliderGroups = new NativeColliderGroups(colliderGroups);
			NativeTransform parent = null;
			if (Object.op_Implicit((Object)(object)_transform.parent))
			{
				parent = new NativeTransform(_transformRegistry, TransformSynchronizationType.PullOnly, _transform.parent);
			}
			SetupRecursive(_transform, parent);
			_nativePoints = new NativePoints(_points);
			_rootBoneWrapper = new NativePointer<BlittableRootBone>(new BlittableRootBone(gravityPower, gravityDir, dragForce, stiffnessForce, _nativePoints.GetUnsafePtr()));
			_rootBoneRegistry.Register(_rootBoneWrapper);
			_colliderGroupRegistry.Register(_nativeColliderGroups);
		}

		public void Dispose()
		{
			_colliderGroupRegistry.Unregister(_nativeColliderGroups);
			_rootBoneRegistry.Unregister(_rootBoneWrapper);
			foreach (NativeTransform transformWrapper in _transformWrappers)
			{
				transformWrapper.Dispose();
			}
			foreach (NativePointer<BlittablePoint> point in _points)
			{
				point.Dispose();
			}
			_center?.Dispose();
			_nativeColliderGroups?.Dispose();
			_nativePoints.Dispose();
			_rootBoneWrapper.Dispose();
		}

		private unsafe void SetupRecursive(Transform trs, NativeTransform parent = null)
		{
			NativeTransform nativeTransform = new NativeTransform(_transformRegistry, TransformSynchronizationType.PushOnly, trs, parent);
			_transformWrappers.Add(nativeTransform);
			NativePointer<BlittablePoint> item = new NativePointer<BlittablePoint>(new BlittablePoint(trs, _radius, (_center != null) ? _center.GetUnsafePtr() : null, _nativeColliderGroups.GetUnsafePtr(), nativeTransform.GetUnsafePtr()));
			_points.Add(item);
			for (int i = 0; i < trs.childCount; i++)
			{
				SetupRecursive(trs.GetChild(i), nativeTransform);
			}
		}
	}
}
namespace VRM.FastSpringBones.Blittables
{
	public readonly struct BlittableCollider
	{
		public Vector3 Offset { get; }

		public float Radius { get; }

		public BlittableCollider(Vector3 offset, float radius)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			Offset = offset;
			Radius = radius;
		}
	}
	public readonly struct BlittableColliderGroup
	{
		public BlittableColliders Colliders { get; }

		public unsafe BlittableTransform* Transform { get; }

		public unsafe BlittableColliderGroup(NativeArray<BlittableCollider> colliders, BlittableTransform* transform)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			Colliders = new BlittableColliders((BlittableCollider*)NativeArrayUnsafeUtility.GetUnsafePtr<BlittableCollider>(colliders), colliders.Length);
			Transform = transform;
		}
	}
	public readonly struct BlittableColliderGroups
	{
		private unsafe readonly BlittableColliderGroup* _data;

		public int Length { get; }

		public unsafe BlittableColliderGroup this[int i] => _data[i];

		public unsafe void DrawGizmos()
		{
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < Length; i++)
			{
				BlittableColliderGroup blittableColliderGroup = this[i];
				BlittableColliders colliders = blittableColliderGroup.Colliders;
				for (int j = 0; j < colliders.Count; j++)
				{
					Gizmos.DrawWireSphere(blittableColliderGroup.Transform->WorldPosition, colliders[j].Radius);
				}
			}
		}

		public unsafe BlittableColliderGroups(BlittableColliderGroup* data, int length)
		{
			_data = data;
			Length = length;
		}
	}
	public struct BlittableColliders
	{
		private unsafe readonly BlittableCollider* _colliders;

		public int Count { get; }

		public unsafe BlittableCollider this[int i] => _colliders[i];

		public unsafe BlittableColliders(BlittableCollider* colliders, int count)
		{
			_colliders = colliders;
			Count = count;
		}
	}
	public struct BlittablePoint
	{
		private readonly float _length;

		private readonly Quaternion _localRotation;

		private readonly Vector3 _boneAxis;

		private readonly float _radius;

		private Vector3 _prevPosition;

		private unsafe readonly BlittableColliderGroups* _blittableColliderGroups;

		private unsafe readonly BlittableTransform* _center;

		private unsafe readonly BlittableTransform* _transform;

		public Vector3 CurrentPosition { get; private set; }

		public unsafe BlittablePoint(Transform transform, float radius, BlittableTransform* center, BlittableColliderGroups* blittableColliderGroups, BlittableTransform* blittableTransform)
		{
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0091: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			Matrix4x4 val3;
			Vector3 val4;
			if (transform.childCount == 0)
			{
				Vector3 val = transform.position - transform.parent.position;
				Vector3 val2 = transform.position + ((Vector3)(ref val)).normalized * 0.07f;
				val3 = transform.worldToLocalMatrix;
				val4 = ((Matrix4x4)(ref val3)).MultiplyPoint(val2);
			}
			else
			{
				Transform child = transform.GetChild(0);
				Vector3 lossyScale = child.lossyScale;
				val4 = child.localPosition;
				val4.x *= lossyScale.x;
				val4.y *= lossyScale.y;
				val4.z *= lossyScale.z;
			}
			Vector3 val5 = transform.TransformPoint(val4);
			Vector3 val6;
			if (center == null)
			{
				val6 = val5;
			}
			else
			{
				val3 = center->LocalToWorld;
				val3 = ((Matrix4x4)(ref val3)).inverse;
				val6 = ((Matrix4x4)(ref val3)).MultiplyPoint3x4(val5);
			}
			Vector3 prevPosition = val6;
			CurrentPosition = val6;
			_prevPosition = prevPosition;
			_localRotation = transform.localRotation;
			_boneAxis = ((Vector3)(ref val4)).normalized;
			_length = ((Vector3)(ref val4)).magnitude;
			_radius = radius;
			_blittableColliderGroups = blittableColliderGroups;
			_transform = blittableTransform;
			_center = center;
		}

		public unsafe void Update(float stiffnessForce, float dragForce, Vector3 external)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0093: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0112: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			_transform->UpdateLocalToWorldMatrix();
			Vector3 val;
			Vector3 val2;
			if (_center == null)
			{
				val = CurrentPosition;
				val2 = _prevPosition;
			}
			else
			{
				Matrix4x4 localToWorld = _center->LocalToWorld;
				val = ((Matrix4x4)(ref localToWorld)).MultiplyPoint3x4(CurrentPosition);
				val2 = ((Matrix4x4)(ref localToWorld)).MultiplyPoint3x4(_prevPosition);
			}
			Vector3 val3 = val + (val - val2) * (1f - dragForce) + _transform->ParentWorldRotation * _localRotation * _boneAxis * stiffnessForce + external;
			Vector3 worldPosition = _transform->WorldPosition;
			Vector3 val4 = val3 - worldPosition;
			val3 = worldPosition + ((Vector3)(ref val4)).normalized * _length;
			val3 = Collision(val3, worldPosition);
			if (_center == null)
			{
				_prevPosition = val;
				CurrentPosition = val3;
			}
			else
			{
				Matrix4x4 localToWorld2 = _center->LocalToWorld;
				Matrix4x4 inverse = ((Matrix4x4)(ref localToWorld2)).inverse;
				_prevPosition = ((Matrix4x4)(ref inverse)).MultiplyPoint3x4(val);
				CurrentPosition = ((Matrix4x4)(ref inverse)).MultiplyPoint3x4(val3);
			}
			_transform->SetWorldRotation(ApplyRotation(val3));
		}

		private unsafe Vector3 Collision(Vector3 nextPosition, Vector3 position)
		{
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_005a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			//IL_008f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0094: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009c: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < _blittableColliderGroups->Length; i++)
			{
				BlittableColliderGroup blittableColliderGroup = (*_blittableColliderGroups)[i];
				for (int j = 0; j < blittableColliderGroup.Colliders.Count; j++)
				{
					BlittableCollider blittableCollider = blittableColliderGroup.Colliders[j];
					Vector3 val = blittableColliderGroup.Transform->TransformPoint(blittableCollider.Offset);
					float num = _radius + blittableCollider.Radius;
					Vector3 val2 = nextPosition - val;
					if (((Vector3)(ref val2)).sqrMagnitude <= num * num)
					{
						val2 = nextPosition - val;
						Vector3 normalized = ((Vector3)(ref val2)).normalized;
						Vector3 val3 = val + normalized * (_radius + blittableCollider.Radius);
						val2 = val3 - position;
						nextPosition = position + ((Vector3)(ref val2)).normalized * _length;
					}
				}
			}
			return nextPosition;
		}

		private static Quaternion FromToRotation(Vector3 from, Vector3 to)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			float num = Mathf.Acos(Mathf.Clamp(Vector3.Dot(((Vector3)(ref from)).normalized, ((Vector3)(ref to)).normalized), -1f, 1f)) * 57.29578f;
			Vector3 val = Vector3.Cross(from, to);
			return Quaternion.AngleAxis(num, ((Vector3)(ref val)).normalized);
		}

		private unsafe Quaternion ApplyRotation(Vector3 nextTail)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			Quaternion val = _transform->ParentWorldRotation * _localRotation;
			return FromToRotation(val * _boneAxis, nextTail - _transform->WorldPosition) * val;
		}
	}
	public struct BlittablePoints
	{
		private unsafe readonly BlittablePoint* _points;

		public int Count { get; }

		public unsafe BlittablePoint this[int i]
		{
			get
			{
				return _points[i];
			}
			set
			{
				Unsafe.Write(_points + i, value);
			}
		}

		public unsafe BlittablePoints(BlittablePoint* points, int count)
		{
			_points = points;
			Count = count;
		}
	}
	public readonly struct BlittableRootBone
	{
		private readonly float _gravityPower;

		private readonly Vector3 _gravityDir;

		private readonly float _dragForce;

		private readonly float _stiffnessForce;

		private unsafe readonly BlittablePoints* _blittablePoints;

		public unsafe void DrawGizmos()
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < _blittablePoints->Count; i++)
			{
				Gizmos.DrawWireSphere((*_blittablePoints)[i].CurrentPosition, 0.05f);
			}
			for (int j = 0; j < _blittablePoints->Count - 1; j++)
			{
				BlittablePoint blittablePoint = (*_blittablePoints)[j];
				BlittablePoint blittablePoint2 = (*_blittablePoints)[j + 1];
				Gizmos.DrawLine(blittablePoint.CurrentPosition, blittablePoint2.CurrentPosition);
			}
		}

		public unsafe BlittableRootBone(float gravityPower, Vector3 gravityDir, float dragForce, float stiffnessForce, BlittablePoints* blittablePoints)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			_gravityPower = gravityPower;
			_gravityDir = gravityDir;
			_dragForce = dragForce;
			_stiffnessForce = stiffnessForce;
			_blittablePoints = blittablePoints;
		}

		public unsafe void Update(float deltaTime)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			float stiffnessForce = _stiffnessForce * deltaTime;
			Vector3 external = _gravityDir * (_gravityPower * deltaTime);
			for (int i = 0; i < _blittablePoints->Count; i++)
			{
				BlittablePoint value = (*_blittablePoints)[i];
				value.Update(stiffnessForce, _dragForce, external);
				(*_blittablePoints)[i] = value;
			}
		}
	}
	public struct BlittableTransform
	{
		private unsafe readonly BlittableTransform* _parent;

		private Quaternion _worldRotation;

		private Vector3 _localPosition;

		private Vector3 _localScale;

		private Quaternion _localRotation;

		private Matrix4x4 _localToWorld;

		public Vector3 WorldPosition { get; private set; }

		public Matrix4x4 LocalToWorld => _localToWorld;

		private Matrix4x4 LocalTransform => Matrix4x4.TRS(_localPosition, _localRotation, _localScale);

		public unsafe Quaternion ParentWorldRotation
		{
			get
			{
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				if (_parent == null)
				{
					return Quaternion.identity;
				}
				return _parent->_worldRotation;
			}
		}

		public void SetWorldRotation(Quaternion rotation)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			Quaternion parentWorldRotation = ParentWorldRotation;
			_localRotation = Quaternion.Inverse(parentWorldRotation) * rotation;
			UpdateLocalToWorldMatrix();
		}

		public unsafe BlittableTransform(BlittableTransform* parent, Transform transform)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			_parent = parent;
			WorldPosition = transform.position;
			_worldRotation = transform.rotation;
			_localPosition = transform.localPosition;
			_localRotation = transform.localRotation;
			_localScale = transform.localScale;
			_localToWorld = transform.localToWorldMatrix;
		}

		public void PullFrom(TransformAccess transform)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			WorldPosition = ((TransformAccess)(ref transform)).position;
			_worldRotation = ((TransformAccess)(ref transform)).rotation;
			_localPosition = ((TransformAccess)(ref transform)).localPosition;
			_localRotation = ((TransformAccess)(ref transform)).localRotation;
			_localScale = ((TransformAccess)(ref transform)).localScale;
			_localToWorld = ((TransformAccess)(ref transform)).localToWorldMatrix;
		}

		public void PushTo(TransformAccess transform)
		{
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			((TransformAccess)(ref transform)).localPosition = _localPosition;
			((TransformAccess)(ref transform)).localRotation = _localRotation;
		}

		public Vector3 TransformPoint(Vector3 offset)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			return ((Matrix4x4)(ref _localToWorld)).MultiplyPoint3x4(offset);
		}

		public unsafe void UpdateLocalToWorldMatrix()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			_localToWorld = ((_parent == null) ? LocalTransform : (_parent->_localToWorld * LocalTransform));
			WorldPosition = ((Matrix4x4)(ref _localToWorld)).MultiplyPoint3x4(Vector3.zero);
			_worldRotation = ((Matrix4x4)(ref _localToWorld)).rotation;
		}
	}
}

FastSpringBone10.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using UniVRM10.FastSpringBones.Blittables;
using Unity.Collections;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.Jobs;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UniVRM10.FastSpringBones.System
{
	public class FastSpringBoneBuffer : IDisposable
	{
		public NativeArray<BlittableSpring> Springs { get; }

		public NativeArray<BlittableJoint> Joints { get; }

		public NativeArray<BlittableCollider> Colliders { get; }

		public NativeArray<BlittableLogic> Logics { get; }

		public NativeArray<BlittableTransform> BlittableTransforms { get; }

		public Transform[] Transforms { get; }

		public bool IsDisposed { get; private set; }

		public FastSpringBoneBuffer(IReadOnlyList<FastSpringBoneSpring> springs)
		{
			//IL_0426: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0439: Unknown result type (might be due to invalid IL or missing references)
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_044b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0450: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0463: Unknown result type (might be due to invalid IL or missing references)
			//IL_046e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0473: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0302: Unknown result type (might be due to invalid IL or missing references)
			//IL_030a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0311: Unknown result type (might be due to invalid IL or missing references)
			//IL_0325: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Unknown result type (might be due to invalid IL or missing references)
			//IL_032c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_034a: Unknown result type (might be due to invalid IL or missing references)
			//IL_033d: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03be: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d1: Unknown result type (might be due to invalid IL or missing references)
			HashSet<Transform> hashSet = new HashSet<Transform>();
			foreach (FastSpringBoneSpring spring in springs)
			{
				FastSpringBoneJoint[] joints = spring.joints;
				for (int i = 0; i < joints.Length; i++)
				{
					FastSpringBoneJoint fastSpringBoneJoint = joints[i];
					hashSet.Add(fastSpringBoneJoint.Transform);
					if ((Object)(object)fastSpringBoneJoint.Transform.parent != (Object)null)
					{
						hashSet.Add(fastSpringBoneJoint.Transform.parent);
					}
				}
				FastSpringBoneCollider[] colliders = spring.colliders;
				for (int i = 0; i < colliders.Length; i++)
				{
					FastSpringBoneCollider fastSpringBoneCollider = colliders[i];
					hashSet.Add(fastSpringBoneCollider.Transform);
				}
				if ((Object)(object)spring.center != (Object)null)
				{
					hashSet.Add(spring.center);
				}
			}
			Transform[] array = hashSet.ToArray();
			Dictionary<Transform, int> transformIndexDictionary = array.Select((Transform trs, int index) => (trs, index)).ToDictionary<(Transform, int), Transform, int>(((Transform trs, int index) tuple) => tuple.trs, ((Transform trs, int index) tuple) => tuple.index);
			List<BlittableCollider> list = new List<BlittableCollider>();
			List<BlittableJoint> list2 = new List<BlittableJoint>();
			List<BlittableSpring> list3 = new List<BlittableSpring>();
			List<BlittableLogic> list4 = new List<BlittableLogic>();
			Vector3 val = default(Vector3);
			foreach (FastSpringBoneSpring spring2 in springs)
			{
				BlittableSpring item = new BlittableSpring
				{
					colliderSpan = new BlittableSpan
					{
						startIndex = list.Count,
						count = spring2.colliders.Length
					},
					logicSpan = new BlittableSpan
					{
						startIndex = list2.Count,
						count = spring2.joints.Length - 1
					},
					centerTransformIndex = (Object.op_Implicit((Object)(object)spring2.center) ? transformIndexDictionary[spring2.center] : (-1))
				};
				list3.Add(item);
				list.AddRange(spring2.colliders.Select(delegate(FastSpringBoneCollider collider)
				{
					BlittableCollider collider2 = collider.Collider;
					collider2.transformIndex = transformIndexDictionary[collider.Transform];
					return collider2;
				}));
				list2.AddRange(from joint in spring2.joints.Take(spring2.joints.Length - 1)
					select joint.Joint);
				for (int j = 0; j < spring2.joints.Length - 1; j++)
				{
					FastSpringBoneJoint fastSpringBoneJoint2 = spring2.joints[j];
					FastSpringBoneJoint fastSpringBoneJoint3 = spring2.joints[j + 1];
					Vector3 localPosition = fastSpringBoneJoint3.Transform.localPosition;
					Vector3 lossyScale = fastSpringBoneJoint3.Transform.lossyScale;
					((Vector3)(ref val))..ctor(localPosition.x * lossyScale.x, localPosition.y * lossyScale.y, localPosition.z * lossyScale.z);
					Vector3 val2 = fastSpringBoneJoint2.Transform.TransformPoint(val);
					Vector3 val3 = (((Object)(object)spring2.center != (Object)null) ? spring2.center.InverseTransformPoint(val2) : val2);
					Transform parent = fastSpringBoneJoint2.Transform.parent;
					list4.Add(new BlittableLogic
					{
						headTransformIndex = transformIndexDictionary[fastSpringBoneJoint2.Transform],
						parentTransformIndex = (((Object)(object)parent != (Object)null) ? transformIndexDictionary[parent] : (-1)),
						currentTail = val3,
						prevTail = val3,
						localRotation = fastSpringBoneJoint2.Transform.localRotation,
						boneAxis = ((Vector3)(ref val)).normalized,
						length = ((Vector3)(ref val)).magnitude
					});
				}
			}
			Springs = new NativeArray<BlittableSpring>(list3.ToArray(), (Allocator)4);
			Joints = new NativeArray<BlittableJoint>(list2.ToArray(), (Allocator)4);
			Colliders = new NativeArray<BlittableCollider>(list.ToArray(), (Allocator)4);
			Logics = new NativeArray<BlittableLogic>(list4.ToArray(), (Allocator)4);
			BlittableTransforms = new NativeArray<BlittableTransform>(array.Length, (Allocator)4, (NativeArrayOptions)1);
			Transforms = array.ToArray();
		}

		public void Dispose()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			if (!IsDisposed)
			{
				IsDisposed = true;
				Springs.Dispose();
				Joints.Dispose();
				BlittableTransforms.Dispose();
				Colliders.Dispose();
				Logics.Dispose();
			}
		}
	}
	[Serializable]
	public struct FastSpringBoneCollider
	{
		public Transform Transform;

		public BlittableCollider Collider;
	}
	[Serializable]
	public struct FastSpringBoneJoint
	{
		public Transform Transform;

		public BlittableJoint Joint;
	}
	[Serializable]
	public struct FastSpringBoneSpring
	{
		public Transform center;

		public FastSpringBoneJoint[] joints;

		public FastSpringBoneCollider[] colliders;
	}
	public struct PullTransformJob : IJobParallelForTransform
	{
		[WriteOnly]
		public NativeArray<BlittableTransform> Transforms;

		public void Execute(int index, TransformAccess transform)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_006c: Unknown result type (might be due to invalid IL or missing references)
			Transforms[index] = new BlittableTransform
			{
				position = ((TransformAccess)(ref transform)).position,
				rotation = ((TransformAccess)(ref transform)).rotation,
				localPosition = ((TransformAccess)(ref transform)).localPosition,
				localRotation = ((TransformAccess)(ref transform)).localRotation,
				localScale = ((TransformAccess)(ref transform)).localScale,
				localToWorldMatrix = ((TransformAccess)(ref transform)).localToWorldMatrix,
				worldToLocalMatrix = ((TransformAccess)(ref transform)).worldToLocalMatrix
			};
		}
	}
	public sealed class FastSpringBoneBufferCombiner : IDisposable
	{
		private struct LoadTransformsJob : IJobParallelFor
		{
			[ReadOnly]
			public NativeArray<BlittableTransform> SrcTransforms;

			[WriteOnly]
			public NativeSlice<BlittableTransform> DestTransforms;

			public void Execute(int index)
			{
				DestTransforms[index] = SrcTransforms[index];
			}
		}

		private struct LoadSpringsJob : IJobParallelFor
		{
			[ReadOnly]
			public NativeArray<BlittableSpring> SrcSprings;

			[WriteOnly]
			public NativeSlice<BlittableSpring> DestSprings;

			public int CollidersOffset;

			public int LogicsOffset;

			public int TransformOffset;

			public void Execute(int index)
			{
				BlittableSpring blittableSpring = SrcSprings[index];
				blittableSpring.colliderSpan.startIndex += CollidersOffset;
				blittableSpring.logicSpan.startIndex += LogicsOffset;
				blittableSpring.transformIndexOffset = TransformOffset;
				DestSprings[index] = blittableSpring;
			}
		}

		private struct LoadCollidersJob : IJobParallelFor
		{
			[ReadOnly]
			public NativeArray<BlittableCollider> SrcColliders;

			[WriteOnly]
			public NativeSlice<BlittableCollider> DestColliders;

			public void Execute(int index)
			{
				DestColliders[index] = SrcColliders[index];
			}
		}

		private struct OffsetLogicsJob : IJobParallelFor
		{
			[ReadOnly]
			public NativeSlice<BlittableLogic> SrcLogics;

			[ReadOnly]
			public NativeSlice<BlittableJoint> SrcJoints;

			[WriteOnly]
			public NativeSlice<BlittableLogic> DestLogics;

			[WriteOnly]
			public NativeSlice<BlittableJoint> DestJoints;

			public void Execute(int index)
			{
				DestLogics[index] = SrcLogics[index];
				DestJoints[index] = SrcJoints[index];
			}
		}

		private NativeArray<BlittableSpring> _springs;

		private NativeArray<BlittableTransform> _transforms;

		private NativeArray<BlittableCollider> _colliders;

		private NativeArray<BlittableJoint> _joints;

		private NativeArray<BlittableLogic> _logics;

		private TransformAccessArray _transformAccessArray;

		private readonly LinkedList<FastSpringBoneBuffer> _buffers = new LinkedList<FastSpringBoneBuffer>();

		private FastSpringBoneBuffer[] _batchedBuffers;

		private int[] _batchedBufferLogicSizes;

		private bool _isDirty;

		public NativeArray<BlittableSpring> Springs => _springs;

		public NativeArray<BlittableJoint> Joints => _joints;

		public NativeArray<BlittableTransform> Transforms => _transforms;

		public TransformAccessArray TransformAccessArray => _transformAccessArray;

		public NativeArray<BlittableCollider> Colliders => _colliders;

		public NativeArray<BlittableLogic> Logics => _logics;

		public void Register(FastSpringBoneBuffer buffer)
		{
			_buffers.AddLast(buffer);
			_isDirty = true;
		}

		public void Unregister(FastSpringBoneBuffer buffer)
		{
			_buffers.Remove(buffer);
			_isDirty = true;
		}

		public JobHandle ReconstructIfDirty(JobHandle handle)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			if (_isDirty)
			{
				JobHandle result = ReconstructBuffers(handle);
				_isDirty = false;
				return result;
			}
			return handle;
		}

		private void SaveToSourceBuffer()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			if (_batchedBuffers == null)
			{
				return;
			}
			int num = 0;
			for (int i = 0; i < _batchedBuffers.Length; i++)
			{
				int num2 = _batchedBufferLogicSizes[i];
				if (!_batchedBuffers[i].IsDisposed && num2 > 0)
				{
					NativeArray<BlittableLogic>.Copy(_logics, num, _batchedBuffers[i].Logics, 0, num2);
				}
				num += num2;
			}
		}

		private JobHandle ReconstructBuffers(JobHandle handle)
		{
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0150: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Unknown result type (might be due to invalid IL or missing references)
			//IL_015d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_016b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0174: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Unknown result type (might be due to invalid IL or missing references)
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0191: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_0201: Unknown result type (might be due to invalid IL or missing references)
			//IL_0202: Unknown result type (might be due to invalid IL or missing references)
			//IL_0207: Unknown result type (might be due to invalid IL or missing references)
			//IL_0215: Unknown result type (might be due to invalid IL or missing references)
			//IL_021a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_022b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0239: Unknown result type (might be due to invalid IL or missing references)
			//IL_023e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0247: Unknown result type (might be due to invalid IL or missing references)
			//IL_024c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0256: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_025c: Unknown result type (might be due to invalid IL or missing references)
			//IL_026a: Unknown result type (might be due to invalid IL or missing references)
			//IL_026f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0274: Unknown result type (might be due to invalid IL or missing references)
			//IL_027d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0282: Unknown result type (might be due to invalid IL or missing references)
			//IL_0287: Unknown result type (might be due to invalid IL or missing references)
			//IL_028f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0298: Unknown result type (might be due to invalid IL or missing references)
			//IL_029d: Unknown result type (might be due to invalid IL or missing references)
			//IL_02a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0308: Unknown result type (might be due to invalid IL or missing references)
			//IL_030d: Unknown result type (might be due to invalid IL or missing references)
			//IL_031d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0322: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0337: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_03dd: Unknown result type (might be due to invalid IL or missing references)
			SaveToSourceBuffer();
			DisposeAllBuffers();
			int num = 0;
			int num2 = 0;
			int num3 = 0;
			int num4 = 0;
			_batchedBuffers = _buffers.ToArray();
			_batchedBufferLogicSizes = _buffers.Select((FastSpringBoneBuffer buffer) => buffer.Logics.Length).ToArray();
			foreach (FastSpringBoneBuffer buffer in _buffers)
			{
				num += buffer.Springs.Length;
				num2 += buffer.Colliders.Length;
				num3 += buffer.Logics.Length;
				num4 += buffer.BlittableTransforms.Length;
			}
			_springs = new NativeArray<BlittableSpring>(num, (Allocator)4, (NativeArrayOptions)1);
			_joints = new NativeArray<BlittableJoint>(num3, (Allocator)4, (NativeArrayOptions)1);
			_logics = new NativeArray<BlittableLogic>(num3, (Allocator)4, (NativeArrayOptions)1);
			_colliders = new NativeArray<BlittableCollider>(num2, (Allocator)4, (NativeArrayOptions)1);
			_transforms = new NativeArray<BlittableTransform>(num4, (Allocator)4, (NativeArrayOptions)1);
			int num5 = 0;
			int num6 = 0;
			int num7 = 0;
			int num8 = 0;
			foreach (FastSpringBoneBuffer buffer2 in _buffers)
			{
				LoadTransformsJob loadTransformsJob = default(LoadTransformsJob);
				loadTransformsJob.SrcTransforms = buffer2.BlittableTransforms;
				loadTransformsJob.DestTransforms = new NativeSlice<BlittableTransform>(_transforms, num8, buffer2.BlittableTransforms.Length);
				handle = IJobParallelForExtensions.Schedule<LoadTransformsJob>(loadTransformsJob, buffer2.BlittableTransforms.Length, 1, handle);
				LoadSpringsJob loadSpringsJob = default(LoadSpringsJob);
				loadSpringsJob.SrcSprings = buffer2.Springs;
				loadSpringsJob.DestSprings = new NativeSlice<BlittableSpring>(_springs, num5, buffer2.Springs.Length);
				loadSpringsJob.CollidersOffset = num6;
				loadSpringsJob.LogicsOffset = num7;
				loadSpringsJob.TransformOffset = num8;
				handle = IJobParallelForExtensions.Schedule<LoadSpringsJob>(loadSpringsJob, buffer2.Springs.Length, 1, handle);
				LoadCollidersJob loadCollidersJob = default(LoadCollidersJob);
				loadCollidersJob.SrcColliders = buffer2.Colliders;
				loadCollidersJob.DestColliders = new NativeSlice<BlittableCollider>(_colliders, num6, buffer2.Colliders.Length);
				handle = IJobParallelForExtensions.Schedule<LoadCollidersJob>(loadCollidersJob, buffer2.Colliders.Length, 1, handle);
				OffsetLogicsJob offsetLogicsJob = default(OffsetLogicsJob);
				offsetLogicsJob.SrcLogics = NativeSlice<BlittableLogic>.op_Implicit(buffer2.Logics);
				offsetLogicsJob.SrcJoints = NativeSlice<BlittableJoint>.op_Implicit(buffer2.Joints);
				offsetLogicsJob.DestLogics = new NativeSlice<BlittableLogic>(_logics, num7, buffer2.Logics.Length);
				offsetLogicsJob.DestJoints = new NativeSlice<BlittableJoint>(_joints, num7, buffer2.Logics.Length);
				handle = IJobParallelForExtensions.Schedule<OffsetLogicsJob>(offsetLogicsJob, buffer2.Logics.Length, 1, handle);
				num5 += buffer2.Springs.Length;
				num6 += buffer2.Colliders.Length;
				num7 += buffer2.Logics.Length;
				num8 += buffer2.BlittableTransforms.Length;
			}
			JobHandle.ScheduleBatchedJobs();
			Transform[] array = (Transform[])(object)new Transform[num4];
			int num9 = 0;
			foreach (FastSpringBoneBuffer buffer3 in _buffers)
			{
				Array.Copy(buffer3.Transforms, 0, array, num9, buffer3.Transforms.Length);
				num9 += buffer3.BlittableTransforms.Length;
			}
			_transformAccessArray = new TransformAccessArray(array, -1);
			return handle;
		}

		private void DisposeAllBuffers()
		{
			if (_springs.IsCreated)
			{
				_springs.Dispose();
			}
			if (_joints.IsCreated)
			{
				_joints.Dispose();
			}
			if (_transforms.IsCreated)
			{
				_transforms.Dispose();
			}
			if (((TransformAccessArray)(ref _transformAccessArray)).isCreated)
			{
				((TransformAccessArray)(ref _transformAccessArray)).Dispose();
			}
			if (_colliders.IsCreated)
			{
				_colliders.Dispose();
			}
			if (_logics.IsCreated)
			{
				_logics.Dispose();
			}
		}

		public void Dispose()
		{
			DisposeAllBuffers();
		}
	}
	public sealed class FastSpringBoneScheduler : IDisposable
	{
		private readonly FastSpringBoneBufferCombiner _bufferCombiner;

		public FastSpringBoneScheduler(FastSpringBoneBufferCombiner bufferCombiner)
		{
			_bufferCombiner = bufferCombiner;
		}

		public JobHandle Schedule()
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0025: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_007b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			JobHandle val = _bufferCombiner.ReconstructIfDirty(default(JobHandle));
			PullTransformJob pullTransformJob = default(PullTransformJob);
			pullTransformJob.Transforms = _bufferCombiner.Transforms;
			val = IJobParallelForTransformExtensions.Schedule<PullTransformJob>(pullTransformJob, _bufferCombiner.TransformAccessArray, val);
			UpdateFastSpringBoneJob updateFastSpringBoneJob = default(UpdateFastSpringBoneJob);
			updateFastSpringBoneJob.Colliders = _bufferCombiner.Colliders;
			updateFastSpringBoneJob.Joints = _bufferCombiner.Joints;
			updateFastSpringBoneJob.Logics = _bufferCombiner.Logics;
			updateFastSpringBoneJob.Springs = _bufferCombiner.Springs;
			updateFastSpringBoneJob.Transforms = _bufferCombiner.Transforms;
			updateFastSpringBoneJob.DeltaTime = Time.deltaTime;
			val = IJobParallelForExtensions.Schedule<UpdateFastSpringBoneJob>(updateFastSpringBoneJob, _bufferCombiner.Springs.Length, 1, val);
			PushTransformJob pushTransformJob = default(PushTransformJob);
			pushTransformJob.Transforms = _bufferCombiner.Transforms;
			return IJobParallelForTransformExtensions.Schedule<PushTransformJob>(pushTransformJob, _bufferCombiner.TransformAccessArray, val);
		}

		public void Dispose()
		{
			_bufferCombiner.Dispose();
		}
	}
	[DefaultExecutionOrder(11000)]
	public sealed class FastSpringBoneService : MonoBehaviour
	{
		private FastSpringBoneScheduler _fastSpringBoneScheduler;

		private static FastSpringBoneService _instance;

		public FastSpringBoneBufferCombiner BufferCombiner { get; private set; }

		public static FastSpringBoneService Instance
		{
			get
			{
				//IL_0033: Unknown result type (might be due to invalid IL or missing references)
				//IL_0038: Unknown result type (might be due to invalid IL or missing references)
				//IL_003e: Expected O, but got Unknown
				if (Object.op_Implicit((Object)(object)_instance))
				{
					return _instance;
				}
				_instance = Object.FindObjectOfType<FastSpringBoneService>();
				if (Object.op_Implicit((Object)(object)_instance))
				{
					return _instance;
				}
				GameObject val = new GameObject("FastSpringBone Service");
				Object.DontDestroyOnLoad((Object)val);
				_instance = val.AddComponent<FastSpringBoneService>();
				return _instance;
			}
		}

		public static void Free()
		{
			Object.Destroy((Object)(object)((Component)_instance).gameObject);
			_instance = null;
		}

		private void OnEnable()
		{
			BufferCombiner = new FastSpringBoneBufferCombiner();
			_fastSpringBoneScheduler = new FastSpringBoneScheduler(BufferCombiner);
		}

		private void OnDisable()
		{
			BufferCombiner.Dispose();
			_fastSpringBoneScheduler.Dispose();
		}

		private void LateUpdate()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			JobHandle val = _fastSpringBoneScheduler.Schedule();
			((JobHandle)(ref val)).Complete();
		}
	}
	public struct PushTransformJob : IJobParallelForTransform
	{
		[ReadOnly]
		public NativeArray<BlittableTransform> Transforms;

		public void Execute(int index, TransformAccess transform)
		{
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			((TransformAccess)(ref transform)).rotation = Transforms[index].rotation;
		}
	}
	public struct UpdateFastSpringBoneJob : IJobParallelFor
	{
		[ReadOnly]
		public NativeArray<BlittableSpring> Springs;

		[ReadOnly]
		public NativeArray<BlittableJoint> Joints;

		[ReadOnly]
		public NativeArray<BlittableCollider> Colliders;

		[NativeDisableParallelForRestriction]
		public NativeArray<BlittableLogic> Logics;

		[NativeDisableParallelForRestriction]
		public NativeArray<BlittableTransform> Transforms;

		public float DeltaTime;

		public void Execute(int index)
		{
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Unknown result type (might be due to invalid IL or missing references)
			//IL_0109: Unknown result type (might be due to invalid IL or missing references)
			//IL_0132: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0162: Unknown result type (might be due to invalid IL or missing references)
			//IL_0167: Unknown result type (might be due to invalid IL or missing references)
			//IL_0149: Unknown result type (might be due to invalid IL or missing references)
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0185: Unknown result type (might be due to invalid IL or missing references)
			//IL_0177: Unknown result type (might be due to invalid IL or missing references)
			//IL_018a: Unknown result type (might be due to invalid IL or missing references)
			//IL_018e: Unknown result type (might be due to invalid IL or missing references)
			//IL_019a: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01de: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0206: Unknown result type (might be due to invalid IL or missing references)
			//IL_020b: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0214: Unknown result type (might be due to invalid IL or missing references)
			//IL_0218: Unknown result type (might be due to invalid IL or missing references)
			//IL_021d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0222: Unknown result type (might be due to invalid IL or missing references)
			//IL_0226: Unknown result type (might be due to invalid IL or missing references)
			//IL_0232: Unknown result type (might be due to invalid IL or missing references)
			//IL_0237: Unknown result type (might be due to invalid IL or missing references)
			//IL_023c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0277: Unknown result type (might be due to invalid IL or missing references)
			//IL_027c: Unknown result type (might be due to invalid IL or missing references)
			//IL_027e: Unknown result type (might be due to invalid IL or missing references)
			//IL_028a: Unknown result type (might be due to invalid IL or missing references)
			//IL_029b: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_02bc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02cc: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
			//IL_034f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0351: Unknown result type (might be due to invalid IL or missing references)
			//IL_033b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0301: Unknown result type (might be due to invalid IL or missing references)
			//IL_0303: Unknown result type (might be due to invalid IL or missing references)
			//IL_0356: Unknown result type (might be due to invalid IL or missing references)
			//IL_037a: Unknown result type (might be due to invalid IL or missing references)
			//IL_037c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0366: Unknown result type (might be due to invalid IL or missing references)
			//IL_0381: Unknown result type (might be due to invalid IL or missing references)
			//IL_0386: Unknown result type (might be due to invalid IL or missing references)
			//IL_038a: Unknown result type (might be due to invalid IL or missing references)
			//IL_038f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0394: Unknown result type (might be due to invalid IL or missing references)
			//IL_0398: Unknown result type (might be due to invalid IL or missing references)
			//IL_039c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_03c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_0446: Unknown result type (might be due to invalid IL or missing references)
			//IL_044d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0454: Unknown result type (might be due to invalid IL or missing references)
			//IL_0459: Unknown result type (might be due to invalid IL or missing references)
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_046c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0471: Unknown result type (might be due to invalid IL or missing references)
			//IL_047a: Unknown result type (might be due to invalid IL or missing references)
			//IL_047f: Unknown result type (might be due to invalid IL or missing references)
			//IL_03d5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03da: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f6: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0400: Unknown result type (might be due to invalid IL or missing references)
			//IL_0407: Unknown result type (might be due to invalid IL or missing references)
			//IL_040b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0412: Unknown result type (might be due to invalid IL or missing references)
			//IL_0419: Unknown result type (might be due to invalid IL or missing references)
			//IL_041e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0423: Unknown result type (might be due to invalid IL or missing references)
			//IL_0428: Unknown result type (might be due to invalid IL or missing references)
			//IL_0436: Unknown result type (might be due to invalid IL or missing references)
			//IL_043b: Unknown result type (might be due to invalid IL or missing references)
			BlittableSpring blittableSpring = Springs[index];
			int transformIndexOffset = blittableSpring.transformIndexOffset;
			BlittableSpan colliderSpan = blittableSpring.colliderSpan;
			BlittableSpan logicSpan = blittableSpring.logicSpan;
			for (int i = logicSpan.startIndex; i < logicSpan.startIndex + logicSpan.count; i++)
			{
				BlittableLogic blittableLogic = Logics[i];
				BlittableJoint joint = Joints[i];
				BlittableTransform blittableTransform = Transforms[blittableLogic.headTransformIndex + transformIndexOffset];
				BlittableTransform? blittableTransform2 = ((blittableLogic.parentTransformIndex >= 0) ? new BlittableTransform?(Transforms[blittableLogic.parentTransformIndex + transformIndexOffset]) : null);
				BlittableTransform? blittableTransform3 = ((blittableSpring.centerTransformIndex >= 0) ? new BlittableTransform?(Transforms[blittableSpring.centerTransformIndex + transformIndexOffset]) : null);
				BlittableTransform value;
				if (blittableTransform2.HasValue)
				{
					value = blittableTransform2.Value;
					blittableTransform.position = ((Matrix4x4)(ref value.localToWorldMatrix)).MultiplyPoint3x4(blittableTransform.localPosition);
					blittableTransform.rotation = blittableTransform2.Value.rotation * blittableTransform.localRotation;
				}
				Vector3 val;
				if (!blittableTransform3.HasValue)
				{
					val = blittableLogic.currentTail;
				}
				else
				{
					value = blittableTransform3.Value;
					val = ((Matrix4x4)(ref value.localToWorldMatrix)).MultiplyPoint3x4(blittableLogic.currentTail);
				}
				Vector3 val2 = val;
				Vector3 val3;
				if (!blittableTransform3.HasValue)
				{
					val3 = blittableLogic.prevTail;
				}
				else
				{
					value = blittableTransform3.Value;
					val3 = ((Matrix4x4)(ref value.localToWorldMatrix)).MultiplyPoint3x4(blittableLogic.prevTail);
				}
				Vector3 val4 = val3;
				Quaternion val5 = blittableTransform2?.rotation ?? Quaternion.identity;
				Vector3 val6 = joint.gravityDir * joint.gravityPower * DeltaTime;
				Vector3 val7 = val2 + (val2 - val4) * (1f - joint.dragForce) + val5 * blittableLogic.localRotation * blittableLogic.boneAxis * joint.stiffnessForce * DeltaTime + val6;
				Vector3 position = blittableTransform.position;
				Vector3 val8 = val7 - blittableTransform.position;
				val7 = position + ((Vector3)(ref val8)).normalized * blittableLogic.length;
				for (int j = colliderSpan.startIndex; j < colliderSpan.startIndex + colliderSpan.count; j++)
				{
					BlittableCollider collider = Colliders[j];
					BlittableTransform blittableTransform4 = Transforms[collider.transformIndex + transformIndexOffset];
					Vector3 lossyScale = ((Matrix4x4)(ref blittableTransform4.localToWorldMatrix)).lossyScale;
					float maxColliderScale = Mathf.Max(Mathf.Max(Mathf.Abs(lossyScale.x), Mathf.Abs(lossyScale.y)), Mathf.Abs(lossyScale.z));
					Vector3 worldPosition = ((Matrix4x4)(ref blittableTransform4.localToWorldMatrix)).MultiplyPoint3x4(collider.offset);
					Vector3 worldTail = ((Matrix4x4)(ref blittableTransform4.localToWorldMatrix)).MultiplyPoint3x4(collider.tail);
					switch (collider.colliderType)
					{
					case BlittableColliderType.Sphere:
						ResolveSphereCollision(joint, collider, worldPosition, blittableTransform, maxColliderScale, blittableLogic, ref val7);
						break;
					case BlittableColliderType.Capsule:
						ResolveCapsuleCollision(worldTail, worldPosition, blittableTransform, joint, collider, maxColliderScale, blittableLogic, ref val7);
						break;
					}
				}
				Vector3 prevTail;
				if (!blittableTransform3.HasValue)
				{
					prevTail = val2;
				}
				else
				{
					value = blittableTransform3.Value;
					prevTail = ((Matrix4x4)(ref value.worldToLocalMatrix)).MultiplyPoint3x4(val2);
				}
				blittableLogic.prevTail = prevTail;
				Vector3 currentTail;
				if (!blittableTransform3.HasValue)
				{
					currentTail = val7;
				}
				else
				{
					value = blittableTransform3.Value;
					currentTail = ((Matrix4x4)(ref value.worldToLocalMatrix)).MultiplyPoint3x4(val7);
				}
				blittableLogic.currentTail = currentTail;
				Quaternion val9 = val5 * blittableLogic.localRotation;
				blittableTransform.rotation = Quaternion.FromToRotation(val9 * blittableLogic.boneAxis, val7 - blittableTransform.position) * val9;
				if (blittableTransform2.HasValue)
				{
					Matrix4x4 localToWorldMatrix = blittableTransform2.Value.localToWorldMatrix;
					blittableTransform.localRotation = Normalize(Quaternion.Inverse(blittableTransform2.Value.rotation) * blittableTransform.rotation);
					blittableTransform.localToWorldMatrix = localToWorldMatrix * Matrix4x4.TRS(blittableTransform.localPosition, blittableTransform.localRotation, blittableTransform.localScale);
					blittableTransform.worldToLocalMatrix = ((Matrix4x4)(ref blittableTransform.localToWorldMatrix)).inverse;
				}
				else
				{
					blittableTransform.localToWorldMatrix = Matrix4x4.TRS(blittableTransform.position, blittableTransform.rotation, blittableTransform.localScale);
					blittableTransform.worldToLocalMatrix = ((Matrix4x4)(ref blittableTransform.localToWorldMatrix)).inverse;
					blittableTransform.localRotation = blittableTransform.rotation;
				}
				Transforms[blittableLogic.headTransformIndex + transformIndexOffset] = blittableTransform;
				Logics[i] = blittableLogic;
			}
		}

		private static Quaternion Normalize(Quaternion q)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			float num = (float)Math.Sqrt(Quaternion.Dot(q, q));
			if (!(num < float.Epsilon))
			{
				return new Quaternion(q.x / num, q.y / num, q.z / num, q.w / num);
			}
			return Quaternion.identity;
		}

		private static void ResolveCapsuleCollision(Vector3 worldTail, Vector3 worldPosition, BlittableTransform headTransform, BlittableJoint joint, BlittableCollider collider, float maxColliderScale, BlittableLogic logic, ref Vector3 nextTail)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0014: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_0055: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0062: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			Vector3 val = worldTail - worldPosition;
			Vector3 val2 = headTransform.position - worldPosition;
			float num = Vector3.Dot(val, val2);
			if (num <= 0f)
			{
				ResolveSphereCollision(joint, collider, worldPosition, headTransform, maxColliderScale, logic, ref nextTail);
			}
			float num2 = num / ((Vector3)(ref val)).magnitude;
			if (num2 >= 1f)
			{
				ResolveSphereCollision(joint, collider, worldTail, headTransform, maxColliderScale, logic, ref nextTail);
			}
			Vector3 worldPosition2 = worldPosition + val * num2;
			ResolveSphereCollision(joint, collider, worldPosition2, headTransform, maxColliderScale, logic, ref nextTail);
		}

		private static void ResolveSphereCollision(BlittableJoint joint, BlittableCollider collider, Vector3 worldPosition, BlittableTransform headTransform, float maxColliderScale, BlittableLogic logic, ref Vector3 nextTail)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			//IL_004f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			float num = joint.radius + collider.radius * maxColliderScale;
			if (Vector3.SqrMagnitude(nextTail - worldPosition) <= num * num)
			{
				Vector3 val = nextTail - worldPosition;
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				Vector3 val2 = worldPosition + normalized * num;
				Vector3 position = headTransform.position;
				val = val2 - headTransform.position;
				nextTail = position + ((Vector3)(ref val)).normalized * logic.length;
			}
		}
	}
}
namespace UniVRM10.FastSpringBones.Blittables
{
	[Serializable]
	public struct BlittableCollider
	{
		public BlittableColliderType colliderType;

		public Vector3 offset;

		public float radius;

		public Vector3 tail;

		public int transformIndex;
	}
	public enum BlittableColliderType
	{
		Sphere,
		Capsule
	}
	[Serializable]
	public struct BlittableJoint
	{
		public float stiffnessForce;

		public float gravityPower;

		public Vector3 gravityDir;

		public float dragForce;

		public float radius;
	}
	[Serializable]
	public struct BlittableLogic
	{
		public int parentTransformIndex;

		public int headTransformIndex;

		public float length;

		public Vector3 currentTail;

		public Vector3 prevTail;

		public Quaternion localRotation;

		public Vector3 boneAxis;
	}
	[Serializable]
	public struct BlittableSpan
	{
		public int startIndex;

		public int count;
	}
	[Serializable]
	public struct BlittableSpring
	{
		public BlittableSpan colliderSpan;

		public BlittableSpan logicSpan;

		public int centerTransformIndex;

		public int transformIndexOffset;
	}
	[Serializable]
	public struct BlittableTransform
	{
		public Vector3 position;

		public Quaternion rotation;

		public Vector3 localPosition;

		public Quaternion localRotation;

		public Vector3 localScale;

		public Matrix4x4 localToWorldMatrix;

		public Matrix4x4 worldToLocalMatrix;
	}
}

MToon.dll

Decompiled 5 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace MToon;

public enum DebugMode
{
	None,
	Normal,
	LitShadeRate
}
public enum OutlineColorMode
{
	FixedColor,
	MixedLighting
}
public enum OutlineWidthMode
{
	None,
	WorldCoordinates,
	ScreenCoordinates
}
public enum RenderMode
{
	Opaque,
	Cutout,
	Transparent,
	TransparentWithZWrite
}
public enum CullMode
{
	Off,
	Front,
	Back
}
public struct RenderQueueRequirement
{
	public int DefaultValue;

	public int MinValue;

	public int MaxValue;
}
public class MToonDefinition
{
	public MetaDefinition Meta;

	public RenderingDefinition Rendering;

	public ColorDefinition Color;

	public LightingDefinition Lighting;

	public EmissionDefinition Emission;

	public MatCapDefinition MatCap;

	public RimDefinition Rim;

	public OutlineDefinition Outline;

	public TextureUvCoordsDefinition TextureOption;
}
public class MetaDefinition
{
	public string Implementation;

	public int VersionNumber;
}
public class RenderingDefinition
{
	public RenderMode RenderMode;

	public CullMode CullMode;

	public int RenderQueueOffsetNumber;
}
public class ColorDefinition
{
	public Color LitColor;

	public Texture2D LitMultiplyTexture;

	public Color ShadeColor;

	public Texture2D ShadeMultiplyTexture;

	public float CutoutThresholdValue;
}
public class LightingDefinition
{
	public LitAndShadeMixingDefinition LitAndShadeMixing;

	public LightingInfluenceDefinition LightingInfluence;

	public NormalDefinition Normal;
}
public class LitAndShadeMixingDefinition
{
	public float ShadingShiftValue;

	public float ShadingToonyValue;

	public float ShadowReceiveMultiplierValue;

	public Texture2D ShadowReceiveMultiplierMultiplyTexture;

	public float LitAndShadeMixingMultiplierValue;

	public Texture2D LitAndShadeMixingMultiplierMultiplyTexture;
}
public class LightingInfluenceDefinition
{
	public float LightColorAttenuationValue;

	public float GiIntensityValue;
}
public class EmissionDefinition
{
	public Color EmissionColor;

	public Texture2D EmissionMultiplyTexture;
}
public class MatCapDefinition
{
	public Texture2D AdditiveTexture;
}
public class RimDefinition
{
	public Color RimColor;

	public Texture2D RimMultiplyTexture;

	public float RimLightingMixValue;

	public float RimFresnelPowerValue;

	public float RimLiftValue;
}
public class NormalDefinition
{
	public Texture2D NormalTexture;

	public float NormalScaleValue;
}
public class OutlineDefinition
{
	public OutlineWidthMode OutlineWidthMode;

	public float OutlineWidthValue;

	public Texture2D OutlineWidthMultiplyTexture;

	public float OutlineScaledMaxDistanceValue;

	public OutlineColorMode OutlineColorMode;

	public Color OutlineColor;

	public float OutlineLightingMixValue;
}
public class TextureUvCoordsDefinition
{
	public Vector2 MainTextureLeftBottomOriginScale;

	public Vector2 MainTextureLeftBottomOriginOffset;

	public Texture2D UvAnimationMaskTexture;

	public float UvAnimationScrollXSpeedValue;

	public float UvAnimationScrollYSpeedValue;

	public float UvAnimationRotationSpeedValue;
}
public static class Utils
{
	public const string ShaderName = "VRM/MToon";

	public const string PropVersion = "_MToonVersion";

	public const string PropDebugMode = "_DebugMode";

	public const string PropOutlineWidthMode = "_OutlineWidthMode";

	public const string PropOutlineColorMode = "_OutlineColorMode";

	public const string PropBlendMode = "_BlendMode";

	public const string PropCullMode = "_CullMode";

	public const string PropOutlineCullMode = "_OutlineCullMode";

	public const string PropCutoff = "_Cutoff";

	public const string PropColor = "_Color";

	public const string PropShadeColor = "_ShadeColor";

	public const string PropMainTex = "_MainTex";

	public const string PropShadeTexture = "_ShadeTexture";

	public const string PropBumpScale = "_BumpScale";

	public const string PropBumpMap = "_BumpMap";

	public const string PropReceiveShadowRate = "_ReceiveShadowRate";

	public const string PropReceiveShadowTexture = "_ReceiveShadowTexture";

	public const string PropShadingGradeRate = "_ShadingGradeRate";

	public const string PropShadingGradeTexture = "_ShadingGradeTexture";

	public const string PropShadeShift = "_ShadeShift";

	public const string PropShadeToony = "_ShadeToony";

	public const string PropLightColorAttenuation = "_LightColorAttenuation";

	public const string PropIndirectLightIntensity = "_IndirectLightIntensity";

	public const string PropRimColor = "_RimColor";

	public const string PropRimTexture = "_RimTexture";

	public const string PropRimLightingMix = "_RimLightingMix";

	public const string PropRimFresnelPower = "_RimFresnelPower";

	public const string PropRimLift = "_RimLift";

	public const string PropSphereAdd = "_SphereAdd";

	public const string PropEmissionColor = "_EmissionColor";

	public const string PropEmissionMap = "_EmissionMap";

	public const string PropOutlineWidthTexture = "_OutlineWidthTexture";

	public const string PropOutlineWidth = "_OutlineWidth";

	public const string PropOutlineScaledMaxDistance = "_OutlineScaledMaxDistance";

	public const string PropOutlineColor = "_OutlineColor";

	public const string PropOutlineLightingMix = "_OutlineLightingMix";

	public const string PropUvAnimMaskTexture = "_UvAnimMaskTexture";

	public const string PropUvAnimScrollX = "_UvAnimScrollX";

	public const string PropUvAnimScrollY = "_UvAnimScrollY";

	public const string PropUvAnimRotation = "_UvAnimRotation";

	public const string PropSrcBlend = "_SrcBlend";

	public const string PropDstBlend = "_DstBlend";

	public const string PropZWrite = "_ZWrite";

	public const string PropAlphaToMask = "_AlphaToMask";

	public const string KeyNormalMap = "_NORMALMAP";

	public const string KeyAlphaTestOn = "_ALPHATEST_ON";

	public const string KeyAlphaBlendOn = "_ALPHABLEND_ON";

	public const string KeyAlphaPremultiplyOn = "_ALPHAPREMULTIPLY_ON";

	public const string KeyOutlineWidthWorld = "MTOON_OUTLINE_WIDTH_WORLD";

	public const string KeyOutlineWidthScreen = "MTOON_OUTLINE_WIDTH_SCREEN";

	public const string KeyOutlineColorFixed = "MTOON_OUTLINE_COLOR_FIXED";

	public const string KeyOutlineColorMixed = "MTOON_OUTLINE_COLOR_MIXED";

	public const string KeyDebugNormal = "MTOON_DEBUG_NORMAL";

	public const string KeyDebugLitShadeRate = "MTOON_DEBUG_LITSHADERATE";

	public const string TagRenderTypeKey = "RenderType";

	public const string TagRenderTypeValueOpaque = "Opaque";

	public const string TagRenderTypeValueTransparentCutout = "TransparentCutout";

	public const string TagRenderTypeValueTransparent = "Transparent";

	public const int DisabledIntValue = 0;

	public const int EnabledIntValue = 1;

	public const string Implementation = "Santarh/MToon";

	public const int VersionNumber = 38;

	public static RenderQueueRequirement GetRenderQueueRequirement(RenderMode renderMode)
	{
		switch (renderMode)
		{
		case RenderMode.Opaque:
		{
			RenderQueueRequirement result = default(RenderQueueRequirement);
			result.DefaultValue = -1;
			result.MinValue = -1;
			result.MaxValue = -1;
			return result;
		}
		case RenderMode.Cutout:
		{
			RenderQueueRequirement result = default(RenderQueueRequirement);
			result.DefaultValue = 2450;
			result.MinValue = 2450;
			result.MaxValue = 2450;
			return result;
		}
		case RenderMode.Transparent:
		{
			RenderQueueRequirement result = default(RenderQueueRequirement);
			result.DefaultValue = 3000;
			result.MinValue = 2951;
			result.MaxValue = 3000;
			return result;
		}
		case RenderMode.TransparentWithZWrite:
		{
			RenderQueueRequirement result = default(RenderQueueRequirement);
			result.DefaultValue = 2501;
			result.MinValue = 2501;
			result.MaxValue = 2550;
			return result;
		}
		default:
			throw new ArgumentOutOfRangeException("renderMode", renderMode, null);
		}
	}

	public static MToonDefinition GetMToonParametersFromMaterial(Material material)
	{
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ed: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
		//IL_0298: Unknown result type (might be due to invalid IL or missing references)
		//IL_029d: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_02ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_02d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_02db: Unknown result type (might be due to invalid IL or missing references)
		return new MToonDefinition
		{
			Meta = new MetaDefinition
			{
				Implementation = "Santarh/MToon",
				VersionNumber = material.GetInt("_MToonVersion")
			},
			Rendering = new RenderingDefinition
			{
				RenderMode = GetBlendMode(material),
				CullMode = GetCullMode(material),
				RenderQueueOffsetNumber = GetRenderQueueOffset(material, GetRenderQueueOriginMode(material))
			},
			Color = new ColorDefinition
			{
				LitColor = GetColor(material, "_Color"),
				LitMultiplyTexture = GetTexture(material, "_MainTex"),
				ShadeColor = GetColor(material, "_ShadeColor"),
				ShadeMultiplyTexture = GetTexture(material, "_ShadeTexture"),
				CutoutThresholdValue = GetValue(material, "_Cutoff")
			},
			Lighting = new LightingDefinition
			{
				LitAndShadeMixing = new LitAndShadeMixingDefinition
				{
					ShadingShiftValue = GetValue(material, "_ShadeShift"),
					ShadingToonyValue = GetValue(material, "_ShadeToony"),
					ShadowReceiveMultiplierValue = GetValue(material, "_ReceiveShadowRate"),
					ShadowReceiveMultiplierMultiplyTexture = GetTexture(material, "_ReceiveShadowTexture"),
					LitAndShadeMixingMultiplierValue = GetValue(material, "_ShadingGradeRate"),
					LitAndShadeMixingMultiplierMultiplyTexture = GetTexture(material, "_ShadingGradeTexture")
				},
				LightingInfluence = new LightingInfluenceDefinition
				{
					LightColorAttenuationValue = GetValue(material, "_LightColorAttenuation"),
					GiIntensityValue = GetValue(material, "_IndirectLightIntensity")
				},
				Normal = new NormalDefinition
				{
					NormalTexture = GetTexture(material, "_BumpMap"),
					NormalScaleValue = GetValue(material, "_BumpScale")
				}
			},
			Emission = new EmissionDefinition
			{
				EmissionColor = GetColor(material, "_EmissionColor"),
				EmissionMultiplyTexture = GetTexture(material, "_EmissionMap")
			},
			MatCap = new MatCapDefinition
			{
				AdditiveTexture = GetTexture(material, "_SphereAdd")
			},
			Rim = new RimDefinition
			{
				RimColor = GetColor(material, "_RimColor"),
				RimMultiplyTexture = GetTexture(material, "_RimTexture"),
				RimLightingMixValue = GetValue(material, "_RimLightingMix"),
				RimFresnelPowerValue = GetValue(material, "_RimFresnelPower"),
				RimLiftValue = GetValue(material, "_RimLift")
			},
			Outline = new OutlineDefinition
			{
				OutlineWidthMode = GetOutlineWidthMode(material),
				OutlineWidthValue = GetValue(material, "_OutlineWidth"),
				OutlineWidthMultiplyTexture = GetTexture(material, "_OutlineWidthTexture"),
				OutlineScaledMaxDistanceValue = GetValue(material, "_OutlineScaledMaxDistance"),
				OutlineColorMode = GetOutlineColorMode(material),
				OutlineColor = GetColor(material, "_OutlineColor"),
				OutlineLightingMixValue = GetValue(material, "_OutlineLightingMix")
			},
			TextureOption = new TextureUvCoordsDefinition
			{
				MainTextureLeftBottomOriginScale = material.GetTextureScale("_MainTex"),
				MainTextureLeftBottomOriginOffset = material.GetTextureOffset("_MainTex"),
				UvAnimationMaskTexture = GetTexture(material, "_UvAnimMaskTexture"),
				UvAnimationScrollXSpeedValue = GetValue(material, "_UvAnimScrollX"),
				UvAnimationScrollYSpeedValue = GetValue(material, "_UvAnimScrollY"),
				UvAnimationRotationSpeedValue = GetValue(material, "_UvAnimRotation")
			}
		};
	}

	private static float GetValue(Material material, string propertyName)
	{
		return material.GetFloat(propertyName);
	}

	private static Color GetColor(Material material, string propertyName)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		return material.GetColor(propertyName);
	}

	private static Texture2D GetTexture(Material material, string propertyName)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Expected O, but got Unknown
		return (Texture2D)material.GetTexture(propertyName);
	}

	private static RenderMode GetBlendMode(Material material)
	{
		if (material.IsKeywordEnabled("_ALPHATEST_ON"))
		{
			return RenderMode.Cutout;
		}
		if (material.IsKeywordEnabled("_ALPHABLEND_ON"))
		{
			switch (material.GetInt("_ZWrite"))
			{
			case 1:
				return RenderMode.TransparentWithZWrite;
			case 0:
				return RenderMode.Transparent;
			default:
				Debug.LogWarning((object)"Invalid ZWrite Int Value.");
				return RenderMode.Transparent;
			}
		}
		return RenderMode.Opaque;
	}

	private static CullMode GetCullMode(Material material)
	{
		switch ((CullMode)material.GetInt("_CullMode"))
		{
		case CullMode.Off:
			return CullMode.Off;
		case CullMode.Front:
			return CullMode.Front;
		case CullMode.Back:
			return CullMode.Back;
		default:
			Debug.LogWarning((object)"Invalid CullMode.");
			return CullMode.Back;
		}
	}

	private static OutlineWidthMode GetOutlineWidthMode(Material material)
	{
		if (material.IsKeywordEnabled("MTOON_OUTLINE_WIDTH_WORLD"))
		{
			return OutlineWidthMode.WorldCoordinates;
		}
		if (material.IsKeywordEnabled("MTOON_OUTLINE_WIDTH_SCREEN"))
		{
			return OutlineWidthMode.ScreenCoordinates;
		}
		return OutlineWidthMode.None;
	}

	private static OutlineColorMode GetOutlineColorMode(Material material)
	{
		if (material.IsKeywordEnabled("MTOON_OUTLINE_COLOR_FIXED"))
		{
			return OutlineColorMode.FixedColor;
		}
		if (material.IsKeywordEnabled("MTOON_OUTLINE_COLOR_MIXED"))
		{
			return OutlineColorMode.MixedLighting;
		}
		return OutlineColorMode.FixedColor;
	}

	private static RenderMode GetRenderQueueOriginMode(Material material)
	{
		return GetBlendMode(material);
	}

	private static int GetRenderQueueOffset(Material material, RenderMode originMode)
	{
		int renderQueue = material.renderQueue;
		RenderQueueRequirement renderQueueRequirement = GetRenderQueueRequirement(originMode);
		if (renderQueue < renderQueueRequirement.MinValue || renderQueue > renderQueueRequirement.MaxValue)
		{
			return 0;
		}
		return renderQueue - renderQueueRequirement.DefaultValue;
	}

	public static void SetMToonParametersToMaterial(Material material, MToonDefinition parameters)
	{
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0165: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_0243: Unknown result type (might be due to invalid IL or missing references)
		//IL_0283: Unknown result type (might be due to invalid IL or missing references)
		//IL_0295: Unknown result type (might be due to invalid IL or missing references)
		MetaDefinition meta = parameters.Meta;
		SetValue(material, "_MToonVersion", meta.VersionNumber);
		RenderingDefinition rendering = parameters.Rendering;
		SetRenderMode(material, rendering.RenderMode, rendering.RenderQueueOffsetNumber, useDefaultRenderQueue: false);
		SetCullMode(material, rendering.CullMode);
		ColorDefinition color = parameters.Color;
		SetColor(material, "_Color", color.LitColor);
		SetTexture(material, "_MainTex", (Texture)(object)color.LitMultiplyTexture);
		SetColor(material, "_ShadeColor", color.ShadeColor);
		SetTexture(material, "_ShadeTexture", (Texture)(object)color.ShadeMultiplyTexture);
		SetValue(material, "_Cutoff", color.CutoutThresholdValue);
		LightingDefinition lighting = parameters.Lighting;
		LitAndShadeMixingDefinition litAndShadeMixing = lighting.LitAndShadeMixing;
		SetValue(material, "_ShadeShift", litAndShadeMixing.ShadingShiftValue);
		SetValue(material, "_ShadeToony", litAndShadeMixing.ShadingToonyValue);
		SetValue(material, "_ReceiveShadowRate", litAndShadeMixing.ShadowReceiveMultiplierValue);
		SetTexture(material, "_ReceiveShadowTexture", (Texture)(object)litAndShadeMixing.ShadowReceiveMultiplierMultiplyTexture);
		SetValue(material, "_ShadingGradeRate", litAndShadeMixing.LitAndShadeMixingMultiplierValue);
		SetTexture(material, "_ShadingGradeTexture", (Texture)(object)litAndShadeMixing.LitAndShadeMixingMultiplierMultiplyTexture);
		LightingInfluenceDefinition lightingInfluence = lighting.LightingInfluence;
		SetValue(material, "_LightColorAttenuation", lightingInfluence.LightColorAttenuationValue);
		SetValue(material, "_IndirectLightIntensity", lightingInfluence.GiIntensityValue);
		NormalDefinition normal = lighting.Normal;
		SetNormalMapping(material, (Texture)(object)normal.NormalTexture, normal.NormalScaleValue);
		EmissionDefinition emission = parameters.Emission;
		SetColor(material, "_EmissionColor", emission.EmissionColor);
		SetTexture(material, "_EmissionMap", (Texture)(object)emission.EmissionMultiplyTexture);
		MatCapDefinition matCap = parameters.MatCap;
		SetTexture(material, "_SphereAdd", (Texture)(object)matCap.AdditiveTexture);
		RimDefinition rim = parameters.Rim;
		SetColor(material, "_RimColor", rim.RimColor);
		SetTexture(material, "_RimTexture", (Texture)(object)rim.RimMultiplyTexture);
		SetValue(material, "_RimLightingMix", rim.RimLightingMixValue);
		SetValue(material, "_RimFresnelPower", rim.RimFresnelPowerValue);
		SetValue(material, "_RimLift", rim.RimLiftValue);
		OutlineDefinition outline = parameters.Outline;
		SetValue(material, "_OutlineWidth", outline.OutlineWidthValue);
		SetTexture(material, "_OutlineWidthTexture", (Texture)(object)outline.OutlineWidthMultiplyTexture);
		SetValue(material, "_OutlineScaledMaxDistance", outline.OutlineScaledMaxDistanceValue);
		SetColor(material, "_OutlineColor", outline.OutlineColor);
		SetValue(material, "_OutlineLightingMix", outline.OutlineLightingMixValue);
		SetOutlineMode(material, outline.OutlineWidthMode, outline.OutlineColorMode);
		TextureUvCoordsDefinition textureOption = parameters.TextureOption;
		material.SetTextureScale("_MainTex", textureOption.MainTextureLeftBottomOriginScale);
		material.SetTextureOffset("_MainTex", textureOption.MainTextureLeftBottomOriginOffset);
		material.SetTexture("_UvAnimMaskTexture", (Texture)(object)textureOption.UvAnimationMaskTexture);
		material.SetFloat("_UvAnimScrollX", textureOption.UvAnimationScrollXSpeedValue);
		material.SetFloat("_UvAnimScrollY", textureOption.UvAnimationScrollYSpeedValue);
		material.SetFloat("_UvAnimRotation", textureOption.UvAnimationRotationSpeedValue);
		ValidateProperties(material);
	}

	public static void ValidateProperties(Material material, bool isBlendModeChangedByUser = false)
	{
		SetRenderMode(material, (RenderMode)material.GetFloat("_BlendMode"), material.renderQueue - GetRenderQueueRequirement((RenderMode)material.GetFloat("_BlendMode")).DefaultValue, isBlendModeChangedByUser);
		SetNormalMapping(material, material.GetTexture("_BumpMap"), material.GetFloat("_BumpScale"));
		SetOutlineMode(material, (OutlineWidthMode)material.GetFloat("_OutlineWidthMode"), (OutlineColorMode)material.GetFloat("_OutlineColorMode"));
		SetDebugMode(material, (DebugMode)material.GetFloat("_DebugMode"));
		SetCullMode(material, (CullMode)material.GetFloat("_CullMode"));
		Texture texture = material.GetTexture("_MainTex");
		Texture texture2 = material.GetTexture("_ShadeTexture");
		if ((Object)(object)texture != (Object)null && (Object)(object)texture2 == (Object)null)
		{
			material.SetTexture("_ShadeTexture", texture);
		}
	}

	private static void SetDebugMode(Material material, DebugMode debugMode)
	{
		SetValue(material, "_DebugMode", (float)debugMode);
		switch (debugMode)
		{
		case DebugMode.None:
			SetKeyword(material, "MTOON_DEBUG_NORMAL", required: false);
			SetKeyword(material, "MTOON_DEBUG_LITSHADERATE", required: false);
			break;
		case DebugMode.Normal:
			SetKeyword(material, "MTOON_DEBUG_NORMAL", required: true);
			SetKeyword(material, "MTOON_DEBUG_LITSHADERATE", required: false);
			break;
		case DebugMode.LitShadeRate:
			SetKeyword(material, "MTOON_DEBUG_NORMAL", required: false);
			SetKeyword(material, "MTOON_DEBUG_LITSHADERATE", required: true);
			break;
		}
	}

	private static void SetRenderMode(Material material, RenderMode renderMode, int renderQueueOffset, bool useDefaultRenderQueue)
	{
		SetValue(material, "_BlendMode", (float)renderMode);
		switch (renderMode)
		{
		case RenderMode.Opaque:
			material.SetOverrideTag("RenderType", "Opaque");
			material.SetInt("_SrcBlend", 1);
			material.SetInt("_DstBlend", 0);
			material.SetInt("_ZWrite", 1);
			material.SetInt("_AlphaToMask", 0);
			SetKeyword(material, "_ALPHATEST_ON", required: false);
			SetKeyword(material, "_ALPHABLEND_ON", required: false);
			SetKeyword(material, "_ALPHAPREMULTIPLY_ON", required: false);
			break;
		case RenderMode.Cutout:
			material.SetOverrideTag("RenderType", "TransparentCutout");
			material.SetInt("_SrcBlend", 1);
			material.SetInt("_DstBlend", 0);
			material.SetInt("_ZWrite", 1);
			material.SetInt("_AlphaToMask", 1);
			SetKeyword(material, "_ALPHATEST_ON", required: true);
			SetKeyword(material, "_ALPHABLEND_ON", required: false);
			SetKeyword(material, "_ALPHAPREMULTIPLY_ON", required: false);
			break;
		case RenderMode.Transparent:
			material.SetOverrideTag("RenderType", "Transparent");
			material.SetInt("_SrcBlend", 5);
			material.SetInt("_DstBlend", 10);
			material.SetInt("_ZWrite", 0);
			material.SetInt("_AlphaToMask", 0);
			SetKeyword(material, "_ALPHATEST_ON", required: false);
			SetKeyword(material, "_ALPHABLEND_ON", required: true);
			SetKeyword(material, "_ALPHAPREMULTIPLY_ON", required: false);
			break;
		case RenderMode.TransparentWithZWrite:
			material.SetOverrideTag("RenderType", "Transparent");
			material.SetInt("_SrcBlend", 5);
			material.SetInt("_DstBlend", 10);
			material.SetInt("_ZWrite", 1);
			material.SetInt("_AlphaToMask", 0);
			SetKeyword(material, "_ALPHATEST_ON", required: false);
			SetKeyword(material, "_ALPHABLEND_ON", required: true);
			SetKeyword(material, "_ALPHAPREMULTIPLY_ON", required: false);
			break;
		}
		if (useDefaultRenderQueue)
		{
			material.renderQueue = GetRenderQueueRequirement(renderMode).DefaultValue;
			return;
		}
		RenderQueueRequirement renderQueueRequirement = GetRenderQueueRequirement(renderMode);
		material.renderQueue = Mathf.Clamp(renderQueueRequirement.DefaultValue + renderQueueOffset, renderQueueRequirement.MinValue, renderQueueRequirement.MaxValue);
	}

	private static void SetOutlineMode(Material material, OutlineWidthMode outlineWidthMode, OutlineColorMode outlineColorMode)
	{
		SetValue(material, "_OutlineWidthMode", (float)outlineWidthMode);
		SetValue(material, "_OutlineColorMode", (float)outlineColorMode);
		bool required = outlineColorMode == OutlineColorMode.FixedColor;
		bool required2 = outlineColorMode == OutlineColorMode.MixedLighting;
		switch (outlineWidthMode)
		{
		case OutlineWidthMode.None:
			SetKeyword(material, "MTOON_OUTLINE_WIDTH_WORLD", required: false);
			SetKeyword(material, "MTOON_OUTLINE_WIDTH_SCREEN", required: false);
			SetKeyword(material, "MTOON_OUTLINE_COLOR_FIXED", required: false);
			SetKeyword(material, "MTOON_OUTLINE_COLOR_MIXED", required: false);
			break;
		case OutlineWidthMode.WorldCoordinates:
			SetKeyword(material, "MTOON_OUTLINE_WIDTH_WORLD", required: true);
			SetKeyword(material, "MTOON_OUTLINE_WIDTH_SCREEN", required: false);
			SetKeyword(material, "MTOON_OUTLINE_COLOR_FIXED", required);
			SetKeyword(material, "MTOON_OUTLINE_COLOR_MIXED", required2);
			break;
		case OutlineWidthMode.ScreenCoordinates:
			SetKeyword(material, "MTOON_OUTLINE_WIDTH_WORLD", required: false);
			SetKeyword(material, "MTOON_OUTLINE_WIDTH_SCREEN", required: true);
			SetKeyword(material, "MTOON_OUTLINE_COLOR_FIXED", required);
			SetKeyword(material, "MTOON_OUTLINE_COLOR_MIXED", required2);
			break;
		}
	}

	private static void SetNormalMapping(Material material, Texture bumpMap, float bumpScale)
	{
		SetTexture(material, "_BumpMap", bumpMap);
		SetValue(material, "_BumpScale", bumpScale);
		SetKeyword(material, "_NORMALMAP", (Object)(object)bumpMap != (Object)null);
	}

	private static void SetCullMode(Material material, CullMode cullMode)
	{
		SetValue(material, "_CullMode", (float)cullMode);
		switch (cullMode)
		{
		case CullMode.Back:
			material.SetInt("_CullMode", 2);
			material.SetInt("_OutlineCullMode", 1);
			break;
		case CullMode.Front:
			material.SetInt("_CullMode", 1);
			material.SetInt("_OutlineCullMode", 2);
			break;
		case CullMode.Off:
			material.SetInt("_CullMode", 0);
			material.SetInt("_OutlineCullMode", 1);
			break;
		}
	}

	private static void SetValue(Material material, string propertyName, float val)
	{
		material.SetFloat(propertyName, val);
	}

	private static void SetColor(Material material, string propertyName, Color color)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		material.SetColor(propertyName, color);
	}

	private static void SetTexture(Material material, string propertyName, Texture texture)
	{
		material.SetTexture(propertyName, texture);
	}

	private static void SetKeyword(Material mat, string keyword, bool required)
	{
		if (required)
		{
			mat.EnableKeyword(keyword);
		}
		else
		{
			mat.DisableKeyword(keyword);
		}
	}
}

System.dll

Decompiled 5 months ago
using System;
using System.Buffers;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Configuration;
using System.Configuration.Internal;
using System.Configuration.Provider;
using System.Diagnostics;
using System.Diagnostics.Tracing;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.IO.Ports;
using System.Net;
using System.Net.Cache;
using System.Net.Configuration;
using System.Net.Mail;
using System.Net.Mime;
using System.Net.NetworkInformation;
using System.Net.NetworkInformation.MacOsStructs;
using System.Net.Security;
using System.Net.Sockets;
using System.Net.WebSockets;
using System.Reflection;
using System.Reflection.Emit;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
using System.Runtime.Remoting.Messaging;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Versioning;
using System.Security;
using System.Security.AccessControl;
using System.Security.Authentication;
using System.Security.Authentication.ExtendedProtection;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Security.Permissions;
using System.Security.Policy;
using System.Security.Principal;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Util;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Win32;
using Microsoft.Win32.SafeHandles;
using Mono;
using Mono.Http;
using Mono.Net;
using Mono.Net.Security;
using Mono.Net.Security.Private;
using Mono.Security;
using Mono.Security.Authenticode;
using Mono.Security.Cryptography;
using Mono.Security.Interface;
using Mono.Security.Protocol.Ntlm;
using Mono.Security.Protocol.Tls;
using Mono.Security.X509;
using Mono.Security.X509.Extensions;
using Mono.Unity;
using Mono.Util;
using ObjCRuntimeInternal;
using Unity;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("System.dll")]
[assembly: AssemblyDescription("System.dll")]
[assembly: AssemblyDefaultAlias("System.dll")]
[assembly: AssemblyCompany("Mono development team")]
[assembly: AssemblyProduct("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright("(c) Various Mono authors")]
[assembly: AssemblyFileVersion("4.0.30319.17020")]
[assembly: AssemblyInformationalVersion("4.0.30319.17020")]
[assembly: CLSCompliant(true)]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: ComVisible(false)]
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../silverlight.pub")]
[assembly: InternalsVisibleTo("System.ComponentModel.DataAnnotations, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Net.Http, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("Mono.Btls.Interface, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: SatelliteContractVersion("4.0.0.0")]
[assembly: InternalsVisibleTo("Mono.Security, PublicKey=002400000480000094000000060200000024000052534131000400000100010079159977d2d03a8e6bea7a2e74e8d1afcc93e8851974952bb480a12c9134474d04062447c37e0e68c080536fcf3c3fbe2ff9c979ce998475e506e8ce82dd5b0f350dc10e93bf2eeecf874b24770c5081dbea7447fddafa277b22de47d6ffea449674a4f9fccf84d15069089380284dbdd35f46cdff12a1bd78e4ef0065d016df")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("4.0.0.0")]
[module: UnverifiableCode]
internal static class SR
{
	public const string RTL = "RTL_False";

	public const string ContinueButtonText = "Continue";

	public const string DebugMessageTruncated = "{0}...\n<truncated>";

	public const string DebugAssertTitleShort = "Assertion Failed";

	public const string DebugAssertTitle = "Assertion Failed: Cancel=Debug, OK=Continue";

	public const string NotSupported = "This operation is not supported.";

	public const string DebugLaunchFailed = "Cannot launch the debugger.  Make sure that a Microsoft (R) .NET Framework debugger is properly installed.";

	public const string DebugLaunchFailedTitle = "Microsoft .NET Framework Debug Launch Failure";

	public const string ObjectDisposed = "Object {0} has been disposed and can no longer be used.";

	public const string ExceptionOccurred = "An exception occurred writing trace output to log file '{0}'. {1}";

	public const string MustAddListener = "Only TraceListeners can be added to a TraceListenerCollection.";

	public const string ToStringNull = "(null)";

	public const string EnumConverterInvalidValue = "The value '{0}' is not a valid value for the enum '{1}'.";

	public const string ConvertFromException = "{0} cannot convert from {1}.";

	public const string ConvertToException = "'{0}' is unable to convert '{1}' to '{2}'.";

	public const string ConvertInvalidPrimitive = "{0} is not a valid value for {1}.";

	public const string ErrorMissingPropertyAccessors = "Accessor methods for the {0} property are missing.";

	public const string ErrorInvalidPropertyType = "Invalid type for the {0} property.";

	public const string ErrorMissingEventAccessors = "Accessor methods for the {0} event are missing.";

	public const string ErrorInvalidEventHandler = "Invalid event handler for the {0} event.";

	public const string ErrorInvalidEventType = "Invalid type for the {0} event.";

	public const string InvalidMemberName = "Invalid member name.";

	public const string ErrorBadExtenderType = "The {0} extender provider is not compatible with the {1} type.";

	public const string NullableConverterBadCtorArg = "The specified type is not a nullable type.";

	public const string TypeDescriptorExpectedElementType = "Expected types in the collection to be of type {0}.";

	public const string TypeDescriptorSameAssociation = "Cannot create an association when the primary and secondary objects are the same.";

	public const string TypeDescriptorAlreadyAssociated = "The primary and secondary objects are already associated with each other.";

	public const string TypeDescriptorProviderError = "The type description provider {0} has returned null from {1} which is illegal.";

	public const string TypeDescriptorUnsupportedRemoteObject = "The object {0} is being remoted by a proxy that does not support interface discovery.  This type of remoted object is not supported.";

	public const string TypeDescriptorArgsCountMismatch = "The number of elements in the Type and Object arrays must match.";

	public const string ErrorCreateSystemEvents = "Failed to create system events window thread.";

	public const string ErrorCreateTimer = "Cannot create timer.";

	public const string ErrorKillTimer = "Cannot end timer.";

	public const string ErrorSystemEventsNotSupported = "System event notifications are not supported under the current context. Server processes, for example, may not support global system event notifications.";

	public const string ErrorGetTempPath = "Cannot get temporary file name";

	public const string CHECKOUTCanceled = "The checkout was canceled by the user.";

	public const string ErrorInvalidServiceInstance = "The service instance must derive from or implement {0}.";

	public const string ErrorServiceExists = "The service {0} already exists in the service container.";

	public const string Argument_InvalidNumberStyles = "An undefined NumberStyles value is being used.";

	public const string Argument_InvalidHexStyle = "With the AllowHexSpecifier bit set in the enum bit field, the only other valid bits that can be combined into the enum value must be a subset of those in HexNumber.";

	public const string Argument_ByteArrayLengthMustBeAMultipleOf4 = "The Byte[] length must be a multiple of 4.";

	public const string Argument_InvalidCharactersInString = "The string contained an invalid character.";

	public const string Argument_ParsedStringWasInvalid = "The parsed string was invalid.";

	public const string Argument_MustBeBigInt = "The parameter must be a BigInteger.";

	public const string Format_InvalidFormatSpecifier = "Format specifier was invalid.";

	public const string Format_TooLarge = "The value is too large to be represented by this format specifier.";

	public const string ArgumentOutOfRange_MustBeLessThanUInt32MaxValue = "The value must be less than UInt32.MaxValue (2^32).";

	public const string ArgumentOutOfRange_MustBeNonNeg = "The number must be greater than or equal to zero.";

	public const string NotSupported_NumberStyle = "The NumberStyle option is not supported.";

	public const string Overflow_BigIntInfinity = "BigInteger cannot represent infinity.";

	public const string Overflow_NotANumber = "The value is not a number.";

	public const string Overflow_ParseBigInteger = "The value could not be parsed.";

	public const string Overflow_Int32 = "Value was either too large or too small for an Int32.";

	public const string Overflow_Int64 = "Value was either too large or too small for an Int64.";

	public const string Overflow_UInt32 = "Value was either too large or too small for a UInt32.";

	public const string Overflow_UInt64 = "Value was either too large or too small for a UInt64.";

	public const string Overflow_Decimal = "Value was either too large or too small for a Decimal.";

	public const string Argument_FrameworkNameTooShort = "FrameworkName cannot have less than two components or more than three components.";

	public const string Argument_FrameworkNameInvalid = "FrameworkName is invalid.";

	public const string Argument_FrameworkNameInvalidVersion = "FrameworkName version component is invalid.";

	public const string Argument_FrameworkNameMissingVersion = "FrameworkName version component is missing.";

	public const string ArgumentNull_Key = "Key cannot be null.";

	public const string Argument_InvalidValue = "Argument {0} should be larger than {1}.";

	public const string Arg_MultiRank = "Multi dimension array is not supported on this operation.";

	public const string Barrier_ctor_ArgumentOutOfRange = "The participantCount argument must be non-negative and less than or equal to 32767.";

	public const string Barrier_AddParticipants_NonPositive_ArgumentOutOfRange = "The participantCount argument must be a positive value.";

	public const string Barrier_AddParticipants_Overflow_ArgumentOutOfRange = "Adding participantCount participants would result in the number of participants exceeding the maximum number allowed.";

	public const string Barrier_InvalidOperation_CalledFromPHA = "This method may not be called from within the postPhaseAction.";

	public const string Barrier_RemoveParticipants_NonPositive_ArgumentOutOfRange = "The participantCount argument must be a positive value.";

	public const string Barrier_RemoveParticipants_ArgumentOutOfRange = "The participantCount argument must be less than or equal the number of participants.";

	public const string Barrier_RemoveParticipants_InvalidOperation = "The participantCount argument is greater than the number of participants that haven't yet arrived at the barrier in this phase.";

	public const string Barrier_SignalAndWait_ArgumentOutOfRange = "The specified timeout must represent a value between -1 and Int32.MaxValue, inclusive.";

	public const string Barrier_SignalAndWait_InvalidOperation_ZeroTotal = "The barrier has no registered participants.";

	public const string Barrier_SignalAndWait_InvalidOperation_ThreadsExceeded = "The number of threads using the barrier exceeded the total number of registered participants.";

	public const string Barrier_Dispose = "The barrier has been disposed.";

	public const string BarrierPostPhaseException = "The postPhaseAction failed with an exception.";

	public const string UriTypeConverter_ConvertFrom_CannotConvert = "{0} cannot convert from {1}.";

	public const string UriTypeConverter_ConvertTo_CannotConvert = "{0} cannot convert {1} to {2}.";

	public const string ISupportInitializeDescr = "Specifies support for transacted initialization.";

	public const string CantModifyListSortDescriptionCollection = "Once a ListSortDescriptionCollection has been created it can't be modified.";

	public const string Argument_NullComment = "The 'Comment' property of the CodeCommentStatement '{0}' cannot be null.";

	public const string InvalidPrimitiveType = "Invalid Primitive Type: {0}. Consider using CodeObjectCreateExpression.";

	public const string Cannot_Specify_Both_Compiler_Path_And_Version = "Cannot specify both the '{0}' and '{1}' CodeDom provider options to choose a compiler. Please remove one of them.";

	public const string CodeGenOutputWriter = "The output writer for code generation and the writer supplied don't match and cannot be used. This is generally caused by a bad implementation of a CodeGenerator derived class.";

	public const string CodeGenReentrance = "This code generation API cannot be called while the generator is being used to generate something else.";

	public const string InvalidLanguageIdentifier = "The identifier:\"{0}\" on the property:\"{1}\" of type:\"{2}\" is not a valid language-independent identifier name. Check to see if CodeGenerator.IsValidLanguageIndependentIdentifier allows the identifier name.";

	public const string InvalidTypeName = "The type name:\"{0}\" on the property:\"{1}\" of type:\"{2}\" is not a valid language-independent type name.";

	public const string Empty_attribute = "The '{0}' attribute cannot be an empty string.";

	public const string Invalid_nonnegative_integer_attribute = "The '{0}' attribute must be a non-negative integer.";

	public const string CodeDomProvider_NotDefined = "There is no CodeDom provider defined for the language.";

	public const string Language_Names_Cannot_Be_Empty = "You need to specify a non-empty String for a language name in the CodeDom configuration section.";

	public const string Extension_Names_Cannot_Be_Empty_Or_Non_Period_Based = "An extension name in the CodeDom configuration section must be a non-empty string which starts with a period.";

	public const string Unable_To_Locate_Type = "The CodeDom provider type \"{0}\" could not be located.";

	public const string NotSupported_CodeDomAPI = "This CodeDomProvider does not support this method.";

	public const string ArityDoesntMatch = "The total arity specified in '{0}' does not match the number of TypeArguments supplied.  There were '{1}' TypeArguments supplied.";

	public const string PartialTrustErrorTextReplacement = "<The original value of this property potentially contains file system information and has been suppressed.>";

	public const string PartialTrustIllegalProvider = "When used in partial trust, langID must be C#, VB, J#, or JScript, and the language provider must be in the global assembly cache.";

	public const string IllegalAssemblyReference = "Assembly references cannot begin with '-', or contain a '/' or '\\'.";

	public const string NullOrEmpty_Value_in_Property = "The '{0}' property cannot contain null or empty strings.";

	public const string AutoGen_Comment_Line1 = "auto-generated>";

	public const string AutoGen_Comment_Line2 = "This code was generated by a tool.";

	public const string AutoGen_Comment_Line3 = "Runtime Version:";

	public const string AutoGen_Comment_Line4 = "Changes to this file may cause incorrect behavior and will be lost if";

	public const string AutoGen_Comment_Line5 = "the code is regenerated.";

	public const string CantContainNullEntries = "Array '{0}' cannot contain null entries.";

	public const string InvalidPathCharsInChecksum = "The CodeChecksumPragma file name '{0}' contains invalid path characters.";

	public const string InvalidRegion = "The region directive '{0}' contains invalid characters.  RegionText cannot contain any new line characters.";

	public const string Provider_does_not_support_options = "This CodeDomProvider type does not have a constructor that takes providerOptions - \"{0}\"";

	public const string MetaExtenderName = "{0} on {1}";

	public const string InvalidEnumArgument = "The value of argument '{0}' ({1}) is invalid for Enum type '{2}'.";

	public const string InvalidArgument = "'{1}' is not a valid value for '{0}'.";

	public const string InvalidNullArgument = "Null is not a valid value for {0}.";

	public const string LicExceptionTypeOnly = "A valid license cannot be granted for the type {0}. Contact the manufacturer of the component for more information.";

	public const string LicExceptionTypeAndInstance = "An instance of type '{1}' was being created, and a valid license could not be granted for the type '{0}'. Please,  contact the manufacturer of the component for more information.";

	public const string LicMgrContextCannotBeChanged = "The CurrentContext property of the LicenseManager is currently locked and cannot be changed.";

	public const string LicMgrAlreadyLocked = "The CurrentContext property of the LicenseManager is already locked by another user.";

	public const string LicMgrDifferentUser = "The CurrentContext property of the LicenseManager can only be unlocked with the same contextUser.";

	public const string InvalidElementType = "Element type {0} is not supported.";

	public const string InvalidIdentifier = "Identifier '{0}' is not valid.";

	public const string ExecFailedToCreate = "Failed to create file {0}.";

	public const string ExecTimeout = "Timed out waiting for a program to execute. The command being executed was {0}.";

	public const string ExecBadreturn = "An invalid return code was encountered waiting for a program to execute. The command being executed was {0}.";

	public const string ExecCantGetRetCode = "Unable to get the return code for a program being executed. The command that was being executed was '{0}'.";

	public const string ExecCantExec = "Cannot execute a program. The command being executed was {0}.";

	public const string ExecCantRevert = "Cannot execute a program. Impersonation failed.";

	public const string CompilerNotFound = "Compiler executable file {0} cannot be found.";

	public const string DuplicateFileName = "The file name '{0}' was already in the collection.";

	public const string CollectionReadOnly = "Collection is read-only.";

	public const string BitVectorFull = "Bit vector is full.";

	public const string ArrayConverterText = "{0} Array";

	public const string CollectionConverterText = "(Collection)";

	public const string MultilineStringConverterText = "(Text)";

	public const string CultureInfoConverterDefaultCultureString = "(Default)";

	public const string CultureInfoConverterInvalidCulture = "The {0} culture cannot be converted to a CultureInfo object on this computer.";

	public const string InvalidPrimitive = "The text {0} is not a valid {1}.";

	public const string TimerInvalidInterval = "'{0}' is not a valid value for 'Interval'. 'Interval' must be greater than {1}.";

	public const string TraceSwitchLevelTooHigh = "Attempted to set {0} to a value that is too high.  Setting level to TraceLevel.Verbose";

	public const string TraceSwitchLevelTooLow = "Attempted to set {0} to a value that is too low.  Setting level to TraceLevel.Off";

	public const string TraceSwitchInvalidLevel = "The Level must be set to a value in the enumeration TraceLevel.";

	public const string TraceListenerIndentSize = "The IndentSize property must be non-negative.";

	public const string TraceListenerFail = "Fail:";

	public const string TraceAsTraceSource = "Trace";

	public const string InvalidLowBoundArgument = "'{1}' is not a valid value for '{0}'. '{0}' must be greater than {2}.";

	public const string DuplicateComponentName = "Duplicate component name '{0}'.  Component names must be unique and case-insensitive.";

	public const string NotImplemented = "{0}: Not implemented";

	public const string OutOfMemory = "Could not allocate needed memory.";

	public const string EOF = "End of data stream encountered.";

	public const string IOError = "Unknown input/output failure.";

	public const string BadChar = "Unexpected Character: '{0}'.";

	public const string toStringNone = "(none)";

	public const string toStringUnknown = "(unknown)";

	public const string InvalidEnum = "{0} is not a valid {1} value.";

	public const string IndexOutOfRange = "Index {0} is out of range.";

	public const string ErrorPropertyAccessorException = "Property accessor '{0}' on object '{1}' threw the following exception:'{2}'";

	public const string InvalidOperation = "Invalid operation.";

	public const string EmptyStack = "Stack has no items in it.";

	public const string PerformanceCounterDesc = "Represents a Windows performance counter component.";

	public const string PCCategoryName = "Category name of the performance counter object.";

	public const string PCCounterName = "Counter name of the performance counter object.";

	public const string PCInstanceName = "Instance name of the performance counter object.";

	public const string PCMachineName = "Specifies the machine from where to read the performance data.";

	public const string PCInstanceLifetime = "Specifies the lifetime of the instance.";

	public const string PropertyCategoryAction = "Action";

	public const string PropertyCategoryAppearance = "Appearance";

	public const string PropertyCategoryAsynchronous = "Asynchronous";

	public const string PropertyCategoryBehavior = "Behavior";

	public const string PropertyCategoryData = "Data";

	public const string PropertyCategoryDDE = "DDE";

	public const string PropertyCategoryDesign = "Design";

	public const string PropertyCategoryDragDrop = "Drag Drop";

	public const string PropertyCategoryFocus = "Focus";

	public const string PropertyCategoryFont = "Font";

	public const string PropertyCategoryFormat = "Format";

	public const string PropertyCategoryKey = "Key";

	public const string PropertyCategoryList = "List";

	public const string PropertyCategoryLayout = "Layout";

	public const string PropertyCategoryDefault = "Misc";

	public const string PropertyCategoryMouse = "Mouse";

	public const string PropertyCategoryPosition = "Position";

	public const string PropertyCategoryText = "Text";

	public const string PropertyCategoryScale = "Scale";

	public const string PropertyCategoryWindowStyle = "Window Style";

	public const string PropertyCategoryConfig = "Configurations";

	public const string ArgumentNull_ArrayWithNullElements = "The array cannot contain null elements.";

	public const string OnlyAllowedOnce = "This operation is only allowed once per object.";

	public const string BeginIndexNotNegative = "Start index cannot be less than 0 or greater than input length.";

	public const string LengthNotNegative = "Length cannot be less than 0 or exceed input length.";

	public const string UnimplementedState = "Unimplemented state.";

	public const string UnexpectedOpcode = "Unexpected opcode in regular expression generation: {0}.";

	public const string NoResultOnFailed = "Result cannot be called on a failed Match.";

	public const string UnterminatedBracket = "Unterminated [] set.";

	public const string TooManyParens = "Too many )'s.";

	public const string NestedQuantify = "Nested quantifier {0}.";

	public const string QuantifyAfterNothing = "Quantifier {x,y} following nothing.";

	public const string InternalError = "Internal error in ScanRegex.";

	public const string IllegalRange = "Illegal {x,y} with x > y.";

	public const string NotEnoughParens = "Not enough )'s.";

	public const string BadClassInCharRange = "Cannot include class \\{0} in character range.";

	public const string ReversedCharRange = "[x-y] range in reverse order.";

	public const string UndefinedReference = "(?({0}) ) reference to undefined group.";

	public const string MalformedReference = "(?({0}) ) malformed.";

	public const string UnrecognizedGrouping = "Unrecognized grouping construct.";

	public const string UnterminatedComment = "Unterminated (?#...) comment.";

	public const string IllegalEndEscape = "Illegal \\ at end of pattern.";

	public const string MalformedNameRef = "Malformed \\k<...> named back reference.";

	public const string UndefinedBackref = "Reference to undefined group number {0}.";

	public const string UndefinedNameRef = "Reference to undefined group name {0}.";

	public const string TooFewHex = "Insufficient hexadecimal digits.";

	public const string MissingControl = "Missing control character.";

	public const string UnrecognizedControl = "Unrecognized control character.";

	public const string UnrecognizedEscape = "Unrecognized escape sequence \\{0}.";

	public const string IllegalCondition = "Illegal conditional (?(...)) expression.";

	public const string TooManyAlternates = "Too many | in (?()|).";

	public const string MakeException = "parsing \"{0}\" - {1}";

	public const string IncompleteSlashP = "Incomplete \\p{X} character escape.";

	public const string MalformedSlashP = "Malformed \\p{X} character escape.";

	public const string InvalidGroupName = "Invalid group name: Group names must begin with a word character.";

	public const string CapnumNotZero = "Capture number cannot be zero.";

	public const string AlternationCantCapture = "Alternation conditions do not capture and cannot be named.";

	public const string AlternationCantHaveComment = "Alternation conditions cannot be comments.";

	public const string CaptureGroupOutOfRange = "Capture group numbers must be less than or equal to Int32.MaxValue.";

	public const string SubtractionMustBeLast = "A subtraction must be the last element in a character class.";

	public const string UnknownProperty = "Unknown property '{0}'.";

	public const string ReplacementError = "Replacement pattern error.";

	public const string CountTooSmall = "Count cannot be less than -1.";

	public const string EnumNotStarted = "Enumeration has either not started or has already finished.";

	public const string Arg_InvalidArrayType = "Target array type is not compatible with the type of items in the collection.";

	public const string RegexMatchTimeoutException_Occurred = "The RegEx engine has timed out while trying to match a pattern to an input string. This can occur for many reasons, including very large inputs or excessive backtracking caused by nested quantifiers, back-references and other factors.";

	public const string IllegalDefaultRegexMatchTimeoutInAppDomain = "AppDomain data '{0}' contains an invalid value or object for specifying a default matching timeout for System.Text.RegularExpressions.Regex.";

	public const string FileObject_AlreadyOpen = "The file is already open.  Call Close before trying to open the FileObject again.";

	public const string FileObject_Closed = "The FileObject is currently closed.  Try opening it.";

	public const string FileObject_NotWhileWriting = "File information cannot be queried while open for writing.";

	public const string FileObject_FileDoesNotExist = "File information cannot be queried if the file does not exist.";

	public const string FileObject_MustBeClosed = "This operation can only be done when the FileObject is closed.";

	public const string FileObject_MustBeFileName = "You must specify a file name, not a relative or absolute path.";

	public const string FileObject_InvalidInternalState = "FileObject's open mode wasn't set to a valid value.  This FileObject is corrupt.";

	public const string FileObject_PathNotSet = "The path has not been set, or is an empty string.  Please ensure you specify some path.";

	public const string FileObject_Reading = "The file is currently open for reading.  Close the file and reopen it before attempting this.";

	public const string FileObject_Writing = "The file is currently open for writing.  Close the file and reopen it before attempting this.";

	public const string FileObject_InvalidEnumeration = "Enumerator is positioned before the first line or after the last line of the file.";

	public const string FileObject_NoReset = "Reset is not supported on a FileLineEnumerator.";

	public const string DirectoryObject_MustBeDirName = "You must specify a directory name, not a relative or absolute path.";

	public const string DirectoryObjectPathDescr = "The fully qualified, or relative path to the directory you wish to read from. E.g., \"c:\\temp\".";

	public const string FileObjectDetectEncodingDescr = "Determines whether the file will be parsed to see if it has a byte order mark indicating its encoding.  If it does, this will be used rather than the current specified encoding.";

	public const string FileObjectEncodingDescr = "The encoding to use when reading the file. UTF-8 is the default.";

	public const string FileObjectPathDescr = "The fully qualified, or relative path to the file you wish to read from. E.g., \"myfile.txt\".";

	public const string Arg_EnumIllegalVal = "Illegal enum value: {0}.";

	public const string Arg_OutOfRange_NeedNonNegNum = "Non-negative number required.";

	public const string Argument_InvalidPermissionState = "Invalid permission state.";

	public const string Argument_InvalidOidValue = "The OID value was invalid.";

	public const string Argument_WrongType = "Operation on type '{0}' attempted with target of incorrect type.";

	public const string Arg_EmptyOrNullString = "String cannot be empty or null.";

	public const string Arg_EmptyOrNullArray = "Array cannot be empty or null.";

	public const string Argument_InvalidClassAttribute = "The value of \"class\" attribute is invalid.";

	public const string Argument_InvalidNameType = "The value of \"nameType\" is invalid.";

	public const string InvalidOperation_DuplicateItemNotAllowed = "Duplicate items are not allowed in the collection.";

	public const string Cryptography_Asn_MismatchedOidInCollection = "The AsnEncodedData object does not have the same OID for the collection.";

	public const string Cryptography_Cms_Envelope_Empty_Content = "Cannot create CMS enveloped for empty content.";

	public const string Cryptography_Cms_Invalid_Recipient_Info_Type = "The recipient info type {0} is not valid.";

	public const string Cryptography_Cms_Invalid_Subject_Identifier_Type = "The subject identifier type {0} is not valid.";

	public const string Cryptography_Cms_Invalid_Subject_Identifier_Type_Value_Mismatch = "The subject identifier type {0} does not match the value data type {1}.";

	public const string Cryptography_Cms_Key_Agree_Date_Not_Available = "The Date property is not available for none KID key agree recipient.";

	public const string Cryptography_Cms_Key_Agree_Other_Key_Attribute_Not_Available = "The OtherKeyAttribute property is not available for none KID key agree recipient.";

	public const string Cryptography_Cms_MessageNotSigned = "The CMS message is not signed.";

	public const string Cryptography_Cms_MessageNotSignedByNoSignature = "The CMS message is not signed by NoSignature.";

	public const string Cryptography_Cms_MessageNotEncrypted = "The CMS message is not encrypted.";

	public const string Cryptography_Cms_Not_Supported = "The Cryptographic Message Standard (CMS) is not supported on this platform.";

	public const string Cryptography_Cms_RecipientCertificateNotFound = "The recipient certificate is not specified.";

	public const string Cryptography_Cms_Sign_Empty_Content = "Cannot create CMS signature for empty content.";

	public const string Cryptography_Cms_Sign_No_Signature_First_Signer = "CmsSigner has to be the first signer with NoSignature.";

	public const string Cryptography_DpApi_InvalidMemoryLength = "The length of the data should be a multiple of 16 bytes.";

	public const string Cryptography_InvalidHandle = "{0} is an invalid handle.";

	public const string Cryptography_InvalidContextHandle = "The chain context handle is invalid.";

	public const string Cryptography_InvalidStoreHandle = "The store handle is invalid.";

	public const string Cryptography_Oid_InvalidValue = "The OID value is invalid.";

	public const string Cryptography_Pkcs9_ExplicitAddNotAllowed = "The PKCS 9 attribute cannot be explicitly added to the collection.";

	public const string Cryptography_Pkcs9_InvalidOid = "The OID does not represent a valid PKCS 9 attribute.";

	public const string Cryptography_Pkcs9_MultipleSigningTimeNotAllowed = "Cannot add multiple PKCS 9 signing time attributes.";

	public const string Cryptography_Pkcs9_AttributeMismatch = "The parameter should be a PKCS 9 attribute.";

	public const string Cryptography_X509_AddFailed = "Adding certificate with index '{0}' failed.";

	public const string Cryptography_X509_BadEncoding = "Input data cannot be coded as a valid certificate.";

	public const string Cryptography_X509_ExportFailed = "The certificate export operation failed.";

	public const string Cryptography_X509_ExtensionMismatch = "The parameter should be an X509Extension.";

	public const string Cryptography_X509_InvalidFindType = "Invalid find type.";

	public const string Cryptography_X509_InvalidFindValue = "Invalid find value.";

	public const string Cryptography_X509_InvalidEncodingFormat = "Invalid encoding format.";

	public const string Cryptography_X509_InvalidContentType = "Invalid content type.";

	public const string Cryptography_X509_KeyMismatch = "The public key of the certificate does not match the value specified.";

	public const string Cryptography_X509_RemoveFailed = "Removing certificate with index '{0}' failed.";

	public const string Cryptography_X509_StoreNotOpen = "The X509 certificate store has not been opened.";

	public const string Environment_NotInteractive = "The current session is not interactive.";

	public const string NotSupported_InvalidKeyImpl = "Only asymmetric keys that implement ICspAsymmetricAlgorithm are supported.";

	public const string NotSupported_KeyAlgorithm = "The certificate key algorithm is not supported.";

	public const string NotSupported_PlatformRequiresNT = "This operation is only supported on Windows 2000, Windows XP, and higher.";

	public const string NotSupported_UnreadableStream = "Stream does not support reading.";

	public const string Security_InvalidValue = "The {0} value was invalid.";

	public const string Unknown_Error = "Unknown error.";

	public const string security_ServiceNameCollection_EmptyServiceName = "A service name must not be null or empty.";

	public const string security_ExtendedProtectionPolicy_UseDifferentConstructorForNever = "To construct a policy with PolicyEnforcement.Never, the single-parameter constructor must be used.";

	public const string security_ExtendedProtectionPolicy_NoEmptyServiceNameCollection = "The ServiceNameCollection must contain at least one service name.";

	public const string security_ExtendedProtection_NoOSSupport = "This operation requires OS support for extended protection.";

	public const string net_nonClsCompliantException = "A non-CLS Compliant Exception (i.e. an object that does not derive from System.Exception) was thrown.";

	public const string net_illegalConfigWith = "The '{0}' attribute cannot appear when '{1}' is present.";

	public const string net_illegalConfigWithout = "The '{0}' attribute can only appear when '{1}' is present.";

	public const string net_baddate = "The value of the date string in the header is invalid.";

	public const string net_writestarted = "This property cannot be set after writing has started.";

	public const string net_reqsubmitted = "This operation cannot be performed after the request has been submitted.";

	public const string net_ftp_no_http_cmd = "The requested FTP command is not supported when using HTTP proxy.";

	public const string net_ftp_invalid_method_name = "FTP Method names cannot be null or empty.";

	public const string net_ftp_invalid_renameto = "The RenameTo filename cannot be null or empty.";

	public const string net_ftp_no_defaultcreds = "Default credentials are not supported on an FTP request.";

	public const string net_ftpnoresponse = "This type of FTP request does not return a response stream.";

	public const string net_ftp_response_invalid_format = "The response string '{0}' has invalid format.";

	public const string net_ftp_no_offsetforhttp = "Offsets are not supported when sending an FTP request over an HTTP proxy.";

	public const string net_ftp_invalid_uri = "The requested URI is invalid for this FTP command.";

	public const string net_ftp_invalid_status_response = "The status response ({0}) is not expected in response to '{1}' command.";

	public const string net_ftp_server_failed_passive = "The server failed the passive mode request with status response ({0}).";

	public const string net_ftp_active_address_different = "The data connection was made from an address that is different than the address to which the FTP connection was made.";

	public const string net_ftp_proxy_does_not_support_ssl = "SSL cannot be enabled when using a proxy.";

	public const string net_ftp_invalid_response_filename = "The server returned the filename ({0}) which is not valid.";

	public const string net_ftp_unsupported_method = "This method is not supported.";

	public const string net_resubmitcanceled = "An error occurred on an automatic resubmission of the request.";

	public const string net_redirect_perm = "WebPermission demand failed for redirect URI.";

	public const string net_resubmitprotofailed = "Cannot handle redirect from HTTP/HTTPS protocols to other dissimilar ones.";

	public const string net_needchunked = "TransferEncoding requires the SendChunked property to be set to true.";

	public const string net_connarg = "Keep-Alive and Close may not be set using this property.";

	public const string net_no100 = "100-Continue may not be set using this property.";

	public const string net_fromto = "The From parameter cannot be less than To.";

	public const string net_rangetoosmall = "The From or To parameter cannot be less than 0.";

	public const string net_invalidversion = "This protocol version is not supported.";

	public const string net_toosmall = "The specified value must be greater than 0.";

	public const string net_toolong = "The size of {0} is too long. It cannot be longer than {1} characters.";

	public const string net_connclosed = "The underlying connection was closed: {0}.";

	public const string net_servererror = "The remote server returned an error: {0}.";

	public const string net_nouploadonget = "Cannot send a content-body with this verb-type.";

	public const string net_mutualauthfailed = "The requirement for mutual authentication was not met by the remote server.";

	public const string net_invasync = "Cannot block a call on this socket while an earlier asynchronous call is in progress.";

	public const string net_inasync = "An asynchronous call is already in progress. It must be completed or canceled before you can call this method.";

	public const string net_mustbeuri = "The {0} parameter must represent a valid Uri (see inner exception).";

	public const string net_format_shexp = "The shell expression '{0}' could not be parsed because it is formatted incorrectly.";

	public const string net_cannot_load_proxy_helper = "Failed to load the proxy script runtime environment from the Microsoft.JScript assembly.";

	public const string net_invalid_host = "The specified value is not a valid Host header string.";

	public const string net_repcall = "Cannot re-call BeginGetRequestStream/BeginGetResponse while a previous call is still in progress.";

	public const string net_badmethod = "Cannot set null or blank methods on request.";

	public const string net_io_timeout_use_ge_zero = "Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value >= 0.";

	public const string net_io_timeout_use_gt_zero = "Timeout can be only be set to 'System.Threading.Timeout.Infinite' or a value > 0.";

	public const string net_io_no_0timeouts = "NetworkStream does not support a 0 millisecond timeout, use a value greater than zero for the timeout instead.";

	public const string net_requestaborted = "The request was aborted: {0}.";

	public const string net_tooManyRedirections = "Too many automatic redirections were attempted.";

	public const string net_authmodulenotregistered = "The supplied authentication module is not registered.";

	public const string net_authschemenotregistered = "There is no registered module for this authentication scheme.";

	public const string net_proxyschemenotsupported = "The ServicePointManager does not support proxies with the {0} scheme.";

	public const string net_maxsrvpoints = "The maximum number of service points was exceeded.";

	public const string net_unknown_prefix = "The URI prefix is not recognized.";

	public const string net_notconnected = "The operation is not allowed on non-connected sockets.";

	public const string net_notstream = "The operation is not allowed on non-stream oriented sockets.";

	public const string net_timeout = "The operation has timed out.";

	public const string net_nocontentlengthonget = "Content-Length or Chunked Encoding cannot be set for an operation that does not write data.";

	public const string net_contentlengthmissing = "When performing a write operation with AllowWriteStreamBuffering set to false, you must either set ContentLength to a non-negative number or set SendChunked to true.";

	public const string net_nonhttpproxynotallowed = "The URI scheme for the supplied IWebProxy has the illegal value '{0}'. Only 'http' is supported.";

	public const string net_nottoken = "The supplied string is not a valid HTTP token.";

	public const string net_rangetype = "A different range specifier has already been added to this request.";

	public const string net_need_writebuffering = "This request requires buffering data to succeed.";

	public const string net_securityprotocolnotsupported = "The requested security protocol is not supported.";

	public const string net_nodefaultcreds = "Default credentials cannot be supplied for the {0} authentication scheme.";

	public const string net_stopped = "Not listening. You must call the Start() method before calling this method.";

	public const string net_udpconnected = "Cannot send packets to an arbitrary host while connected.";

	public const string net_no_concurrent_io_allowed = "The stream does not support concurrent IO read or write operations.";

	public const string net_needmorethreads = "There were not enough free threads in the ThreadPool to complete the operation.";

	public const string net_MethodNotSupportedException = "This method is not supported by this class.";

	public const string net_PropertyNotSupportedException = "This property is not supported by this class.";

	public const string net_ProtocolNotSupportedException = "The '{0}' protocol is not supported by this class.";

	public const string net_SelectModeNotSupportedException = "The '{0}' select mode is not supported by this class.";

	public const string net_InvalidSocketHandle = "The socket handle is not valid.";

	public const string net_InvalidAddressFamily = "The AddressFamily {0} is not valid for the {1} end point, use {2} instead.";

	public const string net_InvalidEndPointAddressFamily = "The supplied EndPoint of AddressFamily {0} is not valid for this Socket, use {1} instead.";

	public const string net_InvalidSocketAddressSize = "The supplied {0} is an invalid size for the {1} end point.";

	public const string net_invalidAddressList = "None of the discovered or specified addresses match the socket address family.";

	public const string net_invalidPingBufferSize = "The buffer length must not exceed 65500 bytes.";

	public const string net_cant_perform_during_shutdown = "This operation cannot be performed while the AppDomain is shutting down.";

	public const string net_cant_create_environment = "Unable to create another web proxy script environment at this time.";

	public const string net_completed_result = "This operation cannot be performed on a completed asynchronous result object.";

	public const string net_protocol_invalid_family = "'{0}' Client can only accept InterNetwork or InterNetworkV6 addresses.";

	public const string net_protocol_invalid_multicast_family = "Multicast family is not the same as the family of the '{0}' Client.";

	public const string net_empty_osinstalltype = "The Registry value '{0}' was either empty or not a string type.";

	public const string net_unknown_osinstalltype = "Unknown Windows installation type '{0}'.";

	public const string net_cant_determine_osinstalltype = "Can't determine OS installation type: Can't read key '{0}'. Exception message: {1}";

	public const string net_osinstalltype = "Current OS installation type is '{0}'.";

	public const string net_entire_body_not_written = "You must write ContentLength bytes to the request stream before calling [Begin]GetResponse.";

	public const string net_must_provide_request_body = "You must provide a request body if you set ContentLength>0 or SendChunked==true.  Do this by calling [Begin]GetRequestStream before [Begin]GetResponse.";

	public const string net_sockets_zerolist = "The parameter {0} must contain one or more elements.";

	public const string net_sockets_blocking = "The operation is not allowed on a non-blocking Socket.";

	public const string net_sockets_useblocking = "Use the Blocking property to change the status of the Socket.";

	public const string net_sockets_select = "The operation is not allowed on objects of type {0}. Use only objects of type {1}.";

	public const string net_sockets_toolarge_select = "The {0} list contains too many items; a maximum of {1} is allowed.";

	public const string net_sockets_empty_select = "All lists are either null or empty.";

	public const string net_sockets_mustbind = "You must call the Bind method before performing this operation.";

	public const string net_sockets_mustlisten = "You must call the Listen method before performing this operation.";

	public const string net_sockets_mustnotlisten = "You may not perform this operation after calling the Listen method.";

	public const string net_sockets_mustnotbebound = "The socket must not be bound or connected.";

	public const string net_sockets_namedmustnotbebound = "{0}: The socket must not be bound or connected.";

	public const string net_sockets_invalid_socketinformation = "The specified value for the socket information is invalid.";

	public const string net_sockets_invalid_ipaddress_length = "The number of specified IP addresses has to be greater than 0.";

	public const string net_sockets_invalid_optionValue = "The specified value is not a valid '{0}'.";

	public const string net_sockets_invalid_optionValue_all = "The specified value is not valid.";

	public const string net_sockets_invalid_dnsendpoint = "The parameter {0} must not be of type DnsEndPoint.";

	public const string net_sockets_disconnectedConnect = "Once the socket has been disconnected, you can only reconnect again asynchronously, and only to a different EndPoint.  BeginConnect must be called on a thread that won't exit until the operation has been completed.";

	public const string net_sockets_disconnectedAccept = "Once the socket has been disconnected, you can only accept again asynchronously.  BeginAccept must be called on a thread that won't exit until the operation has been completed.";

	public const string net_tcplistener_mustbestopped = "The TcpListener must not be listening before performing this operation.";

	public const string net_sockets_no_duplicate_async = "BeginConnect cannot be called while another asynchronous operation is in progress on the same Socket.";

	public const string net_socketopinprogress = "An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.";

	public const string net_buffercounttoosmall = "The Buffer space specified by the Count property is insufficient for the AcceptAsync method.";

	public const string net_multibuffernotsupported = "Multiple buffers cannot be used with this method.";

	public const string net_ambiguousbuffers = "Buffer and BufferList properties cannot both be non-null.";

	public const string net_sockets_ipv6only = "This operation is only valid for IPv6 Sockets.";

	public const string net_perfcounter_initialized_success = "System.Net performance counters initialization completed successful.";

	public const string net_perfcounter_initialized_error = "System.Net performance counters initialization completed with errors. See System.Net trace file for more information.";

	public const string net_perfcounter_nocategory = "Performance counter category '{0}' doesn't exist. No System.Net performance counter values available.";

	public const string net_perfcounter_initialization_started = "System.Net performance counter initialization started.";

	public const string net_perfcounter_cant_queue_workitem = "Can't queue counter initialization logic on a thread pool thread. System.Net performance counters will not be available.";

	public const string net_config_proxy = "Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section.";

	public const string net_config_proxy_module_not_public = "The specified proxy module type is not public.";

	public const string net_config_authenticationmodules = "Error creating the modules specified in the 'system.net/authenticationModules' configuration section.";

	public const string net_config_webrequestmodules = "Error creating the modules specified in the 'system.net/webRequestModules' configuration section.";

	public const string net_config_requestcaching = "Error creating the Web Request caching policy specified in the 'system.net/requestCaching' configuration section.";

	public const string net_config_section_permission = "Insufficient permissions for setting the configuration section '{0}'.";

	public const string net_config_element_permission = "Insufficient permissions for setting the configuration element '{0}'.";

	public const string net_config_property_permission = "Insufficient permissions for setting the configuration property '{0}'.";

	public const string net_WebResponseParseError_InvalidHeaderName = "Header name is invalid";

	public const string net_WebResponseParseError_InvalidContentLength = "'Content-Length' header value is invalid";

	public const string net_WebResponseParseError_IncompleteHeaderLine = "Invalid header name";

	public const string net_WebResponseParseError_CrLfError = "CR must be followed by LF";

	public const string net_WebResponseParseError_InvalidChunkFormat = "Response chunk format is invalid";

	public const string net_WebResponseParseError_UnexpectedServerResponse = "Unexpected server response received";

	public const string net_webstatus_Success = "Status success";

	public const string net_webstatus_NameResolutionFailure = "The remote name could not be resolved";

	public const string net_webstatus_ConnectFailure = "Unable to connect to the remote server";

	public const string net_webstatus_ReceiveFailure = "An unexpected error occurred on a receive";

	public const string net_webstatus_SendFailure = "An unexpected error occurred on a send";

	public const string net_webstatus_PipelineFailure = "A pipeline failure occurred";

	public const string net_webstatus_RequestCanceled = "The request was canceled";

	public const string net_webstatus_ConnectionClosed = "The connection was closed unexpectedly";

	public const string net_webstatus_TrustFailure = "Could not establish trust relationship for the SSL/TLS secure channel";

	public const string net_webstatus_SecureChannelFailure = "Could not create SSL/TLS secure channel";

	public const string net_webstatus_ServerProtocolViolation = "The server committed a protocol violation";

	public const string net_webstatus_KeepAliveFailure = "A connection that was expected to be kept alive was closed by the server";

	public const string net_webstatus_ProxyNameResolutionFailure = "The proxy name could not be resolved";

	public const string net_webstatus_MessageLengthLimitExceeded = "The message length limit was exceeded";

	public const string net_webstatus_CacheEntryNotFound = "The request cache-only policy does not allow a network request and the response is not found in cache";

	public const string net_webstatus_RequestProhibitedByCachePolicy = "The request could not be satisfied using a cache-only policy";

	public const string net_webstatus_Timeout = "The operation has timed out";

	public const string net_webstatus_RequestProhibitedByProxy = "The IWebProxy object associated with the request did not allow the request to proceed";

	public const string net_InvalidStatusCode = "The server returned a status code outside the valid range of 100-599.";

	public const string net_ftpstatuscode_ServiceNotAvailable = "Service not available, closing control connection";

	public const string net_ftpstatuscode_CantOpenData = "Can't open data connection";

	public const string net_ftpstatuscode_ConnectionClosed = "Connection closed; transfer aborted";

	public const string net_ftpstatuscode_ActionNotTakenFileUnavailableOrBusy = "File unavailable (e.g., file busy)";

	public const string net_ftpstatuscode_ActionAbortedLocalProcessingError = "Local error in processing";

	public const string net_ftpstatuscode_ActionNotTakenInsufficentSpace = "Insufficient storage space in system";

	public const string net_ftpstatuscode_CommandSyntaxError = "Syntax error, command unrecognized";

	public const string net_ftpstatuscode_ArgumentSyntaxError = "Syntax error in parameters or arguments";

	public const string net_ftpstatuscode_CommandNotImplemented = "Command not implemented";

	public const string net_ftpstatuscode_BadCommandSequence = "Bad sequence of commands";

	public const string net_ftpstatuscode_NotLoggedIn = "Not logged in";

	public const string net_ftpstatuscode_AccountNeeded = "Need account for storing files";

	public const string net_ftpstatuscode_ActionNotTakenFileUnavailable = "File unavailable (e.g., file not found, no access)";

	public const string net_ftpstatuscode_ActionAbortedUnknownPageType = "Page type unknown";

	public const string net_ftpstatuscode_FileActionAborted = "Exceeded storage allocation (for current directory or data set)";

	public const string net_ftpstatuscode_ActionNotTakenFilenameNotAllowed = "File name not allowed";

	public const string net_httpstatuscode_NoContent = "No Content";

	public const string net_httpstatuscode_NonAuthoritativeInformation = "Non Authoritative Information";

	public const string net_httpstatuscode_ResetContent = "Reset Content";

	public const string net_httpstatuscode_PartialContent = "Partial Content";

	public const string net_httpstatuscode_MultipleChoices = "Multiple Choices Redirect";

	public const string net_httpstatuscode_Ambiguous = "Ambiguous Redirect";

	public const string net_httpstatuscode_MovedPermanently = "Moved Permanently Redirect";

	public const string net_httpstatuscode_Moved = "Moved Redirect";

	public const string net_httpstatuscode_Found = "Found Redirect";

	public const string net_httpstatuscode_Redirect = "Redirect";

	public const string net_httpstatuscode_SeeOther = "See Other";

	public const string net_httpstatuscode_RedirectMethod = "Redirect Method";

	public const string net_httpstatuscode_NotModified = "Not Modified";

	public const string net_httpstatuscode_UseProxy = "Use Proxy Redirect";

	public const string net_httpstatuscode_TemporaryRedirect = "Temporary Redirect";

	public const string net_httpstatuscode_RedirectKeepVerb = "Redirect Keep Verb";

	public const string net_httpstatuscode_BadRequest = "Bad Request";

	public const string net_httpstatuscode_Unauthorized = "Unauthorized";

	public const string net_httpstatuscode_PaymentRequired = "Payment Required";

	public const string net_httpstatuscode_Forbidden = "Forbidden";

	public const string net_httpstatuscode_NotFound = "Not Found";

	public const string net_httpstatuscode_MethodNotAllowed = "Method Not Allowed";

	public const string net_httpstatuscode_NotAcceptable = "Not Acceptable";

	public const string net_httpstatuscode_ProxyAuthenticationRequired = "Proxy Authentication Required";

	public const string net_httpstatuscode_RequestTimeout = "Request Timeout";

	public const string net_httpstatuscode_Conflict = "Conflict";

	public const string net_httpstatuscode_Gone = "Gone";

	public const string net_httpstatuscode_LengthRequired = "Length Required";

	public const string net_httpstatuscode_InternalServerError = "Internal Server Error";

	public const string net_httpstatuscode_NotImplemented = "Not Implemented";

	public const string net_httpstatuscode_BadGateway = "Bad Gateway";

	public const string net_httpstatuscode_ServiceUnavailable = "Server Unavailable";

	public const string net_httpstatuscode_GatewayTimeout = "Gateway Timeout";

	public const string net_httpstatuscode_HttpVersionNotSupported = "Http Version Not Supported";

	public const string net_emptystringset = "This property cannot be set to an empty string.";

	public const string net_emptystringcall = "The parameter '{0}' cannot be an empty string.";

	public const string net_headers_req = "This collection holds response headers and cannot contain the specified request header.";

	public const string net_headers_rsp = "This collection holds request headers and cannot contain the specified response header.";

	public const string net_headers_toolong = "Header values cannot be longer than {0} characters.";

	public const string net_WebHeaderInvalidCRLFChars = "Specified value has invalid CRLF characters.";

	public const string net_WebHeaderInvalidHeaderChars = "Specified value has invalid HTTP Header characters.";

	public const string net_WebHeaderInvalidNonAsciiChars = "Specified value has invalid non-ASCII characters.";

	public const string net_WebHeaderMissingColon = "Specified value does not have a ':' separator.";

	public const string net_headerrestrict = "The '{0}' header must be modified using the appropriate property or method.";

	public const string net_io_completionportwasbound = "The socket has already been bound to an io completion port.";

	public const string net_io_writefailure = "Unable to write data to the transport connection: {0}.";

	public const string net_io_readfailure = "Unable to read data from the transport connection: {0}.";

	public const string net_io_connectionclosed = "The connection was closed";

	public const string net_io_transportfailure = "Unable to create a transport connection.";

	public const string net_io_internal_bind = "Internal Error: A socket handle could not be bound to a completion port.";

	public const string net_io_invalidnestedcall = "The {0} method cannot be called when another {1} operation is pending.";

	public const string net_io_must_be_rw_stream = "The stream has to be read/write.";

	public const string net_io_header_id = "Found a wrong header field {0} read = {1}, expected = {2}.";

	public const string net_io_out_range = "The byte count must not exceed {0} bytes for this stream type.";

	public const string net_io_encrypt = "The encryption operation failed, see inner exception.";

	public const string net_io_decrypt = "The decryption operation failed, see inner exception.";

	public const string net_io_read = "The read operation failed, see inner exception.";

	public const string net_io_write = "The write operation failed, see inner exception.";

	public const string net_io_eof = "Received an unexpected EOF or 0 bytes from the transport stream.";

	public const string net_io_async_result = "The parameter: {0} is not valid. Use the object returned from corresponding Begin async call.";

	public const string net_tls_version = "The SSL version is not supported.";

	public const string net_perm_target = "Cannot cast target permission type.";

	public const string net_perm_both_regex = "Cannot subset Regex. Only support if both patterns are identical.";

	public const string net_perm_none = "There are no permissions to check.";

	public const string net_perm_attrib_count = "The value for '{0}' must be specified.";

	public const string net_perm_invalid_val = "The parameter value '{0}={1}' is invalid.";

	public const string net_perm_attrib_multi = "The permission '{0}={1}' cannot be added. Add a separate Attribute statement.";

	public const string net_perm_epname = "The argument value '{0}' is invalid for creating a SocketPermission object.";

	public const string net_perm_invalid_val_in_element = "The '{0}' element contains one or more invalid values.";

	public const string net_invalid_ip_addr = "IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.";

	public const string dns_bad_ip_address = "An invalid IP address was specified.";

	public const string net_bad_mac_address = "An invalid physical address was specified.";

	public const string net_ping = "An exception occurred during a Ping request.";

	public const string net_bad_ip_address_prefix = "An invalid IP address prefix was specified.";

	public const string net_max_ip_address_list_length_exceeded = "Too many addresses to sort. The maximum number of addresses allowed are {0}.";

	public const string net_ipv4_not_installed = "IPv4 is not installed.";

	public const string net_ipv6_not_installed = "IPv6 is not installed.";

	public const string net_webclient = "An exception occurred during a WebClient request.";

	public const string net_webclient_ContentType = "The Content-Type header cannot be changed from its default value for this request.";

	public const string net_webclient_Multipart = "The Content-Type header cannot be set to a multipart type for this request.";

	public const string net_webclient_no_concurrent_io_allowed = "WebClient does not support concurrent I/O operations.";

	public const string net_webclient_invalid_baseaddress = "The specified value is not a valid base address.";

	public const string net_container_add_cookie = "An error occurred when adding a cookie to the container.";

	public const string net_cookie_invalid = "Invalid contents for cookie = '{0}'.";

	public const string net_cookie_size = "The value size of the cookie is '{0}'. This exceeds the configured maximum size, which is '{1}'.";

	public const string net_cookie_parse_header = "An error occurred when parsing the Cookie header for Uri '{0}'.";

	public const string net_cookie_attribute = "The '{0}'='{1}' part of the cookie is invalid.";

	public const string net_cookie_format = "Cookie format error.";

	public const string net_cookie_capacity_range = "'{0}' has to be greater than '{1}' and less than '{2}'.";

	public const string net_set_token = "Failed to impersonate a thread doing authentication of a Web Request.";

	public const string net_revert_token = "Failed to revert the thread token after authenticating a Web Request.";

	public const string net_ssl_io_async_context = "Async context creation failed.";

	public const string net_ssl_io_encrypt = "The encryption operation failed, see inner exception.";

	public const string net_ssl_io_decrypt = "The decryption operation failed, see inner exception.";

	public const string net_ssl_io_context_expired = "The security context has expired.";

	public const string net_ssl_io_handshake_start = "The handshake failed. The remote side has dropped the stream.";

	public const string net_ssl_io_handshake = "The handshake failed, see inner exception.";

	public const string net_ssl_io_frame = "The handshake failed due to an unexpected packet format.";

	public const string net_ssl_io_corrupted = "The stream is corrupted due to an invalid SSL version number in the SSL protocol header.";

	public const string net_ssl_io_cert_validation = "The remote certificate is invalid according to the validation procedure.";

	public const string net_ssl_io_invalid_end_call = "{0} can only be called once for each asynchronous operation.";

	public const string net_ssl_io_invalid_begin_call = "{0} cannot be called when another {1} operation is pending.";

	public const string net_ssl_io_no_server_cert = "The server mode SSL must use a certificate with the associated private key.";

	public const string net_auth_bad_client_creds = "The server has rejected the client credentials.";

	public const string net_auth_bad_client_creds_or_target_mismatch = "Either the target name is incorrect or the server has rejected the client credentials.";

	public const string net_auth_context_expectation = "A security requirement was not fulfilled during authentication. Required: {0}, negotiated: {1}.";

	public const string net_auth_context_expectation_remote = "A remote side security requirement was not fulfilled during authentication. Try increasing the ProtectionLevel and/or ImpersonationLevel.";

	public const string net_auth_supported_impl_levels = "The supported values are Identification, Impersonation or Delegation.";

	public const string net_auth_no_anonymous_support = "The TokenImpersonationLevel.Anonymous level is not supported for authentication.";

	public const string net_auth_reauth = "This operation is not allowed on a security context that has already been authenticated.";

	public const string net_auth_noauth = "This operation is only allowed using a successfully authenticated context.";

	public const string net_auth_client_server = "Once authentication is attempted as the client or server, additional authentication attempts must use the same client or server role.";

	public const string net_auth_noencryption = "This authenticated context does not support data encryption.";

	public const string net_auth_SSPI = "A call to SSPI failed, see inner exception.";

	public const string net_auth_failure = "Authentication failed, see inner exception.";

	public const string net_auth_eof = "Authentication failed because the remote party has closed the transport stream.";

	public const string net_auth_alert = "Authentication failed on the remote side (the stream might still be available for additional authentication attempts).";

	public const string net_auth_ignored_reauth = "Re-authentication failed because the remote party continued to encrypt more than {0} bytes before answering re-authentication.";

	public const string net_auth_empty_read = "Protocol error: cannot proceed with SSPI handshake because an empty blob was received.";

	public const string net_auth_must_specify_extended_protection_scheme = "An extended protection policy must specify either a custom channel binding or a custom service name collection.";

	public const string net_frame_size = "Received an invalid authentication frame. The message size is limited to {0} bytes, attempted to read {1} bytes.";

	public const string net_frame_read_io = "Received incomplete authentication message. Remote party has probably closed the connection.";

	public const string net_frame_read_size = "Cannot determine the frame size or a corrupted frame was received.";

	public const string net_frame_max_size = "The payload size is limited to {0}, attempted set it to {1}.";

	public const string net_jscript_load = "The proxy JScript file threw an exception while being initialized: {0}.";

	public const string net_proxy_not_gmt = "The specified value is not a valid GMT time.";

	public const string net_proxy_invalid_dayofweek = "The specified value is not a valid day of the week.";

	public const string net_proxy_invalid_url_format = "The system proxy settings contain an invalid proxy server setting: '{0}'.";

	public const string net_param_not_string = "Argument must be a string instead of {0}.";

	public const string net_value_cannot_be_negative = "The specified value cannot be negative.";

	public const string net_invalid_offset = "Value of offset cannot be negative or greater than the length of the buffer.";

	public const string net_offset_plus_count = "Sum of offset and count cannot be greater than the length of the buffer.";

	public const string net_cannot_be_false = "The specified value cannot be false.";

	public const string net_cache_shadowstream_not_writable = "Shadow stream must be writable.";

	public const string net_cache_validator_fail = "The validation method {0}() returned a failure for this request.";

	public const string net_cache_access_denied = "For this RequestCache object, {0} access is denied.";

	public const string net_cache_validator_result = "The validation method {0}() returned the unexpected status: {1}.";

	public const string net_cache_retrieve_failure = "Cache retrieve failed: {0}.";

	public const string net_cache_not_supported_body = "The cached response is not supported for a request with a content body.";

	public const string net_cache_not_supported_command = "The cached response is not supported for a request with the specified request method.";

	public const string net_cache_not_accept_response = "The cache protocol refused the server response. To allow automatic request retrying, set request.AllowAutoRedirect to true.";

	public const string net_cache_method_failed = "The request (Method = {0}) cannot be served from the cache and will fail because of the effective CachePolicy: {1}.";

	public const string net_cache_key_failed = "The request failed because no cache entry (CacheKey = {0}) was found and the effective CachePolicy is {1}.";

	public const string net_cache_no_stream = "The cache protocol returned a cached response but the cache entry is invalid because it has a null stream. (Cache Key = {0}).";

	public const string net_cache_unsupported_partial_stream = "A partial content stream does not support this operation or some method argument is out of range.";

	public const string net_cache_not_configured = "No cache protocol is available for this request.";

	public const string net_cache_non_seekable_stream_not_supported = "The transport stream instance passed in the RangeStream constructor is not seekable and therefore is not supported.";

	public const string net_invalid_cast = "Invalid cast from {0} to {1}.";

	public const string net_collection_readonly = "The collection is read-only.";

	public const string net_not_ipermission = "Specified value does not contain 'IPermission' as its tag.";

	public const string net_no_classname = "Specified value does not contain a 'class' attribute.";

	public const string net_no_typename = "The value class attribute is not valid.";

	public const string net_servicePointAddressNotSupportedInHostMode = "This property is not supported for protocols that do not use URI.";

	public const string net_Websockets_WebSocketBaseFaulted = "An exception caused the WebSocket to enter the Aborted state. Please see the InnerException, if present, for more details.";

	public const string net_WebSockets_Generic = "An internal WebSocket error occurred. Please see the innerException, if present, for more details.";

	public const string net_WebSockets_NotAWebSocket_Generic = "A WebSocket operation was called on a request or response that is not a WebSocket.";

	public const string net_WebSockets_UnsupportedWebSocketVersion_Generic = "Unsupported WebSocket version.";

	public const string net_WebSockets_HeaderError_Generic = "The WebSocket request or response contained unsupported header(s).";

	public const string net_WebSockets_UnsupportedProtocol_Generic = "The WebSocket request or response operation was called with unsupported protocol(s).";

	public const string net_WebSockets_ClientSecWebSocketProtocolsBlank = "The WebSocket client sent a blank '{0}' header; this is not allowed by the WebSocket protocol specification. The client should omit the header if the client is not negotiating any sub-protocols.";

	public const string net_WebSockets_InvalidState_Generic = "The WebSocket instance cannot be used for communication because it has been transitioned into an invalid state.";

	public const string net_WebSockets_InvalidMessageType_Generic = "The received  message type is invalid after calling {0}. {0} should only be used if no more data is expected from the remote endpoint. Use '{1}' instead to keep being able to receive data but close the output channel.";

	public const string net_WebSockets_ConnectionClosedPrematurely_Generic = "The remote party closed the WebSocket connection without completing the close handshake.";

	public const string net_WebSockets_Scheme = "Only Uris starting with 'ws://' or 'wss://' are supported.";

	public const string net_WebSockets_AlreadyStarted = "The WebSocket has already been started.";

	public const string net_WebSockets_Connect101Expected = "The server returned status code '{0}' when status code '101' was expected.";

	public const string net_WebSockets_InvalidResponseHeader = "The '{0}' header value '{1}' is invalid.";

	public const string net_WebSockets_NotConnected = "The WebSocket is not connected.";

	public const string net_WebSockets_InvalidRegistration = "The WebSocket schemes must be registered with the HttpWebRequest class.";

	public const string net_WebSockets_NoDuplicateProtocol = "Duplicate protocols are not allowed: '{0}'.";

	public const string net_log_exception = "Exception in {0}::{1} - {2}.";

	public const string net_log_sspi_enumerating_security_packages = "Enumerating security packages:";

	public const string net_log_sspi_security_package_not_found = "Security package '{0}' was not found.";

	public const string net_log_sspi_security_context_input_buffer = "{0}(In-Buffer length={1}, Out-Buffer length={2}, returned code={3}).";

	public const string net_log_sspi_security_context_input_buffers = "{0}(In-Buffers count={1}, Out-Buffer length={2}, returned code={3}).";

	public const string net_log_sspi_selected_cipher_suite = "{0}(Protocol={1}, Cipher={2} {3} bit strength, Hash={4} {5} bit strength, Key Exchange={6} {7} bit strength).";

	public const string net_log_remote_certificate = "Remote certificate: {0}.";

	public const string net_log_locating_private_key_for_certificate = "Locating the private key for the certificate: {0}.";

	public const string net_log_cert_is_of_type_2 = "Certificate is of type X509Certificate2 and contains the private key.";

	public const string net_log_found_cert_in_store = "Found the certificate in the {0} store.";

	public const string net_log_did_not_find_cert_in_store = "Cannot find the certificate in either the LocalMachine store or the CurrentUser store.";

	public const string net_log_open_store_failed = "Opening Certificate store {0} failed, exception: {1}.";

	public const string net_log_got_certificate_from_delegate = "Got a certificate from the client delegate.";

	public const string net_log_no_delegate_and_have_no_client_cert = "Client delegate did not provide a certificate; and there are not other user-provided certificates. Need to attempt a session restart.";

	public const string net_log_no_delegate_but_have_client_cert = "Client delegate did not provide a certificate; but there are other user-provided certificates\".";

	public const string net_log_attempting_restart_using_cert = "Attempting to restart the session using the user-provided certificate: {0}.";

	public const string net_log_no_issuers_try_all_certs = "We have user-provided certificates. The server has not specified any issuers, so try all the certificates.";

	public const string net_log_server_issuers_look_for_matching_certs = "We have user-provided certificates. The server has specified {0} issuer(s). Looking for certificates that match any of the issuers.";

	public const string net_log_selected_cert = "Selected certificate: {0}.";

	public const string net_log_n_certs_after_filtering = "Left with {0} client certificates to choose from.";

	public const string net_log_finding_matching_certs = "Trying to find a matching certificate in the certificate store.";

	public const string net_log_using_cached_credential = "Using the cached credential handle.";

	public const string net_log_remote_cert_user_declared_valid = "Remote certificate was verified as valid by the user.";

	public const string net_log_remote_cert_user_declared_invalid = "Remote certificate was verified as invalid by the user.";

	public const string net_log_remote_cert_has_no_errors = "Remote certificate has no errors.";

	public const string net_log_remote_cert_has_errors = "Remote certificate has errors:";

	public const string net_log_remote_cert_not_available = "The remote server did not provide a certificate.";

	public const string net_log_remote_cert_name_mismatch = "Certificate name mismatch.";

	public const string net_log_proxy_autodetect_script_location_parse_error = "WebProxy failed to parse the auto-detected location of a proxy script:\"{0}\" into a Uri.";

	public const string net_log_proxy_autodetect_failed = "WebProxy failed to autodetect a Uri for a proxy script.";

	public const string net_log_proxy_script_execution_error = "WebProxy caught an exception while executing the ScriptReturn script: {0}.";

	public const string net_log_proxy_script_download_compile_error = "WebProxy caught an exception while  downloading/compiling the proxy script: {0}.";

	public const string net_log_proxy_system_setting_update = "ScriptEngine was notified of a potential change in the system's proxy settings and will update WebProxy settings.";

	public const string net_log_proxy_update_due_to_ip_config_change = "ScriptEngine was notified of a change in the IP configuration and will update WebProxy settings.";

	public const string net_log_proxy_called_with_null_parameter = "{0} was called with a null '{1}' parameter.";

	public const string net_log_proxy_called_with_invalid_parameter = "{0} was called with an invalid parameter.";

	public const string net_log_proxy_ras_supported = "RAS supported: {0}";

	public const string net_log_proxy_ras_notsupported_exception = "RAS is not supported. Can't create RasHelper instance.";

	public const string net_log_proxy_winhttp_cant_open_session = "Can't open WinHttp session. Error code: {0}.";

	public const string net_log_proxy_winhttp_getproxy_failed = "Can't retrieve proxy settings for Uri '{0}'. Error code: {1}.";

	public const string net_log_proxy_winhttp_timeout_error = "Can't specify proxy discovery timeout. Error code: {0}.";

	public const string net_log_cache_validation_failed_resubmit = "Resubmitting this request because cache cannot validate the response.";

	public const string net_log_cache_refused_server_response = "Caching protocol has refused the server response. To allow automatic request retrying set request.AllowAutoRedirect=true.";

	public const string net_log_cache_ftp_proxy_doesnt_support_partial = "This FTP request is configured to use a proxy through HTTP protocol. Cache revalidation and partially cached responses are not supported.";

	public const string net_log_cache_ftp_method = "FTP request method={0}.";

	public const string net_log_cache_ftp_supports_bin_only = "Caching is not supported for non-binary FTP request mode.";

	public const string net_log_cache_replacing_entry_with_HTTP_200 = "Replacing cache entry metadata with 'HTTP/1.1 200 OK' status line to satisfy HTTP cache protocol logic.";

	public const string net_log_cache_now_time = "[Now Time (UTC)] = {0}.";

	public const string net_log_cache_max_age_absolute = "[MaxAge] Absolute time expiration check (sensitive to clock skew), cache Expires: {0}.";

	public const string net_log_cache_age1 = "[Age1] Now - LastSynchronized = [Age1] Now - LastSynchronized = {0}, Last Synchronized: {1}.";

	public const string net_log_cache_age1_date_header = "[Age1] NowTime-Date Header = {0}, Date Header: {1}.";

	public const string net_log_cache_age1_last_synchronized = "[Age1] Now - LastSynchronized + AgeHeader = {0}, Last Synchronized: {1}.";

	public const string net_log_cache_age1_last_synchronized_age_header = "[Age1] Now - LastSynchronized + AgeHeader = {0}, Last Synchronized: {1}, Age Header: {2}.";

	public const string net_log_cache_age2 = "[Age2] AgeHeader = {0}.";

	public const string net_log_cache_max_age_cache_s_max_age = "[MaxAge] Cache s_MaxAge = {0}.";

	public const string net_log_cache_max_age_expires_date = "[MaxAge] Cache Expires - Date = {0}, Expires: {1}.";

	public const string net_log_cache_max_age_cache_max_age = "[MaxAge] Cache MaxAge = {0}.";

	public const string net_log_cache_no_max_age_use_10_percent = "[MaxAge] Cannot compute Cache MaxAge, use 10% since LastModified: {0}, LastModified: {1}.";

	public const string net_log_cache_no_max_age_use_default = "[MaxAge] Cannot compute Cache MaxAge, using default RequestCacheValidator.UnspecifiedMaxAge: {0}.";

	public const string net_log_cache_validator_invalid_for_policy = "This validator should not be called for policy : {0}.";

	public const string net_log_cache_response_last_modified = "Response LastModified={0},  ContentLength= {1}.";

	public const string net_log_cache_cache_last_modified = "Cache    LastModified={0},  ContentLength= {1}.";

	public const string net_log_cache_partial_and_non_zero_content_offset = "A Cache Entry is partial and the user request has non zero ContentOffset = {0}. A restart from cache is not supported for partial cache entries.";

	public const string net_log_cache_response_valid_based_on_policy = "Response is valid based on Policy = {0}.";

	public const string net_log_cache_null_response_failure = "Response is null so this Request should fail.";

	public const string net_log_cache_ftp_response_status = "FTP Response Status={0}, {1}.";

	public const string net_log_cache_resp_valid_based_on_retry = "Accept this response as valid based on the retry count = {0}.";

	public const string net_log_cache_no_update_based_on_method = "Cache is not updated based on the request Method = {0}.";

	public const string net_log_cache_removed_existing_invalid_entry = "Existing entry is removed because it was found invalid.";

	public const string net_log_cache_not_updated_based_on_policy = "Cache is not updated based on Policy = {0}.";

	public const string net_log_cache_not_updated_because_no_response = "Cache is not updated because there is no response associated with the request.";

	public const string net_log_cache_removed_existing_based_on_method = "Existing cache entry is removed based on the request Method = {0}.";

	public const string net_log_cache_existing_not_removed_because_unexpected_response_status = "Existing cache entry should but cannot be removed due to unexpected response Status = ({0}) {1}.";

	public const string net_log_cache_removed_existing_based_on_policy = "Existing cache entry is removed based on Policy = {0}.";

	public const string net_log_cache_not_updated_based_on_ftp_response_status = "Cache is not updated based on the FTP response status. Expected = {0}, actual = {1}.";

	public const string net_log_cache_update_not_supported_for_ftp_restart = "Cache update is not supported for restarted FTP responses. Restart offset = {0}.";

	public const string net_log_cache_removed_entry_because_ftp_restart_response_changed = "Existing cache entry is removed since a restarted response was changed on the server, cache LastModified date = {0}, new LastModified date = {1}.";

	public const string net_log_cache_last_synchronized = "The cache entry last synchronized time = {0}.";

	public const string net_log_cache_suppress_update_because_synched_last_minute = "Suppressing cache update since the entry was synchronized within the last minute.";

	public const string net_log_cache_updating_last_synchronized = "Updating cache entry last synchronized time = {0}.";

	public const string net_log_cache_cannot_remove = "{0} Cannot Remove (throw): Key = {1}, Error = {2}.";

	public const string net_log_cache_key_status = "{0}, Key = {1}, -> Status = {2}.";

	public const string net_log_cache_key_remove_failed_status = "{0}, Key = {1}, Remove operation failed -> Status = {2}.";

	public const string net_log_cache_usecount_file = "{0}, UseCount = {1}, File = {2}.";

	public const string net_log_cache_stream = "{0}, stream = {1}.";

	public const string net_log_cache_filename = "{0} -> Filename = {1}, Status = {2}.";

	public const string net_log_cache_lookup_failed = "{0}, Lookup operation failed -> {1}.";

	public const string net_log_cache_exception = "{0}, Exception = {1}.";

	public const string net_log_cache_expected_length = "Expected length (0=none)= {0}.";

	public const string net_log_cache_last_modified = "LastModified    (0=none)= {0}.";

	public const string net_log_cache_expires = "Expires         (0=none)= {0}.";

	public const string net_log_cache_max_stale = "MaxStale (sec)          = {0}.";

	public const string net_log_cache_dumping_metadata = "...Dumping Metadata...";

	public const string net_log_cache_create_failed = "Create operation failed -> {0}.";

	public const string net_log_cache_set_expires = "Set Expires               ={0}.";

	public const string net_log_cache_set_last_modified = "Set LastModified          ={0}.";

	public const string net_log_cache_set_last_synchronized = "Set LastSynchronized      ={0}.";

	public const string net_log_cache_enable_max_stale = "Enable MaxStale (sec) ={0}.";

	public const string net_log_cache_disable_max_stale = "Disable MaxStale (set to 0).";

	public const string net_log_cache_set_new_metadata = "Set new Metadata.";

	public const string net_log_cache_dumping = "...Dumping...";

	public const string net_log_cache_key = "{0}, Key = {1}.";

	public const string net_log_cache_no_commit = "{0}, Nothing was written to the stream, do not commit that cache entry.";

	public const string net_log_cache_error_deleting_filename = "{0}, Error deleting a Filename = {1}.";

	public const string net_log_cache_update_failed = "{0}, Key = {1}, Update operation failed -> {2}.";

	public const string net_log_cache_delete_failed = "{0}, Key = {1}, Delete operation failed -> {2}.";

	public const string net_log_cache_commit_failed = "{0}, Key = {1}, Commit operation failed -> {2}.";

	public const string net_log_cache_committed_as_partial = "{0}, Key = {1}, Committed entry as partial, not cached bytes count = {2}.";

	public const string net_log_cache_max_stale_and_update_status = "{0}, MaxStale = {1}, Update Status = {2}.";

	public const string net_log_cache_failing_request_with_exception = "Failing request with the WebExceptionStatus = {0}.";

	public const string net_log_cache_request_method = "Request Method = {0}.";

	public const string net_log_cache_http_status_parse_failure = "Cannot Parse Cache HTTP Status Line: {0}.";

	public const string net_log_cache_http_status_line = "Entry Status Line = HTTP/{0} {1} {2}.";

	public const string net_log_cache_cache_control = "Cache Cache-Control = {0}.";

	public const string net_log_cache_invalid_http_version = "The cached version is invalid, assuming HTTP 1.0.";

	public const string net_log_cache_no_http_response_header = "This Cache Entry does not carry HTTP response headers.";

	public const string net_log_cache_http_header_parse_error = "Cannot parse HTTP headers in entry metadata, offending string: {0}.";

	public const string net_log_cache_metadata_name_value_parse_error = "Cannot parse all strings in system metadata as \"name:value\", offending string: {0}.";

	public const string net_log_cache_content_range_error = "Invalid format of Response Content-Range:{0}.";

	public const string net_log_cache_cache_control_error = "Invalid CacheControl header = {0}.";

	public const string net_log_cache_unexpected_status = "The cache protocol method {0} has returned unexpected status: {1}.";

	public const string net_log_cache_object_and_exception = "{0} exception: {1}.";

	public const string net_log_cache_revalidation_not_needed = "{0}, No cache entry revalidation is needed.";

	public const string net_log_cache_not_updated_based_on_cache_protocol_status = "{0}, Cache is not updated based on the current cache protocol status = {1}.";

	public const string net_log_cache_closing_cache_stream = "{0}: {1} Closing effective cache stream, type = {2}, cache entry key = {3}.";

	public const string net_log_cache_exception_ignored = "{0}: an exception (ignored) on {1} = {2}.";

	public const string net_log_cache_no_cache_entry = "{0} has requested a cache response but the entry does not exist (Stream.Null).";

	public const string net_log_cache_null_cached_stream = "{0} has requested a cache response but the cached stream is null.";

	public const string net_log_cache_requested_combined_but_null_cached_stream = "{0} has requested a combined response but the cached stream is null.";

	public const string net_log_cache_returned_range_cache = "{0} has returned a range cache stream, Offset = {1}, Length = {2}.";

	public const string net_log_cache_entry_not_found_freshness_undefined = "{0}, Cache Entry not found, freshness result = Undefined.";

	public const string net_log_cache_dumping_cache_context = "...Dumping Cache Context...";

	public const string net_log_cache_result = "{0}, result = {1}.";

	public const string net_log_cache_uri_with_query_has_no_expiration = "Request Uri has a Query, and no explicit expiration time is provided.";

	public const string net_log_cache_uri_with_query_and_cached_resp_from_http_10 = "Request Uri has a Query, and cached response is from HTTP 1.0 server.";

	public const string net_log_cache_valid_as_fresh_or_because_policy = "Valid as fresh or because of Cache Policy = {0}.";

	public const string net_log_cache_accept_based_on_retry_count = "Accept this response base on the retry count = {0}.";

	public const string net_log_cache_date_header_older_than_cache_entry = "Response Date header value is older than that of the cache entry.";

	public const string net_log_cache_server_didnt_satisfy_range = "Server did not satisfy the range: {0}.";

	public const string net_log_cache_304_received_on_unconditional_request = "304 response was received on an unconditional request.";

	public const string net_log_cache_304_received_on_unconditional_request_expected_200_206 = "304 response was received on an unconditional request, but expected response code is 200 or 206.";

	public const string net_log_cache_last_modified_header_older_than_cache_entry = "HTTP 1.0 Response Last-Modified header value is older than that of the cache entry.";

	public const string net_log_cache_freshness_outside_policy_limits = "Response freshness is not within the specified policy limits.";

	public const string net_log_cache_need_to_remove_invalid_cache_entry_304 = "Need to remove an invalid cache entry with status code == 304(NotModified).";

	public const string net_log_cache_resp_status = "Response Status = {0}.";

	public const string net_log_cache_resp_304_or_request_head = "Response==304 or Request was HEAD, updating cache entry.";

	public const string net_log_cache_dont_update_cached_headers = "Do not update Cached Headers.";

	public const string net_log_cache_update_cached_headers = "Update Cached Headers.";

	public const string net_log_cache_partial_resp_not_combined_with_existing_entry = "A partial response is not combined with existing cache entry, Cache Stream Size = {0}, response Range Start = {1}.";

	public const string net_log_cache_request_contains_conditional_header = "User Request contains a conditional header.";

	public const string net_log_cache_not_a_get_head_post = "This was Not a GET, HEAD or POST request.";

	public const string net_log_cache_cannot_update_cache_if_304 = "Cannot update cache if Response status == 304 and a cache entry was not found.";

	public const string net_log_cache_cannot_update_cache_with_head_resp = "Cannot update cache with HEAD response if the cache entry does not exist.";

	public const string net_log_cache_http_resp_is_null = "HttpWebResponse is null.";

	public const string net_log_cache_resp_cache_control_is_no_store = "Response Cache-Control = no-store.";

	public const string net_log_cache_resp_cache_control_is_public = "Response Cache-Control = public.";

	public const string net_log_cache_resp_cache_control_is_private = "Response Cache-Control = private, and Cache is public.";

	public const string net_log_cache_resp_cache_control_is_private_plus_headers = "Response Cache-Control = private+Headers, removing those headers.";

	public const string net_log_cache_resp_older_than_cache = "HttpWebResponse date is older than of the cached one.";

	public const string net_log_cache_revalidation_required = "Response revalidation is always required but neither Last-Modified nor ETag header is set on the response.";

	public const string net_log_cache_needs_revalidation = "Response can be cached although it will always require revalidation.";

	public const string net_log_cache_resp_allows_caching = "Response explicitly allows caching = Cache-Control: {0}.";

	public const string net_log_cache_auth_header_and_no_s_max_age = "Request carries Authorization Header and no s-maxage, proxy-revalidate or public directive found.";

	public const string net_log_cache_post_resp_without_cache_control_or_expires = "POST Response without Cache-Control or Expires headers.";

	public const string net_log_cache_valid_based_on_status_code = "Valid based on Status Code: {0}.";

	public const string net_log_cache_resp_no_cache_control = "Response with no CacheControl and Status Code = {0}.";

	public const string net_log_cache_age = "Cache Age = {0}, Cache MaxAge = {1}.";

	public const string net_log_cache_policy_min_fresh = "Client Policy MinFresh = {0}.";

	public const string net_log_cache_policy_max_age = "Client Policy MaxAge = {0}.";

	public const string net_log_cache_policy_cache_sync_date = "Client Policy CacheSyncDate (UTC) = {0}, Cache LastSynchronizedUtc = {1}.";

	public const string net_log_cache_policy_max_stale = "Client Policy MaxStale = {0}.";

	public const string net_log_cache_control_no_cache = "Cached CacheControl = no-cache.";

	public const string net_log_cache_control_no_cache_removing_some_headers = "Cached CacheControl = no-cache, Removing some headers.";

	public const string net_log_cache_control_must_revalidate = "Cached CacheControl = must-revalidate and Cache is not fresh.";

	public const string net_log_cache_cached_auth_header = "The cached entry has Authorization Header and cache is not fresh.";

	public const string net_log_cache_cached_auth_header_no_control_directive = "The cached entry has Authorization Header and no Cache-Control directive present that would allow to use that entry.";

	public const string net_log_cache_after_validation = "After Response Cache Validation.";

	public const string net_log_cache_resp_status_304 = "Response status == 304 but the cache entry does not exist.";

	public const string net_log_cache_head_resp_has_different_content_length = "A response resulted from a HEAD request has different Content-Length header.";

	public const string net_log_cache_head_resp_has_different_content_md5 = "A response resulted from a HEAD request has different Content-MD5 header.";

	public const string net_log_cache_head_resp_has_different_etag = "A response resulted from a HEAD request has different ETag header.";

	public const string net_log_cache_304_head_resp_has_different_last_modified = "A 304 response resulted from a HEAD request has different Last-Modified header.";

	public const string net_log_cache_existing_entry_has_to_be_discarded = "An existing cache entry has to be discarded.";

	public const string net_log_cache_existing_entry_should_be_discarded = "An existing cache entry should be discarded.";

	public const string net_log_cache_206_resp_non_matching_entry = "A 206 Response has been received and either ETag or Last-Modified header value does not match cache entry.";

	public const string net_log_cache_206_resp_starting_position_not_adjusted = "The starting position for 206 Response is not adjusted to the end of cache entry.";

	public const string net_log_cache_combined_resp_requested = "Creation of a combined response has been requested from the cache protocol.";

	public const string net_log_cache_updating_headers_on_304 = "Updating headers on 304 response.";

	public const string net_log_cache_suppressing_headers_update_on_304 = "Suppressing cache headers update on 304, new headers don't add anything.";

	public const string net_log_cache_status_code_not_304_206 = "A Response Status Code is not 304 or 206.";

	public const string net_log_cache_sxx_resp_cache_only = "A 5XX Response and Cache-Only like policy, serving from cache.";

	public const string net_log_cache_sxx_resp_can_be_replaced = "A 5XX Response that can be replaced by existing cache entry.";

	public const string net_log_cache_vary_header_empty = "Cache entry Vary header is empty.";

	public const string net_log_cache_vary_header_contains_asterisks = "Cache entry Vary header contains '*'.";

	public const string net_log_cache_no_headers_in_metadata = "No request headers are found in cached metadata to test based on the cached response Vary header.";

	public const string net_log_cache_vary_header_mismatched_count = "Vary header: Request and cache header fields count does not match, header name = {0}.";

	public const string net_log_cache_vary_header_mismatched_field = "Vary header: A Cache header field mismatch the request one, header name = {0}, cache field = {1}, request field = {2}.";

	public const string net_log_cache_vary_header_match = "All required Request headers match based on cached Vary response header.";

	public const string net_log_cache_range = "Request Range (not in Cache yet) = Range:{0}.";

	public const string net_log_cache_range_invalid_format = "Invalid format of Request Range:{0}.";

	public const string net_log_cache_range_not_in_cache = "Cannot serve from Cache, Range:{0}.";

	public const string net_log_cache_range_in_cache = "Serving Request Range from cache, Range:{0}.";

	public const string net_log_cache_partial_resp = "Serving Partial Response (206) from cache, Content-Range:{0}.";

	public const string net_log_cache_range_request_range = "Range Request (user specified), Range: {0}.";

	public const string net_log_cache_could_be_partial = "Could be a Partial Cached Response, Size = {0}, Response Content Length = {1}.";

	public const string net_log_cache_condition_if_none_match = "Request Condition = If-None-Match:{0}.";

	public const string net_log_cache_condition_if_modified_since = "Request Condition = If-Modified-Since:{0}.";

	public const string net_log_cache_cannot_construct_conditional_request = "A Conditional Request cannot be constructed.";

	public const string net_log_cache_cannot_construct_conditional_range_request = "A Conditional Range request cannot be constructed.";

	public const string net_log_cache_entry_size_too_big = "Cached Entry Size = {0} is too big, cannot do a range request.";

	public const string net_log_cache_condition_if_range = "Request Condition = If-Range:{0}.";

	public const string net_log_cache_conditional_range_not_implemented_on_http_10 = "A Conditional Range request on Http <= 1.0 is not implemented.";

	public const string net_log_cache_saving_request_headers = "Saving Request Headers, Vary: {0}.";

	public const string net_log_cache_only_byte_range_implemented = "Ranges other than bytes are not implemented.";

	public const string net_log_cache_multiple_complex_range_not_implemented = "Multiple/complexe ranges are not implemented.";

	public const string net_log_digest_hash_algorithm_not_supported = "The hash algorithm is not supported by Digest authentication: {0}.";

	public const string net_log_digest_qop_not_supported = "The Quality of Protection value is not supported by Digest authentication: {0}.";

	public const string net_log_digest_requires_nonce = "A nonce parameter required for Digest authentication was not found or was preceded by an invalid parameter.";

	public const string net_log_auth_invalid_challenge = "The challenge string is not valid for this authentication module: {0}";

	public const string net_log_unknown = "unknown";

	public const string net_log_operation_returned_something = "{0} returned {1}.";

	public const string net_log_buffered_n_bytes = "Buffered {0} bytes.";

	public const string net_log_method_equal = "Method={0}.";

	public const string net_log_releasing_connection = "Releasing FTP connection#{0}.";

	public const string net_log_unexpected_exception = "Unexpected exception in {0}.";

	public const string net_log_server_response_error_code = "Error code {0} was received from server response.";

	public const string net_log_resubmitting_request = "Resubmitting request.";

	public const string net_log_retrieving_localhost_exception = "An unexpected exception while retrieving the local address list: {0}.";

	public const string net_log_resolved_servicepoint_may_not_be_remote_server = "A resolved ServicePoint host could be wrongly considered as a remote server.";

	public const string net_log_closed_idle = "{0}#{1} - Closed as idle.";

	public const string net_log_received_status_line = "Received status line: Version={0}, StatusCode={1}, StatusDescription={2}.";

	public const string net_log_sending_headers = "Sending headers\r\n{{\r\n{0}}}.";

	public const string net_log_received_headers = "Received headers\r\n{{\r\n{0}}}.";

	pu

System.ValueTuple.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Numerics.Hashing;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using FxResources.System.ValueTuple;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AssemblyTitle("System.ValueTuple")]
[assembly: AssemblyDescription("System.ValueTuple")]
[assembly: AssemblyDefaultAlias("System.ValueTuple")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: AssemblyCopyright("© Microsoft Corporation.  All rights reserved.")]
[assembly: AssemblyFileVersion("4.6.26011.01")]
[assembly: AssemblyInformationalVersion("4.6.26011.01 built by: dlab-DDVSOWINAGE026. ")]
[assembly: CLSCompliant(true)]
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: AssemblyMetadata("PreferInbox", "True")]
[assembly: AssemblyVersion("4.0.2.0")]
namespace FxResources.System.ValueTuple
{
	internal static class SR
	{
	}
}
namespace System
{
	public static class TupleExtensions
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1>(this Tuple<T1> value, out T1 item1)
		{
			item1 = value.Item1;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2>(this Tuple<T1, T2> value, out T1 item1, out T2 item2)
		{
			item1 = value.Item1;
			item2 = value.Item2;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3>(this Tuple<T1, T2, T3> value, out T1 item1, out T2 item2, out T3 item3)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4>(this Tuple<T1, T2, T3, T4> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5>(this Tuple<T1, T2, T3, T4, T5> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6>(this Tuple<T1, T2, T3, T4, T5, T6> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7>(this Tuple<T1, T2, T3, T4, T5, T6, T7> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
			item16 = value.Rest.Rest.Item2;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
			item16 = value.Rest.Rest.Item2;
			item17 = value.Rest.Rest.Item3;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
			item16 = value.Rest.Rest.Item2;
			item17 = value.Rest.Rest.Item3;
			item18 = value.Rest.Rest.Item4;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
			item16 = value.Rest.Rest.Item2;
			item17 = value.Rest.Rest.Item3;
			item18 = value.Rest.Rest.Item4;
			item19 = value.Rest.Rest.Item5;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19, T20>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19, out T20 item20)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
			item16 = value.Rest.Rest.Item2;
			item17 = value.Rest.Rest.Item3;
			item18 = value.Rest.Rest.Item4;
			item19 = value.Rest.Rest.Item5;
			item20 = value.Rest.Rest.Item6;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static void Deconstruct<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19, T20, T21>>> value, out T1 item1, out T2 item2, out T3 item3, out T4 item4, out T5 item5, out T6 item6, out T7 item7, out T8 item8, out T9 item9, out T10 item10, out T11 item11, out T12 item12, out T13 item13, out T14 item14, out T15 item15, out T16 item16, out T17 item17, out T18 item18, out T19 item19, out T20 item20, out T21 item21)
		{
			item1 = value.Item1;
			item2 = value.Item2;
			item3 = value.Item3;
			item4 = value.Item4;
			item5 = value.Item5;
			item6 = value.Item6;
			item7 = value.Item7;
			item8 = value.Rest.Item1;
			item9 = value.Rest.Item2;
			item10 = value.Rest.Item3;
			item11 = value.Rest.Item4;
			item12 = value.Rest.Item5;
			item13 = value.Rest.Item6;
			item14 = value.Rest.Item7;
			item15 = value.Rest.Rest.Item1;
			item16 = value.Rest.Rest.Item2;
			item17 = value.Rest.Rest.Item3;
			item18 = value.Rest.Rest.Item4;
			item19 = value.Rest.Rest.Item5;
			item20 = value.Rest.Rest.Item6;
			item21 = value.Rest.Rest.Item7;
		}

		public static ValueTuple<T1> ToValueTuple<T1>(this Tuple<T1> value)
		{
			return ValueTuple.Create(value.Item1);
		}

		public static (T1, T2) ToValueTuple<T1, T2>(this Tuple<T1, T2> value)
		{
			return ValueTuple.Create(value.Item1, value.Item2);
		}

		public static (T1, T2, T3) ToValueTuple<T1, T2, T3>(this Tuple<T1, T2, T3> value)
		{
			return ValueTuple.Create(value.Item1, value.Item2, value.Item3);
		}

		public static (T1, T2, T3, T4) ToValueTuple<T1, T2, T3, T4>(this Tuple<T1, T2, T3, T4> value)
		{
			return ValueTuple.Create(value.Item1, value.Item2, value.Item3, value.Item4);
		}

		public static (T1, T2, T3, T4, T5) ToValueTuple<T1, T2, T3, T4, T5>(this Tuple<T1, T2, T3, T4, T5> value)
		{
			return ValueTuple.Create(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5);
		}

		public static (T1, T2, T3, T4, T5, T6) ToValueTuple<T1, T2, T3, T4, T5, T6>(this Tuple<T1, T2, T3, T4, T5, T6> value)
		{
			return ValueTuple.Create(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6);
		}

		public static (T1, T2, T3, T4, T5, T6, T7) ToValueTuple<T1, T2, T3, T4, T5, T6, T7>(this Tuple<T1, T2, T3, T4, T5, T6, T7> value)
		{
			return ValueTuple.Create(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7);
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9>> value)
		{
			return CreateLong<T1, T2, T3, T4, T5, T6, T7, (T8, T9)>(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1, value.Rest.Item2));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10>> value)
		{
			return CreateLong<T1, T2, T3, T4, T5, T6, T7, (T8, T9, T10)>(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11>> value)
		{
			return CreateLong<T1, T2, T3, T4, T5, T6, T7, (T8, T9, T10, T11)>(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12>> value)
		{
			return CreateLong<T1, T2, T3, T4, T5, T6, T7, (T8, T9, T10, T11, T12)>(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13>> value)
		{
			return CreateLong<T1, T2, T3, T4, T5, T6, T7, (T8, T9, T10, T11, T12, T13)>(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14>> value)
		{
			return CreateLong<T1, T2, T3, T4, T5, T6, T7, (T8, T9, T10, T11, T12, T13, T14)>(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, ValueTuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1)));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong<T8, T9, T10, T11, T12, T13, T14, (T15, T16)>(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2)));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong<T8, T9, T10, T11, T12, T13, T14, (T15, T16, T17)>(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3)));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong<T8, T9, T10, T11, T12, T13, T14, (T15, T16, T17, T18)>(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4)));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong<T8, T9, T10, T11, T12, T13, T14, (T15, T16, T17, T18, T19)>(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4, value.Rest.Rest.Item5)));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19, T20>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong<T8, T9, T10, T11, T12, T13, T14, (T15, T16, T17, T18, T19, T20)>(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4, value.Rest.Rest.Item5, value.Rest.Rest.Item6)));
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) ToValueTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(this Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19, T20, T21>>> value)
		{
			return CreateLong(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLong<T8, T9, T10, T11, T12, T13, T14, (T15, T16, T17, T18, T19, T20, T21)>(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, ValueTuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4, value.Rest.Rest.Item5, value.Rest.Rest.Item6, value.Rest.Rest.Item7)));
		}

		public static Tuple<T1> ToTuple<T1>(this ValueTuple<T1> value)
		{
			return Tuple.Create(value.Item1);
		}

		public static Tuple<T1, T2> ToTuple<T1, T2>(this (T1, T2) value)
		{
			return Tuple.Create(value.Item1, value.Item2);
		}

		public static Tuple<T1, T2, T3> ToTuple<T1, T2, T3>(this (T1, T2, T3) value)
		{
			return Tuple.Create(value.Item1, value.Item2, value.Item3);
		}

		public static Tuple<T1, T2, T3, T4> ToTuple<T1, T2, T3, T4>(this (T1, T2, T3, T4) value)
		{
			return Tuple.Create(value.Item1, value.Item2, value.Item3, value.Item4);
		}

		public static Tuple<T1, T2, T3, T4, T5> ToTuple<T1, T2, T3, T4, T5>(this (T1, T2, T3, T4, T5) value)
		{
			return Tuple.Create(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5);
		}

		public static Tuple<T1, T2, T3, T4, T5, T6> ToTuple<T1, T2, T3, T4, T5, T6>(this (T1, T2, T3, T4, T5, T6) value)
		{
			return Tuple.Create(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6);
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7> ToTuple<T1, T2, T3, T4, T5, T6, T7>(this (T1, T2, T3, T4, T5, T6, T7) value)
		{
			return Tuple.Create(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7);
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8>(this (T1, T2, T3, T4, T5, T6, T7, T8) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1, value.Rest.Item2));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, Tuple.Create(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1)));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2)));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3)));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4)));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4, value.Rest.Rest.Item5)));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19, T20>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4, value.Rest.Rest.Item5, value.Rest.Rest.Item6)));
		}

		public static Tuple<T1, T2, T3, T4, T5, T6, T7, Tuple<T8, T9, T10, T11, T12, T13, T14, Tuple<T15, T16, T17, T18, T19, T20, T21>>> ToTuple<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21>(this (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) value)
		{
			return CreateLongRef(value.Item1, value.Item2, value.Item3, value.Item4, value.Item5, value.Item6, value.Item7, CreateLongRef(value.Rest.Item1, value.Rest.Item2, value.Rest.Item3, value.Rest.Item4, value.Rest.Item5, value.Rest.Item6, value.Rest.Item7, Tuple.Create(value.Rest.Rest.Item1, value.Rest.Rest.Item2, value.Rest.Rest.Item3, value.Rest.Rest.Item4, value.Rest.Rest.Item5, value.Rest.Rest.Item6, value.Rest.Rest.Item7)));
		}

		private static ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> CreateLong<T1, T2, T3, T4, T5, T6, T7, TRest>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest) where TRest : struct
		{
			return new ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>(item1, item2, item3, item4, item5, item6, item7, rest);
		}

		private static Tuple<T1, T2, T3, T4, T5, T6, T7, TRest> CreateLongRef<T1, T2, T3, T4, T5, T6, T7, TRest>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest)
		{
			return new Tuple<T1, T2, T3, T4, T5, T6, T7, TRest>(item1, item2, item3, item4, item5, item6, item7, rest);
		}
	}
	internal interface ITupleInternal
	{
		int Size { get; }

		int GetHashCode(IEqualityComparer comparer);

		string ToStringEnd();
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct ValueTuple : IEquatable<ValueTuple>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple>, System.ITupleInternal
	{
		int System.ITupleInternal.Size => 0;

		public override bool Equals(object obj)
		{
			return obj is ValueTuple;
		}

		public bool Equals(ValueTuple other)
		{
			return true;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			return other is ValueTuple;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return 0;
		}

		public int CompareTo(ValueTuple other)
		{
			return 0;
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return 0;
		}

		public override int GetHashCode()
		{
			return 0;
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return 0;
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return 0;
		}

		public override string ToString()
		{
			return "()";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return ")";
		}

		public static ValueTuple Create()
		{
			return default(ValueTuple);
		}

		public static ValueTuple<T1> Create<T1>(T1 item1)
		{
			return new ValueTuple<T1>(item1);
		}

		public static (T1, T2) Create<T1, T2>(T1 item1, T2 item2)
		{
			return (item1, item2);
		}

		public static (T1, T2, T3) Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3)
		{
			return (item1, item2, item3);
		}

		public static (T1, T2, T3, T4) Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4)
		{
			return (item1, item2, item3, item4);
		}

		public static (T1, T2, T3, T4, T5) Create<T1, T2, T3, T4, T5>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
		{
			return (item1, item2, item3, item4, item5);
		}

		public static (T1, T2, T3, T4, T5, T6) Create<T1, T2, T3, T4, T5, T6>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
		{
			return (item1, item2, item3, item4, item5, item6);
		}

		public static (T1, T2, T3, T4, T5, T6, T7) Create<T1, T2, T3, T4, T5, T6, T7>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
		{
			return (item1, item2, item3, item4, item5, item6, item7);
		}

		public static (T1, T2, T3, T4, T5, T6, T7, T8) Create<T1, T2, T3, T4, T5, T6, T7, T8>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8)
		{
			return new ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8>>(item1, item2, item3, item4, item5, item6, item7, Create(item8));
		}

		internal static int CombineHashCodes(int h1, int h2)
		{
			return HashHelpers.Combine(HashHelpers.Combine(HashHelpers.RandomSeed, h1), h2);
		}

		internal static int CombineHashCodes(int h1, int h2, int h3)
		{
			return HashHelpers.Combine(CombineHashCodes(h1, h2), h3);
		}

		internal static int CombineHashCodes(int h1, int h2, int h3, int h4)
		{
			return HashHelpers.Combine(CombineHashCodes(h1, h2, h3), h4);
		}

		internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5)
		{
			return HashHelpers.Combine(CombineHashCodes(h1, h2, h3, h4), h5);
		}

		internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6)
		{
			return HashHelpers.Combine(CombineHashCodes(h1, h2, h3, h4, h5), h6);
		}

		internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7)
		{
			return HashHelpers.Combine(CombineHashCodes(h1, h2, h3, h4, h5, h6), h7);
		}

		internal static int CombineHashCodes(int h1, int h2, int h3, int h4, int h5, int h6, int h7, int h8)
		{
			return HashHelpers.Combine(CombineHashCodes(h1, h2, h3, h4, h5, h6, h7), h8);
		}
	}
	public struct ValueTuple<T1> : IEquatable<ValueTuple<T1>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1>>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		public T1 Item1;

		int System.ITupleInternal.Size => 1;

		public ValueTuple(T1 item1)
		{
			Item1 = item1;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1>)
			{
				return Equals((ValueTuple<T1>)obj);
			}
			return false;
		}

		public bool Equals(ValueTuple<T1> other)
		{
			return s_t1Comparer.Equals(Item1, other.Item1);
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is ValueTuple<T1> valueTuple))
			{
				return false;
			}
			return comparer.Equals(Item1, valueTuple.Item1);
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1> valueTuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return Comparer<T1>.Default.Compare(Item1, valueTuple.Item1);
		}

		public int CompareTo(ValueTuple<T1> other)
		{
			return Comparer<T1>.Default.Compare(Item1, other.Item1);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1> valueTuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return comparer.Compare(Item1, valueTuple.Item1);
		}

		public override int GetHashCode()
		{
			return s_t1Comparer.GetHashCode(Item1);
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return comparer.GetHashCode(Item1);
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return comparer.GetHashCode(Item1);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2> : IEquatable<(T1, T2)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2)>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		public T1 Item1;

		public T2 Item2;

		int System.ITupleInternal.Size => 2;

		public ValueTuple(T1 item1, T2 item2)
		{
			Item1 = item1;
			Item2 = item2;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2>)
			{
				return Equals(((T1, T2))obj);
			}
			return false;
		}

		public bool Equals((T1, T2) other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1))
			{
				return s_t2Comparer.Equals(Item2, other.Item2);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is (T1, T2) tuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, tuple.Item1))
			{
				return comparer.Equals(Item2, tuple.Item2);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo(((T1, T2))other);
		}

		public int CompareTo((T1, T2) other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			return Comparer<T2>.Default.Compare(Item2, other.Item2);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is (T1, T2) tuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, tuple.Item1);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Item2, tuple.Item2);
		}

		public override int GetHashCode()
		{
			return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2));
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2));
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ", " + Item2?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ", " + Item2?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2, T3> : IEquatable<(T1, T2, T3)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3)>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		private static readonly EqualityComparer<T3> s_t3Comparer = EqualityComparer<T3>.Default;

		public T1 Item1;

		public T2 Item2;

		public T3 Item3;

		int System.ITupleInternal.Size => 3;

		public ValueTuple(T1 item1, T2 item2, T3 item3)
		{
			Item1 = item1;
			Item2 = item2;
			Item3 = item3;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2, T3>)
			{
				return Equals(((T1, T2, T3))obj);
			}
			return false;
		}

		public bool Equals((T1, T2, T3) other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1) && s_t2Comparer.Equals(Item2, other.Item2))
			{
				return s_t3Comparer.Equals(Item3, other.Item3);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is (T1, T2, T3) tuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, tuple.Item1) && comparer.Equals(Item2, tuple.Item2))
			{
				return comparer.Equals(Item3, tuple.Item3);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo(((T1, T2, T3))other);
		}

		public int CompareTo((T1, T2, T3) other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T2>.Default.Compare(Item2, other.Item2);
			if (num != 0)
			{
				return num;
			}
			return Comparer<T3>.Default.Compare(Item3, other.Item3);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is (T1, T2, T3) tuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, tuple.Item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item2, tuple.Item2);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Item3, tuple.Item3);
		}

		public override int GetHashCode()
		{
			return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3));
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3));
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2, T3, T4> : IEquatable<(T1, T2, T3, T4)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4)>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		private static readonly EqualityComparer<T3> s_t3Comparer = EqualityComparer<T3>.Default;

		private static readonly EqualityComparer<T4> s_t4Comparer = EqualityComparer<T4>.Default;

		public T1 Item1;

		public T2 Item2;

		public T3 Item3;

		public T4 Item4;

		int System.ITupleInternal.Size => 4;

		public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4)
		{
			Item1 = item1;
			Item2 = item2;
			Item3 = item3;
			Item4 = item4;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2, T3, T4>)
			{
				return Equals(((T1, T2, T3, T4))obj);
			}
			return false;
		}

		public bool Equals((T1, T2, T3, T4) other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1) && s_t2Comparer.Equals(Item2, other.Item2) && s_t3Comparer.Equals(Item3, other.Item3))
			{
				return s_t4Comparer.Equals(Item4, other.Item4);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is (T1, T2, T3, T4) tuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, tuple.Item1) && comparer.Equals(Item2, tuple.Item2) && comparer.Equals(Item3, tuple.Item3))
			{
				return comparer.Equals(Item4, tuple.Item4);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3, T4>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo(((T1, T2, T3, T4))other);
		}

		public int CompareTo((T1, T2, T3, T4) other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T2>.Default.Compare(Item2, other.Item2);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T3>.Default.Compare(Item3, other.Item3);
			if (num != 0)
			{
				return num;
			}
			return Comparer<T4>.Default.Compare(Item4, other.Item4);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is (T1, T2, T3, T4) tuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, tuple.Item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item2, tuple.Item2);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item3, tuple.Item3);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Item4, tuple.Item4);
		}

		public override int GetHashCode()
		{
			return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4));
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4));
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2, T3, T4, T5> : IEquatable<(T1, T2, T3, T4, T5)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4, T5)>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		private static readonly EqualityComparer<T3> s_t3Comparer = EqualityComparer<T3>.Default;

		private static readonly EqualityComparer<T4> s_t4Comparer = EqualityComparer<T4>.Default;

		private static readonly EqualityComparer<T5> s_t5Comparer = EqualityComparer<T5>.Default;

		public T1 Item1;

		public T2 Item2;

		public T3 Item3;

		public T4 Item4;

		public T5 Item5;

		int System.ITupleInternal.Size => 5;

		public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)
		{
			Item1 = item1;
			Item2 = item2;
			Item3 = item3;
			Item4 = item4;
			Item5 = item5;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2, T3, T4, T5>)
			{
				return Equals(((T1, T2, T3, T4, T5))obj);
			}
			return false;
		}

		public bool Equals((T1, T2, T3, T4, T5) other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1) && s_t2Comparer.Equals(Item2, other.Item2) && s_t3Comparer.Equals(Item3, other.Item3) && s_t4Comparer.Equals(Item4, other.Item4))
			{
				return s_t5Comparer.Equals(Item5, other.Item5);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is (T1, T2, T3, T4, T5) tuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, tuple.Item1) && comparer.Equals(Item2, tuple.Item2) && comparer.Equals(Item3, tuple.Item3) && comparer.Equals(Item4, tuple.Item4))
			{
				return comparer.Equals(Item5, tuple.Item5);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3, T4, T5>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo(((T1, T2, T3, T4, T5))other);
		}

		public int CompareTo((T1, T2, T3, T4, T5) other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T2>.Default.Compare(Item2, other.Item2);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T3>.Default.Compare(Item3, other.Item3);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T4>.Default.Compare(Item4, other.Item4);
			if (num != 0)
			{
				return num;
			}
			return Comparer<T5>.Default.Compare(Item5, other.Item5);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is (T1, T2, T3, T4, T5) tuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, tuple.Item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item2, tuple.Item2);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item3, tuple.Item3);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item4, tuple.Item4);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Item5, tuple.Item5);
		}

		public override int GetHashCode()
		{
			return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5));
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5));
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ", " + Item5?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ", " + Item5?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2, T3, T4, T5, T6> : IEquatable<(T1, T2, T3, T4, T5, T6)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4, T5, T6)>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		private static readonly EqualityComparer<T3> s_t3Comparer = EqualityComparer<T3>.Default;

		private static readonly EqualityComparer<T4> s_t4Comparer = EqualityComparer<T4>.Default;

		private static readonly EqualityComparer<T5> s_t5Comparer = EqualityComparer<T5>.Default;

		private static readonly EqualityComparer<T6> s_t6Comparer = EqualityComparer<T6>.Default;

		public T1 Item1;

		public T2 Item2;

		public T3 Item3;

		public T4 Item4;

		public T5 Item5;

		public T6 Item6;

		int System.ITupleInternal.Size => 6;

		public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)
		{
			Item1 = item1;
			Item2 = item2;
			Item3 = item3;
			Item4 = item4;
			Item5 = item5;
			Item6 = item6;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2, T3, T4, T5, T6>)
			{
				return Equals(((T1, T2, T3, T4, T5, T6))obj);
			}
			return false;
		}

		public bool Equals((T1, T2, T3, T4, T5, T6) other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1) && s_t2Comparer.Equals(Item2, other.Item2) && s_t3Comparer.Equals(Item3, other.Item3) && s_t4Comparer.Equals(Item4, other.Item4) && s_t5Comparer.Equals(Item5, other.Item5))
			{
				return s_t6Comparer.Equals(Item6, other.Item6);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is (T1, T2, T3, T4, T5, T6) tuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, tuple.Item1) && comparer.Equals(Item2, tuple.Item2) && comparer.Equals(Item3, tuple.Item3) && comparer.Equals(Item4, tuple.Item4) && comparer.Equals(Item5, tuple.Item5))
			{
				return comparer.Equals(Item6, tuple.Item6);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3, T4, T5, T6>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo(((T1, T2, T3, T4, T5, T6))other);
		}

		public int CompareTo((T1, T2, T3, T4, T5, T6) other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T2>.Default.Compare(Item2, other.Item2);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T3>.Default.Compare(Item3, other.Item3);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T4>.Default.Compare(Item4, other.Item4);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T5>.Default.Compare(Item5, other.Item5);
			if (num != 0)
			{
				return num;
			}
			return Comparer<T6>.Default.Compare(Item6, other.Item6);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is (T1, T2, T3, T4, T5, T6) tuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, tuple.Item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item2, tuple.Item2);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item3, tuple.Item3);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item4, tuple.Item4);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item5, tuple.Item5);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Item6, tuple.Item6);
		}

		public override int GetHashCode()
		{
			return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6));
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6));
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ", " + Item5?.ToString() + ", " + Item6?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ", " + Item5?.ToString() + ", " + Item6?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7> : IEquatable<(T1, T2, T3, T4, T5, T6, T7)>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<(T1, T2, T3, T4, T5, T6, T7)>, System.ITupleInternal
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		private static readonly EqualityComparer<T3> s_t3Comparer = EqualityComparer<T3>.Default;

		private static readonly EqualityComparer<T4> s_t4Comparer = EqualityComparer<T4>.Default;

		private static readonly EqualityComparer<T5> s_t5Comparer = EqualityComparer<T5>.Default;

		private static readonly EqualityComparer<T6> s_t6Comparer = EqualityComparer<T6>.Default;

		private static readonly EqualityComparer<T7> s_t7Comparer = EqualityComparer<T7>.Default;

		public T1 Item1;

		public T2 Item2;

		public T3 Item3;

		public T4 Item4;

		public T5 Item5;

		public T6 Item6;

		public T7 Item7;

		int System.ITupleInternal.Size => 7;

		public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)
		{
			Item1 = item1;
			Item2 = item2;
			Item3 = item3;
			Item4 = item4;
			Item5 = item5;
			Item6 = item6;
			Item7 = item7;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2, T3, T4, T5, T6, T7>)
			{
				return Equals(((T1, T2, T3, T4, T5, T6, T7))obj);
			}
			return false;
		}

		public bool Equals((T1, T2, T3, T4, T5, T6, T7) other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1) && s_t2Comparer.Equals(Item2, other.Item2) && s_t3Comparer.Equals(Item3, other.Item3) && s_t4Comparer.Equals(Item4, other.Item4) && s_t5Comparer.Equals(Item5, other.Item5) && s_t6Comparer.Equals(Item6, other.Item6))
			{
				return s_t7Comparer.Equals(Item7, other.Item7);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is (T1, T2, T3, T4, T5, T6, T7) tuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, tuple.Item1) && comparer.Equals(Item2, tuple.Item2) && comparer.Equals(Item3, tuple.Item3) && comparer.Equals(Item4, tuple.Item4) && comparer.Equals(Item5, tuple.Item5) && comparer.Equals(Item6, tuple.Item6))
			{
				return comparer.Equals(Item7, tuple.Item7);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3, T4, T5, T6, T7>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo(((T1, T2, T3, T4, T5, T6, T7))other);
		}

		public int CompareTo((T1, T2, T3, T4, T5, T6, T7) other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T2>.Default.Compare(Item2, other.Item2);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T3>.Default.Compare(Item3, other.Item3);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T4>.Default.Compare(Item4, other.Item4);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T5>.Default.Compare(Item5, other.Item5);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T6>.Default.Compare(Item6, other.Item6);
			if (num != 0)
			{
				return num;
			}
			return Comparer<T7>.Default.Compare(Item7, other.Item7);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is (T1, T2, T3, T4, T5, T6, T7) tuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, tuple.Item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item2, tuple.Item2);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item3, tuple.Item3);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item4, tuple.Item4);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item5, tuple.Item5);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item6, tuple.Item6);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Item7, tuple.Item7);
		}

		public override int GetHashCode()
		{
			return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7));
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7));
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			return "(" + Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ", " + Item5?.ToString() + ", " + Item6?.ToString() + ", " + Item7?.ToString() + ")";
		}

		string System.ITupleInternal.ToStringEnd()
		{
			return Item1?.ToString() + ", " + Item2?.ToString() + ", " + Item3?.ToString() + ", " + Item4?.ToString() + ", " + Item5?.ToString() + ", " + Item6?.ToString() + ", " + Item7?.ToString() + ")";
		}
	}
	[StructLayout(LayoutKind.Auto)]
	public struct ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> : IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, System.ITupleInternal where TRest : struct
	{
		private static readonly EqualityComparer<T1> s_t1Comparer = EqualityComparer<T1>.Default;

		private static readonly EqualityComparer<T2> s_t2Comparer = EqualityComparer<T2>.Default;

		private static readonly EqualityComparer<T3> s_t3Comparer = EqualityComparer<T3>.Default;

		private static readonly EqualityComparer<T4> s_t4Comparer = EqualityComparer<T4>.Default;

		private static readonly EqualityComparer<T5> s_t5Comparer = EqualityComparer<T5>.Default;

		private static readonly EqualityComparer<T6> s_t6Comparer = EqualityComparer<T6>.Default;

		private static readonly EqualityComparer<T7> s_t7Comparer = EqualityComparer<T7>.Default;

		private static readonly EqualityComparer<TRest> s_tRestComparer = EqualityComparer<TRest>.Default;

		public T1 Item1;

		public T2 Item2;

		public T3 Item3;

		public T4 Item4;

		public T5 Item5;

		public T6 Item6;

		public T7 Item7;

		public TRest Rest;

		int System.ITupleInternal.Size
		{
			get
			{
				if ((object)Rest is System.ITupleInternal tupleInternal)
				{
					return 7 + tupleInternal.Size;
				}
				return 8;
			}
		}

		public ValueTuple(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, TRest rest)
		{
			if (!(rest is System.ITupleInternal))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleLastArgumentNotAValueTuple);
			}
			Item1 = item1;
			Item2 = item2;
			Item3 = item3;
			Item4 = item4;
			Item5 = item5;
			Item6 = item6;
			Item7 = item7;
			Rest = rest;
		}

		public override bool Equals(object obj)
		{
			if (obj is ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>)
			{
				return Equals((ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>)obj);
			}
			return false;
		}

		public bool Equals(ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> other)
		{
			if (s_t1Comparer.Equals(Item1, other.Item1) && s_t2Comparer.Equals(Item2, other.Item2) && s_t3Comparer.Equals(Item3, other.Item3) && s_t4Comparer.Equals(Item4, other.Item4) && s_t5Comparer.Equals(Item5, other.Item5) && s_t6Comparer.Equals(Item6, other.Item6) && s_t7Comparer.Equals(Item7, other.Item7))
			{
				return s_tRestComparer.Equals(Rest, other.Rest);
			}
			return false;
		}

		bool IStructuralEquatable.Equals(object other, IEqualityComparer comparer)
		{
			if (other == null || !(other is ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> valueTuple))
			{
				return false;
			}
			if (comparer.Equals(Item1, valueTuple.Item1) && comparer.Equals(Item2, valueTuple.Item2) && comparer.Equals(Item3, valueTuple.Item3) && comparer.Equals(Item4, valueTuple.Item4) && comparer.Equals(Item5, valueTuple.Item5) && comparer.Equals(Item6, valueTuple.Item6) && comparer.Equals(Item7, valueTuple.Item7))
			{
				return comparer.Equals(Rest, valueTuple.Rest);
			}
			return false;
		}

		int IComparable.CompareTo(object other)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			return CompareTo((ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>)other);
		}

		public int CompareTo(ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> other)
		{
			int num = Comparer<T1>.Default.Compare(Item1, other.Item1);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T2>.Default.Compare(Item2, other.Item2);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T3>.Default.Compare(Item3, other.Item3);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T4>.Default.Compare(Item4, other.Item4);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T5>.Default.Compare(Item5, other.Item5);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T6>.Default.Compare(Item6, other.Item6);
			if (num != 0)
			{
				return num;
			}
			num = Comparer<T7>.Default.Compare(Item7, other.Item7);
			if (num != 0)
			{
				return num;
			}
			return Comparer<TRest>.Default.Compare(Rest, other.Rest);
		}

		int IStructuralComparable.CompareTo(object other, IComparer comparer)
		{
			if (other == null)
			{
				return 1;
			}
			if (!(other is ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> valueTuple))
			{
				throw new ArgumentException(System.SR.ArgumentException_ValueTupleIncorrectType, "other");
			}
			int num = comparer.Compare(Item1, valueTuple.Item1);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item2, valueTuple.Item2);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item3, valueTuple.Item3);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item4, valueTuple.Item4);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item5, valueTuple.Item5);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item6, valueTuple.Item6);
			if (num != 0)
			{
				return num;
			}
			num = comparer.Compare(Item7, valueTuple.Item7);
			if (num != 0)
			{
				return num;
			}
			return comparer.Compare(Rest, valueTuple.Rest);
		}

		public override int GetHashCode()
		{
			if (!((object)Rest is System.ITupleInternal tupleInternal))
			{
				return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7));
			}
			int size = tupleInternal.Size;
			if (size >= 8)
			{
				return tupleInternal.GetHashCode();
			}
			switch (8 - size)
			{
			case 1:
				return ValueTuple.CombineHashCodes(s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			case 2:
				return ValueTuple.CombineHashCodes(s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			case 3:
				return ValueTuple.CombineHashCodes(s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			case 4:
				return ValueTuple.CombineHashCodes(s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			case 5:
				return ValueTuple.CombineHashCodes(s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			case 6:
				return ValueTuple.CombineHashCodes(s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			case 7:
			case 8:
				return ValueTuple.CombineHashCodes(s_t1Comparer.GetHashCode(Item1), s_t2Comparer.GetHashCode(Item2), s_t3Comparer.GetHashCode(Item3), s_t4Comparer.GetHashCode(Item4), s_t5Comparer.GetHashCode(Item5), s_t6Comparer.GetHashCode(Item6), s_t7Comparer.GetHashCode(Item7), tupleInternal.GetHashCode());
			default:
				return -1;
			}
		}

		int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		private int GetHashCodeCore(IEqualityComparer comparer)
		{
			if (!((object)Rest is System.ITupleInternal tupleInternal))
			{
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7));
			}
			int size = tupleInternal.Size;
			if (size >= 8)
			{
				return tupleInternal.GetHashCode(comparer);
			}
			switch (8 - size)
			{
			case 1:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			case 2:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			case 3:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			case 4:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			case 5:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			case 6:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			case 7:
			case 8:
				return ValueTuple.CombineHashCodes(comparer.GetHashCode(Item1), comparer.GetHashCode(Item2), comparer.GetHashCode(Item3), comparer.GetHashCode(Item4), comparer.GetHashCode(Item5), comparer.GetHashCode(Item6), comparer.GetHashCode(Item7), tupleInternal.GetHashCode(comparer));
			default:
				return -1;
			}
		}

		int System.ITupleInternal.GetHashCode(IEqualityComparer comparer)
		{
			return GetHashCodeCore(comparer);
		}

		public override string ToString()
		{
			string[] obj;
			T1 val;
			object obj2;
			if (!((object)Rest is System.ITupleInternal tupleInternal))
			{
				obj = new string[17]
				{
					"(", null, null, null, null, null, null, null, null, null,
					null, null, null, null, null, null, null
				};
				ref T1 reference = ref Item1;
				val = default(T1);
				if (val == null)
				{
					val = reference;
					reference = ref val;
					if (val == null)
					{
						obj2 = null;
						goto IL_005d;
					}
				}
				obj2 = reference.ToString();
				goto IL_005d;
			}
			string[] obj3 = new string[16]
			{
				"(", null, null, null, null, null, null, null, null, null,
				null, null, null, null, null, null
			};
			ref T1 reference2 = ref Item1;
			val = default(T1);
			object obj4;
			if (val == null)
			{
				val = reference2;
				reference2 = ref val;
				if (val == null)
				{
					obj4 = null;
					goto IL_0262;
				}
			}
			obj4 = reference2.ToString();
			goto IL_0262;
			IL_02e2:
			object obj5;
			obj3[5] = (string)obj5;
			obj3[6] = ", ";
			ref T4 reference3 = ref Item4;
			T4 val2 = default(T4);
			object obj6;
			if (val2 == null)
			{
				val2 = reference3;
				reference3 = ref val2;
				if (val2 == null)
				{
					obj6 = null;
					goto IL_0325;
				}
			}
			obj6 = reference3.ToString();
			goto IL_0325;
			IL_03f3:
			object obj7;
			obj3[13] = (string)obj7;
			obj3[14] = ", ";
			obj3[15] = tupleInternal.ToStringEnd();
			return string.Concat(obj3);
			IL_03ae:
			object obj8;
			obj3[11] = (string)obj8;
			obj3[12] = ", ";
			ref T7 reference4 = ref Item7;
			T7 val3 = default(T7);
			if (val3 == null)
			{
				val3 = reference4;
				reference4 = ref val3;
				if (val3 == null)
				{
					obj7 = null;
					goto IL_03f3;
				}
			}
			obj7 = reference4.ToString();
			goto IL_03f3;
			IL_0120:
			object obj9;
			obj[7] = (string)obj9;
			obj[8] = ", ";
			ref T5 reference5 = ref Item5;
			T5 val4 = default(T5);
			object obj10;
			if (val4 == null)
			{
				val4 = reference5;
				reference5 = ref val4;
				if (val4 == null)
				{
					obj10 = null;
					goto IL_0164;
				}
			}
			obj10 = reference5.ToString();
			goto IL_0164;
			IL_005d:
			obj[1] = (string)obj2;
			obj[2] = ", ";
			ref T2 reference6 = ref Item2;
			T2 val5 = default(T2);
			object obj11;
			if (val5 == null)
			{
				val5 = reference6;
				reference6 = ref val5;
				if (val5 == null)
				{
					obj11 = null;
					goto IL_009d;
				}
			}
			obj11 = reference6.ToString();
			goto IL_009d;
			IL_0164:
			obj[9] = (string)obj10;
			obj[10] = ", ";
			ref T6 reference7 = ref Item6;
			T6 val6 = default(T6);
			object obj12;
			if (val6 == null)
			{
				val6 = reference7;
				reference7 = ref val6;
				if (val6 == null)
				{
					obj12 = null;
					goto IL_01a9;
				}
			}
			obj12 = reference7.ToString();
			goto IL_01a9;
			IL_02a2:
			object obj13;
			obj3[3] = (string)obj13;
			obj3[4] = ", ";
			ref T3 reference8 = ref Item3;
			T3 val7 = default(T3);
			if (val7 == null)
			{
				val7 = reference8;
				reference8 = ref val7;
				if (val7 == null)
				{
					obj5 = null;
					goto IL_02e2;
				}
			}
			obj5 = reference8.ToString();
			goto IL_02e2;
			IL_01ee:
			object obj14;
			obj[13] = (string)obj14;
			obj[14] = ", ";
			obj[15] = Rest.ToString();
			obj[16] = ")";
			return string.Concat(obj);
			IL_009d:
			obj[3] = (string)obj11;
			obj[4] = ", ";
			ref T3 reference9 = ref Item3;
			val7 = default(T3);
			object obj15;
			if (val7 == null)
			{
				val7 = reference9;
				reference9 = ref val7;
				if (val7 == null)
				{
					obj15 = null;
					goto IL_00dd;
				}
			}
			obj15 = reference9.ToString();
			goto IL_00dd;
			IL_0325:
			obj3[7] = (string)obj6;
			obj3[8] = ", ";
			ref T5 reference10 = ref Item5;
			val4 = default(T5);
			object obj16;
			if (val4 == null)
			{
				val4 = reference10;
				reference10 = ref val4;
				if (val4 == null)
				{
					obj16 = null;
					goto IL_0369;
				}
			}
			obj16 = reference10.ToString();
			goto IL_0369;
			IL_01a9:
			obj[11] = (string)obj12;
			obj[12] = ", ";
			ref T7 reference11 = ref Item7;
			val3 = default(T7);
			if (val3 == null)
			{
				val3 = reference11;
				reference11 = ref val3;
				if (val3 == null)
				{
					obj14 = null;
					goto IL_01ee;
				}
			}
			obj14 = reference11.ToString();
			goto IL_01ee;
			IL_0262:
			obj3[1] = (string)obj4;
			obj3[2] = ", ";
			ref T2 reference12 = ref Item2;
			val5 = default(T2);
			if (val5 == null)
			{
				val5 = reference12;
				reference12 = ref val5;
				if (val5 == null)
				{
					obj13 = null;
					goto IL_02a2;
				}
			}
			obj13 = reference12.ToString();
			goto IL_02a2;
			IL_00dd:
			obj[5] = (string)obj15;
			obj[6] = ", ";
			ref T4 reference13 = ref Item4;
			val2 = default(T4);
			if (val2 == null)
			{
				val2 = reference13;
				reference13 = ref val2;
				if (val2 == null)
				{
					obj9 = null;
					goto IL_0120;
				}
			}
			obj9 = reference13.ToString();
			goto IL_0120;
			IL_0369:
			obj3[9] = (string)obj16;
			obj3[10] = ", ";
			ref T6 reference14 = ref Item6;
			val6 = default(T6);
			if (val6 == null)
			{
				val6 = reference14;
				reference14 = ref val6;
				if (val6 == null)
				{
					obj8 = null;
					goto IL_03ae;
				}
			}
			obj8 = reference14.ToString();
			goto IL_03ae;
		}

		string System.ITupleInternal.ToStringEnd()
		{
			string[] array;
			T1 val;
			object obj;
			if (!((object)Rest is System.ITupleInternal tupleInternal))
			{
				array = new string[16];
				ref T1 reference = ref Item1;
				val = default(T1);
				if (val == null)
				{
					val = reference;
					reference = ref val;
					if (val == null)
					{
						obj = null;
						goto IL_0055;
					}
				}
				obj = reference.ToString();
				goto IL_0055;
			}
			string[] array2 = new string[15];
			ref T1 reference2 = ref Item1;
			val = default(T1);
			object obj2;
			if (val == null)
			{
				val = reference2;
				reference2 = ref val;
				if (val == null)
				{
					obj2 = null;
					goto IL_0251;
				}
			}
			obj2 = reference2.ToString();
			goto IL_0251;
			IL_02d1:
			object obj3;
			array2[4] = (string)obj3;
			array2[5] = ", ";
			ref T4 reference3 = ref Item4;
			T4 val2 = default(T4);
			object obj4;
			if (val2 == null)
			{
				val2 = reference3;
				reference3 = ref val2;
				if (val2 == null)
				{
					obj4 = null;
					goto IL_0314;
				}
			}
			obj4 = reference3.ToString();
			goto IL_0314;
			IL_03e1:
			object obj5;
			array2[12] = (string)obj5;
			array2[13] = ", ";
			array2[14] = tupleInternal.ToStringEnd();
			return string.Concat(array2);
			IL_039c:
			object obj6;
			array2[10] = (string)obj6;
			array2[11] = ", ";
			ref T7 reference4 = ref Item7;
			T7 val3 = default(T7);
			if (val3 == null)
			{
				val3 = reference4;
				reference4 = ref val3;
				if (val3 == null)
				{
					obj5 = null;
					goto IL_03e1;
				}
			}
			obj5 = reference4.ToString();
			goto IL_03e1;
			IL_0118:
			object obj7;
			array[6] = (string)obj7;
			array[7] = ", ";
			ref T5 reference5 = ref Item5;
			T5 val4 = default(T5);
			object obj8;
			if (val4 == null)
			{
				val4 = reference5;
				reference5 = ref val4;
				if (val4 == null)
				{
					obj8 = null;
					goto IL_015b;
				}
			}
			obj8 = reference5.ToString();
			goto IL_015b;
			IL_0055:
			array[0] = (string)obj;
			array[1] = ", ";
			ref T2 reference6 = ref Item2;
			T2 val5 = default(T2);
			object obj9;
			if (val5 == null)
			{
				val5 = reference6;
				reference6 = ref val5;
				if (val5 == null)
				{
					obj9 = null;
					goto IL_0095;
				}
			}
			obj9 = reference6.ToString();
			goto IL_0095;
			IL_015b:
			array[8] = (string)obj8;
			array[9] = ", ";
			ref T6 reference7 = ref Item6;
			T6 val6 = default(T6);
			object obj10;
			if (val6 == null)
			{
				val6 = reference7;
				reference7 = ref val6;
				if (val6 == null)
				{
					obj10 = null;
					goto IL_01a0;
				}
			}
			obj10 = reference7.ToString();
			goto IL_01a0;
			IL_0291:
			object obj11;
			array2[2] = (string)obj11;
			array2[3] = ", ";
			ref T3 reference8 = ref Item3;
			T3 val7 = default(T3);
			if (val7 == null)
			{
				val7 = reference8;
				reference8 = ref val7;
				if (val7 == null)
				{
					obj3 = null;
					goto IL_02d1;
				}
			}
			obj3 = reference8.ToString();
			goto IL_02d1;
			IL_01e5:
			object obj12;
			array[12] = (string)obj12;
			array[13] = ", ";
			array[14] = Rest.ToString();
			array[15] = ")";
			return string.Concat(array);
			IL_0095:
			array[2] = (string)obj9;
			array[3] = ", ";
			ref T3 reference9 = ref Item3;
			val7 = default(T3);
			object obj13;
			if (val7 == null)
			{
				val7 = reference9;
				reference9 = ref val7;
				if (val7 == null)
				{
					obj13 = null;
					goto IL_00d5;
				}
			}
			obj13 = reference9.ToString();
			goto IL_00d5;
			IL_0314:
			array2[6] = (string)obj4;
			array2[7] = ", ";
			ref T5 reference10 = ref Item5;
			val4 = default(T5);
			object obj14;
			if (val4 == null)
			{
				val4 = reference10;
				reference10 = ref val4;
				if (val4 == null)
				{
					obj14 = null;
					goto IL_0357;
				}
			}
			obj14 = reference10.ToString();
			goto IL_0357;
			IL_01a0:
			array[10] = (string)obj10;
			array[11] = ", ";
			ref T7 reference11 = ref Item7;
			val3 = default(T7);
			if (val3 == null)
			{
				val3 = reference11;
				reference11 = ref val3;
				if (val3 == null)
				{
					obj12 = null;
					goto IL_01e5;
				}
			}
			obj12 = reference11.ToString();
			goto IL_01e5;
			IL_0251:
			array2[0] = (string)obj2;
			array2[1] = ", ";
			ref T2 reference12 = ref Item2;
			val5 = default(T2);
			if (val5 == null)
			{
				val5 = reference12;
				reference12 = ref val5;
				if (val5 == null)
				{
					obj11 = null;
					goto IL_0291;
				}
			}
			obj11 = reference12.ToString();
			goto IL_0291;
			IL_00d5:
			array[4] = (string)obj13;
			array[5] = ", ";
			ref T4 reference13 = ref Item4;
			val2 = default(T4);
			if (val2 == null)
			{
				val2 = reference13;
				reference13 = ref val2;
				if (val2 == null)
				{
					obj7 = null;
					goto IL_0118;
				}
			}
			obj7 = reference13.ToString();
			goto IL_0118;
			IL_0357:
			array2[8] = (string)obj14;
			array2[9] = ", ";
			ref T6 reference14 = ref Item6;
			val6 = default(T6);
			if (val6 == null)
			{
				val6 = reference14;
				reference14 = ref val6;
				if (val6 == null)
				{
					obj6 = null;
					goto IL_039c;
				}
			}
			obj6 = reference14.ToString();
			goto IL_039c;
		}
	}
	internal static class SR
	{
		private static ResourceManager s_resourceManager;

		private const string s_resourcesName = "FxResources.System.ValueTuple.SR";

		private static ResourceManager ResourceManager => s_resourceManager ?? (s_resourceManager = new ResourceManager(ResourceType));

		internal static string ArgumentException_ValueTupleIncorrectType => GetResourceString("ArgumentException_ValueTupleIncorrectType", null);

		internal static string ArgumentException_ValueTupleLastArgumentNotAValueTuple => GetResourceString("ArgumentException_ValueTupleLastArgumentNotAValueTuple", null);

		internal static Type ResourceType => typeof(SR);

		[MethodImpl(MethodImplOptions.NoInlining)]
		private static bool UsingResourceKeys()
		{
			return false;
		}

		internal static string GetResourceString(string resourceKey, string defaultString)
		{
			string text = null;
			try
			{
				text = ResourceManager.GetString(resourceKey);
			}
			catch (MissingManifestResourceException)
			{
			}
			if (defaultString != null && resourceKey.Equals(text, StringComparison.Ordinal))
			{
				return defaultString;
			}
			return text;
		}

		internal static string Format(string resourceFormat, params object[] args)
		{
			if (args != null)
			{
				if (UsingResourceKeys())
				{
					return resourceFormat + string.Join(", ", args);
				}
				return string.Format(resourceFormat, args);
			}
			return resourceFormat;
		}

		internal static string Format(string resourceFormat, object p1)
		{
			if (UsingResourceKeys())
			{
				return string.Join(", ", resourceFormat, p1);
			}
			return string.Format(resourceFormat, p1);
		}

		internal static string Format(string resourceFormat, object p1, object p2)
		{
			if (UsingResourceKeys())
			{
				return string.Join(", ", resourceFormat, p1, p2);
			}
			return string.Format(resourceFormat, p1, p2);
		}

		internal static string Format(string resourceFormat, object p1, object p2, object p3)
		{
			if (UsingResourceKeys())
			{
				return string.Join(", ", resourceFormat, p1, p2, p3);
			}
			return string.Format(resourceFormat, p1, p2, p3);
		}
	}
}
namespace System.Numerics.Hashing
{
	internal static class HashHelpers
	{
		public static readonly int RandomSeed = Guid.NewGuid().GetHashCode();

		public static int Combine(int h1, int h2)
		{
			uint num = (uint)(h1 << 5) | ((uint)h1 >> 27);
			return ((int)num + h1) ^ h2;
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[CLSCompliant(false)]
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
	public sealed class TupleElementNamesAttribute : Attribute
	{
		private readonly string[] _transformNames;

		public IList<string> TransformNames => _transformNames;

		public TupleElementNamesAttribute(string[] transformNames)
		{
			if (transformNames == null)
			{
				throw new ArgumentNullException("transformNames");
			}
			_transformNames = transformNames;
		}
	}
}

UniGLTF.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
using System.Numerics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using UniGLTF.Extensions.VRMC_materials_hdr_emissiveMultiplier;
using UniGLTF.UniUnlit;
using UniGLTF.Zip;
using UniJSON;
using Unity.Collections;
using UnityEngine;
using UnityEngine.Rendering;
using VRMShaders;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
}
public static class TriangleUtil
{
	public static IEnumerable<int> FlipTriangle(IEnumerable<byte> src)
	{
		return FlipTriangle(src.Select((Func<byte, int>)((byte x) => x)));
	}

	public static IEnumerable<int> FlipTriangle(IEnumerable<ushort> src)
	{
		return FlipTriangle(src.Select((Func<ushort, int>)((ushort x) => x)));
	}

	public static IEnumerable<int> FlipTriangle(IEnumerable<uint> src)
	{
		return FlipTriangle(src.Select((uint x) => (int)x));
	}

	public static IEnumerable<int> FlipTriangle(IEnumerable<int> src)
	{
		IEnumerator<int> it = src.GetEnumerator();
		while (it.MoveNext())
		{
			int i0 = it.Current;
			if (!it.MoveNext())
			{
				break;
			}
			int i1 = it.Current;
			if (!it.MoveNext())
			{
				break;
			}
			yield return it.Current;
			yield return i1;
			yield return i0;
		}
	}
}
namespace UniJSON
{
	public class ByteBuffer
	{
		private byte[] m_buffer;

		private int m_used;

		public ArraySegment<byte> Bytes => new ArraySegment<byte>(m_buffer, 0, Count);

		public int Count => m_used;

		public int Remain
		{
			get
			{
				if (m_buffer == null)
				{
					return 0;
				}
				return m_buffer.Length - m_used;
			}
		}

		public ByteBuffer()
		{
		}

		public ByteBuffer(byte[] buffer)
		{
			m_buffer = buffer;
		}

		private void Ensure(int size)
		{
			if (m_buffer == null || size >= m_buffer.Length - m_used)
			{
				byte[] array = new byte[m_used + size];
				if (m_buffer != null && m_used > 0)
				{
					Buffer.BlockCopy(m_buffer, 0, array, 0, m_used);
				}
				m_buffer = array;
			}
		}

		public void Push(byte b)
		{
			Ensure(1);
			m_buffer[m_used++] = b;
		}

		public void Push(byte[] buffer)
		{
			Push(new ArraySegment<byte>(buffer));
		}

		public void Push(ArraySegment<byte> buffer)
		{
			Ensure(buffer.Count);
			Buffer.BlockCopy(buffer.Array, buffer.Offset, m_buffer, m_used, buffer.Count);
			m_used += buffer.Count;
		}

		public void Unshift(int size)
		{
			if (size > m_used)
			{
				throw new ArgumentException();
			}
			if (m_used - size < size)
			{
				Buffer.BlockCopy(m_buffer, m_used, m_buffer, 0, m_used - size);
				m_used -= size;
			}
			else
			{
				byte[] array = new byte[m_used];
				Buffer.BlockCopy(m_buffer, size, array, 0, m_used - size);
				m_buffer = array;
			}
		}
	}
	public static class ConcreteCast
	{
		public static string GetMethodName(Type src, Type dst)
		{
			return $"Cast{src.Name}To{dst.Name}";
		}

		public static MethodInfo GetMethod(Type src, Type dst)
		{
			string methodName = GetMethodName(src, dst);
			return typeof(ConcreteCast).GetMethod(methodName, BindingFlags.Static | BindingFlags.Public);
		}

		public static byte CastByteToByte(byte src)
		{
			return src;
		}

		public static ushort CastByteToUInt16(byte src)
		{
			return src;
		}

		public static uint CastByteToUInt32(byte src)
		{
			return src;
		}

		public static ulong CastByteToUInt64(byte src)
		{
			return src;
		}

		public static sbyte CastByteToSByte(byte src)
		{
			return (sbyte)src;
		}

		public static short CastByteToInt16(byte src)
		{
			return src;
		}

		public static int CastByteToInt32(byte src)
		{
			return src;
		}

		public static long CastByteToInt64(byte src)
		{
			return src;
		}

		public static float CastByteToSingle(byte src)
		{
			return (int)src;
		}

		public static double CastByteToDouble(byte src)
		{
			return (int)src;
		}

		public static byte CastUInt16ToByte(ushort src)
		{
			return (byte)src;
		}

		public static ushort CastUInt16ToUInt16(ushort src)
		{
			return src;
		}

		public static uint CastUInt16ToUInt32(ushort src)
		{
			return src;
		}

		public static ulong CastUInt16ToUInt64(ushort src)
		{
			return src;
		}

		public static sbyte CastUInt16ToSByte(ushort src)
		{
			return (sbyte)src;
		}

		public static short CastUInt16ToInt16(ushort src)
		{
			return (short)src;
		}

		public static int CastUInt16ToInt32(ushort src)
		{
			return src;
		}

		public static long CastUInt16ToInt64(ushort src)
		{
			return src;
		}

		public static float CastUInt16ToSingle(ushort src)
		{
			return (int)src;
		}

		public static double CastUInt16ToDouble(ushort src)
		{
			return (int)src;
		}

		public static byte CastUInt32ToByte(uint src)
		{
			return (byte)src;
		}

		public static ushort CastUInt32ToUInt16(uint src)
		{
			return (ushort)src;
		}

		public static uint CastUInt32ToUInt32(uint src)
		{
			return src;
		}

		public static ulong CastUInt32ToUInt64(uint src)
		{
			return src;
		}

		public static sbyte CastUInt32ToSByte(uint src)
		{
			return (sbyte)src;
		}

		public static short CastUInt32ToInt16(uint src)
		{
			return (short)src;
		}

		public static int CastUInt32ToInt32(uint src)
		{
			return (int)src;
		}

		public static long CastUInt32ToInt64(uint src)
		{
			return src;
		}

		public static float CastUInt32ToSingle(uint src)
		{
			return src;
		}

		public static double CastUInt32ToDouble(uint src)
		{
			return src;
		}

		public static byte CastUInt64ToByte(ulong src)
		{
			return (byte)src;
		}

		public static ushort CastUInt64ToUInt16(ulong src)
		{
			return (ushort)src;
		}

		public static uint CastUInt64ToUInt32(ulong src)
		{
			return (uint)src;
		}

		public static ulong CastUInt64ToUInt64(ulong src)
		{
			return src;
		}

		public static sbyte CastUInt64ToSByte(ulong src)
		{
			return (sbyte)src;
		}

		public static short CastUInt64ToInt16(ulong src)
		{
			return (short)src;
		}

		public static int CastUInt64ToInt32(ulong src)
		{
			return (int)src;
		}

		public static long CastUInt64ToInt64(ulong src)
		{
			return (long)src;
		}

		public static float CastUInt64ToSingle(ulong src)
		{
			return src;
		}

		public static double CastUInt64ToDouble(ulong src)
		{
			return src;
		}

		public static byte CastSByteToByte(sbyte src)
		{
			return (byte)src;
		}

		public static ushort CastSByteToUInt16(sbyte src)
		{
			return (ushort)src;
		}

		public static uint CastSByteToUInt32(sbyte src)
		{
			return (uint)src;
		}

		public static ulong CastSByteToUInt64(sbyte src)
		{
			return (ulong)src;
		}

		public static sbyte CastSByteToSByte(sbyte src)
		{
			return src;
		}

		public static short CastSByteToInt16(sbyte src)
		{
			return src;
		}

		public static int CastSByteToInt32(sbyte src)
		{
			return src;
		}

		public static long CastSByteToInt64(sbyte src)
		{
			return src;
		}

		public static float CastSByteToSingle(sbyte src)
		{
			return src;
		}

		public static double CastSByteToDouble(sbyte src)
		{
			return src;
		}

		public static byte CastInt16ToByte(short src)
		{
			return (byte)src;
		}

		public static ushort CastInt16ToUInt16(short src)
		{
			return (ushort)src;
		}

		public static uint CastInt16ToUInt32(short src)
		{
			return (uint)src;
		}

		public static ulong CastInt16ToUInt64(short src)
		{
			return (ulong)src;
		}

		public static sbyte CastInt16ToSByte(short src)
		{
			return (sbyte)src;
		}

		public static short CastInt16ToInt16(short src)
		{
			return src;
		}

		public static int CastInt16ToInt32(short src)
		{
			return src;
		}

		public static long CastInt16ToInt64(short src)
		{
			return src;
		}

		public static float CastInt16ToSingle(short src)
		{
			return src;
		}

		public static double CastInt16ToDouble(short src)
		{
			return src;
		}

		public static byte CastInt32ToByte(int src)
		{
			return (byte)src;
		}

		public static ushort CastInt32ToUInt16(int src)
		{
			return (ushort)src;
		}

		public static uint CastInt32ToUInt32(int src)
		{
			return (uint)src;
		}

		public static ulong CastInt32ToUInt64(int src)
		{
			return (ulong)src;
		}

		public static sbyte CastInt32ToSByte(int src)
		{
			return (sbyte)src;
		}

		public static short CastInt32ToInt16(int src)
		{
			return (short)src;
		}

		public static int CastInt32ToInt32(int src)
		{
			return src;
		}

		public static long CastInt32ToInt64(int src)
		{
			return src;
		}

		public static float CastInt32ToSingle(int src)
		{
			return src;
		}

		public static double CastInt32ToDouble(int src)
		{
			return src;
		}

		public static byte CastInt64ToByte(long src)
		{
			return (byte)src;
		}

		public static ushort CastInt64ToUInt16(long src)
		{
			return (ushort)src;
		}

		public static uint CastInt64ToUInt32(long src)
		{
			return (uint)src;
		}

		public static ulong CastInt64ToUInt64(long src)
		{
			return (ulong)src;
		}

		public static sbyte CastInt64ToSByte(long src)
		{
			return (sbyte)src;
		}

		public static short CastInt64ToInt16(long src)
		{
			return (short)src;
		}

		public static int CastInt64ToInt32(long src)
		{
			return (int)src;
		}

		public static long CastInt64ToInt64(long src)
		{
			return src;
		}

		public static float CastInt64ToSingle(long src)
		{
			return src;
		}

		public static double CastInt64ToDouble(long src)
		{
			return src;
		}

		public static byte CastSingleToByte(float src)
		{
			return (byte)src;
		}

		public static ushort CastSingleToUInt16(float src)
		{
			return (ushort)src;
		}

		public static uint CastSingleToUInt32(float src)
		{
			return (uint)src;
		}

		public static ulong CastSingleToUInt64(float src)
		{
			return (ulong)src;
		}

		public static sbyte CastSingleToSByte(float src)
		{
			return (sbyte)src;
		}

		public static short CastSingleToInt16(float src)
		{
			return (short)src;
		}

		public static int CastSingleToInt32(float src)
		{
			return (int)src;
		}

		public static long CastSingleToInt64(float src)
		{
			return (long)src;
		}

		public static float CastSingleToSingle(float src)
		{
			return src;
		}

		public static double CastSingleToDouble(float src)
		{
			return src;
		}

		public static byte CastDoubleToByte(double src)
		{
			return (byte)src;
		}

		public static ushort CastDoubleToUInt16(double src)
		{
			return (ushort)src;
		}

		public static uint CastDoubleToUInt32(double src)
		{
			return (uint)src;
		}

		public static ulong CastDoubleToUInt64(double src)
		{
			return (ulong)src;
		}

		public static sbyte CastDoubleToSByte(double src)
		{
			return (sbyte)src;
		}

		public static short CastDoubleToInt16(double src)
		{
			return (short)src;
		}

		public static int CastDoubleToInt32(double src)
		{
			return (int)src;
		}

		public static long CastDoubleToInt64(double src)
		{
			return (long)src;
		}

		public static float CastDoubleToSingle(double src)
		{
			return (float)src;
		}

		public static double CastDoubleToDouble(double src)
		{
			return src;
		}
	}
	public class TreeValueException : ArgumentException
	{
		protected TreeValueException(string msg)
			: base(msg)
		{
		}
	}
	public class ParserException : TreeValueException
	{
		public ParserException(string msg)
			: base(msg)
		{
		}
	}
	public class DeserializationException : TreeValueException
	{
		public DeserializationException(string msg)
			: base(msg)
		{
		}
	}
	public class FormatterException : TreeValueException
	{
		public FormatterException(string msg)
			: base(msg)
		{
		}
	}
	public static class ArraySegmentExtensions
	{
		public static T[] ArrayOrCopy<T>(this ArraySegment<T> self)
		{
			if (self.Array == null || self.Count == 0)
			{
				return new T[0];
			}
			if (self.Offset == 0 && self.Count == self.Array.Length)
			{
				return self.Array;
			}
			T[] array = new T[self.Count];
			Array.Copy(self.Array, self.Offset, array, 0, self.Count);
			return array;
		}

		public static IEnumerable<T> ToEnumerable<T>(this ArraySegment<T> self)
		{
			return self.Array.Skip(self.Offset).Take(self.Count);
		}

		public static void Set<T>(this ArraySegment<T> self, int index, T value)
		{
			if (index < 0 || index >= self.Count)
			{
				throw new ArgumentOutOfRangeException();
			}
			self.Array[self.Offset + index] = value;
		}

		public static T Get<T>(this ArraySegment<T> self, int index)
		{
			if (index < 0 || index >= self.Count)
			{
				throw new ArgumentOutOfRangeException();
			}
			return self.Array[self.Offset + index];
		}

		public static ArraySegment<T> Advance<T>(this ArraySegment<T> self, int n)
		{
			return new ArraySegment<T>(self.Array, self.Offset + n, self.Count - n);
		}

		public static ArraySegment<T> Take<T>(this ArraySegment<T> self, int n)
		{
			return new ArraySegment<T>(self.Array, self.Offset, n);
		}

		public static T[] TakeReversedArray<T>(this ArraySegment<T> self, int n)
		{
			T[] array = new T[n];
			int num = n - 1;
			int num2 = 0;
			while (num2 < n)
			{
				array[num2] = self.Get(num);
				num2++;
				num--;
			}
			return array;
		}

		public static byte[] Concat(this byte[] lhs, ArraySegment<byte> rhs)
		{
			return new ArraySegment<byte>(lhs).Concat(rhs);
		}

		public static byte[] Concat(this ArraySegment<byte> lhs, ArraySegment<byte> rhs)
		{
			byte[] array = new byte[lhs.Count + rhs.Count];
			Buffer.BlockCopy(lhs.Array, lhs.Offset, array, 0, lhs.Count);
			Buffer.BlockCopy(rhs.Array, rhs.Offset, array, lhs.Count, rhs.Count);
			return array;
		}
	}
	public static class ByteExtensions
	{
		public static byte GetHexDigit(this ushort n, int index)
		{
			return (byte)((uint)(n >> 8 * index) & 0xFFu);
		}

		public static byte GetHexDigit(this uint n, int index)
		{
			return (byte)((n >> 8 * index) & 0xFFu);
		}

		public static byte GetHexDigit(this ulong n, int index)
		{
			return (byte)((n >> 8 * index) & 0xFF);
		}

		public static byte GetHexDigit(this short n, int index)
		{
			return (byte)((uint)(n >> 8 * index) & 0xFFu);
		}

		public static byte GetHexDigit(this int n, int index)
		{
			return (byte)((uint)(n >> 8 * index) & 0xFFu);
		}

		public static byte GetHexDigit(this long n, int index)
		{
			return (byte)((n >> 8 * index) & 0xFF);
		}

		public static uint ToUint32(this float n, byte[] buffer)
		{
			if (buffer.Length < 4)
			{
				throw new ArgumentException();
			}
			using (MemoryStream output = new MemoryStream(buffer))
			{
				using BinaryWriter binaryWriter = new BinaryWriter(output);
				binaryWriter.Write(n);
			}
			return BitConverter.ToUInt32(buffer, 0);
		}

		public static ulong ToUint64(this double n, byte[] buffer)
		{
			if (buffer.Length < 8)
			{
				throw new ArgumentException();
			}
			using (MemoryStream output = new MemoryStream(buffer))
			{
				using BinaryWriter binaryWriter = new BinaryWriter(output);
				binaryWriter.Write(n);
			}
			return BitConverter.ToUInt64(buffer, 0);
		}
	}
	public static class DateTimeOffsetExtensions
	{
		public const long TicksPerSecond = 10000000L;

		public static readonly DateTimeOffset EpochTime = new DateTimeOffset(1970, 1, 1, 0, 0, 0, 0, TimeSpan.Zero);

		[Obsolete("Use EpochTime")]
		public static readonly DateTimeOffset EpocTime = EpochTime;
	}
	public static class EnumExtensions
	{
		public static bool HasFlag(this Enum keys, Enum flag)
		{
			if (keys.GetType() != flag.GetType())
			{
				throw new ArgumentException("Type Mismatch");
			}
			return (Convert.ToUInt64(keys) & Convert.ToUInt64(flag)) != 0;
		}
	}
	public static class StringExtensions
	{
		public static JsonNode ParseAsJson(this string json)
		{
			return JsonParser.Parse(json);
		}

		public static JsonNode ParseAsJson(this Utf8String json)
		{
			return JsonParser.Parse(json);
		}

		public static JsonNode ParseAsJson(this byte[] bytes)
		{
			return JsonParser.Parse(new Utf8String(bytes));
		}

		public static JsonNode ParseAsJson(this ArraySegment<byte> bytes)
		{
			return JsonParser.Parse(new Utf8String(bytes));
		}
	}
	public static class TypeExtensions
	{
		public static bool GetIsGenericList(this Type t)
		{
			if (t == null)
			{
				return false;
			}
			if (t.IsGenericType)
			{
				return t.GetGenericTypeDefinition() == typeof(List<>);
			}
			return false;
		}

		public static bool GetIsGenericDictionary(this Type t)
		{
			if (t == null)
			{
				return false;
			}
			if (t.IsGenericType)
			{
				if (t.GetGenericTypeDefinition() == typeof(Dictionary<, >))
				{
					return t.GetGenericArguments().FirstOrDefault() == typeof(string);
				}
				return false;
			}
			return false;
		}
	}
	public static class FormatterExtensions
	{
		public static ArraySegment<byte> GetStoreBytes(this IFormatter f)
		{
			return f.GetStore().Bytes;
		}

		public static void Key(this IFormatter f, string x)
		{
			f.Key(Utf8String.From(x));
		}

		public static void Value(this IFormatter f, IEnumerable<byte> raw, int count)
		{
			f.Value(new ArraySegment<byte>(raw.Take(count).ToArray()));
		}

		public static void Value(this IFormatter f, byte[] bytes)
		{
			f.Value(new ArraySegment<byte>(bytes));
		}

		public static void Value(this IFormatter f, Vector2 v)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			f.BeginMap(2);
			f.Key("x");
			f.Value(v.x);
			f.Key("y");
			f.Value(v.y);
			f.EndMap();
		}

		public static void Value(this IFormatter f, Vector3 v)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			f.BeginMap(3);
			f.Key("x");
			f.Value(v.x);
			f.Key("y");
			f.Value(v.y);
			f.Key("z");
			f.Value(v.z);
			f.EndMap();
		}

		public static void Value(this IFormatter f, Vector4 v)
		{
			//IL_0013: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			f.BeginMap(4);
			f.Key("x");
			f.Value(v.x);
			f.Key("y");
			f.Value(v.y);
			f.Key("z");
			f.Value(v.z);
			f.Key("w");
			f.Value(v.w);
			f.EndMap();
		}

		private static MethodInfo GetMethod<T>(Expression<Func<T>> expression)
		{
			return typeof(FormatterExtensions).GetMethod("Serialize").MakeGenericMethod(typeof(T));
		}
	}
	public interface IFileSystemAccessor
	{
		string ReadAllText();

		string ReadAllText(string relativePath);

		IFileSystemAccessor Get(string relativePath);
	}
	public class FileSystemAccessor : IFileSystemAccessor
	{
		private string m_path;

		private string m_baseDir;

		public FileSystemAccessor(string path)
		{
			m_path = path;
			if (Directory.Exists(path))
			{
				m_baseDir = path;
			}
			else
			{
				m_baseDir = Path.GetDirectoryName(path);
			}
		}

		public override string ToString()
		{
			return "<" + Path.GetFileName(m_path) + ">";
		}

		public string ReadAllText()
		{
			return File.ReadAllText(m_path, Encoding.UTF8);
		}

		public string ReadAllText(string relativePath)
		{
			return File.ReadAllText(Path.Combine(m_baseDir, relativePath), Encoding.UTF8);
		}

		public IFileSystemAccessor Get(string relativePath)
		{
			return new FileSystemAccessor(Path.Combine(m_baseDir, relativePath));
		}
	}
	public interface IFormatter
	{
		IStore GetStore();

		void Clear();

		void BeginList(int n);

		void EndList();

		void BeginMap(int n);

		void EndMap();

		void Key(Utf8String x);

		void Null();

		void Value(Utf8String x);

		void Value(string x);

		void Value(ArraySegment<byte> bytes);

		void Value(bool x);

		void Value(byte x);

		void Value(ushort x);

		void Value(uint x);

		void Value(ulong x);

		void Value(sbyte x);

		void Value(short x);

		void Value(int x);

		void Value(long x);

		void Value(float x);

		void Value(double x);

		void Value(DateTimeOffset x);
	}
	public static class ByteUnion
	{
		[StructLayout(LayoutKind.Explicit)]
		public struct WordValue
		{
			[FieldOffset(0)]
			public short Signed;

			[FieldOffset(0)]
			public ushort Unsigned;

			[FieldOffset(0)]
			public byte Byte0;

			[FieldOffset(1)]
			public byte Byte1;

			public WordValue HostToNetworkOrder()
			{
				WordValue result = default(WordValue);
				result.Signed = IPAddress.HostToNetworkOrder(Signed);
				return result;
			}

			public static WordValue Create(short value)
			{
				WordValue result = default(WordValue);
				result.Signed = value;
				return result;
			}

			public static WordValue Create(ushort value)
			{
				WordValue result = default(WordValue);
				result.Unsigned = value;
				return result;
			}
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct DWordValue
		{
			[FieldOffset(0)]
			public int Signed;

			[FieldOffset(0)]
			public uint Unsigned;

			[FieldOffset(0)]
			public float Float;

			[FieldOffset(0)]
			public byte Byte0;

			[FieldOffset(1)]
			public byte Byte1;

			[FieldOffset(2)]
			public byte Byte2;

			[FieldOffset(3)]
			public byte Byte3;

			public DWordValue HostToNetworkOrder()
			{
				DWordValue result = default(DWordValue);
				result.Signed = IPAddress.HostToNetworkOrder(Signed);
				return result;
			}

			public static DWordValue Create(int value)
			{
				DWordValue result = default(DWordValue);
				result.Signed = value;
				return result;
			}

			public static DWordValue Create(uint value)
			{
				DWordValue result = default(DWordValue);
				result.Unsigned = value;
				return result;
			}

			public static DWordValue Create(float value)
			{
				DWordValue result = default(DWordValue);
				result.Float = value;
				return result;
			}
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct QWordValue
		{
			[FieldOffset(0)]
			public long Signed;

			[FieldOffset(0)]
			public ulong Unsigned;

			[FieldOffset(0)]
			public double Float;

			[FieldOffset(0)]
			public byte Byte0;

			[FieldOffset(1)]
			public byte Byte1;

			[FieldOffset(2)]
			public byte Byte2;

			[FieldOffset(3)]
			public byte Byte3;

			[FieldOffset(4)]
			public byte Byte4;

			[FieldOffset(5)]
			public byte Byte5;

			[FieldOffset(6)]
			public byte Byte6;

			[FieldOffset(7)]
			public byte Byte7;

			public QWordValue HostToNetworkOrder()
			{
				if (BitConverter.IsLittleEndian)
				{
					QWordValue result = default(QWordValue);
					result.Byte0 = Byte7;
					result.Byte1 = Byte6;
					result.Byte2 = Byte5;
					result.Byte3 = Byte4;
					result.Byte4 = Byte3;
					result.Byte5 = Byte2;
					result.Byte6 = Byte1;
					result.Byte7 = Byte0;
					return result;
				}
				return this;
			}

			public static QWordValue Create(long value)
			{
				QWordValue result = default(QWordValue);
				result.Signed = value;
				return result;
			}

			public static QWordValue Create(ulong value)
			{
				QWordValue result = default(QWordValue);
				result.Unsigned = value;
				return result;
			}

			public static QWordValue Create(double value)
			{
				QWordValue result = default(QWordValue);
				result.Float = value;
				return result;
			}
		}
	}
	public class BytesStore : IStore
	{
		private byte[] m_buffer;

		private int m_pos;

		private char[] m_c = new char[1];

		public ArraySegment<byte> Bytes => new ArraySegment<byte>(m_buffer, 0, m_pos);

		public BytesStore()
			: this(64)
		{
		}

		public BytesStore(int size)
			: this(new byte[size])
		{
		}

		public BytesStore(byte[] buffer)
		{
			m_buffer = buffer;
		}

		private void Require(int size)
		{
			if (m_buffer == null)
			{
				m_buffer = new byte[Math.Max(size, 1024)];
			}
			else if (m_pos + size >= m_buffer.Length)
			{
				int num = Math.Max(m_pos + size, m_buffer.Length * 2);
				byte[] buffer = m_buffer;
				m_buffer = new byte[num];
				Buffer.BlockCopy(buffer, 0, m_buffer, 0, m_pos);
			}
		}

		public void Clear()
		{
			m_pos = 0;
		}

		public void Write(char c)
		{
			if (c <= '\u007f')
			{
				Require(1);
				m_buffer[m_pos++] = (byte)c;
				return;
			}
			Require(3);
			m_c[0] = c;
			int bytes = Encoding.UTF8.GetBytes(m_c, 0, 1, m_buffer, m_pos);
			m_pos += bytes;
		}

		public void Write(string src)
		{
			int byteCount = Encoding.UTF8.GetByteCount(src);
			Require(byteCount);
			int bytes = Encoding.UTF8.GetBytes(src, 0, src.Length, m_buffer, m_pos);
			if (byteCount != bytes)
			{
				throw new Exception();
			}
			m_pos += bytes;
		}

		public void Write(ArraySegment<byte> bytes)
		{
			Require(bytes.Count);
			Array.Copy(bytes.Array, bytes.Offset, m_buffer, m_pos, bytes.Count);
			m_pos += bytes.Count;
		}

		public void Write(sbyte value)
		{
			Require(Marshal.SizeOf(value));
			m_buffer[m_pos++] = (byte)value;
		}

		public void Write(byte value)
		{
			Require(Marshal.SizeOf(value));
			m_buffer[m_pos++] = value;
		}

		public void WriteLittleEndian(short value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.WordValue wordValue = ByteUnion.WordValue.Create(value);
			m_buffer[m_pos++] = wordValue.Byte0;
			m_buffer[m_pos++] = wordValue.Byte1;
		}

		public void WriteLittleEndian(int value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.DWordValue dWordValue = ByteUnion.DWordValue.Create(value);
			m_buffer[m_pos++] = dWordValue.Byte0;
			m_buffer[m_pos++] = dWordValue.Byte1;
			m_buffer[m_pos++] = dWordValue.Byte2;
			m_buffer[m_pos++] = dWordValue.Byte3;
		}

		public void WriteLittleEndian(long value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.QWordValue qWordValue = ByteUnion.QWordValue.Create(value);
			m_buffer[m_pos++] = qWordValue.Byte0;
			m_buffer[m_pos++] = qWordValue.Byte1;
			m_buffer[m_pos++] = qWordValue.Byte2;
			m_buffer[m_pos++] = qWordValue.Byte3;
			m_buffer[m_pos++] = qWordValue.Byte4;
			m_buffer[m_pos++] = qWordValue.Byte5;
			m_buffer[m_pos++] = qWordValue.Byte6;
			m_buffer[m_pos++] = qWordValue.Byte7;
		}

		public void WriteLittleEndian(ushort value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.WordValue wordValue = ByteUnion.WordValue.Create(value);
			m_buffer[m_pos++] = wordValue.Byte0;
			m_buffer[m_pos++] = wordValue.Byte1;
		}

		public void WriteLittleEndian(uint value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.DWordValue dWordValue = ByteUnion.DWordValue.Create(value);
			m_buffer[m_pos++] = dWordValue.Byte0;
			m_buffer[m_pos++] = dWordValue.Byte1;
			m_buffer[m_pos++] = dWordValue.Byte2;
			m_buffer[m_pos++] = dWordValue.Byte3;
		}

		public void WriteLittleEndian(ulong value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.QWordValue qWordValue = ByteUnion.QWordValue.Create(value);
			m_buffer[m_pos++] = qWordValue.Byte0;
			m_buffer[m_pos++] = qWordValue.Byte1;
			m_buffer[m_pos++] = qWordValue.Byte2;
			m_buffer[m_pos++] = qWordValue.Byte3;
			m_buffer[m_pos++] = qWordValue.Byte4;
			m_buffer[m_pos++] = qWordValue.Byte5;
			m_buffer[m_pos++] = qWordValue.Byte6;
			m_buffer[m_pos++] = qWordValue.Byte7;
		}

		public void WriteLittleEndian(float value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.DWordValue dWordValue = ByteUnion.DWordValue.Create(value);
			m_buffer[m_pos++] = dWordValue.Byte0;
			m_buffer[m_pos++] = dWordValue.Byte1;
			m_buffer[m_pos++] = dWordValue.Byte2;
			m_buffer[m_pos++] = dWordValue.Byte3;
		}

		public void WriteLittleEndian(double value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.QWordValue qWordValue = ByteUnion.QWordValue.Create(value);
			m_buffer[m_pos++] = qWordValue.Byte0;
			m_buffer[m_pos++] = qWordValue.Byte1;
			m_buffer[m_pos++] = qWordValue.Byte2;
			m_buffer[m_pos++] = qWordValue.Byte3;
			m_buffer[m_pos++] = qWordValue.Byte4;
			m_buffer[m_pos++] = qWordValue.Byte5;
			m_buffer[m_pos++] = qWordValue.Byte6;
			m_buffer[m_pos++] = qWordValue.Byte7;
		}

		public void WriteBigEndian(short value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.WordValue wordValue = ByteUnion.WordValue.Create(value);
			m_buffer[m_pos++] = wordValue.Byte1;
			m_buffer[m_pos++] = wordValue.Byte0;
		}

		public void WriteBigEndian(int value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.DWordValue dWordValue = ByteUnion.DWordValue.Create(value);
			m_buffer[m_pos++] = dWordValue.Byte3;
			m_buffer[m_pos++] = dWordValue.Byte2;
			m_buffer[m_pos++] = dWordValue.Byte1;
			m_buffer[m_pos++] = dWordValue.Byte0;
		}

		public void WriteBigEndian(long value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.QWordValue qWordValue = ByteUnion.QWordValue.Create(value);
			m_buffer[m_pos++] = qWordValue.Byte7;
			m_buffer[m_pos++] = qWordValue.Byte6;
			m_buffer[m_pos++] = qWordValue.Byte5;
			m_buffer[m_pos++] = qWordValue.Byte4;
			m_buffer[m_pos++] = qWordValue.Byte3;
			m_buffer[m_pos++] = qWordValue.Byte2;
			m_buffer[m_pos++] = qWordValue.Byte1;
			m_buffer[m_pos++] = qWordValue.Byte0;
		}

		public void WriteBigEndian(ushort value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.WordValue wordValue = ByteUnion.WordValue.Create(value);
			m_buffer[m_pos++] = wordValue.Byte1;
			m_buffer[m_pos++] = wordValue.Byte0;
		}

		public void WriteBigEndian(uint value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.DWordValue dWordValue = ByteUnion.DWordValue.Create(value);
			m_buffer[m_pos++] = dWordValue.Byte3;
			m_buffer[m_pos++] = dWordValue.Byte2;
			m_buffer[m_pos++] = dWordValue.Byte1;
			m_buffer[m_pos++] = dWordValue.Byte0;
		}

		public void WriteBigEndian(ulong value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.QWordValue qWordValue = ByteUnion.QWordValue.Create(value);
			m_buffer[m_pos++] = qWordValue.Byte7;
			m_buffer[m_pos++] = qWordValue.Byte6;
			m_buffer[m_pos++] = qWordValue.Byte5;
			m_buffer[m_pos++] = qWordValue.Byte4;
			m_buffer[m_pos++] = qWordValue.Byte3;
			m_buffer[m_pos++] = qWordValue.Byte2;
			m_buffer[m_pos++] = qWordValue.Byte1;
			m_buffer[m_pos++] = qWordValue.Byte0;
		}

		public void WriteBigEndian(float value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.DWordValue dWordValue = ByteUnion.DWordValue.Create(value);
			m_buffer[m_pos++] = dWordValue.Byte3;
			m_buffer[m_pos++] = dWordValue.Byte2;
			m_buffer[m_pos++] = dWordValue.Byte1;
			m_buffer[m_pos++] = dWordValue.Byte0;
		}

		public void WriteBigEndian(double value)
		{
			Require(Marshal.SizeOf(value));
			ByteUnion.QWordValue qWordValue = ByteUnion.QWordValue.Create(value);
			m_buffer[m_pos++] = qWordValue.Byte7;
			m_buffer[m_pos++] = qWordValue.Byte6;
			m_buffer[m_pos++] = qWordValue.Byte5;
			m_buffer[m_pos++] = qWordValue.Byte4;
			m_buffer[m_pos++] = qWordValue.Byte3;
			m_buffer[m_pos++] = qWordValue.Byte2;
			m_buffer[m_pos++] = qWordValue.Byte1;
			m_buffer[m_pos++] = qWordValue.Byte0;
		}
	}
	public interface IStore
	{
		ArraySegment<byte> Bytes { get; }

		void Clear();

		void Write(byte value);

		void Write(sbyte value);

		void WriteBigEndian(ushort value);

		void WriteBigEndian(uint value);

		void WriteBigEndian(ulong value);

		void WriteBigEndian(short value);

		void WriteBigEndian(int value);

		void WriteBigEndian(long value);

		void WriteBigEndian(float value);

		void WriteBigEndian(double value);

		void WriteLittleEndian(ushort value);

		void WriteLittleEndian(uint value);

		void WriteLittleEndian(ulong value);

		void WriteLittleEndian(short value);

		void WriteLittleEndian(int value);

		void WriteLittleEndian(long value);

		void WriteLittleEndian(float value);

		void WriteLittleEndian(double value);

		void Write(ArraySegment<byte> bytes);

		void Write(string src);

		void Write(char c);
	}
	public static class IStoreExtensions
	{
		public static void WriteValues(this IStore s, params byte[] bytes)
		{
			s.Write(new ArraySegment<byte>(bytes));
		}

		public static void Write(this IStore s, byte[] bytes)
		{
			s.Write(new ArraySegment<byte>(bytes));
		}

		public static void Write(this IStore s, IEnumerable<byte> bytes)
		{
			s.Write(new ArraySegment<byte>(bytes.ToArray()));
		}

		public static Utf8String ToUtf8String(this IStore s)
		{
			return new Utf8String(s.Bytes);
		}
	}
	public class StreamStore : IStore
	{
		private Stream m_s;

		private BinaryWriter m_w;

		public ArraySegment<byte> Bytes
		{
			get
			{
				if (!(m_s is MemoryStream memoryStream))
				{
					throw new NotImplementedException();
				}
				return new ArraySegment<byte>(memoryStream.GetBuffer(), 0, (int)memoryStream.Position);
			}
		}

		public StreamStore(Stream s)
		{
			m_s = s;
			m_w = new BinaryWriter(m_s);
		}

		public void Clear()
		{
			m_s.SetLength(0L);
		}

		public void Write(sbyte value)
		{
			m_w.Write(value);
		}

		public void Write(byte value)
		{
			m_w.Write(value);
		}

		public void Write(char c)
		{
			m_w.Write(c);
		}

		public void Write(string src)
		{
			m_w.Write(Encoding.UTF8.GetBytes(src));
		}

		public void Write(ArraySegment<byte> bytes)
		{
			m_w.Write(bytes.Array, bytes.Offset, bytes.Count);
		}

		public void WriteBigEndian(int value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(float value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(double value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(long value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(short value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(uint value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(ulong value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(ushort value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(long value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(uint value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(short value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(ulong value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(double value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(float value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(int value)
		{
			m_w.Write(value);
		}

		public void WriteLittleEndian(ushort value)
		{
			m_w.Write(value);
		}
	}
	public class StringBuilderStore : IStore
	{
		private StringBuilder m_sb;

		public ArraySegment<byte> Bytes => new ArraySegment<byte>(Encoding.UTF8.GetBytes(Buffer()));

		public StringBuilderStore(StringBuilder sb)
		{
			m_sb = sb;
		}

		public string Buffer()
		{
			return m_sb.ToString();
		}

		public void Clear()
		{
			m_sb.Length = 0;
		}

		public void Write(ArraySegment<byte> bytes)
		{
			string @string = Encoding.UTF8.GetString(bytes.Array, bytes.Offset, bytes.Count);
			Write(@string);
		}

		public void Write(byte value)
		{
			throw new NotImplementedException();
		}

		public void Write(sbyte value)
		{
			throw new NotImplementedException();
		}

		public void Write(IEnumerable<char> src)
		{
			foreach (char item in src)
			{
				m_sb.Append(item);
			}
		}

		public void Write(char c)
		{
			m_sb.Append(c);
		}

		public void Write(string src)
		{
			m_sb.Append(src);
		}

		public void WriteBigEndian(int value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(float value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(double value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(long value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(ulong value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(short value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(uint value)
		{
			throw new NotImplementedException();
		}

		public void WriteBigEndian(ushort value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(double value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(short value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(int value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(float value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(long value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(ulong value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(uint value)
		{
			throw new NotImplementedException();
		}

		public void WriteLittleEndian(ushort value)
		{
			throw new NotImplementedException();
		}
	}
	public enum JsonDiffType
	{
		KeyAdded,
		KeyRemoved,
		ValueChanged
	}
	public struct JsonDiff
	{
		public JsonPointer Path;

		public JsonDiffType DiffType;

		public string Msg;

		public static JsonDiff Create(JsonNode node, JsonDiffType diffType, string msg)
		{
			JsonDiff result = default(JsonDiff);
			result.Path = JsonPointer.Create(node);
			result.DiffType = diffType;
			result.Msg = msg;
			return result;
		}

		public override string ToString()
		{
			return DiffType switch
			{
				JsonDiffType.KeyAdded => $"+ {Path}: {Msg}", 
				JsonDiffType.KeyRemoved => $"- {Path}: {Msg}", 
				JsonDiffType.ValueChanged => $"= {Path}: {Msg}", 
				_ => throw new NotImplementedException(), 
			};
		}
	}
	public class JsonFormatter : IFormatter
	{
		private enum Current
		{
			ROOT,
			ARRAY,
			OBJECT
		}

		private class Context
		{
			public Current Current;

			public int Count;

			public Context(Current current)
			{
				Current = current;
				Count = 0;
			}
		}

		private IStore m_w;

		private Stack<Context> m_stack = new Stack<Context>();

		private string m_indent;

		private string m_colon;

		private static Utf8String s_null = Utf8String.From("null");

		private static Utf8String s_true = Utf8String.From("true");

		private static Utf8String s_false = Utf8String.From("false");

		protected IStore Store => m_w;

		private void Indent()
		{
			if (!string.IsNullOrEmpty(m_indent))
			{
				m_w.Write('\n');
				for (int i = 0; i < m_stack.Count - 1; i++)
				{
					m_w.Write(m_indent);
				}
			}
		}

		public JsonFormatter(int indent = 0)
			: this(new BytesStore(128), indent)
		{
		}

		public JsonFormatter(IStore w, int indent = 0)
		{
			m_w = w;
			m_stack.Push(new Context(Current.ROOT));
			m_indent = new string((from x in Enumerable.Range(0, indent)
				select ' ').ToArray());
			m_colon = ((indent == 0) ? ":" : ": ");
		}

		public override string ToString()
		{
			ArraySegment<byte> storeBytes = this.GetStoreBytes();
			return Encoding.UTF8.GetString(storeBytes.Array, storeBytes.Offset, storeBytes.Count);
		}

		public IStore GetStore()
		{
			return m_w;
		}

		public void Clear()
		{
			m_w.Clear();
			m_stack.Clear();
			m_stack.Push(new Context(Current.ROOT));
		}

		protected void CommaCheck(bool isKey = false)
		{
			Context context = m_stack.Pop();
			switch (context.Current)
			{
			case Current.ROOT:
				if (context.Count != 0)
				{
					throw new FormatterException("multiple root value");
				}
				break;
			case Current.ARRAY:
				if (context.Count != 0)
				{
					m_w.Write(',');
				}
				break;
			case Current.OBJECT:
				if (context.Count % 2 == 0)
				{
					if (!isKey)
					{
						throw new FormatterException("key expected");
					}
					if (context.Count != 0)
					{
						m_w.Write(',');
					}
				}
				else if (isKey)
				{
					throw new FormatterException("key not expected");
				}
				break;
			}
			context.Count++;
			m_stack.Push(context);
		}

		public void Null()
		{
			CommaCheck();
			m_w.Write(s_null.Bytes);
		}

		public void BeginList(int _ = 0)
		{
			CommaCheck();
			m_w.Write('[');
			m_stack.Push(new Context(Current.ARRAY));
		}

		public void EndList()
		{
			if (m_stack.Peek().Current != Current.ARRAY)
			{
				throw new InvalidOperationException();
			}
			m_w.Write(']');
			m_stack.Pop();
		}

		public void BeginMap(int _ = 0)
		{
			CommaCheck();
			m_w.Write('{');
			m_stack.Push(new Context(Current.OBJECT));
		}

		public void EndMap()
		{
			if (m_stack.Peek().Current != Current.OBJECT)
			{
				throw new InvalidOperationException();
			}
			m_stack.Pop();
			Indent();
			m_w.Write('}');
		}

		public void Key(Utf8String key)
		{
			_Value(key, isKey: true);
			m_w.Write(m_colon);
		}

		public void Value(string x)
		{
			Value(Utf8String.From(x));
		}

		public void Value(Utf8String key)
		{
			_Value(key, isKey: false);
		}

		private void _Value(Utf8String key, bool isKey)
		{
			CommaCheck(isKey);
			if (isKey)
			{
				Indent();
			}
			JsonString.Quote(key, m_w);
		}

		public void Value(bool x)
		{
			CommaCheck();
			m_w.Write(x ? s_true.Bytes : s_false.Bytes);
		}

		public void Value(sbyte x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(short x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(int x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(long x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(byte x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(ushort x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(uint x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(ulong x)
		{
			CommaCheck();
			m_w.Write(x.ToString());
		}

		public void Value(float x)
		{
			CommaCheck();
			m_w.Write(x.ToString("R", CultureInfo.InvariantCulture));
		}

		public void Value(double x)
		{
			CommaCheck();
			m_w.Write(x.ToString("R", CultureInfo.InvariantCulture));
		}

		public void Value(ArraySegment<byte> x)
		{
			CommaCheck();
			m_w.Write('"');
			m_w.Write(Convert.ToBase64String(x.Array, x.Offset, x.Count));
			m_w.Write('"');
		}

		public void Raw(ArraySegment<byte> x)
		{
			CommaCheck();
			m_w.Write(x);
		}

		public void Value(DateTimeOffset x)
		{
			Value(x.ToString("yyyy-MM-ddTHH:mm:ssZ"));
		}

		public void Value(JsonNode node)
		{
			CommaCheck();
			m_w.Write(node.Value.Bytes);
		}
	}
	public static class JsonParser
	{
		private static ValueNodeType GetValueType(Utf8String segment)
		{
			switch (char.ToLower((char)segment[0]))
			{
			case '{':
				return ValueNodeType.Object;
			case '[':
				return ValueNodeType.Array;
			case '"':
				return ValueNodeType.String;
			case 't':
				return ValueNodeType.Boolean;
			case 'f':
				return ValueNodeType.Boolean;
			case 'n':
				if (segment.ByteLength >= 2 && char.ToLower((char)segment[1]) == 'a')
				{
					return ValueNodeType.NaN;
				}
				return ValueNodeType.Null;
			case 'i':
				return ValueNodeType.Infinity;
			case '-':
				if (segment.ByteLength >= 2 && char.ToLower((char)segment[1]) == 'i')
				{
					return ValueNodeType.MinusInfinity;
				}
				goto case '0';
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
				if (segment.IsInt)
				{
					return ValueNodeType.Integer;
				}
				return ValueNodeType.Number;
			default:
			{
				Utf8String utf8String = segment;
				throw new ParserException(utf8String.ToString() + " is not valid json start");
			}
			}
		}

		private static JsonNode ParsePrimitive(JsonNode tree, Utf8String segment, ValueNodeType valueType)
		{
			int i;
			for (i = 1; i < segment.ByteLength && !char.IsWhiteSpace((char)segment[i]) && segment[i] != 125 && segment[i] != 93 && segment[i] != 44 && segment[i] != 58; i++)
			{
			}
			return tree.AddValue(segment.Subbytes(0, i).Bytes, valueType);
		}

		private static JsonNode ParseString(JsonNode tree, Utf8String segment)
		{
			if (segment.TrySearchAscii(34, 1, out var pos))
			{
				return tree.AddValue(segment.Subbytes(0, pos + 1).Bytes, ValueNodeType.String);
			}
			Utf8String utf8String = segment;
			throw new ParserException("no close string: " + utf8String.ToString());
		}

		private static JsonNode ParseArray(JsonNode tree, Utf8String segment)
		{
			JsonNode jsonNode = tree.AddValue(segment.Bytes, ValueNodeType.Array);
			char c = ']';
			bool flag = true;
			Utf8String src = segment.Subbytes(1);
			while (true)
			{
				if (!src.TrySearchByte((byte x) => !char.IsWhiteSpace((char)x), out var pos))
				{
					throw new ParserException("no white space expected");
				}
				src = src.Subbytes(pos);
				if (src[0] == c)
				{
					break;
				}
				if (flag)
				{
					flag = false;
				}
				else
				{
					if (!src.TrySearchByte((byte x) => x == 44, out var pos2))
					{
						throw new ParserException("',' expected");
					}
					src = src.Subbytes(pos2 + 1);
				}
				if (!src.TrySearchByte((byte x) => !char.IsWhiteSpace((char)x), out var pos3))
				{
					throw new ParserException("not whitespace expected");
				}
				src = src.Subbytes(pos3);
				src = src.Subbytes(Parse(jsonNode, src).Value.Segment.ByteLength);
			}
			ArraySegment<byte> bytes = src.Bytes;
			int num = bytes.Offset + 1;
			bytes = segment.Bytes;
			int valueBytesCount = num - bytes.Offset;
			jsonNode.SetValueBytesCount(valueBytesCount);
			return jsonNode;
		}

		private static JsonNode ParseObject(JsonNode tree, Utf8String segment)
		{
			JsonNode jsonNode = tree.AddValue(segment.Bytes, ValueNodeType.Object);
			char c = '}';
			bool flag = true;
			Utf8String src = segment.Subbytes(1);
			while (true)
			{
				if (!src.TrySearchByte((byte x) => !char.IsWhiteSpace((char)x), out var pos))
				{
					throw new ParserException("no white space expected");
				}
				src = src.Subbytes(pos);
				if (src[0] == c)
				{
					break;
				}
				if (flag)
				{
					flag = false;
				}
				else
				{
					if (!src.TrySearchByte((byte x) => x == 44, out var pos2))
					{
						throw new ParserException("',' expected");
					}
					src = src.Subbytes(pos2 + 1);
				}
				if (!src.TrySearchByte((byte x) => !char.IsWhiteSpace((char)x), out var pos3))
				{
					throw new ParserException("not whitespace expected");
				}
				src = src.Subbytes(pos3);
				JsonNode self = Parse(jsonNode, src);
				if (!self.IsString())
				{
					throw new ParserException("object key must string: " + self.Value.Segment.ToString());
				}
				src = src.Subbytes(self.Value.Segment.ByteLength);
				if (!src.TrySearchByte((byte x) => x == 58, out var pos4))
				{
					throw new ParserException(": is not found");
				}
				src = src.Subbytes(pos4 + 1);
				if (!src.TrySearchByte((byte x) => !char.IsWhiteSpace((char)x), out var pos5))
				{
					throw new ParserException("not whitespace expected");
				}
				src = src.Subbytes(pos5);
				src = src.Subbytes(Parse(jsonNode, src).Value.Segment.ByteLength);
			}
			ArraySegment<byte> bytes = src.Bytes;
			int num = bytes.Offset + 1;
			bytes = segment.Bytes;
			int valueBytesCount = num - bytes.Offset;
			jsonNode.SetValueBytesCount(valueBytesCount);
			return jsonNode;
		}

		public static JsonNode Parse(JsonNode tree, Utf8String segment)
		{
			if (!segment.TrySearchByte((byte x) => !char.IsWhiteSpace((char)x), out var pos))
			{
				throw new ParserException("only whitespace");
			}
			segment = segment.Subbytes(pos);
			ValueNodeType valueType = GetValueType(segment);
			switch (valueType)
			{
			case ValueNodeType.Null:
			case ValueNodeType.Boolean:
			case ValueNodeType.Integer:
			case ValueNodeType.Number:
			case ValueNodeType.NaN:
			case ValueNodeType.Infinity:
			case ValueNodeType.MinusInfinity:
				return ParsePrimitive(tree, segment, valueType);
			case ValueNodeType.String:
				return ParseString(tree, segment);
			case ValueNodeType.Array:
				return ParseArray(tree, segment);
			case ValueNodeType.Object:
				return ParseObject(tree, segment);
			default:
				throw new NotImplementedException();
			}
		}

		public static JsonNode Parse(string json)
		{
			return Parse(Utf8String.From(json));
		}

		public static JsonNode Parse(Utf8String json)
		{
			return Parse(default(JsonNode), json);
		}
	}
	public struct JsonPointer
	{
		public ArraySegment<Utf8String> Path { get; private set; }

		public int Count => Path.Count;

		public Utf8String this[int index] => Path.Array[Path.Offset + index];

		public JsonPointer Unshift()
		{
			JsonPointer result = default(JsonPointer);
			result.Path = new ArraySegment<Utf8String>(Path.Array, Path.Offset + 1, Path.Count - 1);
			return result;
		}

		public static JsonPointer Create(JsonNode node)
		{
			JsonPointer result = default(JsonPointer);
			result.Path = new ArraySegment<Utf8String>((from x in node.Path().Skip(1)
				select GetKeyFromParent(x)).ToArray());
			return result;
		}

		public JsonPointer(Utf8String pointer)
		{
			this = default(JsonPointer);
			if (!pointer.TrySearchAscii(47, 0, out var pos))
			{
				throw new ArgumentException();
			}
			if (pos != 0)
			{
				throw new ArgumentException();
			}
			Utf8String[] array = pointer.Split(47).ToArray();
			Path = new ArraySegment<Utf8String>(array, 1, array.Length - 1);
		}

		public override string ToString()
		{
			if (Path.Count == 0)
			{
				return "/";
			}
			StringBuilder stringBuilder = new StringBuilder();
			int num = Path.Offset + Path.Count;
			for (int i = Path.Offset; i < num; i++)
			{
				stringBuilder.Append('/');
				stringBuilder.Append(Path.Array[i]);
			}
			return stringBuilder.ToString();
		}

		private static Utf8String GetKeyFromParent(JsonNode json)
		{
			JsonNode parent = json.Parent;
			if (parent.IsArray())
			{
				return Utf8String.From(parent.IndexOf(json));
			}
			if (parent.IsMap())
			{
				return parent.KeyOf(json);
			}
			throw new NotImplementedException();
		}
	}
	public static class JsonString
	{
		public static void Escape(string s, IStore w)
		{
			if (string.IsNullOrEmpty(s))
			{
				return;
			}
			IEnumerator<char> enumerator = s.ToCharArray().Cast<char>().GetEnumerator();
			while (enumerator.MoveNext())
			{
				switch (enumerator.Current)
				{
				case '"':
				case '/':
				case '\\':
					w.Write('\\');
					w.Write(enumerator.Current);
					break;
				case '\b':
					w.Write('\\');
					w.Write('b');
					break;
				case '\f':
					w.Write('\\');
					w.Write('f');
					break;
				case '\n':
					w.Write('\\');
					w.Write('n');
					break;
				case '\r':
					w.Write('\\');
					w.Write('r');
					break;
				case '\t':
					w.Write('\\');
					w.Write('t');
					break;
				default:
					w.Write(enumerator.Current);
					break;
				}
			}
		}

		public static void Escape(Utf8String s, IStore w)
		{
			if (s.IsEmpty)
			{
				return;
			}
			Utf8Iterator iterator = s.GetIterator();
			while (iterator.MoveNext())
			{
				switch (iterator.CurrentByteLength)
				{
				case 1:
				{
					byte current = iterator.Current;
					switch (current)
					{
					case 34:
					case 47:
					case 92:
						w.Write((byte)92);
						w.Write(current);
						break;
					case 8:
						w.Write((byte)92);
						w.Write((byte)98);
						break;
					case 12:
						w.Write((byte)92);
						w.Write((byte)102);
						break;
					case 10:
						w.Write((byte)92);
						w.Write((byte)110);
						break;
					case 13:
						w.Write((byte)92);
						w.Write((byte)114);
						break;
					case 9:
						w.Write((byte)92);
						w.Write((byte)116);
						break;
					default:
						w.Write(current);
						break;
					}
					break;
				}
				case 2:
					w.Write(iterator.Current);
					w.Write(iterator.Second);
					break;
				case 3:
					w.Write(iterator.Current);
					w.Write(iterator.Second);
					w.Write(iterator.Third);
					break;
				case 4:
					w.Write(iterator.Current);
					w.Write(iterator.Second);
					w.Write(iterator.Third);
					w.Write(iterator.Fourth);
					break;
				default:
					throw new ParserException("invalid utf8");
				}
			}
		}

		public static string Escape(string s)
		{
			StringBuilder stringBuilder = new StringBuilder();
			Escape(s, new StringBuilderStore(stringBuilder));
			return stringBuilder.ToString();
		}

		public static void Quote(string s, IStore w)
		{
			w.Write('"');
			Escape(s, w);
			w.Write('"');
		}

		public static void Quote(Utf8String s, IStore w)
		{
			w.Write((byte)34);
			Escape(s, w);
			w.Write((byte)34);
		}

		public static string Quote(string s)
		{
			StringBuilder stringBuilder = new StringBuilder();
			Quote(s, new StringBuilderStore(stringBuilder));
			return stringBuilder.ToString();
		}

		public static Utf8String Quote(Utf8String s)
		{
			BytesStore bytesStore = new BytesStore(s.ByteLength);
			Quote(s, bytesStore);
			return new Utf8String(bytesStore.Bytes);
		}

		private static byte CheckHex(int b)
		{
			switch ((char)(ushort)b)
			{
			case '0':
				return 0;
			case '1':
				return 1;
			case '2':
				return 2;
			case '3':
				return 3;
			case '4':
				return 4;
			case '5':
				return 5;
			case '6':
				return 6;
			case '7':
				return 7;
			case '8':
				return 8;
			case '9':
				return 9;
			case 'A':
			case 'a':
				return 10;
			case 'B':
			case 'b':
				return 11;
			case 'C':
			case 'c':
				return 12;
			case 'D':
			case 'd':
				return 13;
			case 'E':
			case 'e':
				return 14;
			case 'F':
			case 'f':
				return 15;
			default:
				throw new ArgumentOutOfRangeException();
			}
		}

		public static int Unescape(string src, IStore w)
		{
			int writeCount = 0;
			Action<char> action = delegate(char c)
			{
				if (w != null)
				{
					w.Write(c);
				}
				int num5 = writeCount + 1;
				writeCount = num5;
			};
			int num = 0;
			int num2 = src.Length - 1;
			while (num < num2)
			{
				if (src[num] == '\\')
				{
					char c2 = src[num + 1];
					switch (c2)
					{
					case '"':
					case '/':
					case '\\':
						action(c2);
						num += 2;
						continue;
					case 'b':
						action('\b');
						num += 2;
						continue;
					case 'f':
						action('\f');
						num += 2;
						continue;
					case 'n':
						action('\n');
						num += 2;
						continue;
					case 'r':
						action('\r');
						num += 2;
						continue;
					case 't':
						action('\t');
						num += 2;
						continue;
					case 'u':
					{
						byte num3 = CheckHex(src[num + 2]);
						byte b = CheckHex(src[num + 3]);
						byte b2 = CheckHex(src[num + 4]);
						byte b3 = CheckHex(src[num + 5]);
						int num4 = (num3 << 12) + (b << 8) + (b2 << 4) + b3;
						action((char)num4);
						num += 6;
						continue;
					}
					}
				}
				action(src[num]);
				num++;
			}
			while (num <= num2)
			{
				action(src[num++]);
			}
			return writeCount;
		}

		public static int Unescape(Utf8String s, IStore w)
		{
			int writeCount = 0;
			Action<byte> action = delegate(byte c)
			{
				if (w != null)
				{
					w.Write(c);
				}
				int num3 = writeCount + 1;
				writeCount = num3;
			};
			Utf8Iterator iterator = s.GetIterator();
			while (iterator.MoveNext())
			{
				switch (iterator.CurrentByteLength)
				{
				case 1:
					if (iterator.Current == 92)
					{
						byte second = iterator.Second;
						switch (second)
						{
						case 34:
						case 47:
						case 92:
							action(second);
							iterator.MoveNext();
							goto end_IL_0038;
						case 98:
							action(8);
							iterator.MoveNext();
							goto end_IL_0038;
						case 102:
							action(12);
							iterator.MoveNext();
							goto end_IL_0038;
						case 110:
							action(10);
							iterator.MoveNext();
							goto end_IL_0038;
						case 114:
							action(13);
							iterator.MoveNext();
							goto end_IL_0038;
						case 116:
							action(9);
							iterator.MoveNext();
							goto end_IL_0038;
						case 117:
						{
							iterator.MoveNext();
							iterator.MoveNext();
							byte num = CheckHex(iterator.Current);
							iterator.MoveNext();
							byte b = CheckHex(iterator.Current);
							iterator.MoveNext();
							byte b2 = CheckHex(iterator.Current);
							iterator.MoveNext();
							byte b3 = CheckHex(iterator.Current);
							int num2 = (num << 12) + (b << 8) + (b2 << 4) + b3;
							foreach (byte item in (IEnumerable<byte>)Utf8String.From(new string(new char[1] { (char)num2 })).Bytes)
							{
								action(item);
							}
							goto end_IL_0038;
						}
						}
					}
					action(iterator.Current);
					break;
				case 2:
					action(iterator.Current);
					action(iterator.Second);
					break;
				case 3:
					action(iterator.Current);
					action(iterator.Second);
					action(iterator.Third);
					break;
				case 4:
					action(iterator.Current);
					action(iterator.Second);
					action(iterator.Third);
					action(iterator.Fourth);
					break;
				default:
					{
						throw new ParserException("invalid utf8");
					}
					end_IL_0038:
					break;
				}
			}
			return writeCount;
		}

		public static string Unescape(string src)
		{
			StringBuilder stringBuilder = new StringBuilder();
			Unescape(src, new StringBuilderStore(stringBuilder));
			return stringBuilder.ToString();
		}

		public static int Unquote(string src, IStore w)
		{
			return Unescape(src.Substring(1, src.Length - 2), w);
		}

		public static int Unquote(Utf8String src, IStore w)
		{
			return Unescape(src.Subbytes(1, src.ByteLength - 2), w);
		}

		public static string Unquote(string src)
		{
			int num = Unquote(src, null);
			if (num == src.Length - 2)
			{
				return src.Substring(1, src.Length - 2);
			}
			StringBuilder stringBuilder = new StringBuilder(num);
			Unquote(src, new StringBuilderStore(stringBuilder));
			return stringBuilder.ToString();
		}

		public static Utf8String Unquote(Utf8String src)
		{
			int num = Unquote(src, null);
			if (num == src.ByteLength - 2)
			{
				return src.Subbytes(1, src.ByteLength - 2);
			}
			BytesStore bytesStore = new BytesStore(num);
			Unquote(src, bytesStore);
			return new Utf8String(bytesStore.Bytes);
		}
	}
	public struct JsonValue
	{
		public Utf8String Segment;

		private int _childCount;

		private static Utf8String s_true = Utf8String.From("true");

		private static Utf8String s_false = Utf8String.From("false");

		public ArraySegment<byte> Bytes => Segment.Bytes;

		public ValueNodeType ValueType { get; private set; }

		public int ParentIndex { get; private set; }

		public int ChildCount => _childCount;

		public void SetBytesCount(int count)
		{
			Segment = new Utf8String(new ArraySegment<byte>(Bytes.Array, Bytes.Offset, count));
		}

		public void SetChildCount(int count)
		{
			_childCount = count;
		}

		public JsonValue(Utf8String segment, ValueNodeType valueType, int parentIndex)
		{
			this = default(JsonValue);
			Segment = segment;
			ValueType = valueType;
			ParentIndex = parentIndex;
		}

		public JsonValue New(ArraySegment<byte> bytes, ValueNodeType valueType, int parentIndex)
		{
			return new JsonValue(new Utf8String(bytes), valueType, parentIndex);
		}

		public JsonValue Key(Utf8String key, int parentIndex)
		{
			return new JsonValue(JsonString.Quote(key), ValueNodeType.String, parentIndex);
		}

		public override string ToString()
		{
			ValueNodeType valueType = ValueType;
			if ((uint)valueType <= 2u || (uint)(valueType - 4) <= 6u)
			{
				return Segment.ToString();
			}
			throw new NotImplementedException();
		}

		public bool GetBoolean()
		{
			if (Segment == s_true)
			{
				return true;
			}
			if (Segment == s_false)
			{
				return false;
			}
			throw new DeserializationException("invalid boolean: " + Segment.ToString());
		}

		public sbyte GetSByte()
		{
			return Segment.ToSByte();
		}

		public short GetInt16()
		{
			return Segment.ToInt16();
		}

		public int GetInt32()
		{
			return Segment.ToInt32();
		}

		public long GetInt64()
		{
			return Segment.ToInt64();
		}

		public byte GetByte()
		{
			return Segment.ToByte();
		}

		public ushort GetUInt16()
		{
			return Segment.ToUInt16();
		}

		public uint GetUInt32()
		{
			return Segment.ToUInt32();
		}

		public ulong GetUInt64()
		{
			return Segment.ToUInt64();
		}

		public float GetSingle()
		{
			return Segment.ToSingle();
		}

		public double GetDouble()
		{
			return Segment.ToDouble();
		}

		public string GetString()
		{
			return JsonString.Unquote(Segment.ToString());
		}

		public Utf8String GetUtf8String()
		{
			return JsonString.Unquote(Segment);
		}
	}
	public struct JsonNode
	{
		private List<JsonValue> m_Values;

		private int _valueIndex;

		public bool IsValid => m_Values != null;

		public int ValueIndex
		{
			get
			{
				if (m_Values == null)
				{
					return -1;
				}
				return _valueIndex;
			}
		}

		public JsonNode Prev => new JsonNode(m_Values, ValueIndex - 1);

		public JsonValue Value
		{
			get
			{
				if (m_Values == null)
				{
					return default(JsonValue);
				}
				return m_Values[ValueIndex];
			}
		}

		public int ChildCount => Value.ChildCount;

		public IEnumerable<JsonNode> Children
		{
			get
			{
				int count = 0;
				int i = ValueIndex;
				while (count < ChildCount && i < m_Values.Count)
				{
					int num;
					if (m_Values[i].ParentIndex == ValueIndex)
					{
						num = count + 1;
						count = num;
						yield return new JsonNode(m_Values, i);
					}
					num = i + 1;
					i = num;
				}
			}
		}

		public JsonNode this[string key] => this[Utf8String.From(key)];

		public JsonNode this[Utf8String key] => this.GetObjectItem(key);

		public JsonNode this[int index] => this.GetArrayItem(index);

		public bool HasParent
		{
			get
			{
				if (Value.ParentIndex >= 0)
				{
					return Value.ParentIndex < m_Values.Count;
				}
				return false;
			}
		}

		public JsonNode Parent
		{
			get
			{
				if (Value.ParentIndex < 0)
				{
					throw new Exception("no parent");
				}
				if (Value.ParentIndex >= m_Values.Count)
				{
					throw new IndexOutOfRangeException();
				}
				return new JsonNode(m_Values, Value.ParentIndex);
			}
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (!(obj is JsonNode self))
			{
				return false;
			}
			if (((Value.ValueType != ValueNodeType.Integer && Value.ValueType != 0) || (self.Value.ValueType != ValueNodeType.Integer && self.Value.ValueType != ValueNodeType.Number)) && Value.ValueType != self.Value.ValueType)
			{
				return false;
			}
			switch (Value.ValueType)
			{
			case ValueNodeType.Null:
				return true;
			case ValueNodeType.Boolean:
				return Value.GetBoolean() == self.GetBoolean();
			case ValueNodeType.Integer:
			case ValueNodeType.Number:
				return Value.GetDouble() == self.GetDouble();
			case ValueNodeType.String:
				return Value.GetString() == self.GetString();
			case ValueNodeType.Array:
				return this.ArrayItems().SequenceEqual(self.ArrayItems());
			case ValueNodeType.Object:
				return (from x in this.ObjectItems()
					orderby x.Key.GetUtf8String()
					select x).SequenceEqual(from x in self.ObjectItems()
					orderby x.Key.GetUtf8String()
					select x);
			default:
				return false;
			}
		}

		public override string ToString()
		{
			if (this.IsArray())
			{
				StringBuilder stringBuilder = new StringBuilder();
				stringBuilder.Append("[");
				stringBuilder.Append("]");
				return stringBuilder.ToString();
			}
			if (this.IsMap())
			{
				StringBuilder stringBuilder2 = new StringBuilder();
				stringBuilder2.Append("{");
				stringBuilder2.Append("}");
				return stringBuilder2.ToString();
			}
			return Value.ToString();
		}

		private IEnumerable<string> ToString(string indent, int level, bool value = false)
		{
			if (this.IsArray())
			{
				int i;
				if (!value)
				{
					i = 0;
					while (i < level)
					{
						yield return indent;
						int num = i + 1;
						i = num;
					}
				}
				yield return "[\n";
				bool isFirst = true;
				int childLevel2 = level + 1;
				foreach (JsonNode x2 in this.ArrayItems())
				{
					if (isFirst)
					{
						isFirst = false;
					}
					else
					{
						yield return ",\n";
					}
					foreach (string item in x2.ToString(indent, childLevel2))
					{
						yield return item;
					}
				}
				if (!isFirst)
				{
					yield return "\n";
				}
				i = 0;
				while (i < level)
				{
					yield return indent;
					int num = i + 1;
					i = num;
				}
				yield return "]";
				yield break;
			}
			if (this.IsMap())
			{
				int i;
				if (!value)
				{
					i = 0;
					while (i < level)
					{
						yield return indent;
						int num = i + 1;
						i = num;
					}
				}
				yield return "{\n";
				bool isFirst = true;
				int childLevel2 = level + 1;
				foreach (KeyValuePair<JsonNode, JsonNode> kv in from x in this.ObjectItems()
					orderby x.Key.ToString()
					select x)
				{
					if (isFirst)
					{
						isFirst = false;
					}
					else
					{
						yield return ",\n";
					}
					i = 0;
					while (i < childLevel2)
					{
						yield return indent;
						int num = i + 1;
						i = num;
					}
					yield return kv.Key.ToString();
					yield return ": ";
					foreach (string item2 in kv.Value.ToString(indent, childLevel2, value: true))
					{
						yield return item2;
					}
				}
				if (!isFirst)
				{
					yield return "\n";
				}
				i = 0;
				while (i < level)
				{
					yield return indent;
					int num = i + 1;
					i = num;
				}
				yield return "}";
				yield break;
			}
			if (!value)
			{
				int childLevel2 = 0;
				while (childLevel2 < level)
				{
					yield return indent;
					int num = childLevel2 + 1;
					childLevel2 = num;
				}
			}
			yield return Value.ToString();
		}

		public string ToString(string indent)
		{
			return string.Join("", ToString(indent, 0).ToArray());
		}

		public IEnumerable<JsonDiff> Diff(JsonNode rhs, JsonPointer path = default(JsonPointer))
		{
			ValueNodeType valueType = Value.ValueType;
			if ((uint)valueType <= 2u || (uint)(valueType - 4) <= 1u)
			{
				if (!Equals(rhs))
				{
					yield return JsonDiff.Create(this, JsonDiffType.ValueChanged, $"{Value} => {rhs.Value}");
				}
				yield break;
			}
			if (Value.ValueType != rhs.Value.ValueType)
			{
				yield return JsonDiff.Create(this, JsonDiffType.ValueChanged, $"{Value.ValueType} => {rhs.Value}");
				yield break;
			}
			if (Value.ValueType == ValueNodeType.Object)
			{
				Dictionary<JsonNode, JsonNode> dictionary = this.ObjectItems().ToDictionary((KeyValuePair<JsonNode, JsonNode> x) => x.Key, (KeyValuePair<JsonNode, JsonNode> x) => x.Value);
				Dictionary<JsonNode, JsonNode> r = rhs.ObjectItems().ToDictionary((KeyValuePair<JsonNode, JsonNode> x) => x.Key, (KeyValuePair<JsonNode, JsonNode> x) => x.Value);
				foreach (KeyValuePair<JsonNode, JsonNode> item in dictionary)
				{
					if (r.TryGetValue(item.Key, out var value))
					{
						r.Remove(item.Key);
						foreach (JsonDiff item2 in item.Value.Diff(value))
						{
							yield return item2;
						}
					}
					else
					{
						yield return JsonDiff.Create(item.Value, JsonDiffType.KeyRemoved, item.Value.Value.ToString());
					}
				}
				foreach (KeyValuePair<JsonNode, JsonNode> item3 in r)
				{
					yield return JsonDiff.Create(item3.Value, JsonDiffType.KeyAdded, item3.Value.Value.ToString());
				}
				yield break;
			}
			if (Value.ValueType == ValueNodeType.Array)
			{
				IEnumerator<JsonNode> ll = this.ArrayItems().GetEnumerator();
				IEnumerator<JsonNode> rr = rhs.ArrayItems().GetEnumerator();
				while (true)
				{
					bool flag = ll.MoveNext();
					bool flag2 = rr.MoveNext();
					if (flag && flag2)
					{
						foreach (JsonDiff item4 in ll.Current.Diff(rr.Current))
						{
							yield return item4;
						}
						continue;
					}
					if (flag)
					{
						yield return JsonDiff.Create(ll.Current, JsonDiffType.KeyRemoved, ll.Current.Value.ToString());
						continue;
					}
					if (flag2)
					{
						yield return JsonDiff.Create(rr.Current, JsonDiffType.KeyAdded, rr.Current.Value.ToString());
						continue;
					}
					break;
				}
				yield break;
			}
			throw new NotImplementedException();
		}

		public void SetValue(JsonValue value)
		{
			m_Values[ValueIndex] = value;
		}

		public JsonNode(List<JsonValue> values, int index = 0)
		{
			this = default(JsonNode);
			m_Values = values;
			_valueIndex = index;
		}

		public JsonNode AddKey(Utf8String key)
		{
			return AddValue(default(JsonValue).Key(key, ValueIndex));
		}

		public JsonNode AddValue(ArraySegment<byte> bytes, ValueNodeType valueType)
		{
			return AddValue(default(JsonValue).New(bytes, valueType, ValueIndex));
		}

		public JsonNode AddValue(JsonValue value)
		{
			if (m_Values == null)
			{
				m_Values = new List<JsonValue>();
				_valueIndex = -1;
			}
			else
			{
				IncrementChildCount();
			}
			int count = m_Values.Count;
			m_Values.Add(value);
			return new JsonNode(m_Values, count);
		}

		private void IncrementChildCount()
		{
			JsonValue value = Value;
			value.SetChildCount(value.ChildCount + 1);
			SetValue(value);
		}

		public void SetValueBytesCount(int count)
		{
			JsonValue value = Value;
			value.SetBytesCount(count);
			SetValue(value);
		}
	}
	public static class ListTreeNodeArrayExtensions
	{
		public static IEnumerable<JsonNode> ArrayItems(this JsonNode self)
		{
			if (!self.IsArray())
			{
				throw new DeserializationException("is not array");
			}
			return self.Children;
		}

		[Obsolete("Use GetArrayItem(index)")]
		public static JsonNode GetArrrayItem(this JsonNode self, int index)
		{
			return self.GetArrayItem(index);
		}

		public static JsonNode GetArrayItem(this JsonNode self, int index)
		{
			int num = 0;
			foreach (JsonNode item in self.ArrayItems())
			{
				if (num++ == index)
				{
					return item;
				}
			}
			throw new KeyNotFoundException();
		}

		public static int GetArrayCount(this JsonNode self)
		{
			if (!self.IsArray())
			{
				throw new DeserializationException("is not array");
			}
			return self.Children.Count();
		}

		public static int IndexOf(this JsonNode self, JsonNode child)
		{
			int num = 0;
			foreach (JsonNode item in self.ArrayItems())
			{
				if (item.ValueIndex == child.ValueIndex)
				{
					return num;
				}
				num++;
			}
			throw new KeyNotFoundException();
		}
	}
	public static class ListTreeNodeExtensions
	{
		public static bool IsNull(this JsonNode self)
		{
			return self.Value.ValueType == ValueNodeType.Null;
		}

		public static bool IsBoolean(this JsonNode self)
		{
			return self.Value.ValueType == ValueNodeType.Boolean;
		}

		public static bool IsString(this JsonNode self)
		{
			return self.Value.ValueType == ValueNodeType.String;
		}

		public static bool IsInteger(this JsonNode self)
		{
			return self.Value.ValueType == ValueNodeType.Integer;
		}

		public static bool IsFloat(this JsonNode self)
		{
			if (self.Value.ValueType != ValueNodeType.Number && self.Value.ValueType != ValueNodeType.NaN && self.Value.ValueType != ValueNodeType.Infinity)
			{
				return self.Value.ValueType == ValueNodeType.MinusInfinity;
			}
			return true;
		}

		public static bool IsArray(this JsonNode self)
		{
			return self.Value.ValueType == ValueNodeType.Array;
		}

		public static bool IsMap(this JsonNode self)
		{
			return self.Value.ValueType == ValueNodeType.Object;
		}

		public static bool GetBoolean(this JsonNode self)
		{
			return self.Value.GetBoolean();
		}

		public static string GetString(this JsonNode self)
		{
			return self.Value.GetString();
		}

		public static Utf8String GetUtf8String(this JsonNode self)
		{
			return self.Value.GetUtf8String();
		}

		public static sbyte GetSByte(this JsonNode self)
		{
			return self.Value.GetSByte();
		}

		public static short GetInt16(this JsonNode self)
		{
			return self.Value.GetInt16();
		}

		public static int GetInt32(this JsonNode self)
		{
			return self.Value.GetInt32();
		}

		public static long GetInt64(this JsonNode self)
		{
			return self.Value.GetInt64();
		}

		public static byte GetByte(this JsonNode self)
		{
			return self.Value.GetByte();
		}

		public static ushort GetUInt16(this JsonNode self)
		{
			return self.Value.GetUInt16();
		}

		public static uint GetUInt32(this JsonNode self)
		{
			return self.Value.GetUInt32();
		}

		public static ulong GetUInt64(this JsonNode self)
		{
			return self.Value.GetUInt64();
		}

		public static float GetSingle(this JsonNode self)
		{
			return self.Value.GetSingle();
		}

		public static double GetDouble(this JsonNode self)
		{
			return self.Value.GetDouble();
		}

		public static IEnumerable<JsonNode> Traverse(this JsonNode self)
		{
			yield return self;
			if (self.IsArray())
			{
				foreach (JsonNode item in self.ArrayItems())
				{
					foreach (JsonNode item2 in item.Traverse())
					{
						yield return item2;
					}
				}
			}
			else
			{
				if (!self.IsMap())
				{
					yield break;
				}
				foreach (KeyValuePair<JsonNode, JsonNode> item3 in self.ObjectItems())
				{
					foreach (JsonNode item4 in item3.Value.Traverse())
					{
						yield return item4;
					}
				}
			}
		}
	}
	public static class ListTreeNodeJsonPointerExtensions
	{
		public static void SetValue(this JsonNode self, Utf8String jsonPointer, ArraySegment<byte> bytes)
		{
			foreach (JsonNode node in self.GetNodes(jsonPointer))
			{
				node.SetValue(default(JsonValue).New(bytes, ValueNodeType.Boolean, node.Value.ParentIndex));
			}
		}

		public static void RemoveValue(this JsonNode self, Utf8String jsonPointer)
		{
			foreach (JsonNode node in self.GetNodes(new JsonPointer(jsonPointer)))
			{
				if (node.Parent.IsMap())
				{
					node.Prev.SetValue(default(JsonValue));
				}
				node.SetValue(default(JsonValue));
			}
		}

		public static JsonPointer Pointer(this JsonNode self)
		{
			return JsonPointer.Create(self);
		}

		public static IEnumerable<JsonNode> Path(this JsonNode self)
		{
			if (self.HasParent)
			{
				foreach (JsonNode item in self.Parent.Path())
				{
					yield return item;
				}
			}
			yield return self;
		}

		public static IEnumerable<JsonNode> GetNodes(this JsonNode self, JsonPointer jsonPointer)
		{
			if (jsonPointer.Path.Count == 0)
			{
				yield return self;
				yield break;
			}
			if (self.IsArray())
			{
				if (jsonPointer[0][0] == 42)
				{
					foreach (JsonNode item in self.ArrayItems())
					{
						foreach (JsonNode node in item.GetNodes(jsonPointer.Unshift()))
						{
							yield return node;
						}
					}
					yield break;
				}
				int count = jsonPointer[0].ToInt32();
				JsonNode self2 = self.ArrayItems().Skip(count).First();
				foreach (JsonNode node2 in self2.GetNodes(jsonPointer.Unshift()))
				{
					yield return node2;
				}
				yield break;
			}
			if (self.IsMap())
			{
				if (jsonPointer[0][0] == 42)
				{
					foreach (KeyValuePair<JsonNode, JsonNode> item2 in self.ObjectItems())
					{
						foreach (JsonNode node3 in item2.Value.GetNodes(jsonPointer.Unshift()))
						{
							yield return node3;
						}
					}
					yield break;
				}
				JsonNode value;
				try
				{
					value = self.ObjectItems().First((KeyValuePair<JsonNode, JsonNode> x) => x.Key.GetUtf8String() == jsonPointer[0]).Value;
				}
				catch (Exception)
				{
					self.AddKey(jsonPointer[0]);
					self.AddValue(default(ArraySegment<byte>), ValueNodeType.Object);
					value = self.ObjectItems().First((KeyValuePair<JsonNode, JsonNode> x) => x.Key.GetUtf8String() == jsonPointer[0]).Value;
				}
				foreach (JsonNode node4 in value.GetNodes(jsonPointer.Unshift()))
				{
					yield return node4;
				}
				yield break;
			}
			throw new NotImplementedException();
		}

		public static IEnumerable<JsonNode> GetNodes(this JsonNode self, Utf8String jsonPointer)
		{
			return self.GetNodes(new JsonPointer(jsonPointer));
		}
	}
	public static class IValueNodeObjectExtensions
	{
		public static IEnumerable<KeyValuePair<JsonNode, JsonNode>> ObjectItems(this JsonNode self)
		{
			if (!self.IsMap())
			{
				throw new DeserializationException("is not object");
			}
			IEnumerator<JsonNode> it = self.Children.GetEnumerator();
			while (it.MoveNext())
			{
				JsonNode current = it.Current;
				it.MoveNext();
				yield return new KeyValuePair<JsonNode, JsonNode>(current, it.Current);
			}
		}

		public static int GetObjectCount(this JsonNode self)
		{
			if (!self.IsMap())
			{
				throw new DeserializationException("is not object");
			}
			return self.Children.Count() / 2;
		}

		public static string GetObjectValueOrDefault(this JsonNode self, string key, string defualtValue)
		{
			try
			{
				return self[key].GetString();
			}
			catch (KeyNotFoundException)
			{
				return defualtValue;
			}
		}

		public static JsonNode GetObjectItem(this JsonNode self, string key)
		{
			return self.GetObjectItem(Utf8String.From(key));
		}

		public static JsonNode GetObjectItem(this JsonNode self, Utf8String key)
		{
			foreach (KeyValuePair<JsonNode, JsonNode> item in self.ObjectItems())
			{
				if (item.Key.GetUtf8String() == key)
				{
					return item.Value;
				}
			}
			throw new KeyNotFoundException(key.ToString());
		}

		public static bool ContainsKey(this JsonNode self, Utf8String key)
		{
			return self.ObjectItems().Any((KeyValuePair<JsonNode, JsonNode> x) => x.Key.GetUtf8String() == key);
		}

		public static bool ContainsKey(this JsonNode self, string key)
		{
			Utf8String key2 = Utf8String.From(key);
			return self.ContainsKey(key2);
		}

		public static bool TryGet(this JsonNode self, Utf8String key, out JsonNode found)
		{
			foreach (KeyValuePair<JsonNode, JsonNode> item in self.ObjectItems())
			{
				if (item.Key.GetUtf8String() == key)
				{
					found = item.Value;
					return true;
				}
			}
			found = default(JsonNode);
			return false;
		}

		public static bool TryGet(this JsonNode self, string key, out JsonNode found)
		{
			Utf8String key2 = Utf8String.From(key);
			return self.TryGet(key2, out found);
		}

		public static Utf8String KeyOf(this JsonNode self, JsonNode node)
		{
			foreach (KeyValuePair<JsonNode, JsonNode> item in self.ObjectItems())
			{
				if (node.ValueIndex == item.Value.ValueIndex)
				{
					return item.Key.GetUtf8String();
				}
			}
			throw new KeyNotFoundException();
		}
	}
	public interface IUtf8String : IEnumerable<byte>, IEnumerable
	{
		int ByteLength { get; }
	}
	[StructLayout(LayoutKind.Explicit)]
	public struct Utf8String4 : IEquatable<Utf8String4>, IUtf8String, IEnumerable<byte>, IEnumerable
	{
		[FieldOffset(0)]
		private uint _value;

		[FieldOffset(0)]
		private byte _byte0;

		[FieldOffset(1)]
		private byte _byte1;

		[FieldOffset(2)]
		private byte _byte2;

		[FieldOffset(3)]
		private byte _byte3;

		public int ByteLength
		{
			get
			{
				if (_byte0 == 0)
				{
					return 0;
				}
				if (_byte1 == 0)
				{
					return 1;
				}
				if (_byte2 == 0)
				{
					return 2;
				}
				if (_byte3 == 0)
				{
					return 3;
				}
				return 4;
			}
		}

		private static Utf8String4 Create(uint value)
		{
			Utf8String4 result = default(Utf8String4);
			result._value = value;
			return result;
		}

		public static Utf8String4 Create(IEnumerable<byte> bytes)
		{
			Utf8String4 result = default(Utf8String4);
			IEnumerator<byte> enumerator = bytes.GetEnumerator();
			if (!enumerator.MoveNext())
			{
				return result;
			}
			result._byte0 = enumerator.Current;
			if (!enumerator.MoveNext())
			{
				return result;
			}
			result._byte1 = enumerator.Current;
			if (!enumerator.MoveNext())
			{
				return result;
			}
			result._byte2 = enumerator.Current;
			if (!enumerator.MoveNext())
			{
				return result;
			}
			result._byte3 = enumerator.Current;
			if (!enumerator.MoveNext())
			{
				throw new ArgumentOutOfRangeException();
			}
			return result;
		}

		public static Utf8String4 Create(string src)
		{
			return Create(Utf8String.Encoding.GetBytes(src));
		}

		public bool Equals(Utf8String4 other)
		{
			return _value == other._value;
		}

		public override bool Equals(object obj)
		{
			if (obj == null)
			{
				return false;
			}
			if (obj is Utf8String4)
			{
				return Equals((Utf8String4)obj);
			}
			if (obj is string text)
			{
				return ToString() == text;
			}
			return false;
		}

		public override int GetHashCode()
		{
			return _value.GetHashCode();
		}

		public override string ToString()
		{
			return Utf8String.Encoding.GetString(this.ToArray());
		}

		public IEnumerator<byte> GetEnumerator()
		{
			if (_byte0 == 0)
			{
				yield break;
			}
			yield return _byte0;
			if (_byte1 == 0)
			{
				yield break;
			}
			yield return _byte1;
			if (_byte2 != 0)
			{
				yield return _byte2;
				if (_byte3 != 0)
				{
					yield return _byte3;
				}
			}
		}

		IEnumerator IEnumerable.GetEnumerator()
		{
			return GetEnumerator();
		}
	}
	public struct Utf8Iterator : IEnumerator<byte>, IEnumerator, IDisposable
	{
		private byte[] m_bytes;

		private int m_offset;

		private int m_start;

		private int m_position;

		private int m_end;

		public const uint Mask1 = 1u;

		public const uint Mask2 = 3u;

		public const uint Mask3 = 7u;

		public const uint Mask4 = 15u;

		public const uint Mask5 = 31u;

		public const uint Mask6 = 63u;

		public const uint Mask7 = 127u;

		public const uint Mask11 = 2047u;

		public const uint Head1 = 128u;

		public const uint Head2 = 192u;

		public const uint Head3 = 224u;

		public const uint Head4 = 240u;

		public int BytePosition => m_position - m_offset;

		public int CurrentByteLength
		{
			get
			{
				byte current = Current;
				if (current <= 127)
				{
					return 1;
				}
				if (current <= 223)
				{
					return 2;
				}
				if (current <= 239)
				{
					return 3;
				}
				if (current <= 247)
				{
					return 4;
				}
				throw new Exception("invalid utf8");
			}
		}

		public byte Current => m_bytes[m_position];

		object IEnumerator.Current => Current;

		public byte Second => m_bytes[m_position + 1];

		public byte Third => m_bytes[m_position + 2];

		public byte Fourth => m_bytes[m_position + 3];

		public uint Unicode => CurrentByteLength switch
		{
			1 => Current, 
			2 => (uint)((0x1F & Current) << 6) | (0x3Fu & Second), 
			3 => (uint)(((0xF & Current) << 12) | ((0x3F & Second) << 6)) | (0x3Fu & Third), 
			4 => (uint)(((7 & Current) << 18) | ((0x3F & Second) << 12) | ((0x3F & Third) << 6)) | (0x3Fu & Fourth), 
			_ => throw new Exception("invalid utf8"), 
		};

		public char Char => CurrentByteLength switch
		{
			1 => (char)Current, 
			2 => (char)((uint)((0x1F & Current) << 6) | (0x3Fu & Second)), 
			3 => (char)((uint)(((0xF & Current) << 12) | ((0x3F & Second) << 6)) | (0x3Fu & Third)), 
			4 => throw new NotImplementedException(), 
			_ => throw new Exception("invalid utf8"), 
		};

		public Utf8Iterator(ArraySegment<byte> range, int start = 0)
		{
			m_bytes = range.Array;
			m_offset = range.Offset;
			m_start = m_offset + start;
			m_position = -1;
			m_end = range.Offset + range.Count;
		}

		public static int ByteLengthFromChar(char c)
		{
			if ((uint)c <= 127u)
			{
				return 1;
			}
			if ((uint)c <= 2047u)
			{
				return 2;
			}
			return 3;
		}

		public void Dispose()
		{
		}

		public bool MoveNext()
		{
			if (m_position == -1)
			{
				m_position = m_start;
			}
			else
			{
				m_position += CurrentByteLength;
			}
			return m_position < m_end;
		}

		public void Reset()
		{
			m_position = -1;
		}
	}
	public struct Utf8String : IComparable<Utf8String>
	{
		public static readonly Encoding Encoding = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);

		public readonly ArraySegment<byte> Bytes;

		public int ByteLength
		{
			get
			{
				ArraySegment<byte> bytes = Bytes;
				return bytes.Count;
			}
		}

		public byte this[int i]
		{
			get
			{
				ArraySegment<byte> bytes = Bytes;
				byte[]? array = bytes.Array;
				bytes = Bytes;
				return array[bytes.Offset + i];
			}
		}

		public bool IsEmpty => ByteLength == 0;

		public bool IsInt
		{
			get
			{
				for (int i = 0; i < ByteLength; i++)
				{
					byte b = this[i];
					if (b != 48 && b != 49 && b != 50 && b != 51 && b != 52 && b != 53 && b != 54 && b != 55 && b != 56 && b != 57 && (i != 0 || b != 45))
					{
						if (b != 46 && b != 101)
						{
							break;
						}
						return false;
					}
				}
				return true;
			}
		}

		public Utf8Iterator GetIterator()
		{
			return new Utf8Iterator(Bytes);
		}

		public int CompareTo(Utf8String other)
		{
			int i;
			for (i = 0; i < ByteLength && i < other.ByteLength; i++)
			{
				if (this[i] < other[i])
				{
					return 1;
				}
				if (this[i] > other[i])
				{
					return -1;
				}
			}
			if (i < ByteLength)
			{
				return -1;
			}
			if (i < other.ByteLength)
			{
				return 1;
			}
			return 0;
		}

		public Utf8String(ArraySegment<byte> bytes)
		{
			Bytes = bytes;
		}

		public Utf8String(byte[] bytes, int offset, int count)
			: this(new ArraySegment<byte>(bytes, offset, count))
		{
		}

		public Utf8String(byte[] bytes)
			: this(bytes, 0, bytes.Length)
		{
		}

		public static Utf8String From(string src)
		{
			return new Utf8String(Encoding.GetBytes(src));
		}

		public static Utf8String From(string src, byte[] bytes)
		{
			if (src.Sum((char c) => Utf8Iterator.ByteLengthFromChar(c)) > bytes.Length)
			{
				throw new OverflowException();
			}
			int count = 0;
			foreach (char c2 in src)
			{
				if ((uint)c2 <= 127u)
				{
					bytes[count++] = (byte)c2;
				}
				else if ((uint)c2 <= 2047u)
				{
					bytes[count++] = (byte)(0xC0 | (0x1FuL & (ulong)((int)c2 >> 6)));
					bytes[count++] = (byte)(0x80u | (0x3Fu & c2));
				}
				else
				{
					bytes[count++] = (byte)(0xE0 | (0xFuL & (ulong)((int)c2 >> 12)));
					bytes[count++] = (byte)(0x80 | (0x3FuL & (ulong)((int)c2 >> 6)));
					bytes[count++] = (byte)(0x80u | (0x3Fu & c2));
				}
			}
			return new Utf8String(new ArraySegment<byte>(bytes, 0, count));
		}

		public static Utf8String From(int src)
		{
			if (src >= 0)
			{
				if (src < 10)
				{
					return new Utf8String(new byte[1] { (byte)(48 + src) });
				}
				if (src < 100)
				{
					return new Utf8String(new byte[2]
					{
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 1000)
				{
					return new Utf8String(new byte[3]
					{
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 10000)
				{
					return new Utf8String(new byte[4]
					{
						(byte)(48 + src / 1000),
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 100000)
				{
					return new Utf8String(new byte[5]
					{
						(byte)(48 + src / 10000),
						(byte)(48 + src / 1000),
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 1000000)
				{
					return new Utf8String(new byte[6]
					{
						(byte)(48 + src / 100000),
						(byte)(48 + src / 10000),
						(byte)(48 + src / 1000),
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 10000000)
				{
					return new Utf8String(new byte[7]
					{
						(byte)(48 + src / 1000000),
						(byte)(48 + src / 100000),
						(byte)(48 + src / 10000),
						(byte)(48 + src / 1000),
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 100000000)
				{
					return new Utf8String(new byte[8]
					{
						(byte)(48 + src / 10000000),
						(byte)(48 + src / 1000000),
						(byte)(48 + src / 100000),
						(byte)(48 + src / 10000),
						(byte)(48 + src / 1000),
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				if (src < 1000000000)
				{
					return new Utf8String(new byte[9]
					{
						(byte)(48 + src / 100000000),
						(byte)(48 + src / 10000000),
						(byte)(48 + src / 1000000),
						(byte)(48 + src / 100000),
						(byte)(48 + src / 10000),
						(byte)(48 + src / 1000),
						(byte)(48 + src / 100),
						(byte)(48 + src / 10),
						(byte)(48 + src % 10)
					});
				}
				return new Utf8String(new byte[10]
				{
					(byte)(48 + src / 1000000000),
					(byte)(48 + src / 100000000),
					(byte)(48 + src / 10000000),
					(byte)(48 + src / 1000000),
					(byte)(48 + src / 100000),
					(byte)(48 + src / 10000),
					(byte)(48 + src / 1000),
					(byte)(48 + src / 100),
					(byte)(48 + src / 10),
					(byte)(48 + src % 10)
				});
			}
			throw new NotImplementedException();
		}

		public Utf8String Concat(Utf8String rhs)
		{
			byte[] array = new byte[ByteLength + rhs.ByteLength];
			ArraySegment<byte> bytes = Bytes;
			byte[]? array2 = bytes.Array;
			bytes = Bytes;
			Buffer.BlockCopy(array2, bytes.Offset, array, 0, ByteLength);
			bytes = rhs.Bytes;
			byte[]? array3 = bytes.Array;
			bytes = rhs.Bytes;
			Buffer.BlockCopy(array3, bytes.Offset, array, ByteLength, rhs.ByteLength);
			return new Utf8String(array);
		}

		public override string ToString()
		{
			if (ByteLength == 0)
			{
				return "";
			}
			Encoding encoding = Encoding;
			ArraySegment<byte> bytes = Bytes;
			byte[]? array = bytes.Array;
			bytes = Bytes;
			int offset = bytes.Offset;
			bytes = Bytes;
			return encoding.GetString(array, offset, bytes.Count);
		}

		public string ToAscii()
		{
			if (ByteLength == 0)
			{
				return "";
			}
			Encoding aSCII = Encoding.ASCII;
			ArraySegment<byte> bytes = Bytes;
			byte[]? array = bytes.Array;
			bytes = Bytes;
			int offset = bytes.Offset;
			bytes = Bytes;
			return aSCII.GetString(array, offset, bytes.Count);
		}

		public bool StartsWith(Utf8String rhs)
		{
			if (rhs.ByteLength > ByteLength)
			{
				return false;
			}
			for (int i = 0; i < rhs.ByteLength; i++)
			{
				if (this[i] != rhs[i])
				{
					return false;
				}
			}
			return true;
		}

		public bool EndsWith(Utf8String rhs)
		{
			if (rhs.ByteLength > ByteLength)
			{
				return false;
			}
			for (int i = 1; i <= rhs.ByteLength; i++)
			{
				if (this[ByteLength - i] != rhs[rhs.ByteLength - i])
				{
					return false;
				}
			}
			return true;
		}

		public int IndexOf(byte code)
		{
			return IndexOf(0, code);
		}

		public int IndexOf(int offset, byte code)
		{
			ArraySegment<byte> bytes = Bytes;
			int num = offset + bytes.Offset;
			int num2 = 0;
			while (true)
			{
				int num3 = num2;
				bytes = Bytes;
				if (num3 >= bytes.Count)
				{
					break;
				}
				bytes = Bytes;
				if (bytes.Array[num] == code)
				{
					int num4 = num;
					bytes = Bytes;
					return num4 - bytes.Offset;
				}
				num2++;
				num++;
			}
			return -1;
		}

		public Utf8String Subbytes(int offset)
		{
			return Subbytes(offset, ByteLength - offset);
		}

		public Utf8String Subbytes(int offset, int count)
		{
			ArraySegment<byte> bytes = Bytes;
			byte[]? array = bytes.Array;
			bytes = Bytes;
			return new Utf8String(array, bytes.Offset + offset, count);
		}

		private static bool IsSpace(byte b)
		{
			if ((uint)(b - 9) <= 4u || b == 32)
			{
				return true;
			}
			return false;
		}

		public Utf8String TrimStart()
		{
			int i;
			for (i = 0; i < ByteLength && IsSpace(this[i]); i++)
			{
			}
			return Subbytes(i);
		}

		public Utf8String TrimEnd()
		{
			int num = ByteLength - 1;
			while (num >= 0 && IsSpace(this[num]))
			{
				num--;
			}
			return Subbytes(0, num + 1);
		}

		public Utf8String Trim()
		{
			return TrimStart().TrimEnd();
		}

		public override bool Equals(object obj)
		{
			if (obj is Utf8String)
			{
				return Equals((Utf8String)obj);
			}
			return false;
		}

		public static bool operator ==(Utf8String x, Utf8String y)
		{
			return x.Equals(y);
		}

		public static bool operator !=(Utf8String x, Utf8String y)
		{
			return !(x == y);
		}

		public bool Equals(Utf8String other)
		{
			if (ByteLength != other.ByteLength)
			{
				return false;
			}
			for (int i = 0; i < ByteLength; i++)
			{
				if (this[i] != other[i])
				{
					return false;
				}
			}
			return true;
		}

		public override int GetHashCode()
		{
			return ByteLength.GetHashCode();
		}

		public static Utf8String operator +(Utf8String l, Utf8String r)
		{
			return new Utf8String(l.Bytes.Concat(r.Bytes));
		}
	}
	public class Utf8StringBuilder
	{
		private ByteBuffer m_buffer = new ByteBuffer();

		private static Encoding s_utf8 = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false);

		public void Ascii(char c)
		{
			m_buffer.Push((byte)c);
		}

		public void Quote(string text)
		{
			Ascii('"');
			m_buffer.Push(s_utf8.GetBytes(text));
			Ascii('"');
		}

		public void Add(Utf8String str)
		{
			m_buffer.Push(str.Bytes);
		}

		public Utf8String ToUtf8String()
		{
			return new Utf8String(m_buffer.Bytes);
		}
	}
	public static class Utf8StringExtensions
	{
		public static void WriteTo(this Utf8String src, Stream dst)
		{
			ArraySegment<byte> bytes = src.Bytes;
			byte[]? array = bytes.Array;
			bytes = src.Bytes;
			int offset = bytes.Offset;
			bytes = src.Bytes;
			dst.Write(array, offset, bytes.Count);
		}

		public static Utf8Iterator GetFirst(this Utf8String src)
		{
			Utf8Iterator iterator = src.GetIterator();
			iterator.MoveNext();
			return iterator;
		}

		public static bool TrySearchByte(this Utf8String src, Func<byte, bool> pred, out int pos)
		{
			for (pos = 0; pos < src.ByteLength; pos++)
			{
				if (pred(src[pos]))
				{
					return true;
				}
			}
			return false;
		}

		public static bool TrySearchAscii(this Utf8String src, byte target, int start, out int pos)
		{
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes, start);
			while (utf8Iterator.MoveNext())
			{
				byte current = utf8Iterator.Current;
				if (current > 127)
				{
					continue;
				}
				if (current == target)
				{
					pos = utf8Iterator.BytePosition;
					return true;
				}
				if (current == 92)
				{
					switch ((char)utf8Iterator.Second)
					{
					case '"':
					case '/':
					case '\\':
					case 'b':
					case 'f':
					case 'n':
					case 'r':
					case 't':
						utf8Iterator.MoveNext();
						break;
					case 'u':
						utf8Iterator.MoveNext();
						utf8Iterator.MoveNext();
						utf8Iterator.MoveNext();
						utf8Iterator.MoveNext();
						break;
					default:
						throw new ParserException("unknown escape: " + utf8Iterator.Second);
					}
				}
			}
			pos = -1;
			return false;
		}

		public static IEnumerable<Utf8String> Split(this Utf8String src, byte delimiter)
		{
			int num = 0;
			Utf8Iterator p = new Utf8Iterator(src.Bytes);
			while (p.MoveNext())
			{
				if (p.Current == delimiter)
				{
					if (p.BytePosition - num == 0)
					{
						yield return default(Utf8String);
					}
					else
					{
						yield return src.Subbytes(num, p.BytePosition - num);
					}
					num = p.BytePosition + 1;
				}
			}
			if (num < p.BytePosition)
			{
				yield return src.Subbytes(num, p.BytePosition - num);
			}
		}

		public static sbyte ToSByte(this Utf8String src)
		{
			sbyte b = 0;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				b = utf8Iterator.Current switch
				{
					48 => (sbyte)(b * 10), 
					49 => (sbyte)(b * 10 + 1), 
					50 => (sbyte)(b * 10 + 2), 
					51 => (sbyte)(b * 10 + 3), 
					52 => (sbyte)(b * 10 + 4), 
					53 => (sbyte)(b * 10 + 5), 
					54 => (sbyte)(b * 10 + 6), 
					55 => (sbyte)(b * 10 + 7), 
					56 => (sbyte)(b * 10 + 8), 
					57 => (sbyte)(b * 10 + 9), 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return b;
		}

		public static short ToInt16(this Utf8String src)
		{
			short num = 0;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				num = utf8Iterator.Current switch
				{
					48 => (short)(num * 10), 
					49 => (short)(num * 10 + 1), 
					50 => (short)(num * 10 + 2), 
					51 => (short)(num * 10 + 3), 
					52 => (short)(num * 10 + 4), 
					53 => (short)(num * 10 + 5), 
					54 => (short)(num * 10 + 6), 
					55 => (short)(num * 10 + 7), 
					56 => (short)(num * 10 + 8), 
					57 => (short)(num * 10 + 9), 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return num;
		}

		public static int ToInt32(this Utf8String src)
		{
			int num = 0;
			int num2 = 1;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			bool flag = true;
			while (utf8Iterator.MoveNext())
			{
				byte current = utf8Iterator.Current;
				if (flag)
				{
					flag = false;
					if (current == 45)
					{
						num2 = -1;
						continue;
					}
				}
				num = current switch
				{
					48 => num * 10, 
					49 => num * 10 + 1, 
					50 => num * 10 + 2, 
					51 => num * 10 + 3, 
					52 => num * 10 + 4, 
					53 => num * 10 + 5, 
					54 => num * 10 + 6, 
					55 => num * 10 + 7, 
					56 => num * 10 + 8, 
					57 => num * 10 + 9, 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return num * num2;
		}

		public static long ToInt64(this Utf8String src)
		{
			long num = 0L;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				num = utf8Iterator.Current switch
				{
					48 => num * 10, 
					49 => num * 10 + 1, 
					50 => num * 10 + 2, 
					51 => num * 10 + 3, 
					52 => num * 10 + 4, 
					53 => num * 10 + 5, 
					54 => num * 10 + 6, 
					55 => num * 10 + 7, 
					56 => num * 10 + 8, 
					57 => num * 10 + 9, 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return num;
		}

		public static byte ToByte(this Utf8String src)
		{
			byte b = 0;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				b = utf8Iterator.Current switch
				{
					48 => (byte)(b * 10), 
					49 => (byte)(b * 10 + 1), 
					50 => (byte)(b * 10 + 2), 
					51 => (byte)(b * 10 + 3), 
					52 => (byte)(b * 10 + 4), 
					53 => (byte)(b * 10 + 5), 
					54 => (byte)(b * 10 + 6), 
					55 => (byte)(b * 10 + 7), 
					56 => (byte)(b * 10 + 8), 
					57 => (byte)(b * 10 + 9), 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return b;
		}

		public static ushort ToUInt16(this Utf8String src)
		{
			ushort num = 0;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				num = utf8Iterator.Current switch
				{
					48 => (ushort)(num * 10), 
					49 => (ushort)(num * 10 + 1), 
					50 => (ushort)(num * 10 + 2), 
					51 => (ushort)(num * 10 + 3), 
					52 => (ushort)(num * 10 + 4), 
					53 => (ushort)(num * 10 + 5), 
					54 => (ushort)(num * 10 + 6), 
					55 => (ushort)(num * 10 + 7), 
					56 => (ushort)(num * 10 + 8), 
					57 => (ushort)(num * 10 + 9), 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return num;
		}

		public static uint ToUInt32(this Utf8String src)
		{
			uint num = 0u;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				num = utf8Iterator.Current switch
				{
					48 => num * 10, 
					49 => num * 10 + 1, 
					50 => num * 10 + 2, 
					51 => num * 10 + 3, 
					52 => num * 10 + 4, 
					53 => num * 10 + 5, 
					54 => num * 10 + 6, 
					55 => num * 10 + 7, 
					56 => num * 10 + 8, 
					57 => num * 10 + 9, 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return num;
		}

		public static ulong ToUInt64(this Utf8String src)
		{
			ulong num = 0uL;
			Utf8Iterator utf8Iterator = new Utf8Iterator(src.Bytes);
			while (utf8Iterator.MoveNext())
			{
				num = utf8Iterator.Current switch
				{
					48 => num * 10, 
					49 => num * 10 + 1, 
					50 => num * 10 + 2, 
					51 => num * 10 + 3, 
					52 => num * 10 + 4, 
					53 => num * 10 + 5, 
					54 => num * 10 + 6, 
					55 => num * 10 + 7, 
					56 => num * 10 + 8, 
					57 => num * 10 + 9, 
					_ => throw new ArgumentOutOfRangeException(), 
				};
			}
			return num;
		}

		public static float ToSingle(this Utf8String src)
		{
			return float.Parse(src.ToAscii(), CultureInfo.InvariantCulture);
		}

		public static double ToDouble(this Utf8String src)
		{
			return double.Parse(src.ToAscii(), CultureInfo.InvariantCulture);
		}

		public static Utf8String GetLine(this Utf8String src)
		{
			if (!src.TrySearchAscii(10, 0, out var pos))
			{
				return src;
			}
			return src.Subbytes(0, pos + 1);
		}
	}
	public static class Utf8StringSplitterExtensions
	{
		public static Utf8String SplitInteger(this Utf8String src)
		{
			int num = 0;
			if (src[0] == 43 || src[0] == 45)
			{
				num++;
			}
			int i;
			for (i = num; i < src.ByteLength && src[i] >= 48 && src[i] <= 57; i++)
			{
			}
			if (num == i)
			{
				throw new FormatException();
			}
			return src.Subbytes(0, i);
		}
	}
	public enum ValueNodeType
	{
		Null,
		Boolean,
		String,
		Binary,
		Integer,
		Number,
		Array,
		Object,
		NaN,
		Infinity,
		MinusInfinity
	}
}
namespace UniGLTF
{
	public static class Pin
	{
		public static Pin<T> Create<T>(ArraySegment<T> src) where T : struct
		{
			return new Pin<T>(src);
		}

		public static Pin<T> Create<T>(T[] src) where T : struct
		{
			return Create(new ArraySegment<T>(src));
		}
	}
	public class Pin<T> : IDisposable where T : struct
	{
		private GCHandle m_pinnedArray;

		private ArraySegment<T> m_src;

		private bool disposedValue;

		public int Length => m_src.Count * Marshal.SizeOf(typeof(T));

		public IntPtr Ptr => new IntPtr(m_pinnedArray.AddrOfPinnedObject().ToInt64() + m_src.Offset);

		public Pin(ArraySegment<T> src)
		{
			m_src = src;
			m_pinnedArray = GCHandle.Alloc(src.Array, GCHandleType.Pinned);
		}

		protected virtual void Dispose(bool disposing)
		{
			if (!disposedValue)
			{
				if (m_pinnedArray.IsAllocated)
				{
					m_pinnedArray.Free();
				}
				disposedValue = true;
			}
		}

		public void Dispose()
		{
			Dispose(disposing: true);
		}
	}
	public static class ArrayExtensions
	{
		public static T[] SelectInplace<T>(this T[] src, Func<T, T> pred)
		{
			for (int i = 0; i < src.Length; i++)
			{
				src[i] = pred(src[i]);
			}
			return src;
		}
	}
	public static class ArraySegmentExtensions
	{
		public static ArraySegment<T> Slice<T>(this ArraySegment<T> self, int start, int length)
		{
			if (start + length > self.Count)
			{
				throw new ArgumentOutOfRangeException(

UniGLTF.Samples.ScreenSpace.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UniGLTF.Samples;

public class ScaleOffset : MonoBehaviour
{
	[SerializeField]
	public Vector2 Scale = Vector2.one;

	[SerializeField]
	public Vector2 Offset = Vector2.zero;

	[SerializeField]
	private Material Unity;

	[SerializeField]
	private Material Gltf;

	private const string PROP_NAME = "_MainTex";

	private void OnValidate()
	{
		Execute();
	}

	private void Update()
	{
		Execute();
	}

	private void Execute()
	{
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		if (!((Object)(object)Unity == (Object)null) && !((Object)(object)Gltf == (Object)null))
		{
			Unity.SetTextureScale("_MainTex", Scale);
			Unity.SetTextureOffset("_MainTex", Offset);
			var (val, val2) = TextureTransform.VerticalFlipScaleOffset(Scale, Offset);
			Gltf.SetTextureScale("_MainTex", val);
			Gltf.SetTextureOffset("_MainTex", val2);
		}
	}
}

UniHumanoid.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using UnityEngine;
using UnityEngine.Serialization;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UniHumanoid;

public static class AnimationClipUtility
{
	private static Dictionary<string, string> TraitPropMap = new Dictionary<string, string>
	{
		{ "Left Thumb 1 Stretched", "LeftHand.Thumb.1 Stretched" },
		{ "Left Thumb Spread", "LeftHand.Thumb Spread" },
		{ "Left Thumb 2 Stretched", "LeftHand.Thumb.2 Stretched" },
		{ "Left Thumb 3 Stretched", "LeftHand.Thumb.3 Stretched" },
		{ "Left Index 1 Stretched", "LeftHand.Index.1 Stretched" },
		{ "Left Index Spread", "LeftHand.Index Spread" },
		{ "Left Index 2 Stretched", "LeftHand.Index.2 Stretched" },
		{ "Left Index 3 Stretched", "LeftHand.Index.3 Stretched" },
		{ "Left Middle 1 Stretched", "LeftHand.Middle.1 Stretched" },
		{ "Left Middle Spread", "LeftHand.Middle Spread" },
		{ "Left Middle 2 Stretched", "LeftHand.Middle.2 Stretched" },
		{ "Left Middle 3 Stretched", "LeftHand.Middle.3 Stretched" },
		{ "Left Ring 1 Stretched", "LeftHand.Ring.1 Stretched" },
		{ "Left Ring Spread", "LeftHand.Ring Spread" },
		{ "Left Ring 2 Stretched", "LeftHand.Ring.2 Stretched" },
		{ "Left Ring 3 Stretched", "LeftHand.Ring.3 Stretched" },
		{ "Left Little 1 Stretched", "LeftHand.Little.1 Stretched" },
		{ "Left Little Spread", "LeftHand.Little Spread" },
		{ "Left Little 2 Stretched", "LeftHand.Little.2 Stretched" },
		{ "Left Little 3 Stretched", "LeftHand.Little.3 Stretched" },
		{ "Right Thumb 1 Stretched", "RightHand.Thumb.1 Stretched" },
		{ "Right Thumb Spread", "RightHand.Thumb Spread" },
		{ "Right Thumb 2 Stretched", "RightHand.Thumb.2 Stretched" },
		{ "Right Thumb 3 Stretched", "RightHand.Thumb.3 Stretched" },
		{ "Right Index 1 Stretched", "RightHand.Index.1 Stretched" },
		{ "Right Index Spread", "RightHand.Index Spread" },
		{ "Right Index 2 Stretched", "RightHand.Index.2 Stretched" },
		{ "Right Index 3 Stretched", "RightHand.Index.3 Stretched" },
		{ "Right Middle 1 Stretched", "RightHand.Middle.1 Stretched" },
		{ "Right Middle Spread", "RightHand.Middle Spread" },
		{ "Right Middle 2 Stretched", "RightHand.Middle.2 Stretched" },
		{ "Right Middle 3 Stretched", "RightHand.Middle.3 Stretched" },
		{ "Right Ring 1 Stretched", "RightHand.Ring.1 Stretched" },
		{ "Right Ring Spread", "RightHand.Ring Spread" },
		{ "Right Ring 2 Stretched", "RightHand.Ring.2 Stretched" },
		{ "Right Ring 3 Stretched", "RightHand.Ring.3 Stretched" },
		{ "Right Little 1 Stretched", "RightHand.Little.1 Stretched" },
		{ "Right Little Spread", "RightHand.Little Spread" },
		{ "Right Little 2 Stretched", "RightHand.Little.2 Stretched" },
		{ "Right Little 3 Stretched", "RightHand.Little.3 Stretched" }
	};

	public static AnimationClip CreateAnimationClipFromHumanPose(HumanPose pose)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Expected O, but got Unknown
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Expected O, but got Unknown
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Expected O, but got Unknown
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Expected O, but got Unknown
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Expected O, but got Unknown
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_0167: Unknown result type (might be due to invalid IL or missing references)
		//IL_0171: Unknown result type (might be due to invalid IL or missing references)
		//IL_0176: Unknown result type (might be due to invalid IL or missing references)
		//IL_017b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Expected O, but got Unknown
		//IL_01ab: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c7: Expected O, but got Unknown
		//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_020f: Expected O, but got Unknown
		AnimationClip val = new AnimationClip();
		AnimationCurve val2 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyPosition.x)
		});
		string text = "RootT.x";
		val.SetCurve((string)null, typeof(Animator), text, val2);
		AnimationCurve val3 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyPosition.y)
		});
		string text2 = "RootT.y";
		val.SetCurve((string)null, typeof(Animator), text2, val3);
		AnimationCurve val4 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyPosition.z)
		});
		string text3 = "RootT.z";
		val.SetCurve((string)null, typeof(Animator), text3, val4);
		AnimationCurve val5 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyRotation.x)
		});
		string text4 = "RootQ.x";
		val.SetCurve((string)null, typeof(Animator), text4, val5);
		AnimationCurve val6 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyRotation.y)
		});
		string text5 = "RootQ.y";
		val.SetCurve((string)null, typeof(Animator), text5, val6);
		AnimationCurve val7 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyRotation.z)
		});
		string text6 = "RootQ.z";
		val.SetCurve((string)null, typeof(Animator), text6, val7);
		AnimationCurve val8 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
		{
			new Keyframe(0f, pose.bodyRotation.w)
		});
		string text7 = "RootQ.w";
		val.SetCurve((string)null, typeof(Animator), text7, val8);
		for (int i = 0; i < HumanTrait.MuscleCount; i++)
		{
			AnimationCurve val9 = new AnimationCurve((Keyframe[])(object)new Keyframe[1]
			{
				new Keyframe(0f, pose.muscles[i])
			});
			string text8 = HumanTrait.MuscleName[i];
			if (TraitPropMap.ContainsKey(text8))
			{
				text8 = TraitPropMap[text8];
			}
			val.SetCurve((string)null, typeof(Animator), text8, val9);
		}
		return val;
	}
}
[Serializable]
public struct BoneLimit
{
	public HumanBodyBones humanBone;

	public string boneName;

	public bool useDefaultValues;

	public Vector3 min;

	public Vector3 max;

	public Vector3 center;

	public float axisLength;

	private static string[] cashedHumanTraitBoneName;

	public static BoneLimit From(HumanBone bone)
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0064: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		BoneLimit result = default(BoneLimit);
		result.humanBone = (HumanBodyBones)Enum.Parse(typeof(HumanBodyBones), ((HumanBone)(ref bone)).humanName.Replace(" ", ""), ignoreCase: true);
		result.boneName = ((HumanBone)(ref bone)).boneName;
		result.useDefaultValues = ((HumanLimit)(ref bone.limit)).useDefaultValues;
		result.min = ((HumanLimit)(ref bone.limit)).min;
		result.max = ((HumanLimit)(ref bone.limit)).max;
		result.center = ((HumanLimit)(ref bone.limit)).center;
		result.axisLength = ((HumanLimit)(ref bone.limit)).axisLength;
		return result;
	}

	public static string ToHumanBoneName(HumanBodyBones b)
	{
		if (cashedHumanTraitBoneName == null)
		{
			cashedHumanTraitBoneName = HumanTrait.BoneName;
		}
		string[] array = cashedHumanTraitBoneName;
		foreach (string text in array)
		{
			if (text.Replace(" ", "") == ((object)(HumanBodyBones)(ref b)).ToString())
			{
				return text;
			}
		}
		throw new KeyNotFoundException();
	}

	public HumanBone ToHumanBone()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		HumanBone result = default(HumanBone);
		((HumanBone)(ref result)).boneName = boneName;
		((HumanBone)(ref result)).humanName = ToHumanBoneName(humanBone);
		HumanLimit limit = default(HumanLimit);
		((HumanLimit)(ref limit)).useDefaultValues = useDefaultValues;
		((HumanLimit)(ref limit)).axisLength = axisLength;
		((HumanLimit)(ref limit)).center = center;
		((HumanLimit)(ref limit)).max = max;
		((HumanLimit)(ref limit)).min = min;
		result.limit = limit;
		return result;
	}
}
[Serializable]
public class AvatarDescription : ScriptableObject
{
	public float armStretch = 0.05f;

	public float legStretch = 0.05f;

	public float upperArmTwist = 0.5f;

	public float lowerArmTwist = 0.5f;

	public float upperLegTwist = 0.5f;

	public float lowerLegTwist = 0.5f;

	public float feetSpacing;

	public bool hasTranslationDoF;

	public BoneLimit[] human;

	public HumanDescription ToHumanDescription(Transform root)
	{
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0086: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Unknown result type (might be due to invalid IL or missing references)
		Transform[] componentsInChildren = ((Component)root).GetComponentsInChildren<Transform>();
		SkeletonBone[] array = (SkeletonBone[])(object)new SkeletonBone[componentsInChildren.Length];
		int num = 0;
		Transform[] array2 = componentsInChildren;
		foreach (Transform t in array2)
		{
			array[num] = t.ToSkeletonBone();
			num++;
		}
		HumanBone[] array3 = (HumanBone[])(object)new HumanBone[human.Length];
		num = 0;
		BoneLimit[] array4 = human;
		foreach (BoneLimit boneLimit in array4)
		{
			array3[num] = boneLimit.ToHumanBone();
			num++;
		}
		HumanDescription result = default(HumanDescription);
		result.skeleton = array;
		result.human = array3;
		((HumanDescription)(ref result)).armStretch = armStretch;
		((HumanDescription)(ref result)).legStretch = legStretch;
		((HumanDescription)(ref result)).upperArmTwist = upperArmTwist;
		((HumanDescription)(ref result)).lowerArmTwist = lowerArmTwist;
		((HumanDescription)(ref result)).upperLegTwist = upperLegTwist;
		((HumanDescription)(ref result)).lowerLegTwist = lowerLegTwist;
		((HumanDescription)(ref result)).feetSpacing = feetSpacing;
		((HumanDescription)(ref result)).hasTranslationDoF = hasTranslationDoF;
		return result;
	}

	public Avatar CreateAvatar(Transform root)
	{
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		return AvatarBuilder.BuildHumanAvatar(((Component)root).gameObject, ToHumanDescription(root));
	}

	public Avatar CreateAvatarAndSetup(Transform root)
	{
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		Avatar val = CreateAvatar(root);
		((Object)val).name = ((Object)this).name;
		Animator component = ((Component)root).GetComponent<Animator>();
		if ((Object)(object)component != (Object)null)
		{
			Dictionary<Transform, Vector3> dictionary = root.Traverse().ToDictionary((Transform x) => x, (Transform x) => x.position);
			component.avatar = val;
			foreach (Transform item in root.Traverse())
			{
				item.position = dictionary[item];
			}
		}
		HumanPoseTransfer component2 = ((Component)root).GetComponent<HumanPoseTransfer>();
		if ((Object)(object)component2 != (Object)null)
		{
			component2.Avatar = val;
		}
		return val;
	}

	public static AvatarDescription CreateFrom(HumanDescription description)
	{
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		AvatarDescription avatarDescription = ScriptableObject.CreateInstance<AvatarDescription>();
		((Object)avatarDescription).name = "AvatarDescription";
		avatarDescription.armStretch = ((HumanDescription)(ref description)).armStretch;
		avatarDescription.legStretch = ((HumanDescription)(ref description)).legStretch;
		avatarDescription.feetSpacing = ((HumanDescription)(ref description)).feetSpacing;
		avatarDescription.hasTranslationDoF = ((HumanDescription)(ref description)).hasTranslationDoF;
		avatarDescription.lowerArmTwist = ((HumanDescription)(ref description)).lowerArmTwist;
		avatarDescription.lowerLegTwist = ((HumanDescription)(ref description)).lowerLegTwist;
		avatarDescription.upperArmTwist = ((HumanDescription)(ref description)).upperArmTwist;
		avatarDescription.upperLegTwist = ((HumanDescription)(ref description)).upperLegTwist;
		avatarDescription.human = description.human.Select(BoneLimit.From).ToArray();
		return avatarDescription;
	}

	public static AvatarDescription Create(AvatarDescription src = null)
	{
		AvatarDescription avatarDescription = ScriptableObject.CreateInstance<AvatarDescription>();
		((Object)avatarDescription).name = "AvatarDescription";
		if ((Object)(object)src != (Object)null)
		{
			avatarDescription.armStretch = src.armStretch;
			avatarDescription.legStretch = src.legStretch;
			avatarDescription.feetSpacing = src.feetSpacing;
			avatarDescription.upperArmTwist = src.upperArmTwist;
			avatarDescription.lowerArmTwist = src.lowerArmTwist;
			avatarDescription.upperLegTwist = src.upperLegTwist;
			avatarDescription.lowerLegTwist = src.lowerLegTwist;
		}
		else
		{
			avatarDescription.armStretch = 0.05f;
			avatarDescription.legStretch = 0.05f;
			avatarDescription.feetSpacing = 0f;
			avatarDescription.lowerArmTwist = 0.5f;
			avatarDescription.upperArmTwist = 0.5f;
			avatarDescription.upperLegTwist = 0.5f;
			avatarDescription.lowerLegTwist = 0.5f;
		}
		return avatarDescription;
	}

	public static AvatarDescription Create(Transform[] boneTransforms, Skeleton skeleton)
	{
		return Create(skeleton.Bones.Select((KeyValuePair<HumanBodyBones, int> x) => new KeyValuePair<HumanBodyBones, Transform>(x.Key, boneTransforms[x.Value])));
	}

	public static AvatarDescription Create(IEnumerable<KeyValuePair<HumanBodyBones, Transform>> skeleton)
	{
		AvatarDescription avatarDescription = Create();
		avatarDescription.SetHumanBones(skeleton);
		return avatarDescription;
	}

	public void SetHumanBones(IEnumerable<KeyValuePair<HumanBodyBones, Transform>> skeleton)
	{
		human = skeleton.Select(delegate(KeyValuePair<HumanBodyBones, Transform> x)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			BoneLimit result = default(BoneLimit);
			result.humanBone = x.Key;
			result.boneName = ((Object)x.Value).name;
			result.useDefaultValues = true;
			return result;
		}).ToArray();
	}
}
public class BoneGizmoDrawer : MonoBehaviour
{
	private const float size = 0.03f;

	private readonly Vector3 SIZE = new Vector3(0.03f, 0.03f, 0.03f);

	[SerializeField]
	public bool Draw = true;

	private void OnDrawGizmos()
	{
	}
}
public class BoneMapping : MonoBehaviour
{
	[SerializeField]
	public GameObject[] Bones = (GameObject[])(object)new GameObject[55];

	[SerializeField]
	public AvatarDescription Description;

	private void Reset()
	{
		GetBones();
	}

	private void GetBones()
	{
		//IL_0048: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Invalid comparison between Unknown and I4
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		Bones = (GameObject[])(object)new GameObject[55];
		Animator component = ((Component)this).GetComponent<Animator>();
		if (!((Object)(object)component != (Object)null) || !((Object)(object)component.avatar != (Object)null))
		{
			return;
		}
		foreach (HumanBodyBones value in Enum.GetValues(typeof(HumanBodyBones)))
		{
			if ((int)value == 55)
			{
				break;
			}
			Transform boneTransform = component.GetBoneTransform(value);
			if ((Object)(object)boneTransform != (Object)null)
			{
				Bones[value] = ((Component)boneTransform).gameObject;
			}
		}
	}

	public void GuessBoneMapping()
	{
		GameObject val = Bones[0];
		if ((Object)(object)val == (Object)null)
		{
			Debug.LogWarning((object)"require hips");
			return;
		}
		Skeleton skeleton = new BvhSkeletonEstimator().Detect(val.transform);
		Transform[] array = val.transform.Traverse().ToArray();
		for (int i = 0; i < 55; i++)
		{
			int boneIndex = skeleton.GetBoneIndex((HumanBodyBones)i);
			if (boneIndex >= 0)
			{
				Bones[i] = ((Component)array[boneIndex]).gameObject;
			}
		}
	}

	public void EnsureTPose()
	{
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0103: Unknown result type (might be due to invalid IL or missing references)
		//IL_0106: Unknown result type (might be due to invalid IL or missing references)
		//IL_010b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0115: Unknown result type (might be due to invalid IL or missing references)
		//IL_011a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_012c: Unknown result type (might be due to invalid IL or missing references)
		Dictionary<HumanBodyBones, Transform> dictionary = (from x in Bones.Select((GameObject x, int i) => new { i, x })
			where (Object)(object)x.x != (Object)null
			select x).ToDictionary(x => (HumanBodyBones)x.i, x => x.x.transform);
		Vector3 val = dictionary[(HumanBodyBones)15].position - dictionary[(HumanBodyBones)13].position;
		Vector3 normalized = ((Vector3)(ref val)).normalized;
		dictionary[(HumanBodyBones)13].rotation = Quaternion.FromToRotation(normalized, Vector3.left) * dictionary[(HumanBodyBones)13].rotation;
		val = dictionary[(HumanBodyBones)16].position - dictionary[(HumanBodyBones)14].position;
		Vector3 normalized2 = ((Vector3)(ref val)).normalized;
		dictionary[(HumanBodyBones)14].rotation = Quaternion.FromToRotation(normalized2, Vector3.right) * dictionary[(HumanBodyBones)14].rotation;
	}

	public static void SetBonesToDescription(BoneMapping mapping, AvatarDescription description)
	{
		Dictionary<HumanBodyBones, Transform> humanBones = (from x in mapping.Bones.Select((GameObject x, int i) => new { i, x })
			where (Object)(object)x.x != (Object)null
			select x).ToDictionary(x => (HumanBodyBones)x.i, x => x.x.transform);
		description.SetHumanBones(humanBones);
	}

	private void Awake()
	{
		if (Bones == null || Bones.All((GameObject x) => (Object)(object)x == (Object)null))
		{
			GetBones();
		}
	}
}
public class BvhBone : IBone
{
	private List<IBone> _children = new List<IBone>();

	public string Name { get; private set; }

	public Vector3 SkeletonLocalPosition { get; private set; }

	public IBone Parent { get; private set; }

	public IList<IBone> Children => _children;

	public BvhBone(string name, Vector3 position)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		Name = name;
		SkeletonLocalPosition = position;
	}

	public override string ToString()
	{
		return $"<BvhBone: {Name}>";
	}

	public void Build(Transform t)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Expected O, but got Unknown
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		foreach (Transform item in t)
		{
			Transform val = item;
			BvhBone bvhBone = new BvhBone(((Object)val).name, SkeletonLocalPosition + val.localPosition);
			bvhBone.Parent = this;
			_children.Add(bvhBone);
			bvhBone.Build(val);
		}
	}

	public void Build(BvhNode node)
	{
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		foreach (BvhNode child in node.Children)
		{
			BvhBone bvhBone = new BvhBone(child.Name, SkeletonLocalPosition + child.Offset.ToXReversedVector3());
			bvhBone.Parent = this;
			_children.Add(bvhBone);
			bvhBone.Build(child);
		}
	}

	public IEnumerable<BvhBone> Traverse()
	{
		yield return this;
		foreach (IBone child in Children)
		{
			foreach (IBone item in child.Traverse())
			{
				yield return (BvhBone)item;
			}
		}
	}
}
public static class EnumExtensions
{
	public static string ToStringFromEnum(this HumanBodyBones val, bool compareBoneTrait = false)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e6: Expected I4, but got Unknown
		switch ((int)val)
		{
		case 0:
			return "Hips";
		case 1:
			return "LeftUpperLeg";
		case 2:
			return "RightUpperLeg";
		case 3:
			return "LeftLowerLeg";
		case 4:
			return "RightLowerLeg";
		case 5:
			return "LeftFoot";
		case 6:
			return "RightFoot";
		case 7:
			return "Spine";
		case 8:
			return "Chest";
		case 9:
			return "Neck";
		case 10:
			return "Head";
		case 11:
			return "LeftShoulder";
		case 12:
			return "RightShoulder";
		case 13:
			return "LeftUpperArm";
		case 14:
			return "RightUpperArm";
		case 15:
			return "LeftLowerArm";
		case 16:
			return "RightLowerArm";
		case 17:
			return "LeftHand";
		case 18:
			return "RightHand";
		case 19:
			return "LeftToes";
		case 20:
			return "RightToes";
		case 21:
			return "LeftEye";
		case 22:
			return "RightEye";
		case 23:
			return "Jaw";
		case 24:
			if (!compareBoneTrait)
			{
				return "LeftThumbProximal";
			}
			return "Left Thumb Proximal";
		case 25:
			if (!compareBoneTrait)
			{
				return "LeftThumbIntermediate";
			}
			return "Left Thumb Intermediate";
		case 26:
			if (!compareBoneTrait)
			{
				return "LeftThumbDistal";
			}
			return "Left Thumb Distal";
		case 27:
			if (!compareBoneTrait)
			{
				return "LeftIndexProximal";
			}
			return "Left Index Proximal";
		case 28:
			if (!compareBoneTrait)
			{
				return "LeftIndexIntermediate";
			}
			return "Left Index Intermediate";
		case 29:
			if (!compareBoneTrait)
			{
				return "LeftIndexDistal";
			}
			return "Left Index Distal";
		case 30:
			if (!compareBoneTrait)
			{
				return "LeftMiddleProximal";
			}
			return "Left Middle Proximal";
		case 31:
			if (!compareBoneTrait)
			{
				return "LeftMiddleIntermediate";
			}
			return "Left Middle Intermediate";
		case 32:
			if (!compareBoneTrait)
			{
				return "LeftMiddleDistal";
			}
			return "Left Middle Distal";
		case 33:
			if (!compareBoneTrait)
			{
				return "LeftRingProximal";
			}
			return "Left Ring Proximal";
		case 34:
			if (!compareBoneTrait)
			{
				return "LeftRingIntermediate";
			}
			return "Left Ring Intermediate";
		case 35:
			if (!compareBoneTrait)
			{
				return "LeftRingDistal";
			}
			return "Left Ring Distal";
		case 36:
			if (!compareBoneTrait)
			{
				return "LeftLittleProximal";
			}
			return "Left Little Proximal";
		case 37:
			if (!compareBoneTrait)
			{
				return "LeftLittleIntermediate";
			}
			return "Left Little Intermediate";
		case 38:
			if (!compareBoneTrait)
			{
				return "LeftLittleDistal";
			}
			return "Left Little Distal";
		case 39:
			if (!compareBoneTrait)
			{
				return "RightThumbProximal";
			}
			return "Right Thumb Proximal";
		case 40:
			if (!compareBoneTrait)
			{
				return "RightThumbIntermediate";
			}
			return "Right Thumb Intermediate";
		case 41:
			if (!compareBoneTrait)
			{
				return "RightThumbDistal";
			}
			return "Right Thumb Distal";
		case 42:
			if (!compareBoneTrait)
			{
				return "RightIndexProximal";
			}
			return "Right Index Proximal";
		case 43:
			if (!compareBoneTrait)
			{
				return "RightIndexIntermediate";
			}
			return "Right Index Intermediate";
		case 44:
			if (!compareBoneTrait)
			{
				return "RightIndexDistal";
			}
			return "Right Index Distal";
		case 45:
			if (!compareBoneTrait)
			{
				return "RightMiddleProximal";
			}
			return "Right Middle Proximal";
		case 46:
			if (!compareBoneTrait)
			{
				return "RightMiddleIntermediate";
			}
			return "Right Middle Intermediate";
		case 47:
			if (!compareBoneTrait)
			{
				return "RightMiddleDistal";
			}
			return "Right Middle Distal";
		case 48:
			if (!compareBoneTrait)
			{
				return "RightRingProximal";
			}
			return "Right Ring Proximal";
		case 49:
			if (!compareBoneTrait)
			{
				return "RightRingIntermediate";
			}
			return "Right Ring Intermediate";
		case 50:
			if (!compareBoneTrait)
			{
				return "RightRingDistal";
			}
			return "Right Ring Distal";
		case 51:
			if (!compareBoneTrait)
			{
				return "RightLittleProximal";
			}
			return "Right Little Proximal";
		case 52:
			if (!compareBoneTrait)
			{
				return "RightLittleIntermediate";
			}
			return "Right Little Intermediate";
		case 53:
			if (!compareBoneTrait)
			{
				return "RightLittleDistal";
			}
			return "Right Little Distal";
		case 54:
			return "UpperChest";
		case 55:
			return "LastBone";
		default:
			throw new InvalidOperationException();
		}
	}
}
public class BvhException : Exception
{
	public BvhException(string msg)
		: base(msg)
	{
	}
}
public enum Channel
{
	Xposition,
	Yposition,
	Zposition,
	Xrotation,
	Yrotation,
	Zrotation
}
public static class ChannelExtensions
{
	public static string ToProperty(this Channel ch)
	{
		return ch switch
		{
			Channel.Xposition => "localPosition.x", 
			Channel.Yposition => "localPosition.y", 
			Channel.Zposition => "localPosition.z", 
			Channel.Xrotation => "localEulerAnglesBaked.x", 
			Channel.Yrotation => "localEulerAnglesBaked.y", 
			Channel.Zrotation => "localEulerAnglesBaked.z", 
			_ => throw new BvhException("no property for " + ch), 
		};
	}

	public static bool IsLocation(this Channel ch)
	{
		switch (ch)
		{
		case Channel.Xposition:
		case Channel.Yposition:
		case Channel.Zposition:
			return true;
		case Channel.Xrotation:
		case Channel.Yrotation:
		case Channel.Zrotation:
			return false;
		default:
			throw new BvhException("no property for " + ch);
		}
	}
}
public struct Single3
{
	public float x;

	public float y;

	public float z;

	public Single3(float _x, float _y, float _z)
	{
		x = _x;
		y = _y;
		z = _z;
	}
}
public class BvhNode
{
	public string Name { get; private set; }

	public Single3 Offset { get; private set; }

	public Channel[] Channels { get; private set; }

	public List<BvhNode> Children { get; private set; }

	public BvhNode(string name)
	{
		Name = name;
		Children = new List<BvhNode>();
	}

	public virtual void Parse(StringReader r)
	{
		Offset = ParseOffset(r.ReadLine());
		Channels = ParseChannel(r.ReadLine());
	}

	private static Single3 ParseOffset(string line)
	{
		string[] array = line.Trim().Split();
		if (array[0] != "OFFSET")
		{
			throw new BvhException("OFFSET is not found");
		}
		float[] array2 = (from x in array.Skip(1)
			where !string.IsNullOrEmpty(x)
			select float.Parse(x, CultureInfo.InvariantCulture)).ToArray();
		return new Single3(array2[0], array2[1], array2[2]);
	}

	private static Channel[] ParseChannel(string line)
	{
		string[] array = line.Trim().Split();
		if (array[0] != "CHANNELS")
		{
			throw new BvhException("CHANNELS is not found");
		}
		if (int.Parse(array[1]) + 2 != array.Length)
		{
			throw new BvhException("channel count is not match with split count");
		}
		return (from x in array.Skip(2)
			select (Channel)Enum.Parse(typeof(Channel), x)).ToArray();
	}

	public IEnumerable<BvhNode> Traverse()
	{
		yield return this;
		foreach (BvhNode child in Children)
		{
			foreach (BvhNode item in child.Traverse())
			{
				yield return item;
			}
		}
	}
}
public class EndSite : BvhNode
{
	public EndSite()
		: base("")
	{
	}

	public override void Parse(StringReader r)
	{
		r.ReadLine();
	}
}
public class ChannelCurve
{
	public float[] Keys { get; private set; }

	public ChannelCurve(int frameCount)
	{
		Keys = new float[frameCount];
	}

	public void SetKey(int frame, float value)
	{
		Keys[frame] = value;
	}
}
public class Bvh
{
	public struct PathWithProperty
	{
		public string Path;

		public string Property;

		public bool IsLocation;
	}

	private int m_frames;

	public BvhNode Root { get; private set; }

	public TimeSpan FrameTime { get; private set; }

	public ChannelCurve[] Channels { get; private set; }

	public int FrameCount => m_frames;

	public bool TryGetPathWithPropertyFromChannel(ChannelCurve channel, out PathWithProperty pathWithProp)
	{
		int num = Channels.ToList().IndexOf(channel);
		if (num == -1)
		{
			pathWithProp = default(PathWithProperty);
			return false;
		}
		foreach (BvhNode item in Root.Traverse())
		{
			int num2 = 0;
			while (num2 < item.Channels.Length)
			{
				if (num == 0)
				{
					pathWithProp = new PathWithProperty
					{
						Path = GetPath(item),
						Property = item.Channels[num2].ToProperty(),
						IsLocation = item.Channels[num2].IsLocation()
					};
					return true;
				}
				num2++;
				num--;
			}
		}
		throw new BvhException("channel is not found");
	}

	public string GetPath(BvhNode node)
	{
		List<string> list = new List<string> { node.Name };
		BvhNode bvhNode = node;
		while (bvhNode != null)
		{
			bvhNode = GetParent(bvhNode);
			if (bvhNode != null)
			{
				list.Insert(0, bvhNode.Name);
			}
		}
		return string.Join("/", list.ToArray());
	}

	private BvhNode GetParent(BvhNode node)
	{
		foreach (BvhNode item in Root.Traverse())
		{
			if (item.Children.Contains(node))
			{
				return item;
			}
		}
		return null;
	}

	public ChannelCurve GetChannel(BvhNode target, Channel channel)
	{
		int num = 0;
		foreach (BvhNode item in Root.Traverse())
		{
			int num2 = 0;
			while (num2 < item.Channels.Length)
			{
				if (item == target && item.Channels[num2] == channel)
				{
					return Channels[num];
				}
				num2++;
				num++;
			}
		}
		throw new BvhException("channel is not found");
	}

	public override string ToString()
	{
		return $"{Root.Traverse().Count()}nodes, {Channels.Length}channels, {m_frames}frames, {(double)m_frames * FrameTime.TotalSeconds:0.00}seconds";
	}

	public Bvh(BvhNode root, int frames, float seconds)
	{
		Root = root;
		FrameTime = TimeSpan.FromSeconds(seconds);
		m_frames = frames;
		int count = (from x in Root.Traverse()
			where x.Channels != null
			select x.Channels.Length).Sum();
		Channels = (from x in Enumerable.Range(0, count)
			select new ChannelCurve(frames)).ToArray();
	}

	public void ParseFrame(int frame, string line)
	{
		string[] array = (from x in line.Trim().Split()
			where !string.IsNullOrEmpty(x)
			select x).ToArray();
		if (array.Length != Channels.Length)
		{
			throw new BvhException("frame key count is not match channel count");
		}
		for (int i = 0; i < Channels.Length; i++)
		{
			Channels[i].SetKey(frame, float.Parse(array[i], CultureInfo.InvariantCulture));
		}
	}

	public static Bvh Parse(string src)
	{
		using StringReader stringReader = new StringReader(src);
		if (stringReader.ReadLine() != "HIERARCHY")
		{
			throw new BvhException("not start with HIERARCHY");
		}
		BvhNode bvhNode = ParseNode(stringReader);
		if (bvhNode == null)
		{
			return null;
		}
		int num = 0;
		float seconds = 0f;
		if (stringReader.ReadLine() == "MOTION")
		{
			string[] array = stringReader.ReadLine().Split(new char[1] { ':' });
			if (array[0] != "Frames")
			{
				throw new BvhException("Frames is not found");
			}
			num = int.Parse(array[1]);
			string[] array2 = stringReader.ReadLine().Split(new char[1] { ':' });
			if (array2[0] != "Frame Time")
			{
				throw new BvhException("Frame Time is not found");
			}
			seconds = float.Parse(array2[1], CultureInfo.InvariantCulture);
		}
		Bvh bvh = new Bvh(bvhNode, num, seconds);
		for (int i = 0; i < num; i++)
		{
			string line = stringReader.ReadLine();
			bvh.ParseFrame(i, line);
		}
		return bvh;
	}

	private static BvhNode ParseNode(StringReader r, int level = 0)
	{
		string text = r.ReadLine().Trim();
		string[] array = text.Split();
		if (array.Length != 2)
		{
			if (array.Length == 1 && array[0] == "}")
			{
				return null;
			}
			throw new BvhException($"split to {array.Length}({text})");
		}
		BvhNode bvhNode = null;
		if (array[0] == "ROOT")
		{
			if (level != 0)
			{
				throw new BvhException("nested ROOT");
			}
			bvhNode = new BvhNode(array[1]);
		}
		else if (array[0] == "JOINT")
		{
			if (level == 0)
			{
				throw new BvhException("should ROOT, but JOINT");
			}
			bvhNode = new BvhNode(array[1]);
		}
		else
		{
			if (!(array[0] == "End"))
			{
				throw new BvhException("unknown type: " + array[0]);
			}
			if (level == 0)
			{
				throw new BvhException("End in level 0");
			}
			bvhNode = new EndSite();
		}
		if (r.ReadLine().Trim() != "{")
		{
			throw new BvhException("'{' is not found");
		}
		bvhNode.Parse(r);
		while (true)
		{
			BvhNode bvhNode2 = ParseNode(r, level + 1);
			if (bvhNode2 == null)
			{
				break;
			}
			if (!(bvhNode2 is EndSite))
			{
				bvhNode.Children.Add(bvhNode2);
			}
		}
		return bvhNode;
	}
}
public class HumanPoseClip : ScriptableObject
{
	public const string TPoseResourcePath = "T-Pose.pose";

	public Vector3 bodyPosition;

	public Quaternion bodyRotation;

	public float[] muscles;

	public HumanPose GetPose()
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		HumanPose result = default(HumanPose);
		result.bodyPosition = bodyPosition;
		result.bodyRotation = bodyRotation;
		result.muscles = muscles;
		return result;
	}

	public void ApplyPose(ref HumanPose pose)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		bodyPosition = pose.bodyPosition;
		bodyRotation = pose.bodyRotation;
		muscles = (float[])pose.muscles.Clone();
	}
}
public class HumanPoseTransfer : MonoBehaviour
{
	public enum HumanPoseTransferSourceType
	{
		None,
		HumanPoseTransfer,
		HumanPoseClip
	}

	[SerializeField]
	public HumanPoseTransferSourceType SourceType;

	[SerializeField]
	public Avatar Avatar;

	[SerializeField]
	public HumanPoseTransfer Source;

	[SerializeField]
	public HumanPoseClip PoseClip;

	private HumanPoseHandler m_handler;

	private HumanPose m_pose;

	private int m_lastFrameCount = -1;

	public HumanPose CreatePose()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		HumanPoseHandler val = new HumanPoseHandler(Avatar, ((Component)this).transform);
		HumanPose result = default(HumanPose);
		val.GetHumanPose(ref result);
		return result;
	}

	public void SetPose(HumanPose pose)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		SetPose(Avatar, ((Component)this).transform, pose);
	}

	public static void SetPose(Avatar avatar, Transform transform, HumanPose pose)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		new HumanPoseHandler(avatar, transform).SetHumanPose(ref pose);
	}

	public static void SetTPose(Avatar avatar, Transform transform)
	{
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		HumanPose pose = Resources.Load<HumanPoseClip>("T-Pose.pose").GetPose();
		SetPose(avatar, transform, pose);
	}

	private void Reset()
	{
		Animator component = ((Component)this).GetComponent<Animator>();
		if ((Object)(object)component != (Object)null)
		{
			Avatar = component.avatar;
		}
	}

	[ContextMenu("Set T-Pose")]
	private void SetTPose()
	{
		if (!((Object)(object)Avatar == (Object)null))
		{
			SetTPose(Avatar, ((Component)this).transform);
		}
	}

	public void OnEnable()
	{
		Animator component = ((Component)this).GetComponent<Animator>();
		if ((Object)(object)component != (Object)null)
		{
			Avatar = component.avatar;
		}
		Setup();
	}

	public void Setup()
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Expected O, but got Unknown
		if (!((Object)(object)Avatar == (Object)null))
		{
			m_handler = new HumanPoseHandler(Avatar, ((Component)this).transform);
		}
	}

	public bool GetPose(int frameCount, ref HumanPose pose)
	{
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)PoseClip != (Object)null)
		{
			pose = PoseClip.GetPose();
			return true;
		}
		if (m_handler == null)
		{
			pose = m_pose;
			return false;
		}
		if (frameCount != m_lastFrameCount)
		{
			m_handler.GetHumanPose(ref m_pose);
			m_lastFrameCount = frameCount;
		}
		pose = m_pose;
		return true;
	}

	private void Update()
	{
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		switch (SourceType)
		{
		case HumanPoseTransferSourceType.HumanPoseTransfer:
			if ((Object)(object)Source != (Object)null && m_handler != null && Source.GetPose(Time.frameCount, ref m_pose))
			{
				m_handler.SetHumanPose(ref m_pose);
			}
			break;
		case HumanPoseTransferSourceType.HumanPoseClip:
			if ((Object)(object)PoseClip != (Object)null)
			{
				HumanPose pose = PoseClip.GetPose();
				m_handler.SetHumanPose(ref pose);
			}
			break;
		case HumanPoseTransferSourceType.None:
			break;
		}
	}
}
[DisallowMultipleComponent]
public class Humanoid : MonoBehaviour
{
	public struct Validation
	{
		public readonly string Message;

		public readonly bool IsError;

		public Validation(string message, bool isError)
		{
			Message = message;
			IsError = isError;
		}
	}

	[SerializeField]
	private Transform m_Hips;

	[SerializeField]
	private Transform m_LeftUpperLeg;

	[SerializeField]
	private Transform m_RightUpperLeg;

	[SerializeField]
	private Transform m_LeftLowerLeg;

	[SerializeField]
	private Transform m_RightLowerLeg;

	[SerializeField]
	private Transform m_LeftFoot;

	[SerializeField]
	private Transform m_RightFoot;

	[SerializeField]
	private Transform m_LeftToes;

	[SerializeField]
	private Transform m_RightToes;

	[SerializeField]
	private Transform m_Spine;

	[SerializeField]
	private Transform m_Chest;

	[SerializeField]
	private Transform m_UpperChest;

	[SerializeField]
	private Transform m_Neck;

	[SerializeField]
	private Transform m_Head;

	[SerializeField]
	private Transform m_LeftEye;

	[SerializeField]
	private Transform m_RightEye;

	[SerializeField]
	private Transform m_Jaw;

	[SerializeField]
	private Transform m_LeftShoulder;

	[SerializeField]
	private Transform m_RightShoulder;

	[SerializeField]
	private Transform m_LeftUpperArm;

	[SerializeField]
	private Transform m_RightUpperArm;

	[SerializeField]
	private Transform m_LeftLowerArm;

	[SerializeField]
	private Transform m_RightLowerArm;

	[SerializeField]
	private Transform m_LeftHand;

	[SerializeField]
	private Transform m_RightHand;

	[SerializeField]
	private Transform m_LeftThumbProximal;

	[SerializeField]
	private Transform m_LeftThumbIntermediate;

	[SerializeField]
	private Transform m_LeftThumbDistal;

	[SerializeField]
	private Transform m_LeftIndexProximal;

	[SerializeField]
	private Transform m_LeftIndexIntermediate;

	[SerializeField]
	private Transform m_LeftIndexDistal;

	[SerializeField]
	private Transform m_LeftMiddleProximal;

	[SerializeField]
	private Transform m_LeftMiddleIntermediate;

	[SerializeField]
	private Transform m_LeftMiddleDistal;

	[SerializeField]
	private Transform m_LeftRingProximal;

	[SerializeField]
	private Transform m_LeftRingIntermediate;

	[SerializeField]
	private Transform m_LeftRingDistal;

	[SerializeField]
	private Transform m_LeftLittleProximal;

	[SerializeField]
	private Transform m_LeftLittleIntermediate;

	[SerializeField]
	private Transform m_LeftLittleDistal;

	[SerializeField]
	private Transform m_RightThumbProximal;

	[SerializeField]
	private Transform m_RightThumbIntermediate;

	[SerializeField]
	private Transform m_RightThumbDistal;

	[SerializeField]
	private Transform m_RightIndexProximal;

	[SerializeField]
	private Transform m_RightIndexIntermediate;

	[SerializeField]
	private Transform m_RightIndexDistal;

	[SerializeField]
	private Transform m_RightMiddleProximal;

	[SerializeField]
	private Transform m_RightMiddleIntermediate;

	[SerializeField]
	private Transform m_RightMiddleDistal;

	[SerializeField]
	private Transform m_RightRingProximal;

	[SerializeField]
	private Transform m_RightRingIntermediate;

	[SerializeField]
	private Transform m_RightRingDistal;

	[SerializeField]
	private Transform m_RightLittleProximal;

	[SerializeField]
	private Transform m_RightLittleIntermediate;

	[SerializeField]
	private Transform m_RightLittleDistal;

	public Transform Hips => m_Hips;

	public Transform LeftUpperLeg => m_LeftUpperLeg;

	public Transform RightUpperLeg => m_RightUpperLeg;

	public Transform LeftLowerLeg => m_LeftLowerLeg;

	public Transform RightLowerLeg => m_RightLowerLeg;

	public Transform LeftFoot => m_LeftFoot;

	public Transform RightFoot => m_RightFoot;

	public Transform LeftToes => m_LeftToes;

	public Transform RightToes => m_RightToes;

	public Transform Spine => m_Spine;

	public Transform Chest => m_Chest;

	public Transform UpperChest => m_UpperChest;

	public Transform Neck => m_Neck;

	public Transform Head => m_Head;

	public Transform LeftEye => m_LeftEye;

	public Transform RightEye => m_RightEye;

	public Transform Jaw => m_Jaw;

	public Transform LeftShoulder => m_LeftShoulder;

	public Transform RightShoulder => m_RightShoulder;

	public Transform LeftUpperArm => m_LeftUpperArm;

	public Transform RightUpperArm => m_RightUpperArm;

	public Transform LeftLowerArm => m_LeftLowerArm;

	public Transform RightLowerArm => m_RightLowerArm;

	public Transform LeftHand => m_LeftHand;

	public Transform RightHand => m_RightHand;

	public Transform LeftThumbProximal => m_LeftThumbProximal;

	public Transform LeftThumbIntermediate => m_LeftThumbIntermediate;

	public Transform LeftThumbDistal => m_LeftThumbDistal;

	public Transform LeftIndexProximal => m_LeftIndexProximal;

	public Transform LeftIndexIntermediate => m_LeftIndexIntermediate;

	public Transform LeftIndexDistal => m_LeftIndexDistal;

	public Transform LeftMiddleProximal => m_LeftMiddleProximal;

	public Transform LeftMiddleIntermediate => m_LeftMiddleIntermediate;

	public Transform LeftMiddleDistal => m_LeftMiddleDistal;

	public Transform LeftRingProximal => m_LeftRingProximal;

	public Transform LeftRingIntermediate => m_LeftRingIntermediate;

	public Transform LeftRingDistal => m_LeftRingDistal;

	public Transform LeftLittleProximal => m_LeftLittleProximal;

	public Transform LeftLittleIntermediate => m_LeftLittleIntermediate;

	public Transform LeftLittleDistal => m_LeftLittleDistal;

	public Transform RightThumbProximal => m_RightThumbProximal;

	public Transform RightThumbIntermediate => m_RightThumbIntermediate;

	public Transform RightThumbDistal => m_RightThumbDistal;

	public Transform RightIndexProximal => m_RightIndexProximal;

	public Transform RightIndexIntermediate => m_RightIndexIntermediate;

	public Transform RightIndexDistal => m_RightIndexDistal;

	public Transform RightMiddleProximal => m_RightMiddleProximal;

	public Transform RightMiddleIntermediate => m_RightMiddleIntermediate;

	public Transform RightMiddleDistal => m_RightMiddleDistal;

	public Transform RightRingProximal => m_RightRingProximal;

	public Transform RightRingIntermediate => m_RightRingIntermediate;

	public Transform RightRingDistal => m_RightRingDistal;

	public Transform RightLittleProximal => m_RightLittleProximal;

	public Transform RightLittleIntermediate => m_RightLittleIntermediate;

	public Transform RightLittleDistal => m_RightLittleDistal;

	private IEnumerable<(Transform, HumanBodyBones)> BoneMap
	{
		get
		{
			if ((Object)(object)Hips != (Object)null)
			{
				yield return (Hips, (HumanBodyBones)0);
			}
			if ((Object)(object)LeftUpperLeg != (Object)null)
			{
				yield return (LeftUpperLeg, (HumanBodyBones)1);
			}
			if ((Object)(object)RightUpperLeg != (Object)null)
			{
				yield return (RightUpperLeg, (HumanBodyBones)2);
			}
			if ((Object)(object)LeftLowerLeg != (Object)null)
			{
				yield return (LeftLowerLeg, (HumanBodyBones)3);
			}
			if ((Object)(object)RightLowerLeg != (Object)null)
			{
				yield return (RightLowerLeg, (HumanBodyBones)4);
			}
			if ((Object)(object)LeftFoot != (Object)null)
			{
				yield return (LeftFoot, (HumanBodyBones)5);
			}
			if ((Object)(object)RightFoot != (Object)null)
			{
				yield return (RightFoot, (HumanBodyBones)6);
			}
			if ((Object)(object)LeftToes != (Object)null)
			{
				yield return (LeftToes, (HumanBodyBones)19);
			}
			if ((Object)(object)RightToes != (Object)null)
			{
				yield return (RightToes, (HumanBodyBones)20);
			}
			if ((Object)(object)Spine != (Object)null)
			{
				yield return (Spine, (HumanBodyBones)7);
			}
			if ((Object)(object)Chest != (Object)null)
			{
				yield return (Chest, (HumanBodyBones)8);
			}
			if ((Object)(object)UpperChest != (Object)null)
			{
				yield return (UpperChest, (HumanBodyBones)54);
			}
			if ((Object)(object)Neck != (Object)null)
			{
				yield return (Neck, (HumanBodyBones)9);
			}
			if ((Object)(object)Head != (Object)null)
			{
				yield return (Head, (HumanBodyBones)10);
			}
			if ((Object)(object)LeftEye != (Object)null)
			{
				yield return (LeftEye, (HumanBodyBones)21);
			}
			if ((Object)(object)RightEye != (Object)null)
			{
				yield return (RightEye, (HumanBodyBones)22);
			}
			if ((Object)(object)Jaw != (Object)null)
			{
				yield return (Jaw, (HumanBodyBones)23);
			}
			if ((Object)(object)LeftShoulder != (Object)null)
			{
				yield return (LeftShoulder, (HumanBodyBones)11);
			}
			if ((Object)(object)RightShoulder != (Object)null)
			{
				yield return (RightShoulder, (HumanBodyBones)12);
			}
			if ((Object)(object)LeftUpperArm != (Object)null)
			{
				yield return (LeftUpperArm, (HumanBodyBones)13);
			}
			if ((Object)(object)RightUpperArm != (Object)null)
			{
				yield return (RightUpperArm, (HumanBodyBones)14);
			}
			if ((Object)(object)LeftLowerArm != (Object)null)
			{
				yield return (LeftLowerArm, (HumanBodyBones)15);
			}
			if ((Object)(object)RightLowerArm != (Object)null)
			{
				yield return (RightLowerArm, (HumanBodyBones)16);
			}
			if ((Object)(object)LeftHand != (Object)null)
			{
				yield return (LeftHand, (HumanBodyBones)17);
			}
			if ((Object)(object)RightHand != (Object)null)
			{
				yield return (RightHand, (HumanBodyBones)18);
			}
			if ((Object)(object)LeftThumbProximal != (Object)null)
			{
				yield return (LeftThumbProximal, (HumanBodyBones)24);
			}
			if ((Object)(object)LeftThumbIntermediate != (Object)null)
			{
				yield return (LeftThumbIntermediate, (HumanBodyBones)25);
			}
			if ((Object)(object)LeftThumbDistal != (Object)null)
			{
				yield return (LeftThumbDistal, (HumanBodyBones)26);
			}
			if ((Object)(object)LeftIndexProximal != (Object)null)
			{
				yield return (LeftIndexProximal, (HumanBodyBones)27);
			}
			if ((Object)(object)LeftIndexIntermediate != (Object)null)
			{
				yield return (LeftIndexIntermediate, (HumanBodyBones)28);
			}
			if ((Object)(object)LeftIndexDistal != (Object)null)
			{
				yield return (LeftIndexDistal, (HumanBodyBones)29);
			}
			if ((Object)(object)LeftMiddleProximal != (Object)null)
			{
				yield return (LeftMiddleProximal, (HumanBodyBones)30);
			}
			if ((Object)(object)LeftMiddleIntermediate != (Object)null)
			{
				yield return (LeftMiddleIntermediate, (HumanBodyBones)31);
			}
			if ((Object)(object)LeftMiddleDistal != (Object)null)
			{
				yield return (LeftMiddleDistal, (HumanBodyBones)32);
			}
			if ((Object)(object)LeftRingProximal != (Object)null)
			{
				yield return (LeftRingProximal, (HumanBodyBones)33);
			}
			if ((Object)(object)LeftRingIntermediate != (Object)null)
			{
				yield return (LeftRingIntermediate, (HumanBodyBones)34);
			}
			if ((Object)(object)LeftRingDistal != (Object)null)
			{
				yield return (LeftRingDistal, (HumanBodyBones)35);
			}
			if ((Object)(object)LeftLittleProximal != (Object)null)
			{
				yield return (LeftLittleProximal, (HumanBodyBones)36);
			}
			if ((Object)(object)LeftLittleIntermediate != (Object)null)
			{
				yield return (LeftLittleIntermediate, (HumanBodyBones)37);
			}
			if ((Object)(object)LeftLittleDistal != (Object)null)
			{
				yield return (LeftLittleDistal, (HumanBodyBones)38);
			}
			if ((Object)(object)RightThumbProximal != (Object)null)
			{
				yield return (RightThumbProximal, (HumanBodyBones)39);
			}
			if ((Object)(object)RightThumbIntermediate != (Object)null)
			{
				yield return (RightThumbIntermediate, (HumanBodyBones)40);
			}
			if ((Object)(object)RightThumbDistal != (Object)null)
			{
				yield return (RightThumbDistal, (HumanBodyBones)41);
			}
			if ((Object)(object)RightIndexProximal != (Object)null)
			{
				yield return (RightIndexProximal, (HumanBodyBones)42);
			}
			if ((Object)(object)RightIndexIntermediate != (Object)null)
			{
				yield return (RightIndexIntermediate, (HumanBodyBones)43);
			}
			if ((Object)(object)RightIndexDistal != (Object)null)
			{
				yield return (RightIndexDistal, (HumanBodyBones)44);
			}
			if ((Object)(object)RightMiddleProximal != (Object)null)
			{
				yield return (RightMiddleProximal, (HumanBodyBones)45);
			}
			if ((Object)(object)RightMiddleIntermediate != (Object)null)
			{
				yield return (RightMiddleIntermediate, (HumanBodyBones)46);
			}
			if ((Object)(object)RightMiddleDistal != (Object)null)
			{
				yield return (RightMiddleDistal, (HumanBodyBones)47);
			}
			if ((Object)(object)RightRingProximal != (Object)null)
			{
				yield return (RightRingProximal, (HumanBodyBones)48);
			}
			if ((Object)(object)RightRingIntermediate != (Object)null)
			{
				yield return (RightRingIntermediate, (HumanBodyBones)49);
			}
			if ((Object)(object)RightRingDistal != (Object)null)
			{
				yield return (RightRingDistal, (HumanBodyBones)50);
			}
			if ((Object)(object)RightLittleProximal != (Object)null)
			{
				yield return (RightLittleProximal, (HumanBodyBones)51);
			}
			if ((Object)(object)RightLittleIntermediate != (Object)null)
			{
				yield return (RightLittleIntermediate, (HumanBodyBones)52);
			}
			if ((Object)(object)RightLittleDistal != (Object)null)
			{
				yield return (RightLittleDistal, (HumanBodyBones)53);
			}
		}
	}

	private void Reset()
	{
		AssignBonesFromAnimator();
	}

	private IEnumerable<Validation> Required(params (string, Transform)[] props)
	{
		for (int i = 0; i < props.Length; i++)
		{
			(string, Transform) tuple = props[i];
			if ((Object)(object)tuple.Item2 == (Object)null)
			{
				var (text, _) = tuple;
				if (text.StartsWith("m_"))
				{
					text = text.Substring(2);
				}
				yield return new Validation(text + " is Required", isError: true);
			}
		}
	}

	private static Vector3 GetForward(Transform l, Transform r)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		if ((Object)(object)l == (Object)null || (Object)(object)r == (Object)null)
		{
			return Vector3.zero;
		}
		Vector3 val = r.position - l.position;
		return Vector3.Cross(((Vector3)(ref val)).normalized, Vector3.up);
	}

	public Vector3 GetForward()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		return GetForward(m_LeftUpperLeg, m_RightUpperLeg);
	}

	public IEnumerable<Validation> Validate()
	{
		foreach (Validation item in Required(("m_Hips", m_Hips), ("m_Spine", m_Spine), ("m_Head", m_Head), ("m_LeftUpperLeg", m_LeftUpperLeg), ("m_LeftLowerLeg", m_LeftLowerLeg), ("m_LeftFoot", m_LeftFoot), ("m_RightUpperLeg", m_RightUpperLeg), ("m_RightLowerLeg", m_RightLowerLeg), ("m_RightFoot", m_RightFoot), ("m_LeftUpperArm", m_LeftUpperArm), ("m_LeftLowerArm", m_LeftLowerArm), ("m_LeftHand", m_LeftHand), ("m_RightUpperArm", m_RightUpperArm), ("m_RightLowerArm", m_RightLowerArm), ("m_RightHand", m_RightHand)))
		{
			yield return item;
		}
	}

	public Avatar CreateAvatar()
	{
		return HumanoidLoader.LoadHumanoidAvatar(((Component)this).transform, BoneMap);
	}

	public Transform GetBoneTransform(HumanBodyBones bone)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Expected I4, but got Unknown
		return (Transform)((int)bone switch
		{
			0 => Hips, 
			1 => LeftUpperLeg, 
			2 => RightUpperLeg, 
			3 => LeftLowerLeg, 
			4 => RightLowerLeg, 
			5 => LeftFoot, 
			6 => RightFoot, 
			19 => LeftToes, 
			20 => RightToes, 
			7 => Spine, 
			8 => Chest, 
			54 => UpperChest, 
			9 => Neck, 
			10 => Head, 
			21 => LeftEye, 
			22 => RightEye, 
			23 => Jaw, 
			11 => LeftShoulder, 
			12 => RightShoulder, 
			13 => LeftUpperArm, 
			14 => RightUpperArm, 
			15 => LeftLowerArm, 
			16 => RightLowerArm, 
			17 => LeftHand, 
			18 => RightHand, 
			24 => LeftThumbProximal, 
			25 => LeftThumbIntermediate, 
			26 => LeftThumbDistal, 
			27 => LeftIndexProximal, 
			28 => LeftIndexIntermediate, 
			29 => LeftIndexDistal, 
			30 => LeftMiddleProximal, 
			31 => LeftMiddleIntermediate, 
			32 => LeftMiddleDistal, 
			33 => LeftRingProximal, 
			34 => LeftRingIntermediate, 
			35 => LeftRingDistal, 
			36 => LeftLittleProximal, 
			37 => LeftLittleIntermediate, 
			38 => LeftLittleDistal, 
			39 => RightThumbProximal, 
			40 => RightThumbIntermediate, 
			41 => RightThumbDistal, 
			42 => RightIndexProximal, 
			43 => RightIndexIntermediate, 
			44 => RightIndexDistal, 
			45 => RightMiddleProximal, 
			46 => RightMiddleIntermediate, 
			47 => RightMiddleDistal, 
			48 => RightRingProximal, 
			49 => RightRingIntermediate, 
			50 => RightRingDistal, 
			51 => RightLittleProximal, 
			52 => RightLittleIntermediate, 
			53 => RightLittleDistal, 
			_ => null, 
		});
	}

	public void AssignBones(IEnumerable<(HumanBodyBones, Transform)> nodes)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Invalid comparison between Unknown and I4
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_010f: Expected I4, but got Unknown
		foreach (var (val, val2) in nodes)
		{
			if ((int)val != 55 && val2 != null)
			{
				switch ((int)val)
				{
				case 0:
					m_Hips = val2;
					break;
				case 1:
					m_LeftUpperLeg = val2;
					break;
				case 2:
					m_RightUpperLeg = val2;
					break;
				case 3:
					m_LeftLowerLeg = val2;
					break;
				case 4:
					m_RightLowerLeg = val2;
					break;
				case 5:
					m_LeftFoot = val2;
					break;
				case 6:
					m_RightFoot = val2;
					break;
				case 19:
					m_LeftToes = val2;
					break;
				case 20:
					m_RightToes = val2;
					break;
				case 7:
					m_Spine = val2;
					break;
				case 8:
					m_Chest = val2;
					break;
				case 54:
					m_UpperChest = val2;
					break;
				case 9:
					m_Neck = val2;
					break;
				case 10:
					m_Head = val2;
					break;
				case 21:
					m_LeftEye = val2;
					break;
				case 22:
					m_RightEye = val2;
					break;
				case 23:
					m_Jaw = val2;
					break;
				case 11:
					m_LeftShoulder = val2;
					break;
				case 12:
					m_RightShoulder = val2;
					break;
				case 13:
					m_LeftUpperArm = val2;
					break;
				case 14:
					m_RightUpperArm = val2;
					break;
				case 15:
					m_LeftLowerArm = val2;
					break;
				case 16:
					m_RightLowerArm = val2;
					break;
				case 17:
					m_LeftHand = val2;
					break;
				case 18:
					m_RightHand = val2;
					break;
				case 24:
					m_LeftThumbProximal = val2;
					break;
				case 25:
					m_LeftThumbIntermediate = val2;
					break;
				case 26:
					m_LeftThumbDistal = val2;
					break;
				case 27:
					m_LeftIndexProximal = val2;
					break;
				case 28:
					m_LeftIndexIntermediate = val2;
					break;
				case 29:
					m_LeftIndexDistal = val2;
					break;
				case 30:
					m_LeftMiddleProximal = val2;
					break;
				case 31:
					m_LeftMiddleIntermediate = val2;
					break;
				case 32:
					m_LeftMiddleDistal = val2;
					break;
				case 33:
					m_LeftRingProximal = val2;
					break;
				case 34:
					m_LeftRingIntermediate = val2;
					break;
				case 35:
					m_LeftRingDistal = val2;
					break;
				case 36:
					m_LeftLittleProximal = val2;
					break;
				case 37:
					m_LeftLittleIntermediate = val2;
					break;
				case 38:
					m_LeftLittleDistal = val2;
					break;
				case 39:
					m_RightThumbProximal = val2;
					break;
				case 40:
					m_RightThumbIntermediate = val2;
					break;
				case 41:
					m_RightThumbDistal = val2;
					break;
				case 42:
					m_RightIndexProximal = val2;
					break;
				case 43:
					m_RightIndexIntermediate = val2;
					break;
				case 44:
					m_RightIndexDistal = val2;
					break;
				case 45:
					m_RightMiddleProximal = val2;
					break;
				case 46:
					m_RightMiddleIntermediate = val2;
					break;
				case 47:
					m_RightMiddleDistal = val2;
					break;
				case 48:
					m_RightRingProximal = val2;
					break;
				case 49:
					m_RightRingIntermediate = val2;
					break;
				case 50:
					m_RightRingDistal = val2;
					break;
				case 51:
					m_RightLittleProximal = val2;
					break;
				case 52:
					m_RightLittleIntermediate = val2;
					break;
				case 53:
					m_RightLittleDistal = val2;
					break;
				}
			}
		}
	}

	public bool AssignBonesFromAnimator()
	{
		Animator animator = ((Component)this).GetComponent<Animator>();
		if ((Object)(object)animator == (Object)null)
		{
			return false;
		}
		Avatar avatar = animator.avatar;
		if ((Object)(object)avatar == (Object)null)
		{
			return false;
		}
		if (!avatar.isValid)
		{
			return false;
		}
		if (!avatar.isHuman)
		{
			return false;
		}
		HumanBodyBones[] source = (HumanBodyBones[])Enum.GetValues(typeof(HumanBodyBones));
		AssignBones(source.Select((HumanBodyBones x) => ((HumanBodyBones, Transform))(((int)x == 55) ? ((HumanBodyBones)55, (Transform)null) : ((HumanBodyBones)Enum.Parse(typeof(HumanBodyBones), ((object)(HumanBodyBones)(ref x)).ToString(), ignoreCase: true), animator.GetBoneTransform(x)))));
		return true;
	}
}
public static class HumanoidLoader
{
	private static readonly Dictionary<HumanBodyBones, string> s_humanTranitBoneNameMap = HumanTrait.BoneName.ToDictionary((string x) => TraitToHumanBone(x), (string x) => x);

	public static Avatar LoadHumanoidAvatar(Transform root, IEnumerable<(Transform, HumanBodyBones)> boneMap)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		HumanDescription val = default(HumanDescription);
		val.skeleton = (from x in ((Component)root).GetComponentsInChildren<Transform>()
			select x.ToSkeletonBone()).ToArray();
		val.human = boneMap.Select(delegate((Transform, HumanBodyBones) x)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0035: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0049: Unknown result type (might be due to invalid IL or missing references)
			HumanBone result = default(HumanBone);
			((HumanBone)(ref result)).boneName = ((Object)x.Item1).name;
			((HumanBone)(ref result)).humanName = s_humanTranitBoneNameMap[x.Item2];
			HumanLimit limit = default(HumanLimit);
			((HumanLimit)(ref limit)).useDefaultValues = true;
			result.limit = limit;
			return result;
		}).ToArray();
		((HumanDescription)(ref val)).armStretch = 0.05f;
		((HumanDescription)(ref val)).legStretch = 0.05f;
		((HumanDescription)(ref val)).upperArmTwist = 0.5f;
		((HumanDescription)(ref val)).lowerArmTwist = 0.5f;
		((HumanDescription)(ref val)).upperLegTwist = 0.5f;
		((HumanDescription)(ref val)).lowerLegTwist = 0.5f;
		((HumanDescription)(ref val)).feetSpacing = 0f;
		((HumanDescription)(ref val)).hasTranslationDoF = false;
		HumanDescription val2 = val;
		return AvatarBuilder.BuildHumanAvatar(((Component)root).gameObject, val2);
	}

	private static HumanBodyBones TraitToHumanBone(string x)
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		return (HumanBodyBones)Enum.Parse(typeof(HumanBodyBones), x.Replace(" ", ""), ignoreCase: true);
	}
}
public interface IBone
{
	string Name { get; }

	Vector3 SkeletonLocalPosition { get; }

	IBone Parent { get; }

	IList<IBone> Children { get; }
}
public static class IBoneExtensions
{
	public static IEnumerable<IBone> Traverse(this IBone self)
	{
		yield return self;
		foreach (IBone child in self.Children)
		{
			foreach (IBone item in child.Traverse())
			{
				yield return item;
			}
		}
	}

	public static Vector3 CenterOfDescendant(this IBone self)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_0042: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = Vector3.zero;
		int num = 0;
		foreach (IBone item in self.Traverse())
		{
			val += item.SkeletonLocalPosition;
			num++;
		}
		return val / (float)num;
	}
}
public static class BvhAnimation
{
	private class CurveSet
	{
		private BvhNode Node;

		private Func<float, float, float, Quaternion> EulerToRotation;

		public ChannelCurve PositionX;

		public ChannelCurve PositionY;

		public ChannelCurve PositionZ;

		public ChannelCurve RotationX;

		public ChannelCurve RotationY;

		public ChannelCurve RotationZ;

		public CurveSet(BvhNode node)
		{
			Node = node;
		}

		public Vector3 GetPosition(int i)
		{
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			return new Vector3(PositionX.Keys[i], PositionY.Keys[i], PositionZ.Keys[i]);
		}

		public Quaternion GetRotation(int i)
		{
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			if (EulerToRotation == null)
			{
				EulerToRotation = Node.GetEulerToRotation();
			}
			return EulerToRotation(RotationX.Keys[i], RotationY.Keys[i], RotationZ.Keys[i]);
		}

		private static void AddCurve(Bvh bvh, AnimationClip clip, ChannelCurve ch, float scaling)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Expected O, but got Unknown
			if (ch != null)
			{
				Bvh.PathWithProperty pathWithProp = default(Bvh.PathWithProperty);
				bvh.TryGetPathWithPropertyFromChannel(ch, out pathWithProp);
				AnimationCurve val = new AnimationCurve();
				for (int i = 0; i < bvh.FrameCount; i++)
				{
					float num = (float)((double)i * bvh.FrameTime.TotalSeconds);
					float num2 = ch.Keys[i] * scaling;
					val.AddKey(num, num2);
				}
				clip.SetCurve(pathWithProp.Path, typeof(Transform), pathWithProp.Property, val);
			}
		}

		public void AddCurves(Bvh bvh, AnimationClip clip, float scaling)
		{
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0048: Unknown result type (might be due to invalid IL or missing references)
			//IL_004e: Expected O, but got Unknown
			//IL_004e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0054: Expected O, but got Unknown
			//IL_0054: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Expected O, but got Unknown
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			AddCurve(bvh, clip, PositionX, 0f - scaling);
			AddCurve(bvh, clip, PositionY, scaling);
			AddCurve(bvh, clip, PositionZ, scaling);
			Bvh.PathWithProperty pathWithProp = default(Bvh.PathWithProperty);
			bvh.TryGetPathWithPropertyFromChannel(RotationX, out pathWithProp);
			AnimationCurve val = new AnimationCurve();
			AnimationCurve val2 = new AnimationCurve();
			AnimationCurve val3 = new AnimationCurve();
			AnimationCurve val4 = new AnimationCurve();
			for (int i = 0; i < bvh.FrameCount; i++)
			{
				float num = (float)((double)i * bvh.FrameTime.TotalSeconds);
				Quaternion val5 = GetRotation(i).ReverseX();
				val.AddKey(num, val5.x);
				val2.AddKey(num, val5.y);
				val3.AddKey(num, val5.z);
				val4.AddKey(num, val5.w);
			}
			clip.SetCurve(pathWithProp.Path, typeof(Transform), "localRotation.x", val);
			clip.SetCurve(pathWithProp.Path, typeof(Transform), "localRotation.y", val2);
			clip.SetCurve(pathWithProp.Path, typeof(Transform), "localRotation.z", val3);
			clip.SetCurve(pathWithProp.Path, typeof(Transform), "localRotation.w", val4);
		}
	}

	public static AnimationClip CreateAnimationClip(Bvh bvh, float scaling)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Expected O, but got Unknown
		AnimationClip val = new AnimationClip();
		val.legacy = true;
		Dictionary<BvhNode, CurveSet> dictionary = new Dictionary<BvhNode, CurveSet>();
		int num = 0;
		foreach (BvhNode item in bvh.Root.Traverse())
		{
			CurveSet curveSet2 = (dictionary[item] = new CurveSet(item));
			int num2 = 0;
			while (num2 < item.Channels.Length)
			{
				ChannelCurve channelCurve = bvh.Channels[num];
				switch (item.Channels[num2])
				{
				case Channel.Xposition:
					curveSet2.PositionX = channelCurve;
					break;
				case Channel.Yposition:
					curveSet2.PositionY = channelCurve;
					break;
				case Channel.Zposition:
					curveSet2.PositionZ = channelCurve;
					break;
				case Channel.Xrotation:
					curveSet2.RotationX = channelCurve;
					break;
				case Channel.Yrotation:
					curveSet2.RotationY = channelCurve;
					break;
				case Channel.Zrotation:
					curveSet2.RotationZ = channelCurve;
					break;
				default:
					throw new Exception();
				}
				num2++;
				num++;
			}
		}
		foreach (KeyValuePair<BvhNode, CurveSet> item2 in dictionary)
		{
			item2.Value.AddCurves(bvh, val, scaling);
		}
		val.EnsureQuaternionContinuity();
		return val;
	}
}
public static class BvhImporter
{
	[Obsolete("use BvhImporter.Parse(path), then BvhImporter.Load()")]
	public static void Import(BvhImporterContext context)
	{
		context.Parse(context.Path);
		context.Load();
	}
}
[Obsolete("use BvhImporterContext")]
public class ImporterContext : BvhImporterContext
{
}
public class BvhImporterContext
{
	private string m_path;

	public string Source;

	public Bvh Bvh;

	public GameObject Root;

	public List<Transform> Nodes = new List<Transform>();

	public AnimationClip Animation;

	public AvatarDescription AvatarDescription;

	public Avatar Avatar;

	public Mesh Mesh;

	public Material Material;

	public string Path
	{
		get
		{
			return m_path;
		}
		set
		{
			if (!(m_path == value))
			{
				m_path = value;
			}
		}
	}

	[Obsolete("use Load(path)")]
	public void Parse()
	{
		Parse(Path);
	}

	public void Parse(string path)
	{
		Parse(path, File.ReadAllText(path, Encoding.UTF8));
	}

	public void Parse(string path, string source)
	{
		Path = path;
		Source = source;
		Bvh = Bvh.Parse(Source);
	}

	public void Load()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Expected O, but got Unknown
		//IL_0071: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e3: Expected O, but got Unknown
		Root = new GameObject(System.IO.Path.GetFileNameWithoutExtension(Path));
		Transform val = BuildHierarchy(Root.transform, Bvh.Root, 1f);
		Skeleton skeleton = Skeleton.Estimate(val);
		AvatarDescription avatarDescription = AvatarDescription.Create(val.Traverse().ToArray(), skeleton);
		float num = 1f;
		Transform val2 = val.Traverse().Skip(skeleton.GetBoneIndex((HumanBodyBones)5)).First();
		float num2 = val.position.y - val2.position.y;
		num = 1f / num2;
		foreach (Transform item in Root.transform.Traverse())
		{
			item.localPosition *= num;
		}
		float num3 = num2 * num;
		val.position = new Vector3(0f, num3, 0f);
		Avatar = avatarDescription.CreateAvatar(Root.transform);
		((Object)Avatar).name = "Avatar";
		AvatarDescription = avatarDescription;
		Animator obj = Root.AddComponent<Animator>();
		obj.avatar = Avatar;
		Animation = BvhAnimation.CreateAnimationClip(Bvh, num);
		((Object)Animation).name = ((Object)Root).name;
		Animation.legacy = true;
		Animation.wrapMode = (WrapMode)2;
		Animation obj2 = Root.AddComponent<Animation>();
		obj2.AddClip(Animation, ((Object)Animation).name);
		obj2.clip = Animation;
		obj2.Play();
		Root.AddComponent<HumanPoseTransfer>().Avatar = Avatar;
		SkinnedMeshRenderer val3 = SkeletonMeshUtility.CreateRenderer(obj);
		Material = new Material(Shader.Find("Standard"));
		((Renderer)val3).sharedMaterial = Material;
		Mesh = val3.sharedMesh;
		((Object)Mesh).name = "box-man";
	}

	private static Transform BuildHierarchy(Transform parent, BvhNode node, float toMeter)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		GameObject val = new GameObject(node.Name);
		val.transform.localPosition = node.Offset.ToXReversedVector3() * toMeter;
		val.transform.SetParent(parent, false);
		foreach (BvhNode child in node.Children)
		{
			BuildHierarchy(val.transform, child, toMeter);
		}
		return val.transform;
	}

	public void Destroy(bool destroySubAssets)
	{
		if ((Object)(object)Root != (Object)null)
		{
			Object.DestroyImmediate((Object)(object)Root);
		}
	}
}
public static class BvhExtensions
{
	public static Func<float, float, float, Quaternion> GetEulerToRotation(this BvhNode bvh)
	{
		Channel[] order = bvh.Channels.Where((Channel x) => x == Channel.Xrotation || x == Channel.Yrotation || x == Channel.Zrotation).ToArray();
		return delegate(float x, float y, float z)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_009b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0075: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			Quaternion val = Quaternion.Euler(x, 0f, 0f);
			Quaternion val2 = Quaternion.Euler(0f, y, 0f);
			Quaternion val3 = Quaternion.Euler(0f, 0f, z);
			Quaternion val4 = Quaternion.identity;
			Channel[] array = order;
			for (int i = 0; i < array.Length; i++)
			{
				val4 = (Quaternion)(array[i] switch
				{
					Channel.Xrotation => val4 * val, 
					Channel.Yrotation => val4 * val2, 
					Channel.Zrotation => val4 * val3, 
					_ => throw new BvhException("no rotation"), 
				});
			}
			return val4;
		};
	}

	public static Vector3 ToVector3(this Single3 s3)
	{
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		return new Vector3(s3.x, s3.y, s3.z);
	}

	public static Vector3 ToXReversedVector3(this Single3 s3)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		return new Vector3(0f - s3.x, s3.y, s3.z);
	}
}
public static class UnityExtensions
{
	public static Quaternion ReverseX(this Quaternion quaternion)
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		float num = default(float);
		Vector3 val = default(Vector3);
		((Quaternion)(ref quaternion)).ToAngleAxis(ref num, ref val);
		return Quaternion.AngleAxis(0f - num, new Vector3(0f - val.x, val.y, val.z));
	}

	public static IEnumerable<Transform> GetChildren(this Transform parent)
	{
		foreach (Transform item in parent)
		{
			yield return item;
		}
	}

	public static IEnumerable<Transform> Traverse(this Transform parent)
	{
		yield return parent;
		foreach (Transform item in parent)
		{
			Transform parent2 = item;
			foreach (Transform item2 in parent2.Traverse())
			{
				yield return item2;
			}
		}
	}

	public static SkeletonBone ToSkeletonBone(this Transform t)
	{
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		SkeletonBone result = default(SkeletonBone);
		result.name = ((Object)t).name;
		result.position = t.localPosition;
		result.rotation = t.localRotation;
		result.scale = t.localScale;
		return result;
	}
}
public class MuscleDebug : MonoBehaviour
{
	[Serializable]
	public struct Muscle
	{
		public int Index;

		public string Name;

		public float Value;
	}

	private HumanPoseHandler m_handler;

	public HumanPose m_pose;

	public Vector3 BodyPosition;

	public Muscle[] Muscles;

	private Avatar GetAvatar()
	{
		Animator component = ((Component)this).GetComponent<Animator>();
		if ((Object)(object)component != (Object)null && (Object)(object)component.avatar != (Object)null)
		{
			return component.avatar;
		}
		HumanPoseTransfer component2 = ((Component)this).GetComponent<HumanPoseTransfer>();
		if ((Object)(object)component2 != (Object)null && (Object)(object)component2.Avatar != (Object)null)
		{
			return component2.Avatar;
		}
		return null;
	}

	private void OnEnable()
	{
		//IL_0020: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Expected O, but got Unknown
		Avatar avatar = GetAvatar();
		if ((Object)(object)avatar == (Object)null)
		{
			((Behaviour)this).enabled = false;
			return;
		}
		m_handler = new HumanPoseHandler(avatar, ((Component)this).transform);
		Muscles = HumanTrait.MuscleName.Select(delegate(string x, int i)
		{
			Muscle result = default(Muscle);
			result.Index = i;
			result.Name = x;
			return result;
		}).ToArray();
	}

	private void OnDisable()
	{
	}

	private void Update()
	{
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		m_handler.GetHumanPose(ref m_pose);
		BodyPosition = m_pose.bodyPosition;
		for (int i = 0; i < m_pose.muscles.Length; i++)
		{
			Muscles[i].Value = m_pose.muscles[i];
		}
	}
}
public class MuscleInspector : MonoBehaviour
{
}
public class HandPoseModifier : IPoseModifier
{
	public class HandPose
	{
		public float ThumbStretch;

		public float ThumbSpread;

		public float IndexStretch;

		public float IndexSpread;

		public float MiddleStretch;

		public float MiddleSpread;

		public float RingStretch;

		public float RingSpread;

		public float LittleStretch;

		public float LittleSpread;

		[Obsolete("Use ThumbStretch")]
		public float ThumbStrech
		{
			get
			{
				return ThumbStretch;
			}
			set
			{
				ThumbStretch = value;
			}
		}

		[Obsolete("Use IndexStretch")]
		public float IndexStrech
		{
			get
			{
				return IndexStretch;
			}
			set
			{
				IndexStretch = value;
			}
		}

		[Obsolete("Use MiddleStretch")]
		public float MiddleStrech
		{
			get
			{
				return MiddleStretch;
			}
			set
			{
				MiddleStretch = value;
			}
		}

		[Obsolete("Use RingStretch")]
		public float RingStrech
		{
			get
			{
				return RingStretch;
			}
			set
			{
				RingStretch = value;
			}
		}

		[Obsolete("Use LittleStretch")]
		public float LittleStrech
		{
			get
			{
				return LittleStretch;
			}
			set
			{
				LittleStretch = value;
			}
		}
	}

	private int LeftThumb1Stretched;

	private int LeftThumb2Stretched;

	private int LeftThumb3Stretched;

	private int LeftIndex1Stretched;

	private int LeftIndex2Stretched;

	private int LeftIndex3Stretched;

	private int LeftMiddle1Stretched;

	private int LeftMiddle2Stretched;

	private int LeftMiddle3Stretched;

	private int LeftRing1Stretched;

	private int LeftRing2Stretched;

	private int LeftRing3Stretched;

	private int LeftLittle1Stretched;

	private int LeftLittle2Stretched;

	private int LeftLittle3Stretched;

	private int LeftThumbSpread;

	private int LeftIndexSpread;

	private int LeftMiddleSpread;

	private int LeftRingSpread;

	private int LeftLittleSpread;

	private int RightThumb1Stretched;

	private int RightThumb2Stretched;

	private int RightThumb3Stretched;

	private int RightIndex1Stretched;

	private int RightIndex2Stretched;

	private int RightIndex3Stretched;

	private int RightMiddle1Stretched;

	private int RightMiddle2Stretched;

	private int RightMiddle3Stretched;

	private int RightRing1Stretched;

	private int RightRing2Stretched;

	private int RightRing3Stretched;

	private int RightLittle1Stretched;

	private int RightLittle2Stretched;

	private int RightLittle3Stretched;

	private int RightThumbSpread;

	private int RightIndexSpread;

	private int RightMiddleSpread;

	private int RightRingSpread;

	private int RightLittleSpread;

	public HandPose LeftHandPose { get; set; }

	public HandPose RightHandPose { get; set; }

	public HandPoseModifier()
	{
		LeftThumb1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Thumb 1 Stretched");
		LeftThumb2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Thumb 2 Stretched");
		LeftThumb3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Thumb 3 Stretched");
		LeftIndex1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Index 1 Stretched");
		LeftIndex2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Index 2 Stretched");
		LeftIndex3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Index 3 Stretched");
		LeftMiddle1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Middle 1 Stretched");
		LeftMiddle2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Middle 2 Stretched");
		LeftMiddle3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Middle 3 Stretched");
		LeftRing1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Ring 1 Stretched");
		LeftRing2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Ring 2 Stretched");
		LeftRing3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Ring 3 Stretched");
		LeftLittle1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Little 1 Stretched");
		LeftLittle2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Little 2 Stretched");
		LeftLittle3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Left Little 3 Stretched");
		LeftThumbSpread = Array.IndexOf(HumanTrait.MuscleName, "Left Thumb Spread");
		LeftIndexSpread = Array.IndexOf(HumanTrait.MuscleName, "Left Index Spread");
		LeftMiddleSpread = Array.IndexOf(HumanTrait.MuscleName, "Left Middle Spread");
		LeftRingSpread = Array.IndexOf(HumanTrait.MuscleName, "Left Ring Spread");
		LeftLittleSpread = Array.IndexOf(HumanTrait.MuscleName, "Left Little Spread");
		RightThumb1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Thumb 1 Stretched");
		RightThumb2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Thumb 2 Stretched");
		RightThumb3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Thumb 3 Stretched");
		RightIndex1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Index 1 Stretched");
		RightIndex2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Index 2 Stretched");
		RightIndex3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Index 3 Stretched");
		RightMiddle1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Middle 1 Stretched");
		RightMiddle2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Middle 2 Stretched");
		RightMiddle3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Middle 3 Stretched");
		RightRing1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Ring 1 Stretched");
		RightRing2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Ring 2 Stretched");
		RightRing3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Ring 3 Stretched");
		RightLittle1Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Little 1 Stretched");
		RightLittle2Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Little 2 Stretched");
		RightLittle3Stretched = Array.IndexOf(HumanTrait.MuscleName, "Right Little 3 Stretched");
		RightThumbSpread = Array.IndexOf(HumanTrait.MuscleName, "Right Thumb Spread");
		RightIndexSpread = Array.IndexOf(HumanTrait.MuscleName, "Right Index Spread");
		RightMiddleSpread = Array.IndexOf(HumanTrait.MuscleName, "Right Middle Spread");
		RightRingSpread = Array.IndexOf(HumanTrait.MuscleName, "Right Ring Spread");
		RightLittleSpread = Array.IndexOf(HumanTrait.MuscleName, "Right Little Spread");
	}

	public void Modify(ref HumanPose pose)
	{
		if (LeftHandPose != null)
		{
			pose.muscles[LeftThumb1Stretched] = LeftHandPose.ThumbStretch;
			pose.muscles[LeftThumb2Stretched] = LeftHandPose.ThumbStretch;
			pose.muscles[LeftThumb3Stretched] = LeftHandPose.ThumbStretch;
			pose.muscles[LeftIndex1Stretched] = LeftHandPose.IndexStretch;
			pose.muscles[LeftIndex2Stretched] = LeftHandPose.IndexStretch;
			pose.muscles[LeftIndex3Stretched] = LeftHandPose.IndexStretch;
			pose.muscles[LeftMiddle1Stretched] = LeftHandPose.MiddleStretch;
			pose.muscles[LeftMiddle2Stretched] = LeftHandPose.MiddleStretch;
			pose.muscles[LeftMiddle3Stretched] = LeftHandPose.MiddleStretch;
			pose.muscles[LeftRing1Stretched] = LeftHandPose.RingStretch;
			pose.muscles[LeftRing2Stretched] = LeftHandPose.RingStretch;
			pose.muscles[LeftRing3Stretched] = LeftHandPose.RingStretch;
			pose.muscles[LeftLittle1Stretched] = LeftHandPose.LittleStretch;
			pose.muscles[LeftLittle2Stretched] = LeftHandPose.LittleStretch;
			pose.muscles[LeftLittle3Stretched] = LeftHandPose.LittleStretch;
			pose.muscles[LeftThumbSpread] = LeftHandPose.ThumbSpread;
			pose.muscles[LeftIndexSpread] = LeftHandPose.IndexSpread;
			pose.muscles[LeftMiddleSpread] = LeftHandPose.MiddleSpread;
			pose.muscles[LeftRingSpread] = LeftHandPose.RingSpread;
			pose.muscles[LeftLittleSpread] = LeftHandPose.LittleSpread;
		}
		if (RightHandPose != null)
		{
			pose.muscles[RightThumb1Stretched] = RightHandPose.ThumbStretch;
			pose.muscles[RightThumb2Stretched] = RightHandPose.ThumbStretch;
			pose.muscles[RightThumb3Stretched] = RightHandPose.ThumbStretch;
			pose.muscles[RightIndex1Stretched] = RightHandPose.IndexStretch;
			pose.muscles[RightIndex2Stretched] = RightHandPose.IndexStretch;
			pose.muscles[RightIndex3Stretched] = RightHandPose.IndexStretch;
			pose.muscles[RightMiddle1Stretched] = RightHandPose.MiddleStretch;
			pose.muscles[RightMiddle2Stretched] = RightHandPose.MiddleStretch;
			pose.muscles[RightMiddle3Stretched] = RightHandPose.MiddleStretch;
			pose.muscles[RightRing1Stretched] = RightHandPose.RingStretch;
			pose.muscles[RightRing2Stretched] = RightHandPose.RingStretch;
			pose.muscles[RightRing3Stretched] = RightHandPose.RingStretch;
			pose.muscles[RightLittle1Stretched] = RightHandPose.LittleStretch;
			pose.muscles[RightLittle2Stretched] = RightHandPose.LittleStretch;
			pose.muscles[RightLittle3Stretched] = RightHandPose.LittleStretch;
			pose.muscles[RightThumbSpread] = RightHandPose.ThumbSpread;
			pose.muscles[RightIndexSpread] = RightHandPose.IndexSpread;
			pose.muscles[RightMiddleSpread] = RightHandPose.MiddleSpread;
			pose.muscles[RightRingSpread] = RightHandPose.RingSpread;
			pose.muscles[RightLittleSpread] = RightHandPose.LittleSpread;
		}
	}
}
public class HandRig : MonoBehaviour
{
	[SerializeField]
	private Animator m_animator;

	[FormerlySerializedAs("LeftStrech")]
	[SerializeField]
	[Range(-1f, 1f)]
	public float LeftStretch;

	[SerializeField]
	[Range(-1f, 1f)]
	public float LeftSpread;

	[FormerlySerializedAs("RightStrech")]
	[SerializeField]
	[Range(-1f, 1f)]
	public float RightStretch;

	[SerializeField]
	[Range(-1f, 1f)]
	public float RightSpread;

	private HumanPoseHandler m_handler;

	private HandPoseModifier m_updater;

	private HandPoseModifier.HandPose m_leftHand = new HandPoseModifier.HandPose();

	private HandPoseModifier.HandPose m_rightHand = new HandPoseModifier.HandPose();

	private HumanPose m_pose;

	public Animator Animator => m_animator;

	private void Reset()
	{
		m_animator = ((Component)this).GetComponent<Animator>();
	}

	public static HumanPoseHandler GetHandler(Animator animator)
	{
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Expected O, but got Unknown
		if ((Object)(object)animator == (Object)null)
		{
			return null;
		}
		if ((Object)(object)animator.avatar == (Object)null)
		{
			return null;
		}
		if (!animator.avatar.isValid || !animator.avatar.isHuman)
		{
			return null;
		}
		return new HumanPoseHandler(animator.avatar, ((Component)animator).transform);
	}

	private void Awake()
	{
		m_handler = GetHandler(m_animator);
		if (m_handler == null)
		{
			((Behaviour)this).enabled = false;
		}
		else
		{
			m_updater = new HandPoseModifier();
		}
	}

	private void Update()
	{
		m_leftHand.ThumbStretch = LeftStretch;
		m_leftHand.ThumbSpread = LeftSpread;
		m_leftHand.IndexStretch = LeftStretch;
		m_leftHand.IndexSpread = LeftSpread;
		m_leftHand.MiddleStretch = LeftStretch;
		m_leftHand.MiddleSpread = LeftSpread;
		m_leftHand.RingStretch = LeftStretch;
		m_leftHand.RingSpread = LeftSpread;
		m_leftHand.LittleStretch = LeftStretch;
		m_leftHand.LittleSpread = LeftSpread;
		m_rightHand.ThumbStretch = RightStretch;
		m_rightHand.ThumbSpread = RightSpread;
		m_rightHand.IndexStretch = RightStretch;
		m_rightHand.IndexSpread = RightSpread;
		m_rightHand.MiddleStretch = RightStretch;
		m_rightHand.MiddleSpread = RightSpread;
		m_rightHand.RingStretch = RightStretch;
		m_rightHand.RingSpread = RightSpread;
		m_rightHand.LittleStretch = RightStretch;
		m_rightHand.LittleSpread = RightSpread;
		m_updater.LeftHandPose = m_leftHand;
		m_updater.RightHandPose = m_rightHand;
		m_handler.GetHumanPose(ref m_pose);
		m_updater.Modify(ref m_pose);
		m_handler.SetHumanPose(ref m_pose);
	}
}
public interface IPoseModifier
{
	void Modify(ref HumanPose pose);
}
public struct Skeleton
{
	private Dictionary<HumanBodyBones, int> m_indexMap;

	public Dictionary<HumanBodyBones, int> Bones => m_indexMap;

	public int GetBoneIndex(HumanBodyBones bone)
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		if (m_indexMap.TryGetValue(bone, out var value))
		{
			return value;
		}
		return -1;
	}

	public static Skeleton Estimate(Transform hips)
	{
		return new BvhSkeletonEstimator().Detect(hips);
	}

	public void Set(HumanBodyBones bone, IList<IBone> bones, IBone b)
	{
		//IL_0004: Unknown result type (might be due to invalid IL or missing references)
		if (b != null)
		{
			Set(bone, bones.IndexOf(b), b.Name);
		}
	}

	public void Set(HumanBodyBones bone, int index, string name)
	{
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		if (m_indexMap == null)
		{
			m_indexMap = new Dictionary<HumanBodyBones, int>();
		}
		m_indexMap[bone] = index;
	}
}
public interface ISkeletonDetector
{
	Skeleton Detect(IList<IBone> bones);
}
public class BvhSkeletonEstimator : ISkeletonDetector
{
	private struct Arm
	{
		public IBone Shoulder;

		public IBone UpperArm;

		public IBone LowerArm;

		public IBone Hand;
	}

	private struct Leg
	{
		public IBone UpperLeg;

		public IBone LowerLeg;

		public IBone Foot;

		public IBone Toes;
	}

	private static IBone GetRoot(IList<IBone> bones)
	{
		IBone[] array = bones.Where((IBone x) => x.Parent == null).ToArray();
		if (array.Length != 1)
		{
			throw new Exception("Require unique root");
		}
		return array[0];
	}

	private static IBone SelectBone(Func<IBone, IBone, IBone> selector, IList<IBone> bones)
	{
		if (bones == null || bones.Count == 0)
		{
			throw new Exception("no bones");
		}
		IBone bone = bones[0];
		for (int i = 1; i < bones.Count; i++)
		{
			bone = selector(bone, bones[i]);
		}
		return bone;
	}

	private static void GetSpineAndHips(IBone hips, out IBone spine, out IBone leg_L, out IBone leg_R)
	{
		if (hips.Children.Count != 3)
		{
			throw new Exception("Hips require 3 children");
		}
		spine = SelectBone((IBone l, IBone r) => (!(l.CenterOfDescendant().y > r.CenterOfDescendant().y)) ? r : l, hips.Children);
		leg_L = SelectBone((IBone l, IBone r) => (!(l.CenterOfDescendant().x < r.CenterOfDescendant().x)) ? r : l, hips.Children);
		leg_R = SelectBone((IBone l, IBone r) => (!(l.CenterOfDescendant().x > r.CenterOfDescendant().x)) ? r : l, hips.Children);
	}

	private static void GetNeckAndArms(IBone chest, out IBone neck, out IBone arm_L, out IBone arm_R)
	{
		if (chest.Children.Count != 3)
		{
			throw new Exception("Chest require 3 children");
		}
		neck = SelectBone((IBone l, IBone r) => (!(l.CenterOfDescendant().y > r.CenterOfDescendant().y)) ? r : l, chest.Children);
		arm_L = SelectBone((IBone l, IBone r) => (!(l.CenterOfDescendant().x < r.CenterOfDescendant().x)) ? r : l, chest.Children);
		arm_R = SelectBone((IBone l, IBone r) => (!(l.CenterOfDescendant().x > r.CenterOfDescendant().x)) ? r : l, chest.Children);
	}

	private Arm GetArm(IBone shoulder)
	{
		IBone[] array = shoulder.Traverse().ToArray();
		int num = array.Length;
		if ((uint)num <= 3u)
		{
			throw new NotImplementedException();
		}
		Arm result = default(Arm);
		result.Shoulder = array[0];
		result.UpperArm = array[1];
		result.LowerArm = array[2];
		result.Hand = array[3];
		return result;
	}

	private Leg GetLeg(IBone leg)
	{
		IBone[] array = (from x in leg.Traverse()
			where !x.Name.ToLower().Contains("buttock")
			select x).ToArray();
		switch (array.Length)
		{
		case 0:
		case 1:
		case 2:
			throw new NotImplementedException();
		case 3:
		{
			Leg result = default(Leg);
			result.UpperLeg = array[0];
			result.LowerLeg = array[1];
			result.Foot = array[2];
			return result;
		}
		default:
		{
			Leg result = default(Leg);
			result.UpperLeg = array[^4];
			result.LowerLeg = array[^3];
			result.Foot = array[^2];
			result.Toes = array[^1];
			return result;
		}
		}
	}

	public Skeleton Detect(IList<IBone> bones)
	{
		IBone bone = GetRoot(bones).Traverse().First((IBone x) => x.Children.Count == 3);
		GetSpineAndHips(bone, out var spine, out var leg_L, out var leg_R);
		Leg leg = GetLeg(leg_L);
		Leg leg2 = GetLeg(leg_R);
		List<IBone> list = new List<IBone>();
		foreach (IBone item in spine.Traverse())
		{
			list.Add(item);
			if (item.Children.Count == 3)
			{
				break;
			}
		}
		GetNeckAndArms(list.Last(), out var neck, out var arm_L, out var arm_R);
		Arm arm = GetArm(arm_L);
		Arm arm2 = GetArm(arm_R);
		IBone[] array = neck.Traverse().ToArray();
		Skeleton result = default(Skeleton);
		result.Set((HumanBodyBones)0, bones, bone);
		switch (list.Count)
		{
		case 0:
			throw new Exception();
		case 1:
			result.Set((HumanBodyBones)7, bones, list[0]);
			break;
		case 2:
			result.Set((HumanBodyBones)7, bones, list[0]);
			result.Set((HumanBodyBones)8, bones, list[1]);
			break;
		case 3:
			result.Set((HumanBodyBones)7, bones, list[0]);
			result.Set((HumanBodyBones)8, bones, list[1]);
			result.Set((HumanBodyBones)54, bones, list[2]);
			break;
		default:
			result.Set((HumanBodyBones)7, bones, list[0]);
			result.Set((HumanBodyBones)8, bones, list[1]);
			result.Set((HumanBodyBones)54, bones, list.Last());
			break;
		}
		switch (array.Length)
		{
		case 0:
			throw new Exception();
		case 1:
			result.Set((HumanBodyBones)10, bones, array[0]);
			break;
		case 2:
			result.Set((HumanBodyBones)9, bones, array[0]);
			result.Set((HumanBodyBones)10, bones, array[1]);
			break;
		default:
			result.Set((HumanBodyBones)9, bones, array[0]);
			re

UnityEngine.AnimationModule.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using Microsoft.CodeAnalysis;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Playables;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;

[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.VirtualTexturingModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityCurlModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS4VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS4Module")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsNativeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS5Module")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: InternalsVisibleTo("UnityEngine.GIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubsystemsModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS5VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.Core")]
[assembly: InternalsVisibleTo("Unity.Runtime")]
[assembly: InternalsVisibleTo("Unity.Collections")]
[assembly: InternalsVisibleTo("Unity.Entities.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.Entities")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("Unity.Logging")]
[assembly: InternalsVisibleTo("Unity.Networking.Transport")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("Unity.ucg.QoS")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.UIElements.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UIElements.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsGameObjectsModule")]
[assembly: InternalsVisibleTo("Unity.UIElements")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("UnityEditor.UIBuilderModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: UnityEngineModuleAssembly]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
}
namespace UnityEngine
{
	public interface IAnimationClipSource
	{
		void GetAnimationClips(List<AnimationClip> results);
	}
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
	[RequiredByNativeCode]
	public sealed class SharedBetweenAnimatorsAttribute : Attribute
	{
	}
	[RequiredByNativeCode]
	public abstract class StateMachineBehaviour : ScriptableObject
	{
		public virtual void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
		{
		}

		public virtual void OnStateMachineEnter(Animator animator, int stateMachinePathHash)
		{
		}

		public virtual void OnStateMachineExit(Animator animator, int stateMachinePathHash)
		{
		}

		public virtual void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateMove(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateIK(Animator animator, AnimatorStateInfo stateInfo, int layerIndex, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateMachineEnter(Animator animator, int stateMachinePathHash, AnimatorControllerPlayable controller)
		{
		}

		public virtual void OnStateMachineExit(Animator animator, int stateMachinePathHash, AnimatorControllerPlayable controller)
		{
		}
	}
	public enum PlayMode
	{
		StopSameLayer = 0,
		StopAll = 4
	}
	public enum QueueMode
	{
		CompleteOthers = 0,
		PlayNow = 2
	}
	public enum AnimationBlendMode
	{
		Blend,
		Additive
	}
	public enum AnimationPlayMode
	{
		Stop,
		Queue,
		Mix
	}
	public enum AnimationCullingType
	{
		AlwaysAnimate,
		BasedOnRenderers,
		[Obsolete("Enum member AnimatorCullingMode.BasedOnClipBounds has been deprecated. Use AnimationCullingType.AlwaysAnimate or AnimationCullingType.BasedOnRenderers instead")]
		BasedOnClipBounds,
		[Obsolete("Enum member AnimatorCullingMode.BasedOnUserBounds has been deprecated. Use AnimationCullingType.AlwaysAnimate or AnimationCullingType.BasedOnRenderers instead")]
		BasedOnUserBounds
	}
	internal enum AnimationEventSource
	{
		NoSource,
		Legacy,
		Animator
	}
	[NativeHeader("Modules/Animation/Animation.h")]
	public sealed class Animation : Behaviour, IEnumerable
	{
		private sealed class Enumerator : IEnumerator
		{
			private Animation m_Outer;

			private int m_CurrentIndex = -1;

			public object Current => m_Outer.GetStateAtIndex(m_CurrentIndex);

			internal Enumerator(Animation outer)
			{
				m_Outer = outer;
			}

			public bool MoveNext()
			{
				int stateCount = m_Outer.GetStateCount();
				m_CurrentIndex++;
				return m_CurrentIndex < stateCount;
			}

			public void Reset()
			{
				m_CurrentIndex = -1;
			}
		}

		public extern AnimationClip clip
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool playAutomatically
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern WrapMode wrapMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool isPlaying
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeName("IsPlaying")]
			get;
		}

		public AnimationState this[string name] => GetState(name);

		public extern bool animatePhysics
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Use cullingType instead")]
		public extern bool animateOnlyIfVisible
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("AnimationBindings::GetAnimateOnlyIfVisible", HasExplicitThis = true)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("AnimationBindings::SetAnimateOnlyIfVisible", HasExplicitThis = true)]
			set;
		}

		public extern AnimationCullingType cullingType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Bounds localBounds
		{
			[NativeName("GetLocalAABB")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_localBounds_Injected(out var ret);
				return ret;
			}
			[NativeName("SetLocalAABB")]
			set
			{
				set_localBounds_Injected(ref value);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Stop();

		public void Stop(string name)
		{
			StopNamed(name);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("Stop")]
		private extern void StopNamed(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Rewind();

		public void Rewind(string name)
		{
			RewindNamed(name);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("Rewind")]
		private extern void RewindNamed(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Sample();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool IsPlaying(string name);

		[ExcludeFromDocs]
		public bool Play()
		{
			return Play(PlayMode.StopSameLayer);
		}

		public bool Play([DefaultValue("PlayMode.StopSameLayer")] PlayMode mode)
		{
			return PlayDefaultAnimation(mode);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("Play")]
		private extern bool PlayDefaultAnimation(PlayMode mode);

		[ExcludeFromDocs]
		public bool Play(string animation)
		{
			return Play(animation, PlayMode.StopSameLayer);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool Play(string animation, [DefaultValue("PlayMode.StopSameLayer")] PlayMode mode);

		[ExcludeFromDocs]
		public void CrossFade(string animation)
		{
			CrossFade(animation, 0.3f);
		}

		[ExcludeFromDocs]
		public void CrossFade(string animation, float fadeLength)
		{
			CrossFade(animation, fadeLength, PlayMode.StopSameLayer);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void CrossFade(string animation, [DefaultValue("0.3F")] float fadeLength, [DefaultValue("PlayMode.StopSameLayer")] PlayMode mode);

		[ExcludeFromDocs]
		public void Blend(string animation)
		{
			Blend(animation, 1f);
		}

		[ExcludeFromDocs]
		public void Blend(string animation, float targetWeight)
		{
			Blend(animation, targetWeight, 0.3f);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void Blend(string animation, [DefaultValue("1.0F")] float targetWeight, [DefaultValue("0.3F")] float fadeLength);

		[ExcludeFromDocs]
		public AnimationState CrossFadeQueued(string animation)
		{
			return CrossFadeQueued(animation, 0.3f);
		}

		[ExcludeFromDocs]
		public AnimationState CrossFadeQueued(string animation, float fadeLength)
		{
			return CrossFadeQueued(animation, fadeLength, QueueMode.CompleteOthers);
		}

		[ExcludeFromDocs]
		public AnimationState CrossFadeQueued(string animation, float fadeLength, QueueMode queue)
		{
			return CrossFadeQueued(animation, fadeLength, queue, PlayMode.StopSameLayer);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationBindings::CrossFadeQueuedImpl", HasExplicitThis = true)]
		public extern AnimationState CrossFadeQueued(string animation, [DefaultValue("0.3F")] float fadeLength, [DefaultValue("QueueMode.CompleteOthers")] QueueMode queue, [DefaultValue("PlayMode.StopSameLayer")] PlayMode mode);

		[ExcludeFromDocs]
		public AnimationState PlayQueued(string animation)
		{
			return PlayQueued(animation, QueueMode.CompleteOthers);
		}

		[ExcludeFromDocs]
		public AnimationState PlayQueued(string animation, QueueMode queue)
		{
			return PlayQueued(animation, queue, PlayMode.StopSameLayer);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationBindings::PlayQueuedImpl", HasExplicitThis = true)]
		public extern AnimationState PlayQueued(string animation, [DefaultValue("QueueMode.CompleteOthers")] QueueMode queue, [DefaultValue("PlayMode.StopSameLayer")] PlayMode mode);

		public void AddClip(AnimationClip clip, string newName)
		{
			AddClip(clip, newName, int.MinValue, int.MaxValue);
		}

		[ExcludeFromDocs]
		public void AddClip(AnimationClip clip, string newName, int firstFrame, int lastFrame)
		{
			AddClip(clip, newName, firstFrame, lastFrame, addLoopFrame: false);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void AddClip([NotNull("NullExceptionObject")] AnimationClip clip, string newName, int firstFrame, int lastFrame, [DefaultValue("false")] bool addLoopFrame);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void RemoveClip([NotNull("NullExceptionObject")] AnimationClip clip);

		public void RemoveClip(string clipName)
		{
			RemoveClipNamed(clipName);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("RemoveClip")]
		private extern void RemoveClipNamed(string clipName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern int GetClipCount();

		[Obsolete("use PlayMode instead of AnimationPlayMode.")]
		public bool Play(AnimationPlayMode mode)
		{
			return PlayDefaultAnimation((PlayMode)mode);
		}

		[Obsolete("use PlayMode instead of AnimationPlayMode.")]
		public bool Play(string animation, AnimationPlayMode mode)
		{
			return Play(animation, (PlayMode)mode);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SyncLayer(int layer);

		public IEnumerator GetEnumerator()
		{
			return new Enumerator(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationBindings::GetState", HasExplicitThis = true)]
		internal extern AnimationState GetState(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationBindings::GetStateAtIndex", HasExplicitThis = true, ThrowsException = true)]
		internal extern AnimationState GetStateAtIndex(int index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeName("GetAnimationStateCount")]
		internal extern int GetStateCount();

		public AnimationClip GetClip(string name)
		{
			AnimationState state = GetState(name);
			if (TrackedReference.op_Implicit((TrackedReference)(object)state))
			{
				return state.clip;
			}
			return null;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_localBounds_Injected(out Bounds ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_localBounds_Injected(ref Bounds value);
	}
	[NativeHeader("Modules/Animation/AnimationState.h")]
	[UsedByNativeCode]
	public sealed class AnimationState : TrackedReference
	{
		public extern bool enabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float weight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern WrapMode wrapMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float time
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float normalizedTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float speed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float normalizedSpeed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern int layer
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AnimationClip clip
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern string name
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern AnimationBlendMode blendMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[ExcludeFromDocs]
		public void AddMixingTransform(Transform mix)
		{
			AddMixingTransform(mix, recursive: true);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void AddMixingTransform([NotNull("NullExceptionObject")] Transform mix, [DefaultValue("true")] bool recursive);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void RemoveMixingTransform([NotNull("NullExceptionObject")] Transform mix);
	}
	[Serializable]
	[StructLayout(LayoutKind.Sequential)]
	[RequiredByNativeCode]
	public sealed class AnimationEvent
	{
		internal float m_Time;

		internal string m_FunctionName;

		internal string m_StringParameter;

		internal Object m_ObjectReferenceParameter;

		internal float m_FloatParameter;

		internal int m_IntParameter;

		internal int m_MessageOptions;

		internal AnimationEventSource m_Source;

		internal AnimationState m_StateSender;

		internal AnimatorStateInfo m_AnimatorStateInfo;

		internal AnimatorClipInfo m_AnimatorClipInfo;

		[Obsolete("Use stringParameter instead")]
		public string data
		{
			get
			{
				return m_StringParameter;
			}
			set
			{
				m_StringParameter = value;
			}
		}

		public string stringParameter
		{
			get
			{
				return m_StringParameter;
			}
			set
			{
				m_StringParameter = value;
			}
		}

		public float floatParameter
		{
			get
			{
				return m_FloatParameter;
			}
			set
			{
				m_FloatParameter = value;
			}
		}

		public int intParameter
		{
			get
			{
				return m_IntParameter;
			}
			set
			{
				m_IntParameter = value;
			}
		}

		public Object objectReferenceParameter
		{
			get
			{
				return m_ObjectReferenceParameter;
			}
			set
			{
				m_ObjectReferenceParameter = value;
			}
		}

		public string functionName
		{
			get
			{
				return m_FunctionName;
			}
			set
			{
				m_FunctionName = value;
			}
		}

		public float time
		{
			get
			{
				return m_Time;
			}
			set
			{
				m_Time = value;
			}
		}

		public SendMessageOptions messageOptions
		{
			get
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				return (SendMessageOptions)m_MessageOptions;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0008: Expected I4, but got Unknown
				m_MessageOptions = (int)value;
			}
		}

		public bool isFiredByLegacy => m_Source == AnimationEventSource.Legacy;

		public bool isFiredByAnimator => m_Source == AnimationEventSource.Animator;

		public AnimationState animationState
		{
			get
			{
				if (!isFiredByLegacy)
				{
					Debug.LogError((object)"AnimationEvent was not fired by Animation component, you shouldn't use AnimationEvent.animationState");
				}
				return m_StateSender;
			}
		}

		public AnimatorStateInfo animatorStateInfo
		{
			get
			{
				if (!isFiredByAnimator)
				{
					Debug.LogError((object)"AnimationEvent was not fired by Animator component, you shouldn't use AnimationEvent.animatorStateInfo");
				}
				return m_AnimatorStateInfo;
			}
		}

		public AnimatorClipInfo animatorClipInfo
		{
			get
			{
				if (!isFiredByAnimator)
				{
					Debug.LogError((object)"AnimationEvent was not fired by Animator component, you shouldn't use AnimationEvent.animatorClipInfo");
				}
				return m_AnimatorClipInfo;
			}
		}

		public AnimationEvent()
		{
			m_Time = 0f;
			m_FunctionName = "";
			m_StringParameter = "";
			m_ObjectReferenceParameter = null;
			m_FloatParameter = 0f;
			m_IntParameter = 0;
			m_MessageOptions = 0;
			m_Source = AnimationEventSource.NoSource;
			m_StateSender = null;
		}

		internal int GetHash()
		{
			int num = 0;
			num = functionName.GetHashCode();
			return 33 * num + time.GetHashCode();
		}
	}
	[NativeType("Modules/Animation/AnimationClip.h")]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimationClip.bindings.h")]
	public sealed class AnimationClip : Motion
	{
		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public extern float length
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		internal extern float startTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		internal extern float stopTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public extern float frameRate
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public extern WrapMode wrapMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[NativeProperty(/*Could not decode attribute arguments.*/)]
		public Bounds localBounds
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_localBounds_Injected(out var ret);
				return ret;
			}
			set
			{
				set_localBounds_Injected(ref value);
			}
		}

		public new extern bool legacy
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsLegacy")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetLegacy")]
			set;
		}

		public extern bool humanMotion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsHumanMotion")]
			get;
		}

		public extern bool empty
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsEmpty")]
			get;
		}

		public extern bool hasGenericRootTransform
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasGenericRootTransform")]
			get;
		}

		public extern bool hasMotionFloatCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasMotionFloatCurves")]
			get;
		}

		public extern bool hasMotionCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasMotionCurves")]
			get;
		}

		public extern bool hasRootCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasRootCurves")]
			get;
		}

		internal extern bool hasRootMotion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction(Name = "AnimationClipBindings::Internal_GetHasRootMotion", HasExplicitThis = true)]
			get;
		}

		public AnimationEvent[] events
		{
			get
			{
				return (AnimationEvent[])GetEventsInternal();
			}
			set
			{
				SetEventsInternal(value);
			}
		}

		public AnimationClip()
		{
			Internal_CreateAnimationClip(this);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationClipBindings::Internal_CreateAnimationClip")]
		private static extern void Internal_CreateAnimationClip([Writable] AnimationClip self);

		public void SampleAnimation(GameObject go, float time)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			SampleAnimation(go, this, time, wrapMode);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeHeader("Modules/Animation/AnimationUtility.h")]
		[FreeFunction]
		internal static extern void SampleAnimation([NotNull("ArgumentNullException")] GameObject go, [NotNull("ArgumentNullException")] AnimationClip clip, float inTime, WrapMode wrapMode);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationClipBindings::Internal_SetCurve", HasExplicitThis = true)]
		public extern void SetCurve([NotNull("ArgumentNullException")] string relativePath, [NotNull("ArgumentNullException")] Type type, [NotNull("ArgumentNullException")] string propertyName, AnimationCurve curve);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void EnsureQuaternionContinuity();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ClearCurves();

		public void AddEvent(AnimationEvent evt)
		{
			if (evt == null)
			{
				throw new ArgumentNullException("evt");
			}
			AddEventInternal(evt);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimationClipBindings::AddEventInternal", HasExplicitThis = true)]
		private extern void AddEventInternal(object evt);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimationClipBindings::SetEventsInternal", HasExplicitThis = true, ThrowsException = true)]
		private extern void SetEventsInternal(Array value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimationClipBindings::GetEventsInternal", HasExplicitThis = true)]
		private extern Array GetEventsInternal();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_localBounds_Injected(out Bounds ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_localBounds_Injected(ref Bounds value);
	}
	public enum AvatarTarget
	{
		Root,
		Body,
		LeftFoot,
		RightFoot,
		LeftHand,
		RightHand
	}
	public enum AvatarIKGoal
	{
		LeftFoot,
		RightFoot,
		LeftHand,
		RightHand
	}
	public enum AvatarIKHint
	{
		LeftKnee,
		RightKnee,
		LeftElbow,
		RightElbow
	}
	public enum AnimatorControllerParameterType
	{
		Float = 1,
		Int = 3,
		Bool = 4,
		Trigger = 9
	}
	internal enum TransitionType
	{
		Normal = 1,
		Entry = 2,
		Exit = 4
	}
	internal enum StateInfoIndex
	{
		CurrentState,
		NextState,
		ExitState,
		InterruptedState
	}
	public enum AnimatorRecorderMode
	{
		Offline,
		Playback,
		Record
	}
	public enum DurationUnit
	{
		Fixed,
		Normalized
	}
	public enum AnimatorCullingMode
	{
		AlwaysAnimate,
		CullUpdateTransforms,
		CullCompletely
	}
	public enum AnimatorUpdateMode
	{
		Normal,
		AnimatePhysics,
		UnscaledTime
	}
	[NativeHeader("Modules/Animation/ScriptBindings/Animation.bindings.h")]
	[NativeHeader("Modules/Animation/AnimatorInfo.h")]
	[UsedByNativeCode]
	public struct AnimatorClipInfo
	{
		private int m_ClipInstanceID;

		private float m_Weight;

		public AnimationClip clip => (m_ClipInstanceID != 0) ? InstanceIDToAnimationClipPPtr(m_ClipInstanceID) : null;

		public float weight => m_Weight;

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationBindings::InstanceIDToAnimationClipPPtr")]
		private static extern AnimationClip InstanceIDToAnimationClipPPtr(int instanceID);
	}
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/AnimatorInfo.h")]
	public struct AnimatorStateInfo
	{
		private int m_Name;

		private int m_Path;

		private int m_FullPath;

		private float m_NormalizedTime;

		private float m_Length;

		private float m_Speed;

		private float m_SpeedMultiplier;

		private int m_Tag;

		private int m_Loop;

		public int fullPathHash => m_FullPath;

		[Obsolete("AnimatorStateInfo.nameHash has been deprecated. Use AnimatorStateInfo.fullPathHash instead.")]
		public int nameHash => m_Path;

		public int shortNameHash => m_Name;

		public float normalizedTime => m_NormalizedTime;

		public float length => m_Length;

		public float speed => m_Speed;

		public float speedMultiplier => m_SpeedMultiplier;

		public int tagHash => m_Tag;

		public bool loop => m_Loop != 0;

		public bool IsName(string name)
		{
			int num = Animator.StringToHash(name);
			return num == m_FullPath || num == m_Name || num == m_Path;
		}

		public bool IsTag(string tag)
		{
			return Animator.StringToHash(tag) == m_Tag;
		}
	}
	[RequiredByNativeCode]
	[NativeHeader("Modules/Animation/AnimatorInfo.h")]
	public struct AnimatorTransitionInfo
	{
		[NativeName("fullPathHash")]
		private int m_FullPath;

		[NativeName("userNameHash")]
		private int m_UserName;

		[NativeName("nameHash")]
		private int m_Name;

		[NativeName("hasFixedDuration")]
		private bool m_HasFixedDuration;

		[NativeName("duration")]
		private float m_Duration;

		[NativeName("normalizedTime")]
		private float m_NormalizedTime;

		[NativeName("anyState")]
		private bool m_AnyState;

		[NativeName("transitionType")]
		private int m_TransitionType;

		public int fullPathHash => m_FullPath;

		public int nameHash => m_Name;

		public int userNameHash => m_UserName;

		public DurationUnit durationUnit => (!m_HasFixedDuration) ? DurationUnit.Normalized : DurationUnit.Fixed;

		public float duration => m_Duration;

		public float normalizedTime => m_NormalizedTime;

		public bool anyState => m_AnyState;

		internal bool entry => (m_TransitionType & 2) != 0;

		internal bool exit => (m_TransitionType & 4) != 0;

		public bool IsName(string name)
		{
			return Animator.StringToHash(name) == m_Name || Animator.StringToHash(name) == m_FullPath;
		}

		public bool IsUserName(string name)
		{
			return Animator.StringToHash(name) == m_UserName;
		}
	}
	[NativeHeader("Modules/Animation/Animator.h")]
	public struct MatchTargetWeightMask
	{
		private Vector3 m_PositionXYZWeight;

		private float m_RotationWeight;

		public Vector3 positionXYZWeight
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				return m_PositionXYZWeight;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_PositionXYZWeight = value;
			}
		}

		public float rotationWeight
		{
			get
			{
				return m_RotationWeight;
			}
			set
			{
				m_RotationWeight = value;
			}
		}

		public MatchTargetWeightMask(Vector3 positionXYZWeight, float rotationWeight)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			m_PositionXYZWeight = positionXYZWeight;
			m_RotationWeight = rotationWeight;
		}
	}
	[NativeHeader("Modules/Animation/Animator.h")]
	[NativeHeader("Modules/Animation/ScriptBindings/Animator.bindings.h")]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimatorControllerParameter.bindings.h")]
	[UsedByNativeCode]
	public class Animator : Behaviour
	{
		public extern bool isOptimizable
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsOptimizable")]
			get;
		}

		public extern bool isHuman
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsHuman")]
			get;
		}

		public extern bool hasRootMotion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasRootMotion")]
			get;
		}

		internal extern bool isRootPositionOrRotationControlledByCurves
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsRootTranslationOrRotationControllerByCurves")]
			get;
		}

		public extern float humanScale
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern bool isInitialized
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsInitialized")]
			get;
		}

		public Vector3 deltaPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_deltaPosition_Injected(out var ret);
				return ret;
			}
		}

		public Quaternion deltaRotation
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_deltaRotation_Injected(out var ret);
				return ret;
			}
		}

		public Vector3 velocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_velocity_Injected(out var ret);
				return ret;
			}
		}

		public Vector3 angularVelocity
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_angularVelocity_Injected(out var ret);
				return ret;
			}
		}

		public Vector3 rootPosition
		{
			[NativeMethod("GetAvatarPosition")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_rootPosition_Injected(out var ret);
				return ret;
			}
			[NativeMethod("SetAvatarPosition")]
			set
			{
				set_rootPosition_Injected(ref value);
			}
		}

		public Quaternion rootRotation
		{
			[NativeMethod("GetAvatarRotation")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_rootRotation_Injected(out var ret);
				return ret;
			}
			[NativeMethod("SetAvatarRotation")]
			set
			{
				set_rootRotation_Injected(ref value);
			}
		}

		public extern bool applyRootMotion
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Animator.linearVelocityBlending is no longer used and has been deprecated.")]
		public extern bool linearVelocityBlending
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		[Obsolete("Animator.animatePhysics has been deprecated. Use Animator.updateMode instead.")]
		public bool animatePhysics
		{
			get
			{
				return updateMode == AnimatorUpdateMode.AnimatePhysics;
			}
			set
			{
				updateMode = (value ? AnimatorUpdateMode.AnimatePhysics : AnimatorUpdateMode.Normal);
			}
		}

		public extern AnimatorUpdateMode updateMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool hasTransformHierarchy
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		internal extern bool allowConstantClipSamplingOptimization
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float gravityWeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public Vector3 bodyPosition
		{
			get
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				CheckIfInIKPass();
				return bodyPositionInternal;
			}
			set
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				CheckIfInIKPass();
				bodyPositionInternal = value;
			}
		}

		internal Vector3 bodyPositionInternal
		{
			[NativeMethod("GetBodyPosition")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_bodyPositionInternal_Injected(out var ret);
				return ret;
			}
			[NativeMethod("SetBodyPosition")]
			set
			{
				set_bodyPositionInternal_Injected(ref value);
			}
		}

		public Quaternion bodyRotation
		{
			get
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				//IL_000e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0011: Unknown result type (might be due to invalid IL or missing references)
				CheckIfInIKPass();
				return bodyRotationInternal;
			}
			set
			{
				//IL_0009: Unknown result type (might be due to invalid IL or missing references)
				CheckIfInIKPass();
				bodyRotationInternal = value;
			}
		}

		internal Quaternion bodyRotationInternal
		{
			[NativeMethod("GetBodyRotation")]
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_bodyRotationInternal_Injected(out var ret);
				return ret;
			}
			[NativeMethod("SetBodyRotation")]
			set
			{
				set_bodyRotationInternal_Injected(ref value);
			}
		}

		public extern bool stabilizeFeet
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern int layerCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern AnimatorControllerParameter[] parameters
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction(Name = "AnimatorBindings::GetParameters", HasExplicitThis = true)]
			get;
		}

		public extern int parameterCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern float feetPivotActive
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float pivotWeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public Vector3 pivotPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_pivotPosition_Injected(out var ret);
				return ret;
			}
		}

		public extern bool isMatchingTarget
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsMatchingTarget")]
			get;
		}

		public extern float speed
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public Vector3 targetPosition
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_targetPosition_Injected(out var ret);
				return ret;
			}
		}

		public Quaternion targetRotation
		{
			get
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				get_targetRotation_Injected(out var ret);
				return ret;
			}
		}

		internal extern Transform avatarRoot
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern AnimatorCullingMode cullingMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float playbackTime
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public float recorderStartTime
		{
			get
			{
				return GetRecorderStartTime();
			}
			set
			{
			}
		}

		public float recorderStopTime
		{
			get
			{
				return GetRecorderStopTime();
			}
			set
			{
			}
		}

		public extern AnimatorRecorderMode recorderMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern RuntimeAnimatorController runtimeAnimatorController
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool hasBoundPlayables
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("HasBoundPlayables")]
			get;
		}

		public extern Avatar avatar
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public PlayableGraph playableGraph
		{
			get
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0012: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Unknown result type (might be due to invalid IL or missing references)
				//IL_0016: Unknown result type (might be due to invalid IL or missing references)
				PlayableGraph graph = default(PlayableGraph);
				GetCurrentGraph(ref graph);
				return graph;
			}
		}

		public extern bool layersAffectMassCenter
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern float leftFeetBottomHeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		public extern float rightFeetBottomHeight
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		[NativeConditional("UNITY_EDITOR")]
		internal extern bool supportsOnAnimatorMove
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SupportsOnAnimatorMove")]
			get;
		}

		public extern bool logWarnings
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool fireEvents
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public extern bool keepAnimatorControllerStateOnDisable
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		public float GetFloat(string name)
		{
			return GetFloatString(name);
		}

		public float GetFloat(int id)
		{
			return GetFloatID(id);
		}

		public void SetFloat(string name, float value)
		{
			SetFloatString(name, value);
		}

		public void SetFloat(string name, float value, float dampTime, float deltaTime)
		{
			SetFloatStringDamp(name, value, dampTime, deltaTime);
		}

		public void SetFloat(int id, float value)
		{
			SetFloatID(id, value);
		}

		public void SetFloat(int id, float value, float dampTime, float deltaTime)
		{
			SetFloatIDDamp(id, value, dampTime, deltaTime);
		}

		public bool GetBool(string name)
		{
			return GetBoolString(name);
		}

		public bool GetBool(int id)
		{
			return GetBoolID(id);
		}

		public void SetBool(string name, bool value)
		{
			SetBoolString(name, value);
		}

		public void SetBool(int id, bool value)
		{
			SetBoolID(id, value);
		}

		public int GetInteger(string name)
		{
			return GetIntegerString(name);
		}

		public int GetInteger(int id)
		{
			return GetIntegerID(id);
		}

		public void SetInteger(string name, int value)
		{
			SetIntegerString(name, value);
		}

		public void SetInteger(int id, int value)
		{
			SetIntegerID(id, value);
		}

		public void SetTrigger(string name)
		{
			SetTriggerString(name);
		}

		public void SetTrigger(int id)
		{
			SetTriggerID(id);
		}

		public void ResetTrigger(string name)
		{
			ResetTriggerString(name);
		}

		public void ResetTrigger(int id)
		{
			ResetTriggerID(id);
		}

		public bool IsParameterControlledByCurve(string name)
		{
			return IsParameterControlledByCurveString(name);
		}

		public bool IsParameterControlledByCurve(int id)
		{
			return IsParameterControlledByCurveID(id);
		}

		public Vector3 GetIKPosition(AvatarIKGoal goal)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			return GetGoalPosition(goal);
		}

		private Vector3 GetGoalPosition(AvatarIKGoal goal)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			GetGoalPosition_Injected(goal, out var ret);
			return ret;
		}

		public void SetIKPosition(AvatarIKGoal goal, Vector3 goalPosition)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			SetGoalPosition(goal, goalPosition);
		}

		private void SetGoalPosition(AvatarIKGoal goal, Vector3 goalPosition)
		{
			SetGoalPosition_Injected(goal, ref goalPosition);
		}

		public Quaternion GetIKRotation(AvatarIKGoal goal)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			return GetGoalRotation(goal);
		}

		private Quaternion GetGoalRotation(AvatarIKGoal goal)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			GetGoalRotation_Injected(goal, out var ret);
			return ret;
		}

		public void SetIKRotation(AvatarIKGoal goal, Quaternion goalRotation)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			SetGoalRotation(goal, goalRotation);
		}

		private void SetGoalRotation(AvatarIKGoal goal, Quaternion goalRotation)
		{
			SetGoalRotation_Injected(goal, ref goalRotation);
		}

		public float GetIKPositionWeight(AvatarIKGoal goal)
		{
			CheckIfInIKPass();
			return GetGoalWeightPosition(goal);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetGoalWeightPosition(AvatarIKGoal goal);

		public void SetIKPositionWeight(AvatarIKGoal goal, float value)
		{
			CheckIfInIKPass();
			SetGoalWeightPosition(goal, value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetGoalWeightPosition(AvatarIKGoal goal, float value);

		public float GetIKRotationWeight(AvatarIKGoal goal)
		{
			CheckIfInIKPass();
			return GetGoalWeightRotation(goal);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetGoalWeightRotation(AvatarIKGoal goal);

		public void SetIKRotationWeight(AvatarIKGoal goal, float value)
		{
			CheckIfInIKPass();
			SetGoalWeightRotation(goal, value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetGoalWeightRotation(AvatarIKGoal goal, float value);

		public Vector3 GetIKHintPosition(AvatarIKHint hint)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			return GetHintPosition(hint);
		}

		private Vector3 GetHintPosition(AvatarIKHint hint)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			GetHintPosition_Injected(hint, out var ret);
			return ret;
		}

		public void SetIKHintPosition(AvatarIKHint hint, Vector3 hintPosition)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			SetHintPosition(hint, hintPosition);
		}

		private void SetHintPosition(AvatarIKHint hint, Vector3 hintPosition)
		{
			SetHintPosition_Injected(hint, ref hintPosition);
		}

		public float GetIKHintPositionWeight(AvatarIKHint hint)
		{
			CheckIfInIKPass();
			return GetHintWeightPosition(hint);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetHintWeightPosition(AvatarIKHint hint);

		public void SetIKHintPositionWeight(AvatarIKHint hint, float value)
		{
			CheckIfInIKPass();
			SetHintWeightPosition(hint, value);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetHintWeightPosition(AvatarIKHint hint, float value);

		public void SetLookAtPosition(Vector3 lookAtPosition)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			SetLookAtPositionInternal(lookAtPosition);
		}

		[NativeMethod("SetLookAtPosition")]
		private void SetLookAtPositionInternal(Vector3 lookAtPosition)
		{
			SetLookAtPositionInternal_Injected(ref lookAtPosition);
		}

		public void SetLookAtWeight(float weight)
		{
			CheckIfInIKPass();
			SetLookAtWeightInternal(weight, 0f, 1f, 0f, 0.5f);
		}

		public void SetLookAtWeight(float weight, float bodyWeight)
		{
			CheckIfInIKPass();
			SetLookAtWeightInternal(weight, bodyWeight, 1f, 0f, 0.5f);
		}

		public void SetLookAtWeight(float weight, float bodyWeight, float headWeight)
		{
			CheckIfInIKPass();
			SetLookAtWeightInternal(weight, bodyWeight, headWeight, 0f, 0.5f);
		}

		public void SetLookAtWeight(float weight, float bodyWeight, float headWeight, float eyesWeight)
		{
			CheckIfInIKPass();
			SetLookAtWeightInternal(weight, bodyWeight, headWeight, eyesWeight, 0.5f);
		}

		public void SetLookAtWeight(float weight, [DefaultValue("0.0f")] float bodyWeight, [DefaultValue("1.0f")] float headWeight, [DefaultValue("0.0f")] float eyesWeight, [DefaultValue("0.5f")] float clampWeight)
		{
			CheckIfInIKPass();
			SetLookAtWeightInternal(weight, bodyWeight, headWeight, eyesWeight, clampWeight);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetLookAtWeight")]
		private extern void SetLookAtWeightInternal(float weight, float bodyWeight, float headWeight, float eyesWeight, float clampWeight);

		public void SetBoneLocalRotation(HumanBodyBones humanBoneId, Quaternion rotation)
		{
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			CheckIfInIKPass();
			SetBoneLocalRotationInternal(HumanTrait.GetBoneIndexFromMono((int)humanBoneId), rotation);
		}

		[NativeMethod("SetBoneLocalRotation")]
		private void SetBoneLocalRotationInternal(int humanBoneId, Quaternion rotation)
		{
			SetBoneLocalRotationInternal_Injected(humanBoneId, ref rotation);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern ScriptableObject GetBehaviour([NotNull("ArgumentNullException")] Type type);

		public T GetBehaviour<T>() where T : StateMachineBehaviour
		{
			return GetBehaviour(typeof(T)) as T;
		}

		private static T[] ConvertStateMachineBehaviour<T>(ScriptableObject[] rawObjects) where T : StateMachineBehaviour
		{
			if (rawObjects == null)
			{
				return null;
			}
			T[] array = new T[rawObjects.Length];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = (T)(StateMachineBehaviour)(object)rawObjects[i];
			}
			return array;
		}

		public T[] GetBehaviours<T>() where T : StateMachineBehaviour
		{
			return ConvertStateMachineBehaviour<T>(InternalGetBehaviours(typeof(T)));
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::InternalGetBehaviours", HasExplicitThis = true)]
		internal extern ScriptableObject[] InternalGetBehaviours([NotNull("ArgumentNullException")] Type type);

		public StateMachineBehaviour[] GetBehaviours(int fullPathHash, int layerIndex)
		{
			return InternalGetBehavioursByKey(fullPathHash, layerIndex, typeof(StateMachineBehaviour)) as StateMachineBehaviour[];
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::InternalGetBehavioursByKey", HasExplicitThis = true)]
		internal extern ScriptableObject[] InternalGetBehavioursByKey(int fullPathHash, int layerIndex, [NotNull("ArgumentNullException")] Type type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern string GetLayerName(int layerIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern int GetLayerIndex(string layerName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern float GetLayerWeight(int layerIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetLayerWeight(int layerIndex, float weight);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetAnimatorStateInfo(int layerIndex, StateInfoIndex stateInfoIndex, out AnimatorStateInfo info);

		public AnimatorStateInfo GetCurrentAnimatorStateInfo(int layerIndex)
		{
			GetAnimatorStateInfo(layerIndex, StateInfoIndex.CurrentState, out var info);
			return info;
		}

		public AnimatorStateInfo GetNextAnimatorStateInfo(int layerIndex)
		{
			GetAnimatorStateInfo(layerIndex, StateInfoIndex.NextState, out var info);
			return info;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetAnimatorTransitionInfo(int layerIndex, out AnimatorTransitionInfo info);

		public AnimatorTransitionInfo GetAnimatorTransitionInfo(int layerIndex)
		{
			GetAnimatorTransitionInfo(layerIndex, out var info);
			return info;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern int GetAnimatorClipInfoCount(int layerIndex, bool current);

		public int GetCurrentAnimatorClipInfoCount(int layerIndex)
		{
			return GetAnimatorClipInfoCount(layerIndex, current: true);
		}

		public int GetNextAnimatorClipInfoCount(int layerIndex)
		{
			return GetAnimatorClipInfoCount(layerIndex, current: false);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetCurrentAnimatorClipInfo", HasExplicitThis = true)]
		public extern AnimatorClipInfo[] GetCurrentAnimatorClipInfo(int layerIndex);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetNextAnimatorClipInfo", HasExplicitThis = true)]
		public extern AnimatorClipInfo[] GetNextAnimatorClipInfo(int layerIndex);

		public void GetCurrentAnimatorClipInfo(int layerIndex, List<AnimatorClipInfo> clips)
		{
			if (clips == null)
			{
				throw new ArgumentNullException("clips");
			}
			GetAnimatorClipInfoInternal(layerIndex, isCurrent: true, clips);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetAnimatorClipInfoInternal", HasExplicitThis = true)]
		private extern void GetAnimatorClipInfoInternal(int layerIndex, bool isCurrent, object clips);

		public void GetNextAnimatorClipInfo(int layerIndex, List<AnimatorClipInfo> clips)
		{
			if (clips == null)
			{
				throw new ArgumentNullException("clips");
			}
			GetAnimatorClipInfoInternal(layerIndex, isCurrent: false, clips);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool IsInTransition(int layerIndex);

		public AnimatorControllerParameter GetParameter(int index)
		{
			AnimatorControllerParameter[] array = parameters;
			if (index < 0 || index >= parameters.Length)
			{
				throw new IndexOutOfRangeException("Index must be between 0 and " + parameters.Length);
			}
			return array[index];
		}

		private void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, int targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime, bool completeMatch)
		{
			MatchTarget_Injected(ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime, completeMatch);
		}

		public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			MatchTarget(matchPosition, matchRotation, (int)targetBodyPart, weightMask, startNormalizedTime, 1f, completeMatch: true);
		}

		public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, [DefaultValue("1")] float targetNormalizedTime)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			MatchTarget(matchPosition, matchRotation, (int)targetBodyPart, weightMask, startNormalizedTime, targetNormalizedTime, completeMatch: true);
		}

		public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, [DefaultValue("1")] float targetNormalizedTime, [DefaultValue("true")] bool completeMatch)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			MatchTarget(matchPosition, matchRotation, (int)targetBodyPart, weightMask, startNormalizedTime, targetNormalizedTime, completeMatch);
		}

		public void InterruptMatchTarget()
		{
			InterruptMatchTarget(completeMatch: true);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void InterruptMatchTarget([DefaultValue("true")] bool completeMatch);

		[Obsolete("ForceStateNormalizedTime is deprecated. Please use Play or CrossFade instead.")]
		public void ForceStateNormalizedTime(float normalizedTime)
		{
			Play(0, 0, normalizedTime);
		}

		public void CrossFadeInFixedTime(string stateName, float fixedTransitionDuration)
		{
			float normalizedTransitionTime = 0f;
			float fixedTimeOffset = 0f;
			int layer = -1;
			CrossFadeInFixedTime(StringToHash(stateName), fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFadeInFixedTime(string stateName, float fixedTransitionDuration, int layer)
		{
			float normalizedTransitionTime = 0f;
			float fixedTimeOffset = 0f;
			CrossFadeInFixedTime(StringToHash(stateName), fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFadeInFixedTime(string stateName, float fixedTransitionDuration, int layer, float fixedTimeOffset)
		{
			float normalizedTransitionTime = 0f;
			CrossFadeInFixedTime(StringToHash(stateName), fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFadeInFixedTime(string stateName, float fixedTransitionDuration, [DefaultValue("-1")] int layer, [DefaultValue("0.0f")] float fixedTimeOffset, [DefaultValue("0.0f")] float normalizedTransitionTime)
		{
			CrossFadeInFixedTime(StringToHash(stateName), fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFadeInFixedTime(int stateHashName, float fixedTransitionDuration, int layer, float fixedTimeOffset)
		{
			float normalizedTransitionTime = 0f;
			CrossFadeInFixedTime(stateHashName, fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFadeInFixedTime(int stateHashName, float fixedTransitionDuration, int layer)
		{
			float normalizedTransitionTime = 0f;
			float fixedTimeOffset = 0f;
			CrossFadeInFixedTime(stateHashName, fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFadeInFixedTime(int stateHashName, float fixedTransitionDuration)
		{
			float normalizedTransitionTime = 0f;
			float fixedTimeOffset = 0f;
			int layer = -1;
			CrossFadeInFixedTime(stateHashName, fixedTransitionDuration, layer, fixedTimeOffset, normalizedTransitionTime);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::CrossFadeInFixedTime", HasExplicitThis = true)]
		public extern void CrossFadeInFixedTime(int stateHashName, float fixedTransitionDuration, [DefaultValue("-1")] int layer, [DefaultValue("0.0f")] float fixedTimeOffset, [DefaultValue("0.0f")] float normalizedTransitionTime);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::WriteDefaultValues", HasExplicitThis = true)]
		public extern void WriteDefaultValues();

		public void CrossFade(string stateName, float normalizedTransitionDuration, int layer, float normalizedTimeOffset)
		{
			float normalizedTransitionTime = 0f;
			CrossFade(stateName, normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFade(string stateName, float normalizedTransitionDuration, int layer)
		{
			float normalizedTransitionTime = 0f;
			float normalizedTimeOffset = float.NegativeInfinity;
			CrossFade(stateName, normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFade(string stateName, float normalizedTransitionDuration)
		{
			float normalizedTransitionTime = 0f;
			float normalizedTimeOffset = float.NegativeInfinity;
			int layer = -1;
			CrossFade(stateName, normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFade(string stateName, float normalizedTransitionDuration, [DefaultValue("-1")] int layer, [DefaultValue("float.NegativeInfinity")] float normalizedTimeOffset, [DefaultValue("0.0f")] float normalizedTransitionTime)
		{
			CrossFade(StringToHash(stateName), normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::CrossFade", HasExplicitThis = true)]
		public extern void CrossFade(int stateHashName, float normalizedTransitionDuration, [DefaultValue("-1")] int layer, [DefaultValue("0.0f")] float normalizedTimeOffset, [DefaultValue("0.0f")] float normalizedTransitionTime);

		public void CrossFade(int stateHashName, float normalizedTransitionDuration, int layer, float normalizedTimeOffset)
		{
			float normalizedTransitionTime = 0f;
			CrossFade(stateHashName, normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFade(int stateHashName, float normalizedTransitionDuration, int layer)
		{
			float normalizedTransitionTime = 0f;
			float normalizedTimeOffset = float.NegativeInfinity;
			CrossFade(stateHashName, normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		public void CrossFade(int stateHashName, float normalizedTransitionDuration)
		{
			float normalizedTransitionTime = 0f;
			float normalizedTimeOffset = float.NegativeInfinity;
			int layer = -1;
			CrossFade(stateHashName, normalizedTransitionDuration, layer, normalizedTimeOffset, normalizedTransitionTime);
		}

		public void PlayInFixedTime(string stateName, int layer)
		{
			float fixedTime = float.NegativeInfinity;
			PlayInFixedTime(stateName, layer, fixedTime);
		}

		public void PlayInFixedTime(string stateName)
		{
			float fixedTime = float.NegativeInfinity;
			int layer = -1;
			PlayInFixedTime(stateName, layer, fixedTime);
		}

		public void PlayInFixedTime(string stateName, [DefaultValue("-1")] int layer, [DefaultValue("float.NegativeInfinity")] float fixedTime)
		{
			PlayInFixedTime(StringToHash(stateName), layer, fixedTime);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::PlayInFixedTime", HasExplicitThis = true)]
		public extern void PlayInFixedTime(int stateNameHash, [DefaultValue("-1")] int layer, [DefaultValue("float.NegativeInfinity")] float fixedTime);

		public void PlayInFixedTime(int stateNameHash, int layer)
		{
			float fixedTime = float.NegativeInfinity;
			PlayInFixedTime(stateNameHash, layer, fixedTime);
		}

		public void PlayInFixedTime(int stateNameHash)
		{
			float fixedTime = float.NegativeInfinity;
			int layer = -1;
			PlayInFixedTime(stateNameHash, layer, fixedTime);
		}

		public void Play(string stateName, int layer)
		{
			float normalizedTime = float.NegativeInfinity;
			Play(stateName, layer, normalizedTime);
		}

		public void Play(string stateName)
		{
			float normalizedTime = float.NegativeInfinity;
			int layer = -1;
			Play(stateName, layer, normalizedTime);
		}

		public void Play(string stateName, [DefaultValue("-1")] int layer, [DefaultValue("float.NegativeInfinity")] float normalizedTime)
		{
			Play(StringToHash(stateName), layer, normalizedTime);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::Play", HasExplicitThis = true)]
		public extern void Play(int stateNameHash, [DefaultValue("-1")] int layer, [DefaultValue("float.NegativeInfinity")] float normalizedTime);

		public void Play(int stateNameHash, int layer)
		{
			float normalizedTime = float.NegativeInfinity;
			Play(stateNameHash, layer, normalizedTime);
		}

		public void Play(int stateNameHash)
		{
			float normalizedTime = float.NegativeInfinity;
			int layer = -1;
			Play(stateNameHash, layer, normalizedTime);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void SetTarget(AvatarTarget targetIndex, float targetNormalizedTime);

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Use mask and layers to control subset of transfroms in a skeleton.", true)]
		public bool IsControlled(Transform transform)
		{
			return false;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern bool IsBoneTransform(Transform transform);

		public Transform GetBoneTransform(HumanBodyBones humanBoneId)
		{
			if (humanBoneId < HumanBodyBones.Hips || humanBoneId >= HumanBodyBones.LastBone)
			{
				throw new IndexOutOfRangeException("humanBoneId must be between 0 and " + HumanBodyBones.LastBone);
			}
			return GetBoneTransformInternal(HumanTrait.GetBoneIndexFromMono((int)humanBoneId));
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetBoneTransform")]
		internal extern Transform GetBoneTransformInternal(int humanBoneId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StartPlayback();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StopPlayback();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StartRecording(int frameCount);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void StopRecording();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetRecorderStartTime();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern float GetRecorderStopTime();

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void ClearInternalControllerPlayable();

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern bool HasState(int layerIndex, int stateID);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "ScriptingStringToCRC32", IsThreadSafe = true)]
		public static extern int StringToHash(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern string GetStats();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetCurrentGraph", HasExplicitThis = true)]
		private extern void GetCurrentGraph(ref PlayableGraph graph);

		private void CheckIfInIKPass()
		{
			if (logWarnings && !IsInIKPass())
			{
				Debug.LogWarning((object)"Setting and getting Body Position/Rotation, IK Goals, Lookat and BoneLocalRotation should only be done in OnAnimatorIK or OnStateIK");
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern bool IsInIKPass();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetFloatString", HasExplicitThis = true)]
		private extern void SetFloatString(string name, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetFloatID", HasExplicitThis = true)]
		private extern void SetFloatID(int id, float value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetFloatString", HasExplicitThis = true)]
		private extern float GetFloatString(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetFloatID", HasExplicitThis = true)]
		private extern float GetFloatID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetBoolString", HasExplicitThis = true)]
		private extern void SetBoolString(string name, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetBoolID", HasExplicitThis = true)]
		private extern void SetBoolID(int id, bool value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetBoolString", HasExplicitThis = true)]
		private extern bool GetBoolString(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetBoolID", HasExplicitThis = true)]
		private extern bool GetBoolID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetIntegerString", HasExplicitThis = true)]
		private extern void SetIntegerString(string name, int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetIntegerID", HasExplicitThis = true)]
		private extern void SetIntegerID(int id, int value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetIntegerString", HasExplicitThis = true)]
		private extern int GetIntegerString(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::GetIntegerID", HasExplicitThis = true)]
		private extern int GetIntegerID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetTriggerString", HasExplicitThis = true)]
		private extern void SetTriggerString(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetTriggerID", HasExplicitThis = true)]
		private extern void SetTriggerID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::ResetTriggerString", HasExplicitThis = true)]
		private extern void ResetTriggerString(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::ResetTriggerID", HasExplicitThis = true)]
		private extern void ResetTriggerID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::IsParameterControlledByCurveString", HasExplicitThis = true)]
		private extern bool IsParameterControlledByCurveString(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::IsParameterControlledByCurveID", HasExplicitThis = true)]
		private extern bool IsParameterControlledByCurveID(int id);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetFloatStringDamp", HasExplicitThis = true)]
		private extern void SetFloatStringDamp(string name, float value, float dampTime, float deltaTime);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(Name = "AnimatorBindings::SetFloatIDDamp", HasExplicitThis = true)]
		private extern void SetFloatIDDamp(int id, float value, float dampTime, float deltaTime);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("UNITY_EDITOR")]
		internal extern void OnUpdateModeChanged();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("UNITY_EDITOR")]
		internal extern void OnCullingModeChanged();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("UNITY_EDITOR")]
		internal extern void WriteDefaultPose();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("UpdateWithDelta")]
		public extern void Update(float deltaTime);

		public void Rebind()
		{
			Rebind(writeDefaultValues: true);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Rebind(bool writeDefaultValues);

		[MethodImpl(MethodImplOptions.InternalCall)]
		public extern void ApplyBuiltinRootMotion();

		[NativeConditional("UNITY_EDITOR")]
		internal void EvaluateController()
		{
			EvaluateController(0f);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void EvaluateController(float deltaTime);

		[NativeConditional("UNITY_EDITOR")]
		internal string GetCurrentStateName(int layerIndex)
		{
			return GetAnimatorStateName(layerIndex, current: true);
		}

		[NativeConditional("UNITY_EDITOR")]
		internal string GetNextStateName(int layerIndex)
		{
			return GetAnimatorStateName(layerIndex, current: false);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("UNITY_EDITOR")]
		private extern string GetAnimatorStateName(int layerIndex, bool current);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern string ResolveHash(int hash);

		[Obsolete("GetVector is deprecated.")]
		public Vector3 GetVector(string name)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return Vector3.zero;
		}

		[Obsolete("GetVector is deprecated.")]
		public Vector3 GetVector(int id)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return Vector3.zero;
		}

		[Obsolete("SetVector is deprecated.")]
		public void SetVector(string name, Vector3 value)
		{
		}

		[Obsolete("SetVector is deprecated.")]
		public void SetVector(int id, Vector3 value)
		{
		}

		[Obsolete("GetQuaternion is deprecated.")]
		public Quaternion GetQuaternion(string name)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return Quaternion.identity;
		}

		[Obsolete("GetQuaternion is deprecated.")]
		public Quaternion GetQuaternion(int id)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			return Quaternion.identity;
		}

		[Obsolete("SetQuaternion is deprecated.")]
		public void SetQuaternion(string name, Quaternion value)
		{
		}

		[Obsolete("SetQuaternion is deprecated.")]
		public void SetQuaternion(int id, Quaternion value)
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_deltaPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_deltaRotation_Injected(out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_velocity_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_angularVelocity_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_rootPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_rootPosition_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_rootRotation_Injected(out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_rootRotation_Injected(ref Quaternion value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_bodyPositionInternal_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_bodyPositionInternal_Injected(ref Vector3 value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_bodyRotationInternal_Injected(out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void set_bodyRotationInternal_Injected(ref Quaternion value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetGoalPosition_Injected(AvatarIKGoal goal, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetGoalPosition_Injected(AvatarIKGoal goal, ref Vector3 goalPosition);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetGoalRotation_Injected(AvatarIKGoal goal, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetGoalRotation_Injected(AvatarIKGoal goal, ref Quaternion goalRotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetHintPosition_Injected(AvatarIKHint hint, out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetHintPosition_Injected(AvatarIKHint hint, ref Vector3 hintPosition);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetLookAtPositionInternal_Injected(ref Vector3 lookAtPosition);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetBoneLocalRotationInternal_Injected(int humanBoneId, ref Quaternion rotation);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_pivotPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void MatchTarget_Injected(ref Vector3 matchPosition, ref Quaternion matchRotation, int targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime, bool completeMatch);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_targetPosition_Injected(out Vector3 ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_targetRotation_Injected(out Quaternion ret);
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeAsStruct]
	[NativeType(/*Could not decode attribute arguments.*/)]
	[UsedByNativeCode]
	[NativeHeader("Modules/Animation/ScriptBindings/AnimatorControllerParameter.bindings.h")]
	[NativeHeader("Modules/Animation/AnimatorControllerParameter.h")]
	public class AnimatorControllerParameter
	{
		internal string m_Name = "";

		internal AnimatorControllerParameterType m_Type;

		internal float m_DefaultFloat;

		internal int m_DefaultInt;

		internal bool m_DefaultBool;

		public string name => m_Name;

		public int nameHash => Animator.StringToHash(m_Name);

		public AnimatorControllerParameterType type
		{
			get
			{
				return m_Type;
			}
			set
			{
				m_Type = value;
			}
		}

		public float defaultFloat
		{
			get
			{
				return m_DefaultFloat;
			}
			set
			{
				m_DefaultFloat = value;
			}
		}

		public int defaultInt
		{
			get
			{
				return m_DefaultInt;
			}
			set
			{
				m_DefaultInt = value;
			}
		}

		public bool defaultBool
		{
			get
			{
				return m_DefaultBool;
			}
			set
			{
				m_DefaultBool = value;
			}
		}

		public override bool Equals(object o)
		{
			return o is AnimatorControllerParameter animatorControllerParameter && m_Name == animatorControllerParameter.m_Name && m_Type == animatorControllerParameter.m_Type && m_DefaultFloat == animatorControllerParameter.m_DefaultFloat && m_DefaultInt == animatorControllerParameter.m_DefaultInt && m_DefaultBool == animatorControllerParameter.m_DefaultBool;
		}

		public override int GetHashCode()
		{
			return name.GetHashCode();
		}
	}
	[Serializable]
	[StructLayout(LayoutKind.Sequential)]
	[Obsolete("This class is not used anymore. See AnimatorOverrideController.GetOverrides() and AnimatorOverrideController.ApplyOverrides()")]
	public class AnimationClipPair
	{
		public AnimationClip originalClip;

		public AnimationClip overrideClip;
	}
	[UsedByNativeCode]
	[NativeHeader("Modules/Animation/ScriptBindings/Animation.bindings.h")]
	[NativeHeader("Modules/Animation/AnimatorOverrideController.h")]
	public class AnimatorOverrideController : RuntimeAnimatorController
	{
		internal delegate void OnOverrideControllerDirtyCallback();

		internal OnOverrideControllerDirtyCallback OnOverrideControllerDirty;

		public extern RuntimeAnimatorController runtimeAnimatorController
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetAnimatorController")]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("SetAnimatorController")]
			set;
		}

		public AnimationClip this[string name]
		{
			get
			{
				return Internal_GetClipByName(name, returnEffectiveClip: true);
			}
			set
			{
				Internal_SetClipByName(name, value);
			}
		}

		public AnimationClip this[AnimationClip clip]
		{
			get
			{
				return GetClip(clip, returnEffectiveClip: true);
			}
			set
			{
				SetClip(clip, value, notify: true);
			}
		}

		public extern int overridesCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetOriginalClipsCount")]
			get;
		}

		[Obsolete("AnimatorOverrideController.clips property is deprecated. Use AnimatorOverrideController.GetOverrides and AnimatorOverrideController.ApplyOverrides instead.")]
		public AnimationClipPair[] clips
		{
			get
			{
				int num = overridesCount;
				AnimationClipPair[] array = new AnimationClipPair[num];
				for (int i = 0; i < num; i++)
				{
					array[i] = new AnimationClipPair();
					array[i].originalClip = GetOriginalClip(i);
					array[i].overrideClip = GetOverrideClip(array[i].originalClip);
				}
				return array;
			}
			set
			{
				for (int i = 0; i < value.Length; i++)
				{
					SetClip(value[i].originalClip, value[i].overrideClip, notify: false);
				}
				SendNotification();
			}
		}

		public AnimatorOverrideController()
		{
			Internal_Create(this, null);
			OnOverrideControllerDirty = null;
		}

		public AnimatorOverrideController(RuntimeAnimatorController controller)
		{
			Internal_Create(this, controller);
			OnOverrideControllerDirty = null;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("AnimationBindings::CreateAnimatorOverrideController")]
		private static extern void Internal_Create([Writable] AnimatorOverrideController self, RuntimeAnimatorController controller);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetClip")]
		private extern AnimationClip Internal_GetClipByName(string name, bool returnEffectiveClip);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetClip")]
		private extern void Internal_SetClipByName(string name, AnimationClip clip);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern AnimationClip GetClip(AnimationClip originalClip, bool returnEffectiveClip);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SetClip(AnimationClip originalClip, AnimationClip overrideClip, bool notify);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void SendNotification();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern AnimationClip GetOriginalClip(int index);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern AnimationClip GetOverrideClip(AnimationClip originalClip);

		public void GetOverrides(List<KeyValuePair<AnimationClip, AnimationClip>> overrides)
		{
			if (overrides == null)
			{
				throw new ArgumentNullException("overrides");
			}
			int num = overridesCount;
			if (overrides.Capacity < num)
			{
				overrides.Capacity = num;
			}
			overrides.Clear();
			for (int i = 0; i < num; i++)
			{
				AnimationClip originalClip = GetOriginalClip(i);
				overrides.Add(new KeyValuePair<AnimationClip, AnimationClip>(originalClip, GetOverrideClip(originalClip)));
			}
		}

		public void ApplyOverrides(IList<KeyValuePair<AnimationClip, AnimationClip>> overrides)
		{
			if (overrides == null)
			{
				throw new ArgumentNullException("overrides");
			}
			for (int i = 0; i < overrides.Count; i++)
			{
				SetClip(overrides[i].Key, overrides[i].Value, notify: false);
			}
			SendNotification();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("UNITY_EDITOR")]
		internal extern void PerformOverrideClipListCleanup();

		[RequiredByNativeCode]
		[NativeConditional("UNITY_EDITOR")]
		internal static void OnInvalidateOverrideController(AnimatorOverrideController controller)
		{
			if (controller.OnOverrideControllerDirty != null)
			{
				controller.OnOverrideControllerDirty();
			}
		}
	}
	[NativeHeader("Modules/Animation/OptimizeTransformHierarchy.h")]
	public class AnimatorUtility
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void OptimizeTransformHierarchy([NotNull("NullExceptionObject")] GameObject go, string[] exposedTransforms);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void DeoptimizeTransformHierarchy([NotNull("NullExceptionObject")] GameObject go);
	}
	public enum BodyDof
	{
		SpineFrontBack,
		SpineLeftRight,
		SpineRollLeftRight,
		ChestFrontBack,
		ChestLeftRight,
		ChestRollLeftRight,
		UpperChestFrontBack,
		UpperChestLeftRight,
		UpperChestRollLeftRight,
		LastBodyDof
	}
	public enum HeadDof
	{
		NeckFrontBack,
		NeckLeftRight,
		NeckRollLeftRight,
		HeadFrontBack,
		HeadLeftRight,
		HeadRollLeftRight,
		LeftEyeDownUp,
		LeftEyeInOut,
		RightEyeDownUp,
		RightEyeInOut,
		JawDownUp,
		JawLeftRight,
		LastHeadDof
	}
	public enum LegDof
	{
		UpperLegFrontBack,
		UpperLegInOut,
		UpperLegRollInOut,
		LegCloseOpen,
		LegRollInOut,
		FootCloseOpen,
		FootInOut,
		ToesUpDown,
		LastLegDof
	}
	public enum ArmDof
	{
		ShoulderDownUp,
		ShoulderFrontBack,
		ArmDownUp,
		ArmFrontBack,
		ArmRollInOut,
		ForeArmCloseOpen,
		ForeArmRollInOut,
		HandDownUp,
		HandInOut,
		LastArmDof
	}
	public enum FingerDof
	{
		ProximalDownUp,
		ProximalInOut,
		IntermediateCloseOpen,
		DistalCloseOpen,
		LastFingerDof
	}
	public enum HumanPartDof
	{
		Body,
		Head,
		LeftLeg,
		RightLeg,
		LeftArm,
		RightArm,
		LeftThumb,
		LeftIndex,
		LeftMiddle,
		LeftRing,
		LeftLittle,
		RightThumb,
		RightIndex,
		RightMiddle,
		RightRing,
		RightLittle,
		LastHumanPartDof
	}
	internal enum Dof
	{
		BodyDofStart = 0,
		HeadDofStart = 9,
		LeftLegDofStart = 21,
		RightLegDofStart = 29,
		LeftArmDofStart = 37,
		RightArmDofStart = 46,
		LeftThumbDofStart = 55,
		LeftIndexDofStart = 59,
		LeftMiddleDofStart = 63,
		LeftRingDofStart = 67,
		LeftLittleDofStart = 71,
		RightThumbDofStart = 75,
		RightIndexDofStart = 79,
		RightMiddleDofStart = 83,
		RightRingDofStart = 87,
		RightLittleDofStart = 91,
		LastDof = 95
	}
	public enum HumanBodyBones
	{
		Hips = 0,
		LeftUpperLeg = 1,
		RightUpperLeg = 2,
		LeftLowerLeg = 3,
		RightLowerLeg = 4,
		LeftFoot = 5,
		RightFoot = 6,
		Spine = 7,
		Chest = 8,
		UpperChest = 54,
		Neck = 9,
		Head = 10,
		LeftShoulder = 11,
		RightShoulder = 12,
		LeftUpperArm = 13,
		RightUpperArm = 14,
		LeftLowerArm = 15,
		RightLowerArm = 16,
		LeftHand = 17,
		RightHand = 18,
		LeftToes = 19,
		RightToes = 20,
		LeftEye = 21,
		RightEye = 22,
		Jaw = 23,
		LeftThumbProximal = 24,
		LeftThumbIntermediate = 25,
		LeftThumbDistal = 26,
		LeftIndexProximal = 27,
		LeftIndexIntermediate = 28,
		LeftIndexDistal = 29,
		LeftMiddleProximal = 30,
		LeftMiddleIntermediate = 31,
		LeftMiddleDistal = 32,
		LeftRingProximal = 33,
		LeftRingIntermediate = 34,
		LeftRingDistal = 35,
		LeftLittleProximal = 36,
		LeftLittleIntermediate = 37,
		LeftLittleDistal = 38,
		RightThumbProximal = 39,
		RightThumbIntermediate = 40,
		RightThumbDistal = 41,
		RightIndexProximal = 42,
		RightIndexIntermediate = 43,
		RightIndexDistal = 44,
		RightMiddleProximal = 45,
		RightMiddleIntermediate = 46,
		RightMiddleDistal = 47,
		RightRingProximal = 48,
		RightRingIntermediate = 49,
		RightRingDistal = 50,
		RightLittleProximal = 51,
		RightLittleIntermediate = 52,
		RightLittleDistal = 53,
		LastBone = 55
	}
	internal enum HumanParameter
	{
		UpperArmTwist,
		LowerArmTwist,
		UpperLegTwist,
		LowerLegTwist,
		ArmStretch,
		LegStretch,
		FeetSpacing
	}
	[UsedByNativeCode]
	[NativeHeader("Modules/Animation/Avatar.h")]
	public class Avatar : Object
	{
		public extern bool isValid
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsValid")]
			get;
		}

		public extern bool isHuman
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("IsHuman")]
			get;
		}

		public HumanDescription humanDescription
		{
			get
			{
				get_humanDescription_Injected(out var ret);
				return ret;
			}
		}

		private Avatar()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void SetMuscleMinMax(int muscleId, float min, float max);

		[MethodImpl(MethodImplOptions.InternalCall)]
		internal extern void SetParameter(int parameterId, float value);

		internal float GetAxisLength(int humanId)
		{
			return Internal_GetAxisLength(HumanTrait.GetBoneIndexFromMono(humanId));
		}

		internal Quaternion GetPreRotation(int humanId)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			return Internal_GetPreRotation(HumanTrait.GetBoneIndexFromMono(humanId));
		}

		internal Quaternion GetPostRotation(int humanId)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			return Internal_GetPostRotation(HumanTrait.GetBoneIndexFromMono(humanId));
		}

		internal Quaternion GetZYPostQ(int humanId, Quaternion parentQ, Quaternion q)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0012: Unknown result type (might be due to invalid IL or missing references)
			return Internal_GetZYPostQ(HumanTrait.GetBoneIndexFromMono(humanId), parentQ, q);
		}

		internal Quaternion GetZYRoll(int humanId, Vector3 uvw)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			return Internal_GetZYRoll(HumanTrait.GetBoneIndexFromMono(humanId), uvw);
		}

		internal Vector3 GetLimitSign(int humanId)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			return Internal_GetLimitSign(HumanTrait.GetBoneIndexFromMono(humanId));
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAxisLength")]
		internal extern float Internal_GetAxisLength(int humanId);

		[NativeMethod("GetPreRotation")]
		internal Quaternion Internal_GetPreRotation(int humanId)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			Internal_GetPreRotation_Injected(humanId, out var ret);
			return ret;
		}

		[NativeMethod("GetPostRotation")]
		internal Quaternion Internal_GetPostRotation(int humanId)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			Internal_GetPostRotation_Injected(humanId, out var ret);
			return ret;
		}

		[NativeMethod("GetZYPostQ")]
		internal Quaternion Internal_GetZYPostQ(int humanId, Quaternion parentQ, Quaternion q)
		{
			//IL_000d: Unknown result type (might be due to invalid IL or missing references)
			Internal_GetZYPostQ_Injected(humanId, ref parentQ, ref q, out var ret);
			return ret;
		}

		[NativeMethod("GetZYRoll")]
		internal Quaternion Internal_GetZYRoll(int humanId, Vector3 uvw)
		{
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			Internal_GetZYRoll_Injected(humanId, ref uvw, out var ret);
			return ret;
		}

		[NativeMethod("GetLimitSign")]
		internal Vector3 Internal_GetLimitSign(int humanId)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			Internal_GetLimitSign_Injected(humanId, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private extern void get_humanDescription_Injected(out HumanDescription ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetPreRotation_Injected(int humanId, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetPostRotation_Injected(int humanId, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetZYPostQ_Injected(int humanId, ref Quaternion parentQ, ref Quaternion q, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetZYRoll_Injected(int humanId, ref Vector3 uvw, out Quaternion ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void Internal_GetLimitSign_Injected(int humanId, out Vector3 ret);
	}
	[NativeHeader("Modules/Animation/HumanDescription.h")]
	[RequiredByNativeCode]
	[NativeType(/*Could not decode attribute arguments.*/)]
	public struct SkeletonBone
	{
		[NativeName("m_Name")]
		public string name;

		[NativeName("m_ParentName")]
		internal string parentName;

		[NativeName("m_Position")]
		public Vector3 position;

		[NativeName("m_Rotation")]
		public Quaternion rotation;

		[NativeName("m_Scale")]
		public Vector3 scale;

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("transformModified is no longer used and has been deprecated.", true)]
		public int transformModified
		{
			get
			{
				return 0;
			}
			set
			{
			}
		}
	}
	[NativeType(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Modules/Animation/ScriptBindings/AvatarBuilder.bindings.h")]
	[NativeHeader("Modules/Animation/HumanDescription.h")]
	public struct HumanLimit
	{
		private Vector3 m_Min;

		private Vector3 m_Max;

		private Vector3 m_Center;

		private float m_AxisLength;

		private int m_UseDefaultValues;

		public bool useDefaultValues
		{
			get
			{
				return m_UseDefaultValues != 0;
			}
			set
			{
				m_UseDefaultValues = (value ? 1 : 0);
			}
		}

		public Vector3 min
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				return m_Min;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Min = value;
			}
		}

		public Vector3 max
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				return m_Max;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Max = value;
			}
		}

		public Vector3 center
		{
			get
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000a: Unknown result type (might be due to invalid IL or missing references)
				return m_Center;
			}
			set
			{
				//IL_0002: Unknown result type (might be due to invalid IL or missing references)
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				m_Center = value;
			}
		}

		public float axisLength
		{
			get
			{
				return m_AxisLength;
			}
			set
			{
				m_AxisLength = value;
			}
		}
	}
	[NativeHeader("Modules/Animation/HumanDescription.h")]
	[RequiredByNativeCode]
	[NativeType(/*Could not decode attribute arguments.*/)]
	public struct HumanBone
	{
		private string m_BoneName;

		private string m_HumanNam

UnityEngine.AssetBundleModule.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using UnityEngine;
using UnityEngine.Bindings;
using UnityEngine.Scripting;
using UnityEngineInternal;

[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS4Module")]
[assembly: InternalsVisibleTo("UnityEngine.PS4VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS5Module")]
[assembly: InternalsVisibleTo("UnityEngine.PS5VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityCurlModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("UnityEngine.VirtualTexturingModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsNativeModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("UnityEditor.UIBuilderModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UIElements")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsGameObjectsModule")]
[assembly: InternalsVisibleTo("Unity.UIElements.Editor")]
[assembly: InternalsVisibleTo("Unity.UIElements.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Networking.Transport")]
[assembly: InternalsVisibleTo("Unity.ucg.QoS")]
[assembly: InternalsVisibleTo("Unity.Logging")]
[assembly: InternalsVisibleTo("Unity.Entities")]
[assembly: InternalsVisibleTo("Unity.Entities.Tests")]
[assembly: InternalsVisibleTo("Unity.Collections")]
[assembly: InternalsVisibleTo("Unity.Runtime")]
[assembly: InternalsVisibleTo("Unity.Core")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.GIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: CompilationRelaxations(8)]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubsystemsModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace UnityEngine
{
	public enum AssetBundleLoadResult
	{
		Success,
		Cancelled,
		NotMatchingCrc,
		FailedCache,
		NotValidAssetBundle,
		NoSerializedData,
		NotCompatible,
		AlreadyLoaded,
		FailedRead,
		FailedDecompression,
		FailedWrite,
		FailedDeleteRecompressionTarget,
		RecompressionTargetIsLoaded,
		RecompressionTargetExistsButNotArchive
	}
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromMemoryAsyncOperation.h")]
	[ExcludeFromPreset]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadAssetOperation.h")]
	[NativeHeader("Runtime/Scripting/ScriptingExportUtility.h")]
	[NativeHeader("Runtime/Scripting/ScriptingObjectWithIntPtrField.h")]
	[NativeHeader("Runtime/Scripting/ScriptingUtility.h")]
	[NativeHeader("AssetBundleScriptingClasses.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleSaveAndLoadHelper.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleUtility.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadAssetUtility.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromFileAsyncOperation.h")]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromManagedStreamAsyncOperation.h")]
	public class AssetBundle : Object
	{
		[Obsolete("mainAsset has been made obsolete. Please use the new AssetBundle build system introduced in 5.0 and check BuildAssetBundles documentation for details.")]
		public Object mainAsset => returnMainAsset(this);

		public extern bool isStreamedSceneAssetBundle
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetIsStreamedSceneAssetBundle")]
			get;
		}

		public static uint memoryBudgetKB
		{
			get
			{
				return AssetBundleLoadingCache.memoryBudgetKB;
			}
			set
			{
				AssetBundleLoadingCache.memoryBudgetKB = value;
			}
		}

		private AssetBundle()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadMainObjectFromAssetBundle", true)]
		internal static extern Object returnMainAsset([NotNull("NullExceptionObject")] AssetBundle bundle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("UnloadAllAssetBundles")]
		public static extern void UnloadAllAssetBundles(bool unloadAllObjects);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("GetAllAssetBundles")]
		internal static extern AssetBundle[] GetAllLoadedAssetBundles_Native();

		public static IEnumerable<AssetBundle> GetAllLoadedAssetBundles()
		{
			return GetAllLoadedAssetBundles_Native();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromFileAsync")]
		internal static extern AssetBundleCreateRequest LoadFromFileAsync_Internal(string path, uint crc, ulong offset);

		public static AssetBundleCreateRequest LoadFromFileAsync(string path)
		{
			return LoadFromFileAsync_Internal(path, 0u, 0uL);
		}

		public static AssetBundleCreateRequest LoadFromFileAsync(string path, uint crc)
		{
			return LoadFromFileAsync_Internal(path, crc, 0uL);
		}

		public static AssetBundleCreateRequest LoadFromFileAsync(string path, uint crc, ulong offset)
		{
			return LoadFromFileAsync_Internal(path, crc, offset);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromFile")]
		internal static extern AssetBundle LoadFromFile_Internal(string path, uint crc, ulong offset);

		public static AssetBundle LoadFromFile(string path)
		{
			return LoadFromFile_Internal(path, 0u, 0uL);
		}

		public static AssetBundle LoadFromFile(string path, uint crc)
		{
			return LoadFromFile_Internal(path, crc, 0uL);
		}

		public static AssetBundle LoadFromFile(string path, uint crc, ulong offset)
		{
			return LoadFromFile_Internal(path, crc, offset);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromMemoryAsync")]
		internal static extern AssetBundleCreateRequest LoadFromMemoryAsync_Internal(byte[] binary, uint crc);

		public static AssetBundleCreateRequest LoadFromMemoryAsync(byte[] binary)
		{
			return LoadFromMemoryAsync_Internal(binary, 0u);
		}

		public static AssetBundleCreateRequest LoadFromMemoryAsync(byte[] binary, uint crc)
		{
			return LoadFromMemoryAsync_Internal(binary, crc);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromMemory")]
		internal static extern AssetBundle LoadFromMemory_Internal(byte[] binary, uint crc);

		public static AssetBundle LoadFromMemory(byte[] binary)
		{
			return LoadFromMemory_Internal(binary, 0u);
		}

		public static AssetBundle LoadFromMemory(byte[] binary, uint crc)
		{
			return LoadFromMemory_Internal(binary, crc);
		}

		internal static void ValidateLoadFromStream(Stream stream)
		{
			if (stream == null)
			{
				throw new ArgumentNullException("ManagedStream object must be non-null", "stream");
			}
			if (!stream.CanRead)
			{
				throw new ArgumentException("ManagedStream object must be readable (stream.CanRead must return true)", "stream");
			}
			if (!stream.CanSeek)
			{
				throw new ArgumentException("ManagedStream object must be seekable (stream.CanSeek must return true)", "stream");
			}
		}

		public static AssetBundleCreateRequest LoadFromStreamAsync(Stream stream, uint crc, uint managedReadBufferSize)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamAsyncInternal(stream, crc, managedReadBufferSize);
		}

		public static AssetBundleCreateRequest LoadFromStreamAsync(Stream stream, uint crc)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamAsyncInternal(stream, crc, 0u);
		}

		public static AssetBundleCreateRequest LoadFromStreamAsync(Stream stream)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamAsyncInternal(stream, 0u, 0u);
		}

		public static AssetBundle LoadFromStream(Stream stream, uint crc, uint managedReadBufferSize)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamInternal(stream, crc, managedReadBufferSize);
		}

		public static AssetBundle LoadFromStream(Stream stream, uint crc)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamInternal(stream, crc, 0u);
		}

		public static AssetBundle LoadFromStream(Stream stream)
		{
			ValidateLoadFromStream(stream);
			return LoadFromStreamInternal(stream, 0u, 0u);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromStreamAsyncInternal")]
		internal static extern AssetBundleCreateRequest LoadFromStreamAsyncInternal(Stream stream, uint crc, uint managedReadBufferSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("LoadFromStreamInternal")]
		internal static extern AssetBundle LoadFromStreamInternal(Stream stream, uint crc, uint managedReadBufferSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("Contains")]
		public extern bool Contains(string name);

		[Obsolete("Method Load has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAsset instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public Object Load(string name)
		{
			return null;
		}

		[Obsolete("Method Load has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAsset instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		public Object Load<T>(string name)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method Load has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAsset instead and check the documentation for details.", true)]
		private Object Load(string name, Type type)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method LoadAsync has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAssetAsync instead and check the documentation for details.", true)]
		private AssetBundleRequest LoadAsync(string name, Type type)
		{
			return null;
		}

		[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
		[EditorBrowsable(EditorBrowsableState.Never)]
		private Object[] LoadAll(Type type)
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
		public Object[] LoadAll()
		{
			return null;
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		[Obsolete("Method LoadAll has been deprecated. Script updater cannot update it as the loading behaviour has changed. Please use LoadAllAssets instead and check the documentation for details.", true)]
		public T[] LoadAll<T>() where T : Object
		{
			return null;
		}

		public Object LoadAsset(string name)
		{
			return LoadAsset(name, typeof(Object));
		}

		public T LoadAsset<T>(string name) where T : Object
		{
			return (T)(object)LoadAsset(name, typeof(T));
		}

		[TypeInferenceRule(/*Could not decode attribute arguments.*/)]
		public Object LoadAsset(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAsset_Internal(name, type);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[TypeInferenceRule(/*Could not decode attribute arguments.*/)]
		[NativeMethod("LoadAsset_Internal")]
		[NativeThrows]
		private extern Object LoadAsset_Internal(string name, Type type);

		public AssetBundleRequest LoadAssetAsync(string name)
		{
			return LoadAssetAsync(name, typeof(Object));
		}

		public AssetBundleRequest LoadAssetAsync<T>(string name)
		{
			return LoadAssetAsync(name, typeof(T));
		}

		public AssetBundleRequest LoadAssetAsync(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetAsync_Internal(name, type);
		}

		public Object[] LoadAssetWithSubAssets(string name)
		{
			return LoadAssetWithSubAssets(name, typeof(Object));
		}

		internal static T[] ConvertObjects<T>(Object[] rawObjects) where T : Object
		{
			if (rawObjects == null)
			{
				return null;
			}
			T[] array = new T[rawObjects.Length];
			for (int i = 0; i < array.Length; i++)
			{
				array[i] = (T)(object)rawObjects[i];
			}
			return array;
		}

		public T[] LoadAssetWithSubAssets<T>(string name) where T : Object
		{
			return ConvertObjects<T>(LoadAssetWithSubAssets(name, typeof(T)));
		}

		public Object[] LoadAssetWithSubAssets(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssets_Internal(name, type);
		}

		public AssetBundleRequest LoadAssetWithSubAssetsAsync(string name)
		{
			return LoadAssetWithSubAssetsAsync(name, typeof(Object));
		}

		public AssetBundleRequest LoadAssetWithSubAssetsAsync<T>(string name)
		{
			return LoadAssetWithSubAssetsAsync(name, typeof(T));
		}

		public AssetBundleRequest LoadAssetWithSubAssetsAsync(string name, Type type)
		{
			if (name == null)
			{
				throw new NullReferenceException("The input asset name cannot be null.");
			}
			if (name.Length == 0)
			{
				throw new ArgumentException("The input asset name cannot be empty.");
			}
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssetsAsync_Internal(name, type);
		}

		public Object[] LoadAllAssets()
		{
			return LoadAllAssets(typeof(Object));
		}

		public T[] LoadAllAssets<T>() where T : Object
		{
			return ConvertObjects<T>(LoadAllAssets(typeof(T)));
		}

		public Object[] LoadAllAssets(Type type)
		{
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssets_Internal("", type);
		}

		public AssetBundleRequest LoadAllAssetsAsync()
		{
			return LoadAllAssetsAsync(typeof(Object));
		}

		public AssetBundleRequest LoadAllAssetsAsync<T>()
		{
			return LoadAllAssetsAsync(typeof(T));
		}

		public AssetBundleRequest LoadAllAssetsAsync(Type type)
		{
			if ((object)type == null)
			{
				throw new NullReferenceException("The input type cannot be null.");
			}
			return LoadAssetWithSubAssetsAsync_Internal("", type);
		}

		[Obsolete("This method is deprecated.Use GetAllAssetNames() instead.", false)]
		public string[] AllAssetNames()
		{
			return GetAllAssetNames();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("LoadAssetAsync_Internal")]
		[NativeThrows]
		private extern AssetBundleRequest LoadAssetAsync_Internal(string name, Type type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("Unload")]
		public extern void Unload(bool unloadAllLoadedObjects);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllAssetNames")]
		public extern string[] GetAllAssetNames();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllScenePaths")]
		public extern string[] GetAllScenePaths();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		[NativeMethod("LoadAssetWithSubAssets_Internal")]
		internal extern Object[] LoadAssetWithSubAssets_Internal(string name, Type type);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeThrows]
		[NativeMethod("LoadAssetWithSubAssetsAsync_Internal")]
		private extern AssetBundleRequest LoadAssetWithSubAssetsAsync_Internal(string name, Type type);

		public static AssetBundleRecompressOperation RecompressAssetBundleAsync(string inputPath, string outputPath, BuildCompression method, uint expectedCRC = 0u, ThreadPriority priority = 0)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return RecompressAssetBundleAsync_Internal(inputPath, outputPath, method, expectedCRC, priority);
		}

		[NativeThrows]
		[FreeFunction("RecompressAssetBundleAsync_Internal")]
		internal static AssetBundleRecompressOperation RecompressAssetBundleAsync_Internal(string inputPath, string outputPath, BuildCompression method, uint expectedCRC, ThreadPriority priority)
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			return RecompressAssetBundleAsync_Internal_Injected(inputPath, outputPath, ref method, expectedCRC, priority);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern AssetBundleRecompressOperation RecompressAssetBundleAsync_Internal_Injected(string inputPath, string outputPath, ref BuildCompression method, uint expectedCRC, ThreadPriority priority);
	}
	[StructLayout(LayoutKind.Sequential)]
	[RequiredByNativeCode]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadFromAsyncOperation.h")]
	public class AssetBundleCreateRequest : AsyncOperation
	{
		public extern AssetBundle assetBundle
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetAssetBundleBlocking")]
			get;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("SetEnableCompatibilityChecks")]
		private extern void SetEnableCompatibilityChecks(bool set);

		internal void DisableCompatibilityChecks()
		{
			SetEnableCompatibilityChecks(set: false);
		}
	}
	[Serializable]
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadingCache.h")]
	[UsedByNativeCode]
	internal static class AssetBundleLoadingCache
	{
		internal const int kMinAllowedBlockCount = 2;

		internal const int kMinAllowedMaxBlocksPerFile = 2;

		internal static extern uint maxBlocksPerFile
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		internal static extern uint blockCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			set;
		}

		internal static extern uint blockSize
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			get;
		}

		internal static uint memoryBudgetKB
		{
			get
			{
				return blockCount * blockSize;
			}
			set
			{
				uint num = Math.Max(value / blockSize, 2u);
				uint num2 = Math.Max(blockCount / 4, 2u);
				if (num != blockCount || num2 != maxBlocksPerFile)
				{
					blockCount = num;
					maxBlocksPerFile = num2;
				}
			}
		}
	}
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleManifest.h")]
	public class AssetBundleManifest : Object
	{
		private AssetBundleManifest()
		{
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllAssetBundles")]
		public extern string[] GetAllAssetBundles();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllAssetBundlesWithVariant")]
		public extern string[] GetAllAssetBundlesWithVariant();

		[NativeMethod("GetAssetBundleHash")]
		public Hash128 GetAssetBundleHash(string assetBundleName)
		{
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			GetAssetBundleHash_Injected(assetBundleName, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetDirectDependencies")]
		public extern string[] GetDirectDependencies(string assetBundleName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetAllDependencies")]
		public extern string[] GetAllDependencies(string assetBundleName);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private extern void GetAssetBundleHash_Injected(string assetBundleName, out Hash128 ret);
	}
	[StructLayout(LayoutKind.Sequential)]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleRecompressOperation.h")]
	[RequiredByNativeCode]
	public class AssetBundleRecompressOperation : AsyncOperation
	{
		public extern string humanReadableResult
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetResultStr")]
			get;
		}

		public extern string inputPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetInputPath")]
			get;
		}

		public extern string outputPath
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetOutputPath")]
			get;
		}

		public extern AssetBundleLoadResult result
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetResult")]
			get;
		}

		public extern bool success
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetSuccess")]
			get;
		}
	}
	[StructLayout(LayoutKind.Sequential)]
	[RequiredByNativeCode]
	[NativeHeader("Modules/AssetBundle/Public/AssetBundleLoadAssetOperation.h")]
	public class AssetBundleRequest : ResourceRequest
	{
		public Object asset => ((ResourceRequest)this).GetResult();

		public extern Object[] allAssets
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod("GetAllLoadedAssets")]
			get;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod("GetLoadedAsset")]
		protected override extern Object GetResult();
	}
	public enum CompressionType
	{
		None,
		Lzma,
		Lz4,
		Lz4HC
	}
	public enum CompressionLevel
	{
		None,
		Fastest,
		Fast,
		Normal,
		High,
		Maximum
	}
	[Serializable]
	[UsedByNativeCode]
	public struct BuildCompression
	{
		public static readonly BuildCompression Uncompressed = new BuildCompression(CompressionType.None, CompressionLevel.Maximum, 131072u);

		public static readonly BuildCompression LZ4 = new BuildCompression(CompressionType.Lz4HC, CompressionLevel.Maximum, 131072u);

		public static readonly BuildCompression LZMA = new BuildCompression(CompressionType.Lzma, CompressionLevel.Maximum, 131072u);

		public static readonly BuildCompression UncompressedRuntime = Uncompressed;

		public static readonly BuildCompression LZ4Runtime = new BuildCompression(CompressionType.Lz4, CompressionLevel.Maximum, 131072u);

		[NativeName("compression")]
		private CompressionType _compression;

		[NativeName("level")]
		private CompressionLevel _level;

		[NativeName("blockSize")]
		private uint _blockSize;

		public CompressionType compression
		{
			get
			{
				return _compression;
			}
			private set
			{
				_compression = value;
			}
		}

		public CompressionLevel level
		{
			get
			{
				return _level;
			}
			private set
			{
				_level = value;
			}
		}

		public uint blockSize
		{
			get
			{
				return _blockSize;
			}
			private set
			{
				_blockSize = value;
			}
		}

		private BuildCompression(CompressionType in_compression, CompressionLevel in_level, uint in_blockSize)
		{
			this = default(BuildCompression);
			compression = in_compression;
			level = in_level;
			blockSize = in_blockSize;
		}
	}
}
namespace UnityEngine.Experimental.AssetBundlePatching
{
	[NativeHeader("Modules/AssetBundle/Public/AssetBundlePatching.h")]
	public static class AssetBundleUtility
	{
		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void PatchAssetBundles(AssetBundle[] bundles, string[] filenames);
	}
}

UnityEngine.CoreModule.dll

Decompiled 5 months ago
#define UNITY_ASSERTIONS
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Security;
using System.Security.Permissions;
using System.Text;
using System.Threading;
using JetBrains.Annotations;
using Microsoft.CodeAnalysis;
using Unity.Baselib.LowLevel;
using Unity.Burst;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.IL2CPP.CompilerServices;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using Unity.Profiling;
using Unity.Profiling.LowLevel;
using Unity.Profiling.LowLevel.Unsafe;
using UnityEngine;
using UnityEngine.Assertions.Comparers;
using UnityEngine.Bindings;
using UnityEngine.Diagnostics;
using UnityEngine.Events;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Internal;
using UnityEngine.Networking.PlayerConnection;
using UnityEngine.Playables;
using UnityEngine.Profiling;
using UnityEngine.Profiling.Experimental;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.Serialization;
using UnityEngineInternal;

[assembly: InternalsVisibleTo("UnityEngine.GIModule")]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: InternalsVisibleTo("UnityEngine")]
[assembly: InternalsVisibleTo("UnityEngine.SharedInternalsModule")]
[assembly: InternalsVisibleTo("UnityEngine.CoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.AccessibilityModule")]
[assembly: InternalsVisibleTo("UnityEngine.AIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AndroidJNIModule")]
[assembly: InternalsVisibleTo("UnityEngine.AnimationModule")]
[assembly: InternalsVisibleTo("UnityEngine.AudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterInputModule")]
[assembly: InternalsVisibleTo("UnityEngine.ClusterRendererModule")]
[assembly: InternalsVisibleTo("UnityEngine.DirectorModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextRenderingModule")]
[assembly: InternalsVisibleTo("UnityEngine.GridModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainModule")]
[assembly: InternalsVisibleTo("UnityEngine.DSPGraphModule")]
[assembly: InternalsVisibleTo("UnityEngine.HotReloadModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputLegacyModule")]
[assembly: InternalsVisibleTo("UnityEngine.JSONSerializeModule")]
[assembly: InternalsVisibleTo("UnityEngine.LocalizationModule")]
[assembly: InternalsVisibleTo("UnityEngine.ParticleSystemModule")]
[assembly: InternalsVisibleTo("UnityEngine.PhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.Physics2DModule")]
[assembly: InternalsVisibleTo("UnityEngine.ProfilerModule")]
[assembly: InternalsVisibleTo("UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule")]
[assembly: InternalsVisibleTo("UnityEngine.ScreenCaptureModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteMaskModule")]
[assembly: InternalsVisibleTo("UnityEngine.SpriteShapeModule")]
[assembly: InternalsVisibleTo("UnityEngine.StreamingModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubstanceModule")]
[assembly: InternalsVisibleTo("UnityEngine.SubsystemsModule")]
[assembly: InternalsVisibleTo("UnityEngine.ImageConversionModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS5Module")]
[assembly: InternalsVisibleTo("UnityEngine.TilemapModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS5VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.GameCenterModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIModule")]
[assembly: InternalsVisibleTo("UnityEngine.UmbraModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityConnectModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityCurlModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityTestProtocolModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAudioModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestTextureModule")]
[assembly: InternalsVisibleTo("UnityEngine.VehiclesModule")]
[assembly: InternalsVisibleTo("UnityEngine.VFXModule")]
[assembly: InternalsVisibleTo("UnityEngine.VideoModule")]
[assembly: InternalsVisibleTo("UnityEngine.VirtualTexturingModule")]
[assembly: InternalsVisibleTo("UnityEngine.WindModule")]
[assembly: InternalsVisibleTo("UnityEngine.AssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.IMGUIModule")]
[assembly: InternalsVisibleTo("UnityEngine.TerrainPhysicsModule")]
[assembly: InternalsVisibleTo("UnityEngine.TextCoreModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS4VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.InputModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsNativeModule")]
[assembly: InternalsVisibleTo("UnityEngine.UNETModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityAnalyticsModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestAssetBundleModule")]
[assembly: InternalsVisibleTo("UnityEngine.UnityWebRequestWWWModule")]
[assembly: InternalsVisibleTo("UnityEngine.XRModule")]
[assembly: InternalsVisibleTo("UnityEngine.ARModule")]
[assembly: InternalsVisibleTo("UnityEngine.CrashReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.PerformanceReportingModule")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsModule")]
[assembly: InternalsVisibleTo("UnityEngine.VRModule")]
[assembly: InternalsVisibleTo("UnityEngine.SwitchModule")]
[assembly: InternalsVisibleTo("UnityEngine.XboxOneModule")]
[assembly: InternalsVisibleTo("UnityEngine.PS4Module")]
[assembly: InternalsVisibleTo("UnityEngine.TLSModule")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.012")]
[assembly: InternalsVisibleTo("UnityEngine.ClothModule")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework.Tests")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.Framework")]
[assembly: InternalsVisibleTo("UnityEngine.Cloud.Service")]
[assembly: InternalsVisibleTo("Unity.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Analytics")]
[assembly: InternalsVisibleTo("UnityEngine.Advertisements")]
[assembly: InternalsVisibleTo("UnityEngine.Purchasing")]
[assembly: InternalsVisibleTo("UnityEngine.TestRunner")]
[assembly: InternalsVisibleTo("Unity.Automation")]
[assembly: InternalsVisibleTo("Unity.Burst")]
[assembly: InternalsVisibleTo("Unity.Burst.Editor")]
[assembly: InternalsVisibleTo("Unity.DeploymentTests.Services")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.UnityAnalytics")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Timeline")]
[assembly: InternalsVisibleTo("Unity.PerformanceTests.RuntimeTestRunner.Tests")]
[assembly: InternalsVisibleTo("Unity.IntegrationTests.Framework")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests.AllIn1Runner")]
[assembly: InternalsVisibleTo("Unity.UIElements.EditorTests")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.EditorTests")]
[assembly: InternalsVisibleTo("Unity.Timeline")]
[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
[assembly: InternalsVisibleTo("Assembly-CSharp-firstpass-testable")]
[assembly: InternalsVisibleTo("UnityEngine.SpatialTracking")]
[assembly: InternalsVisibleTo("GoogleAR.UnityNative")]
[assembly: InternalsVisibleTo("Unity.WindowsMRAutomation")]
[assembly: InternalsVisibleTo("Unity.2D.Sprite.Editor")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.Editor")]
[assembly: InternalsVisibleTo("UnityEngine.Networking")]
[assembly: InternalsVisibleTo("UnityEditor.UIBuilderModule")]
[assembly: InternalsVisibleTo("Unity.UI.Builder.EditorTests")]
[assembly: InternalsVisibleTo("Unity.UIElements")]
[assembly: InternalsVisibleTo("UnityEngine.UIElementsGameObjectsModule")]
[assembly: InternalsVisibleTo("Unity.UIElements.Editor")]
[assembly: InternalsVisibleTo("Unity.Networking.Transport")]
[assembly: InternalsVisibleTo("Unity.RuntimeTests")]
[assembly: InternalsVisibleTo("Unity.ucg.QoS")]
[assembly: InternalsVisibleTo("Unity.Logging")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.013")]
[assembly: InternalsVisibleTo("Unity.Collections")]
[assembly: InternalsVisibleTo("Unity.Runtime")]
[assembly: InternalsVisibleTo("Unity.Core")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.005")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.006")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.007")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.008")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.009")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.010")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.011")]
[assembly: InternalsVisibleTo("Unity.Entities.Tests")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.014")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.016")]
[assembly: UnityEngineModuleAssembly]
[assembly: InternalsVisibleTo("Unity.Entities")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.015")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.017")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.018")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.019")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.020")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.021")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.022")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.024")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.001")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.002")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.003")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.004")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridgeDev.005")]
[assembly: InternalsVisibleTo("Unity.Subsystem.Registration")]
[assembly: InternalsVisibleTo("Unity.InternalAPIEngineBridge.023")]
[assembly: InternalsVisibleTo("Unity.2D.Entities.Hybrid")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsUnmanagedAttribute : Attribute
	{
	}
}
namespace AOT
{
	[AttributeUsage(AttributeTargets.Method)]
	public class MonoPInvokeCallbackAttribute : Attribute
	{
		public MonoPInvokeCallbackAttribute(Type type)
		{
		}
	}
}
namespace UnityEditor.Experimental
{
	public class RenderSettings
	{
		[Obsolete("Use UnityEngine.Experimental.GlobalIllumination.useRadianceAmbientProbe instead. (UnityUpgradable) -> UnityEngine.Experimental.GlobalIllumination.RenderSettings.useRadianceAmbientProbe", true)]
		public static bool useRadianceAmbientProbe { get; set; }
	}
}
namespace UnityEngineInternal
{
	public enum GITextureType
	{
		Charting,
		Albedo,
		Emissive,
		Irradiance,
		Directionality,
		Baked,
		BakedDirectional,
		InputWorkspace,
		BakedShadowMask,
		BakedAlbedo,
		BakedEmissive,
		BakedCharting,
		BakedTexelValidity,
		BakedUVOverlap,
		BakedLightmapCulling
	}
	[NativeHeader("Runtime/Export/GI/GIDebugVisualisation.bindings.h")]
	public static class GIDebugVisualisation
	{
		public static extern bool cycleMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			get;
		}

		public static extern bool pauseCycleMode
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			get;
		}

		public static extern GITextureType texType
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			set;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void ResetRuntimeInputTextures();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void PlayCycleMode();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void PauseCycleMode();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void StopCycleMode();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void CycleSkipSystems(int skip);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction]
		public static extern void CycleSkipInstances(int skip);
	}
	public enum MemorylessMode
	{
		Unused,
		Forced,
		Automatic
	}
	[NativeHeader("Runtime/Misc/PlayerSettings.h")]
	public class MemorylessManager
	{
		public static MemorylessMode depthMemorylessMode
		{
			get
			{
				return GetFramebufferDepthMemorylessMode();
			}
			set
			{
				SetFramebufferDepthMemorylessMode(value);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(Name = "GetFramebufferDepthMemorylessMode")]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		internal static extern MemorylessMode GetFramebufferDepthMemorylessMode();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[StaticAccessor(/*Could not decode attribute arguments.*/)]
		[NativeMethod(Name = "SetFramebufferDepthMemorylessMode")]
		internal static extern void SetFramebufferDepthMemorylessMode(MemorylessMode mode);
	}
	internal struct GraphicsDeviceDebugSettings
	{
		public float sleepAtStartOfGraphicsJobs;

		public float sleepBeforeTextureUpload;
	}
	[StaticAccessor(/*Could not decode attribute arguments.*/)]
	[NativeHeader("Runtime/Export/Graphics/GraphicsDeviceDebug.bindings.h")]
	internal static class GraphicsDeviceDebug
	{
		internal static GraphicsDeviceDebugSettings settings
		{
			get
			{
				get_settings_Injected(out var ret);
				return ret;
			}
			set
			{
				set_settings_Injected(ref value);
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void get_settings_Injected(out GraphicsDeviceDebugSettings ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void set_settings_Injected(ref GraphicsDeviceDebugSettings value);
	}
	internal enum LightmapType
	{
		NoLightmap = -1,
		StaticLightmap,
		DynamicLightmap
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	[Il2CppEagerStaticClassConstruction]
	public struct MathfInternal
	{
		public static volatile float FloatMinNormal = 1.1754944E-38f;

		public static volatile float FloatMinDenormal = float.Epsilon;

		public static bool IsFlushToZeroEnabled = FloatMinDenormal == 0f;
	}
	public sealed class APIUpdaterRuntimeServices
	{
		[Obsolete("Method is not meant to be used at runtime. Please, replace this call with GameObject.AddComponent<T>()/GameObject.AddComponent(Type).", true)]
		public static UnityEngine.Component AddComponent(GameObject go, string sourceInfo, string name)
		{
			throw new Exception();
		}
	}
	public enum TypeInferenceRules
	{
		TypeReferencedByFirstArgument,
		TypeReferencedBySecondArgument,
		ArrayOfTypeReferencedByFirstArgument,
		TypeOfFirstArgument
	}
	[Serializable]
	[AttributeUsage(AttributeTargets.Method)]
	public class TypeInferenceRuleAttribute : Attribute
	{
		private readonly string _rule;

		public TypeInferenceRuleAttribute(TypeInferenceRules rule)
			: this(rule.ToString())
		{
		}

		public TypeInferenceRuleAttribute(string rule)
		{
			_rule = rule;
		}

		public override string ToString()
		{
			return _rule;
		}
	}
	public class GenericStack : Stack
	{
	}
}
namespace Unity.Baselib
{
	internal static class BaselibNativeLibrary
	{
	}
	internal struct ErrorState
	{
		private Binding.Baselib_ErrorState nativeErrorState;

		public Binding.Baselib_ErrorCode ErrorCode => nativeErrorState.code;

		public unsafe Binding.Baselib_ErrorState* NativeErrorStatePtr
		{
			get
			{
				fixed (Binding.Baselib_ErrorState* result = &nativeErrorState)
				{
					return result;
				}
			}
		}

		public void ThrowIfFailed()
		{
			if (ErrorCode != 0)
			{
				throw new BaselibException(this);
			}
		}

		public unsafe string Explain(Binding.Baselib_ErrorState_ExplainVerbosity verbosity = Binding.Baselib_ErrorState_ExplainVerbosity.ErrorType_SourceLocation_Explanation)
		{
			fixed (Binding.Baselib_ErrorState* errorState = &nativeErrorState)
			{
				uint num = Binding.Baselib_ErrorState_Explain(errorState, null, 0u, verbosity) + 1;
				IntPtr intPtr = Binding.Baselib_Memory_Allocate(new UIntPtr(num));
				try
				{
					Binding.Baselib_ErrorState_Explain(errorState, (byte*)(void*)intPtr, num, verbosity);
					return Marshal.PtrToStringAnsi(intPtr);
				}
				finally
				{
					Binding.Baselib_Memory_Free(intPtr);
				}
			}
		}
	}
	internal class BaselibException : Exception
	{
		private readonly ErrorState errorState;

		public Binding.Baselib_ErrorCode ErrorCode => errorState.ErrorCode;

		internal BaselibException(ErrorState errorState)
			: base(errorState.Explain())
		{
			this.errorState = errorState;
		}
	}
}
namespace Unity.Baselib.LowLevel
{
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_ErrorCode.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_RegisteredNetwork.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_DynamicLibrary.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_Thread.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_SourceLocation.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_Socket.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_NetworkAddress.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_Memory.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_ThreadLocalStorage.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_ErrorState.gen.binding.h")]
	[NativeHeader("External/baselib/builds/CSharp/BindingsUnity/Baselib_Timer.gen.binding.h")]
	internal static class Binding
	{
		public struct Baselib_DynamicLibrary_Handle
		{
			public IntPtr handle;
		}

		public enum Baselib_ErrorCode
		{
			Success = 0,
			OutOfMemory = 16777216,
			OutOfSystemResources = 16777217,
			InvalidAddressRange = 16777218,
			InvalidArgument = 16777219,
			InvalidBufferSize = 16777220,
			InvalidState = 16777221,
			NotSupported = 16777222,
			Timeout = 16777223,
			UnsupportedAlignment = 33554432,
			InvalidPageSize = 33554433,
			InvalidPageCount = 33554434,
			UnsupportedPageState = 33554435,
			ThreadCannotJoinSelf = 50331648,
			NetworkInitializationError = 67108864,
			AddressInUse = 67108865,
			AddressUnreachable = 67108866,
			AddressFamilyNotSupported = 67108867,
			Disconnected = 67108868,
			InvalidPathname = 83886080,
			RequestedAccessIsNotAllowed = 83886081,
			IOError = 83886082,
			FailedToOpenDynamicLibrary = 100663296,
			FunctionNotFound = 100663297,
			UnexpectedError = -1
		}

		public enum Baselib_ErrorState_NativeErrorCodeType : byte
		{
			None,
			PlatformDefined
		}

		public enum Baselib_ErrorState_ExtraInformationType : byte
		{
			None,
			StaticString,
			GenerationCounter
		}

		public struct Baselib_ErrorState
		{
			public Baselib_SourceLocation sourceLocation;

			public ulong nativeErrorCode;

			public ulong extraInformation;

			public Baselib_ErrorCode code;

			public Baselib_ErrorState_NativeErrorCodeType nativeErrorCodeType;

			public Baselib_ErrorState_ExtraInformationType extraInformationType;
		}

		public enum Baselib_ErrorState_ExplainVerbosity
		{
			ErrorType,
			ErrorType_SourceLocation_Explanation
		}

		public struct Baselib_Memory_PageSizeInfo
		{
			public ulong defaultPageSize;

			public ulong pageSizes0;

			public ulong pageSizes1;

			public ulong pageSizes2;

			public ulong pageSizes3;

			public ulong pageSizes4;

			public ulong pageSizes5;

			public ulong pageSizesLen;
		}

		public struct Baselib_Memory_PageAllocation
		{
			public IntPtr ptr;

			public ulong pageSize;

			public ulong pageCount;
		}

		public enum Baselib_Memory_PageState
		{
			Reserved = 0,
			NoAccess = 1,
			ReadOnly = 2,
			ReadWrite = 4,
			ReadOnly_Executable = 18,
			ReadWrite_Executable = 20
		}

		public enum Baselib_NetworkAddress_Family
		{
			Invalid,
			IPv4,
			IPv6
		}

		[StructLayout(LayoutKind.Explicit)]
		public struct Baselib_NetworkAddress
		{
			[FieldOffset(0)]
			public byte data0;

			[FieldOffset(1)]
			public byte data1;

			[FieldOffset(2)]
			public byte data2;

			[FieldOffset(3)]
			public byte data3;

			[FieldOffset(4)]
			public byte data4;

			[FieldOffset(5)]
			public byte data5;

			[FieldOffset(6)]
			public byte data6;

			[FieldOffset(7)]
			public byte data7;

			[FieldOffset(8)]
			public byte data8;

			[FieldOffset(9)]
			public byte data9;

			[FieldOffset(10)]
			public byte data10;

			[FieldOffset(11)]
			public byte data11;

			[FieldOffset(12)]
			public byte data12;

			[FieldOffset(13)]
			public byte data13;

			[FieldOffset(14)]
			public byte data14;

			[FieldOffset(15)]
			public byte data15;

			[FieldOffset(0)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_0;

			[FieldOffset(1)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_1;

			[FieldOffset(2)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_2;

			[FieldOffset(3)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_3;

			[FieldOffset(4)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_4;

			[FieldOffset(5)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_5;

			[FieldOffset(6)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_6;

			[FieldOffset(7)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_7;

			[FieldOffset(8)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_8;

			[FieldOffset(9)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_9;

			[FieldOffset(10)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_10;

			[FieldOffset(11)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_11;

			[FieldOffset(12)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_12;

			[FieldOffset(13)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_13;

			[FieldOffset(14)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_14;

			[FieldOffset(15)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv6_15;

			[FieldOffset(0)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv4_0;

			[FieldOffset(1)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv4_1;

			[FieldOffset(2)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv4_2;

			[FieldOffset(3)]
			[Ignore(DoesNotContributeToSize = true)]
			public byte ipv4_3;

			[FieldOffset(16)]
			public byte port0;

			[FieldOffset(17)]
			public byte port1;

			[FieldOffset(18)]
			public byte family;

			[FieldOffset(19)]
			public byte _padding;
		}

		public enum Baselib_NetworkAddress_AddressReuse
		{
			DoNotAllow,
			Allow
		}

		public struct Baselib_RegisteredNetwork_Buffer
		{
			public IntPtr id;

			public Baselib_Memory_PageAllocation allocation;
		}

		public struct Baselib_RegisteredNetwork_BufferSlice
		{
			public IntPtr id;

			public IntPtr data;

			public uint size;

			public uint offset;
		}

		public struct Baselib_RegisteredNetwork_Endpoint
		{
			public Baselib_RegisteredNetwork_BufferSlice slice;
		}

		public struct Baselib_RegisteredNetwork_Request
		{
			public Baselib_RegisteredNetwork_BufferSlice payload;

			public Baselib_RegisteredNetwork_Endpoint remoteEndpoint;

			public IntPtr requestUserdata;
		}

		public enum Baselib_RegisteredNetwork_CompletionStatus
		{
			Failed,
			Success
		}

		public struct Baselib_RegisteredNetwork_CompletionResult
		{
			public Baselib_RegisteredNetwork_CompletionStatus status;

			public uint bytesTransferred;

			public IntPtr requestUserdata;
		}

		public struct Baselib_RegisteredNetwork_Socket_UDP
		{
			public IntPtr handle;
		}

		public enum Baselib_RegisteredNetwork_ProcessStatus
		{
			NonePendingImmediately = 0,
			Done = 0,
			Pending = 1
		}

		public enum Baselib_RegisteredNetwork_CompletionQueueStatus
		{
			NoResultsAvailable,
			ResultsAvailable
		}

		public struct Baselib_Socket_Handle
		{
			public IntPtr handle;
		}

		public enum Baselib_Socket_Protocol
		{
			UDP = 1,
			TCP
		}

		public struct Baselib_Socket_Message
		{
			public unsafe Baselib_NetworkAddress* address;

			public IntPtr data;

			public uint dataLen;
		}

		public enum Baselib_Socket_PollEvents
		{
			Readable = 1,
			Writable = 2,
			Connected = 4
		}

		public struct Baselib_Socket_PollFd
		{
			public Baselib_Socket_Handle handle;

			public Baselib_Socket_PollEvents requestedEvents;

			public Baselib_Socket_PollEvents resultEvents;

			public unsafe Baselib_ErrorState* errorState;
		}

		public struct Baselib_SourceLocation
		{
			public unsafe byte* file;

			public unsafe byte* function;

			public uint lineNumber;
		}

		public struct Baselib_Timer_TickToNanosecondConversionRatio
		{
			public ulong ticksToNanosecondsNumerator;

			public ulong ticksToNanosecondsDenominator;
		}

		public static readonly UIntPtr Baselib_Memory_MaxAlignment = new UIntPtr(65536u);

		public static readonly UIntPtr Baselib_Memory_MinGuaranteedAlignment = new UIntPtr(8u);

		public const uint Baselib_NetworkAddress_IpMaxStringLength = 46u;

		public static readonly IntPtr Baselib_RegisteredNetwork_Buffer_Id_Invalid = IntPtr.Zero;

		public const uint Baselib_RegisteredNetwork_Endpoint_MaxSize = 28u;

		public static readonly IntPtr Baselib_Thread_InvalidId = IntPtr.Zero;

		public const uint Baselib_TLS_MinimumGuaranteedSlots = 100u;

		public const ulong Baselib_SecondsPerMinute = 60uL;

		public const ulong Baselib_MillisecondsPerSecond = 1000uL;

		public const ulong Baselib_MillisecondsPerMinute = 60000uL;

		public const ulong Baselib_MicrosecondsPerMillisecond = 1000uL;

		public const ulong Baselib_MicrosecondsPerSecond = 1000000uL;

		public const ulong Baselib_MicrosecondsPerMinute = 60000000uL;

		public const ulong Baselib_NanosecondsPerMicrosecond = 1000uL;

		public const ulong Baselib_NanosecondsPerMillisecond = 1000000uL;

		public const ulong Baselib_NanosecondsPerSecond = 1000000000uL;

		public const ulong Baselib_NanosecondsPerMinute = 60000000000uL;

		public const ulong Baselib_Timer_MaxNumberOfNanosecondsPerTick = 1000uL;

		public const double Baselib_Timer_MinNumberOfNanosecondsPerTick = 0.01;

		public static readonly Baselib_Memory_PageAllocation Baselib_Memory_PageAllocation_Invalid = default(Baselib_Memory_PageAllocation);

		public static readonly Baselib_RegisteredNetwork_Socket_UDP Baselib_RegisteredNetwork_Socket_UDP_Invalid = default(Baselib_RegisteredNetwork_Socket_UDP);

		public static readonly Baselib_Socket_Handle Baselib_Socket_Handle_Invalid = new Baselib_Socket_Handle
		{
			handle = (IntPtr)(-1)
		};

		public static readonly Baselib_DynamicLibrary_Handle Baselib_DynamicLibrary_Handle_Invalid = new Baselib_DynamicLibrary_Handle
		{
			handle = (IntPtr)(-1)
		};

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_DynamicLibrary_Handle Baselib_DynamicLibrary_Open(byte* pathname, Baselib_ErrorState* errorState)
		{
			Baselib_DynamicLibrary_Open_Injected(pathname, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static IntPtr Baselib_DynamicLibrary_GetFunction(Baselib_DynamicLibrary_Handle handle, byte* functionName, Baselib_ErrorState* errorState)
		{
			return Baselib_DynamicLibrary_GetFunction_Injected(ref handle, functionName, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public static void Baselib_DynamicLibrary_Close(Baselib_DynamicLibrary_Handle handle)
		{
			Baselib_DynamicLibrary_Close_Injected(ref handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public unsafe static extern uint Baselib_ErrorState_Explain(Baselib_ErrorState* errorState, byte* buffer, uint bufferLen, Baselib_ErrorState_ExplainVerbosity verbosity);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public unsafe static extern void Baselib_Memory_GetPageSizeInfo(Baselib_Memory_PageSizeInfo* outPagesSizeInfo);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern IntPtr Baselib_Memory_Allocate(UIntPtr size);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern IntPtr Baselib_Memory_Reallocate(IntPtr ptr, UIntPtr newSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern void Baselib_Memory_Free(IntPtr ptr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern IntPtr Baselib_Memory_AlignedAllocate(UIntPtr size, UIntPtr alignment);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern IntPtr Baselib_Memory_AlignedReallocate(IntPtr ptr, UIntPtr newSize, UIntPtr alignment);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern void Baselib_Memory_AlignedFree(IntPtr ptr);

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_Memory_PageAllocation Baselib_Memory_AllocatePages(ulong pageSize, ulong pageCount, ulong alignmentInMultipleOfPageSize, Baselib_Memory_PageState pageState, Baselib_ErrorState* errorState)
		{
			Baselib_Memory_AllocatePages_Injected(pageSize, pageCount, alignmentInMultipleOfPageSize, pageState, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_Memory_ReleasePages(Baselib_Memory_PageAllocation pageAllocation, Baselib_ErrorState* errorState)
		{
			Baselib_Memory_ReleasePages_Injected(ref pageAllocation, errorState);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public unsafe static extern void Baselib_Memory_SetPageState(IntPtr addressOfFirstPage, ulong pageSize, ulong pageCount, Baselib_Memory_PageState pageState, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public unsafe static extern void Baselib_NetworkAddress_Encode(Baselib_NetworkAddress* dstAddress, Baselib_NetworkAddress_Family family, byte* ip, ushort port, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public unsafe static extern void Baselib_NetworkAddress_Decode(Baselib_NetworkAddress* srcAddress, Baselib_NetworkAddress_Family* family, byte* ipAddressBuffer, uint ipAddressBufferLen, ushort* port, Baselib_ErrorState* errorState);

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_Buffer Baselib_RegisteredNetwork_Buffer_Register(Baselib_Memory_PageAllocation pageAllocation, Baselib_ErrorState* errorState)
		{
			Baselib_RegisteredNetwork_Buffer_Register_Injected(ref pageAllocation, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public static void Baselib_RegisteredNetwork_Buffer_Deregister(Baselib_RegisteredNetwork_Buffer buffer)
		{
			Baselib_RegisteredNetwork_Buffer_Deregister_Injected(ref buffer);
		}

		[FreeFunction(IsThreadSafe = true)]
		public static Baselib_RegisteredNetwork_BufferSlice Baselib_RegisteredNetwork_BufferSlice_Create(Baselib_RegisteredNetwork_Buffer buffer, uint offset, uint size)
		{
			Baselib_RegisteredNetwork_BufferSlice_Create_Injected(ref buffer, offset, size, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public static Baselib_RegisteredNetwork_BufferSlice Baselib_RegisteredNetwork_BufferSlice_Empty()
		{
			Baselib_RegisteredNetwork_BufferSlice_Empty_Injected(out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_Endpoint Baselib_RegisteredNetwork_Endpoint_Create(Baselib_NetworkAddress* srcAddress, Baselib_RegisteredNetwork_BufferSlice dstSlice, Baselib_ErrorState* errorState)
		{
			Baselib_RegisteredNetwork_Endpoint_Create_Injected(srcAddress, ref dstSlice, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public static Baselib_RegisteredNetwork_Endpoint Baselib_RegisteredNetwork_Endpoint_Empty()
		{
			Baselib_RegisteredNetwork_Endpoint_Empty_Injected(out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_RegisteredNetwork_Endpoint_GetNetworkAddress(Baselib_RegisteredNetwork_Endpoint endpoint, Baselib_NetworkAddress* dstAddress, Baselib_ErrorState* errorState)
		{
			Baselib_RegisteredNetwork_Endpoint_GetNetworkAddress_Injected(ref endpoint, dstAddress, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_Socket_UDP Baselib_RegisteredNetwork_Socket_UDP_Create(Baselib_NetworkAddress* bindAddress, Baselib_NetworkAddress_AddressReuse endpointReuse, uint sendQueueSize, uint recvQueueSize, Baselib_ErrorState* errorState)
		{
			Baselib_RegisteredNetwork_Socket_UDP_Create_Injected(bindAddress, endpointReuse, sendQueueSize, recvQueueSize, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_RegisteredNetwork_Socket_UDP_ScheduleRecv(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_Request* requests, uint requestsCount, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_ScheduleRecv_Injected(ref socket, requests, requestsCount, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_RegisteredNetwork_Socket_UDP_ScheduleSend(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_Request* requests, uint requestsCount, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_ScheduleSend_Injected(ref socket, requests, requestsCount, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_ProcessStatus Baselib_RegisteredNetwork_Socket_UDP_ProcessRecv(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_ProcessRecv_Injected(ref socket, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_ProcessStatus Baselib_RegisteredNetwork_Socket_UDP_ProcessSend(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_ProcessSend_Injected(ref socket, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_CompletionQueueStatus Baselib_RegisteredNetwork_Socket_UDP_WaitForCompletedRecv(Baselib_RegisteredNetwork_Socket_UDP socket, uint timeoutInMilliseconds, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_WaitForCompletedRecv_Injected(ref socket, timeoutInMilliseconds, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_RegisteredNetwork_CompletionQueueStatus Baselib_RegisteredNetwork_Socket_UDP_WaitForCompletedSend(Baselib_RegisteredNetwork_Socket_UDP socket, uint timeoutInMilliseconds, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_WaitForCompletedSend_Injected(ref socket, timeoutInMilliseconds, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_RegisteredNetwork_Socket_UDP_DequeueRecv(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_CompletionResult* results, uint resultsCount, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_DequeueRecv_Injected(ref socket, results, resultsCount, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_RegisteredNetwork_Socket_UDP_DequeueSend(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_CompletionResult* results, uint resultsCount, Baselib_ErrorState* errorState)
		{
			return Baselib_RegisteredNetwork_Socket_UDP_DequeueSend_Injected(ref socket, results, resultsCount, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_RegisteredNetwork_Socket_UDP_GetNetworkAddress(Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_NetworkAddress* dstAddress, Baselib_ErrorState* errorState)
		{
			Baselib_RegisteredNetwork_Socket_UDP_GetNetworkAddress_Injected(ref socket, dstAddress, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public static void Baselib_RegisteredNetwork_Socket_UDP_Close(Baselib_RegisteredNetwork_Socket_UDP socket)
		{
			Baselib_RegisteredNetwork_Socket_UDP_Close_Injected(ref socket);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_Socket_Handle Baselib_Socket_Create(Baselib_NetworkAddress_Family family, Baselib_Socket_Protocol protocol, Baselib_ErrorState* errorState)
		{
			Baselib_Socket_Create_Injected(family, protocol, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_Socket_Bind(Baselib_Socket_Handle socket, Baselib_NetworkAddress* address, Baselib_NetworkAddress_AddressReuse addressReuse, Baselib_ErrorState* errorState)
		{
			Baselib_Socket_Bind_Injected(ref socket, address, addressReuse, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_Socket_TCP_Connect(Baselib_Socket_Handle socket, Baselib_NetworkAddress* address, Baselib_NetworkAddress_AddressReuse addressReuse, Baselib_ErrorState* errorState)
		{
			Baselib_Socket_TCP_Connect_Injected(ref socket, address, addressReuse, errorState);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public unsafe static extern void Baselib_Socket_Poll(Baselib_Socket_PollFd* sockets, uint socketsCount, uint timeoutInMilliseconds, Baselib_ErrorState* errorState);

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_Socket_GetAddress(Baselib_Socket_Handle socket, Baselib_NetworkAddress* address, Baselib_ErrorState* errorState)
		{
			Baselib_Socket_GetAddress_Injected(ref socket, address, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static void Baselib_Socket_TCP_Listen(Baselib_Socket_Handle socket, Baselib_ErrorState* errorState)
		{
			Baselib_Socket_TCP_Listen_Injected(ref socket, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static Baselib_Socket_Handle Baselib_Socket_TCP_Accept(Baselib_Socket_Handle socket, Baselib_ErrorState* errorState)
		{
			Baselib_Socket_TCP_Accept_Injected(ref socket, errorState, out var ret);
			return ret;
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_Socket_UDP_Send(Baselib_Socket_Handle socket, Baselib_Socket_Message* messages, uint messagesCount, Baselib_ErrorState* errorState)
		{
			return Baselib_Socket_UDP_Send_Injected(ref socket, messages, messagesCount, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_Socket_TCP_Send(Baselib_Socket_Handle socket, IntPtr data, uint dataLen, Baselib_ErrorState* errorState)
		{
			return Baselib_Socket_TCP_Send_Injected(ref socket, data, dataLen, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_Socket_UDP_Recv(Baselib_Socket_Handle socket, Baselib_Socket_Message* messages, uint messagesCount, Baselib_ErrorState* errorState)
		{
			return Baselib_Socket_UDP_Recv_Injected(ref socket, messages, messagesCount, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public unsafe static uint Baselib_Socket_TCP_Recv(Baselib_Socket_Handle socket, IntPtr data, uint dataLen, Baselib_ErrorState* errorState)
		{
			return Baselib_Socket_TCP_Recv_Injected(ref socket, data, dataLen, errorState);
		}

		[FreeFunction(IsThreadSafe = true)]
		public static void Baselib_Socket_Close(Baselib_Socket_Handle socket)
		{
			Baselib_Socket_Close_Injected(ref socket);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern void Baselib_Thread_YieldExecution();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern IntPtr Baselib_Thread_GetCurrentThreadId();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern UIntPtr Baselib_TLS_Alloc();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern void Baselib_TLS_Free(UIntPtr handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern void Baselib_TLS_Set(UIntPtr handle, UIntPtr value);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern UIntPtr Baselib_TLS_Get(UIntPtr handle);

		[FreeFunction(IsThreadSafe = true)]
		public static Baselib_Timer_TickToNanosecondConversionRatio Baselib_Timer_GetTicksToNanosecondsConversionRatio()
		{
			Baselib_Timer_GetTicksToNanosecondsConversionRatio_Injected(out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern ulong Baselib_Timer_GetHighPrecisionTimerTicks();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern void Baselib_Timer_WaitForAtLeast(uint timeInMilliseconds);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(IsThreadSafe = true)]
		public static extern double Baselib_Timer_GetTimeSinceStartupInSeconds();

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_DynamicLibrary_Open_Injected(byte* pathname, Baselib_ErrorState* errorState, out Baselib_DynamicLibrary_Handle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern IntPtr Baselib_DynamicLibrary_GetFunction_Injected(ref Baselib_DynamicLibrary_Handle handle, byte* functionName, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_DynamicLibrary_Close_Injected(ref Baselib_DynamicLibrary_Handle handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Memory_AllocatePages_Injected(ulong pageSize, ulong pageCount, ulong alignmentInMultipleOfPageSize, Baselib_Memory_PageState pageState, Baselib_ErrorState* errorState, out Baselib_Memory_PageAllocation ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Memory_ReleasePages_Injected(ref Baselib_Memory_PageAllocation pageAllocation, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_RegisteredNetwork_Buffer_Register_Injected(ref Baselib_Memory_PageAllocation pageAllocation, Baselib_ErrorState* errorState, out Baselib_RegisteredNetwork_Buffer ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_RegisteredNetwork_Buffer_Deregister_Injected(ref Baselib_RegisteredNetwork_Buffer buffer);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_RegisteredNetwork_BufferSlice_Create_Injected(ref Baselib_RegisteredNetwork_Buffer buffer, uint offset, uint size, out Baselib_RegisteredNetwork_BufferSlice ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_RegisteredNetwork_BufferSlice_Empty_Injected(out Baselib_RegisteredNetwork_BufferSlice ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_RegisteredNetwork_Endpoint_Create_Injected(Baselib_NetworkAddress* srcAddress, ref Baselib_RegisteredNetwork_BufferSlice dstSlice, Baselib_ErrorState* errorState, out Baselib_RegisteredNetwork_Endpoint ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_RegisteredNetwork_Endpoint_Empty_Injected(out Baselib_RegisteredNetwork_Endpoint ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_RegisteredNetwork_Endpoint_GetNetworkAddress_Injected(ref Baselib_RegisteredNetwork_Endpoint endpoint, Baselib_NetworkAddress* dstAddress, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_RegisteredNetwork_Socket_UDP_Create_Injected(Baselib_NetworkAddress* bindAddress, Baselib_NetworkAddress_AddressReuse endpointReuse, uint sendQueueSize, uint recvQueueSize, Baselib_ErrorState* errorState, out Baselib_RegisteredNetwork_Socket_UDP ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_RegisteredNetwork_Socket_UDP_ScheduleRecv_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_Request* requests, uint requestsCount, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_RegisteredNetwork_Socket_UDP_ScheduleSend_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_Request* requests, uint requestsCount, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern Baselib_RegisteredNetwork_ProcessStatus Baselib_RegisteredNetwork_Socket_UDP_ProcessRecv_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern Baselib_RegisteredNetwork_ProcessStatus Baselib_RegisteredNetwork_Socket_UDP_ProcessSend_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern Baselib_RegisteredNetwork_CompletionQueueStatus Baselib_RegisteredNetwork_Socket_UDP_WaitForCompletedRecv_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, uint timeoutInMilliseconds, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern Baselib_RegisteredNetwork_CompletionQueueStatus Baselib_RegisteredNetwork_Socket_UDP_WaitForCompletedSend_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, uint timeoutInMilliseconds, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_RegisteredNetwork_Socket_UDP_DequeueRecv_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_CompletionResult* results, uint resultsCount, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_RegisteredNetwork_Socket_UDP_DequeueSend_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_RegisteredNetwork_CompletionResult* results, uint resultsCount, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_RegisteredNetwork_Socket_UDP_GetNetworkAddress_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket, Baselib_NetworkAddress* dstAddress, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_RegisteredNetwork_Socket_UDP_Close_Injected(ref Baselib_RegisteredNetwork_Socket_UDP socket);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Socket_Create_Injected(Baselib_NetworkAddress_Family family, Baselib_Socket_Protocol protocol, Baselib_ErrorState* errorState, out Baselib_Socket_Handle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Socket_Bind_Injected(ref Baselib_Socket_Handle socket, Baselib_NetworkAddress* address, Baselib_NetworkAddress_AddressReuse addressReuse, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Socket_TCP_Connect_Injected(ref Baselib_Socket_Handle socket, Baselib_NetworkAddress* address, Baselib_NetworkAddress_AddressReuse addressReuse, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Socket_GetAddress_Injected(ref Baselib_Socket_Handle socket, Baselib_NetworkAddress* address, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Socket_TCP_Listen_Injected(ref Baselib_Socket_Handle socket, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void Baselib_Socket_TCP_Accept_Injected(ref Baselib_Socket_Handle socket, Baselib_ErrorState* errorState, out Baselib_Socket_Handle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_Socket_UDP_Send_Injected(ref Baselib_Socket_Handle socket, Baselib_Socket_Message* messages, uint messagesCount, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_Socket_TCP_Send_Injected(ref Baselib_Socket_Handle socket, IntPtr data, uint dataLen, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_Socket_UDP_Recv_Injected(ref Baselib_Socket_Handle socket, Baselib_Socket_Message* messages, uint messagesCount, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern uint Baselib_Socket_TCP_Recv_Injected(ref Baselib_Socket_Handle socket, IntPtr data, uint dataLen, Baselib_ErrorState* errorState);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_Socket_Close_Injected(ref Baselib_Socket_Handle socket);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Baselib_Timer_GetTicksToNanosecondsConversionRatio_Injected(out Baselib_Timer_TickToNanosecondConversionRatio ret);
	}
}
namespace Unity.Profiling
{
	[StructLayout(LayoutKind.Explicit, Size = 2)]
	[UsedByNativeCode]
	public readonly struct ProfilerCategory
	{
		[FieldOffset(0)]
		private readonly ushort m_CategoryId;

		public unsafe string Name
		{
			get
			{
				ProfilerCategoryDescription categoryDescription = ProfilerUnsafeUtility.GetCategoryDescription(m_CategoryId);
				return ProfilerUnsafeUtility.Utf8ToString(categoryDescription.NameUtf8, categoryDescription.NameUtf8Len);
			}
		}

		public Color32 Color => ProfilerUnsafeUtility.GetCategoryDescription(m_CategoryId).Color;

		public static ProfilerCategory Render => new ProfilerCategory(0);

		public static ProfilerCategory Scripts => new ProfilerCategory(1);

		public static ProfilerCategory Gui => new ProfilerCategory(4);

		public static ProfilerCategory Physics => new ProfilerCategory(5);

		public static ProfilerCategory Animation => new ProfilerCategory(6);

		public static ProfilerCategory Ai => new ProfilerCategory(7);

		public static ProfilerCategory Audio => new ProfilerCategory(8);

		public static ProfilerCategory Video => new ProfilerCategory(11);

		public static ProfilerCategory Particles => new ProfilerCategory(12);

		public static ProfilerCategory Lighting => new ProfilerCategory(13);

		public static ProfilerCategory Network => new ProfilerCategory(14);

		public static ProfilerCategory Loading => new ProfilerCategory(15);

		public static ProfilerCategory Vr => new ProfilerCategory(22);

		public static ProfilerCategory Input => new ProfilerCategory(30);

		public static ProfilerCategory Memory => new ProfilerCategory(23);

		public static ProfilerCategory VirtualTexturing => new ProfilerCategory(31);

		public static ProfilerCategory Internal => new ProfilerCategory(24);

		internal static ProfilerCategory Any => new ProfilerCategory(ushort.MaxValue);

		public ProfilerCategory(string categoryName)
		{
			m_CategoryId = ProfilerUnsafeUtility.GetCategoryByName(categoryName);
		}

		internal ProfilerCategory(ushort category)
		{
			m_CategoryId = category;
		}

		public override string ToString()
		{
			return Name;
		}

		public static implicit operator ushort(ProfilerCategory category)
		{
			return category.m_CategoryId;
		}
	}
	[Flags]
	public enum ProfilerCategoryFlags : ushort
	{
		None = 0,
		Builtin = 1
	}
	[NativeHeader("Runtime/Profiler/ScriptBindings/ProfilerMarker.bindings.h")]
	[UsedByNativeCode]
	public struct ProfilerMarker
	{
		[UsedByNativeCode]
		public struct AutoScope : IDisposable
		{
			[NativeDisableUnsafePtrRestriction]
			internal readonly IntPtr m_Ptr;

			[MethodImpl(MethodImplOptions.AggressiveInlining)]
			internal AutoScope(IntPtr markerPtr)
			{
				m_Ptr = markerPtr;
				ProfilerUnsafeUtility.BeginSample(markerPtr);
			}

			[MethodImpl(MethodImplOptions.AggressiveInlining)]
			public void Dispose()
			{
				ProfilerUnsafeUtility.EndSample(m_Ptr);
			}
		}

		[NonSerialized]
		[NativeDisableUnsafePtrRestriction]
		internal readonly IntPtr m_Ptr;

		public IntPtr Handle => m_Ptr;

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public ProfilerMarker(string name)
		{
			m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, 1, MarkerFlags.Default, 0);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public unsafe ProfilerMarker(char* name, int nameLen)
		{
			m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, nameLen, 1, MarkerFlags.Default, 0);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public ProfilerMarker(ProfilerCategory category, string name)
		{
			m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, category, MarkerFlags.Default, 0);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public unsafe ProfilerMarker(ProfilerCategory category, char* name, int nameLen)
		{
			m_Ptr = ProfilerUnsafeUtility.CreateMarker(name, nameLen, category, MarkerFlags.Default, 0);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[Conditional("ENABLE_PROFILER")]
		[Pure]
		public void Begin()
		{
			ProfilerUnsafeUtility.BeginSample(m_Ptr);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[Conditional("ENABLE_PROFILER")]
		public void Begin(UnityEngine.Object contextUnityObject)
		{
			ProfilerUnsafeUtility.Internal_BeginWithObject(m_Ptr, contextUnityObject);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[Conditional("ENABLE_PROFILER")]
		[Pure]
		public void End()
		{
			ProfilerUnsafeUtility.EndSample(m_Ptr);
		}

		[Conditional("ENABLE_PROFILER")]
		internal void GetName(ref string name)
		{
			name = ProfilerUnsafeUtility.Internal_GetName(m_Ptr);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[Pure]
		public AutoScope Auto()
		{
			return new AutoScope(m_Ptr);
		}
	}
	public enum ProfilerFlowEventType : byte
	{
		Begin,
		ParallelNext,
		End,
		Next
	}
	public enum ProfilerMarkerDataUnit : byte
	{
		Undefined,
		TimeNanoseconds,
		Bytes,
		Count,
		Percent,
		FrequencyHz
	}
	[Flags]
	public enum ProfilerCounterOptions : ushort
	{
		None = 0,
		FlushOnEndOfFrame = 2,
		ResetToZeroOnFlush = 4
	}
	internal struct ProfilerMarkerWithStringData
	{
		public struct AutoScope : IDisposable
		{
			private IntPtr _marker;

			[MethodImpl(MethodImplOptions.AggressiveInlining)]
			internal AutoScope(IntPtr marker)
			{
				_marker = marker;
			}

			[MethodImpl(MethodImplOptions.AggressiveInlining)]
			[Pure]
			public void Dispose()
			{
				if (_marker != IntPtr.Zero)
				{
					ProfilerUnsafeUtility.EndSample(_marker);
				}
			}
		}

		private const MethodImplOptions AggressiveInlining = MethodImplOptions.AggressiveInlining;

		private IntPtr _marker;

		public static ProfilerMarkerWithStringData Create(string name, string parameterName)
		{
			IntPtr intPtr = ProfilerUnsafeUtility.CreateMarker(name, 16, MarkerFlags.Default, 1);
			ProfilerUnsafeUtility.SetMarkerMetadata(intPtr, 0, parameterName, 9, 0);
			ProfilerMarkerWithStringData result = default(ProfilerMarkerWithStringData);
			result._marker = intPtr;
			return result;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[Pure]
		public AutoScope Auto(bool enabled, Func<string> parameterValue)
		{
			if (enabled)
			{
				return Auto(parameterValue());
			}
			return new AutoScope(IntPtr.Zero);
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		[Pure]
		public unsafe AutoScope Auto(string value)
		{
			if (value == null)
			{
				throw new ArgumentNullException("value");
			}
			fixed (char* ptr = value)
			{
				ProfilerMarkerData profilerMarkerData = default(ProfilerMarkerData);
				profilerMarkerData.Type = 9;
				profilerMarkerData.Size = (uint)(value.Length * 2 + 2);
				ProfilerMarkerData profilerMarkerData2 = profilerMarkerData;
				profilerMarkerData2.Ptr = ptr;
				ProfilerUnsafeUtility.BeginSampleWithMetadata(_marker, 1, &profilerMarkerData2);
			}
			return new AutoScope(_marker);
		}
	}
	[Flags]
	public enum ProfilerRecorderOptions
	{
		None = 0,
		StartImmediately = 1,
		KeepAliveDuringDomainReload = 2,
		CollectOnlyOnCurrentThread = 4,
		WrapAroundWhenCapacityReached = 8,
		SumAllSamplesInFrame = 0x10,
		Default = 0x18
	}
	[DebuggerDisplay("Value = {Value}; Count = {Count}")]
	[UsedByNativeCode]
	public struct ProfilerRecorderSample
	{
		private long value;

		private long count;

		private long refValue;

		public long Value => value;

		public long Count => count;
	}
	[DebuggerDisplay("Count = {Count}")]
	[NativeHeader("Runtime/Profiler/ScriptBindings/ProfilerRecorder.bindings.h")]
	[UsedByNativeCode]
	[DebuggerTypeProxy(typeof(ProfilerRecorderDebugView))]
	public struct ProfilerRecorder : IDisposable
	{
		internal enum ControlOptions
		{
			Start = 0,
			Stop = 1,
			Reset = 2,
			Release = 4
		}

		internal enum CountOptions
		{
			Count,
			MaxCount
		}

		internal ulong handle;

		public bool Valid => handle != 0L && GetValid(this);

		public ProfilerMarkerDataType DataType
		{
			get
			{
				CheckInitializedAndThrow();
				return GetValueDataType(this);
			}
		}

		public ProfilerMarkerDataUnit UnitType
		{
			get
			{
				CheckInitializedAndThrow();
				return GetValueUnitType(this);
			}
		}

		public long CurrentValue
		{
			get
			{
				CheckInitializedAndThrow();
				return GetCurrentValue(this);
			}
		}

		public double CurrentValueAsDouble
		{
			get
			{
				CheckInitializedAndThrow();
				return GetCurrentValueAsDouble(this);
			}
		}

		public long LastValue
		{
			get
			{
				CheckInitializedAndThrow();
				return GetLastValue(this);
			}
		}

		public double LastValueAsDouble
		{
			get
			{
				CheckInitializedAndThrow();
				return GetLastValueAsDouble(this);
			}
		}

		public int Capacity
		{
			get
			{
				CheckInitializedAndThrow();
				return GetCount(this, CountOptions.MaxCount);
			}
		}

		public int Count
		{
			get
			{
				CheckInitializedAndThrow();
				return GetCount(this, CountOptions.Count);
			}
		}

		public bool IsRunning
		{
			get
			{
				CheckInitializedAndThrow();
				return GetRunning(this);
			}
		}

		public bool WrappedAround
		{
			get
			{
				CheckInitializedAndThrow();
				return GetWrapped(this);
			}
		}

		internal ProfilerRecorder(ProfilerRecorderOptions options)
		{
			this = Create(default(ProfilerRecorderHandle), 0, options);
		}

		public ProfilerRecorder(string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
			: this(ProfilerCategory.Any, statName, capacity, options)
		{
		}

		public ProfilerRecorder(string categoryName, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
			: this(new ProfilerCategory(categoryName), statName, capacity, options)
		{
		}

		public ProfilerRecorder(ProfilerCategory category, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
		{
			ProfilerRecorderHandle byName = ProfilerRecorderHandle.GetByName(category, statName);
			this = Create(byName, capacity, options);
		}

		public unsafe ProfilerRecorder(ProfilerCategory category, char* statName, int statNameLen, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
		{
			ProfilerRecorderHandle byName = ProfilerRecorderHandle.GetByName(category, statName, statNameLen);
			this = Create(byName, capacity, options);
		}

		public ProfilerRecorder(ProfilerMarker marker, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
		{
			this = Create(ProfilerRecorderHandle.Get(marker), capacity, options);
		}

		public ProfilerRecorder(ProfilerRecorderHandle statHandle, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
		{
			this = Create(statHandle, capacity, options);
		}

		public unsafe static ProfilerRecorder StartNew(ProfilerCategory category, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
		{
			fixed (char* statName2 = statName)
			{
				return new ProfilerRecorder(category, statName2, statName.Length, capacity, options | ProfilerRecorderOptions.StartImmediately);
			}
		}

		public static ProfilerRecorder StartNew(ProfilerMarker marker, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
		{
			return new ProfilerRecorder(marker, capacity, options | ProfilerRecorderOptions.StartImmediately);
		}

		internal static ProfilerRecorder StartNew()
		{
			return Create(default(ProfilerRecorderHandle), 0, ProfilerRecorderOptions.StartImmediately);
		}

		public void Start()
		{
			CheckInitializedAndThrow();
			Control(this, ControlOptions.Start);
		}

		public void Stop()
		{
			CheckInitializedAndThrow();
			Control(this, ControlOptions.Stop);
		}

		public void Reset()
		{
			CheckInitializedAndThrow();
			Control(this, ControlOptions.Reset);
		}

		public ProfilerRecorderSample GetSample(int index)
		{
			CheckInitializedAndThrow();
			return GetSampleInternal(this, index);
		}

		public void CopyTo(List<ProfilerRecorderSample> outSamples, bool reset = false)
		{
			if (outSamples == null)
			{
				throw new ArgumentNullException("outSamples");
			}
			CheckInitializedAndThrow();
			CopyTo_List(this, outSamples, reset);
		}

		public unsafe int CopyTo(ProfilerRecorderSample* dest, int destSize, bool reset = false)
		{
			CheckInitializedWithParamsAndThrow(dest);
			return CopyTo_Pointer(this, dest, destSize, reset);
		}

		public unsafe ProfilerRecorderSample[] ToArray()
		{
			CheckInitializedAndThrow();
			int count = Count;
			ProfilerRecorderSample[] array = new ProfilerRecorderSample[count];
			fixed (ProfilerRecorderSample* outSamples = array)
			{
				CopyTo_Pointer(this, outSamples, count, reset: false);
			}
			return array;
		}

		[NativeMethod(IsThreadSafe = true, ThrowsException = true)]
		private static ProfilerRecorder Create(ProfilerRecorderHandle statHandle, int maxSampleCount, ProfilerRecorderOptions options)
		{
			Create_Injected(ref statHandle, maxSampleCount, options, out var ret);
			return ret;
		}

		[NativeMethod(IsThreadSafe = true)]
		private static void Control(ProfilerRecorder handle, ControlOptions options)
		{
			Control_Injected(ref handle, options);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static ProfilerMarkerDataUnit GetValueUnitType(ProfilerRecorder handle)
		{
			return GetValueUnitType_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static ProfilerMarkerDataType GetValueDataType(ProfilerRecorder handle)
		{
			return GetValueDataType_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static long GetCurrentValue(ProfilerRecorder handle)
		{
			return GetCurrentValue_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static double GetCurrentValueAsDouble(ProfilerRecorder handle)
		{
			return GetCurrentValueAsDouble_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static long GetLastValue(ProfilerRecorder handle)
		{
			return GetLastValue_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static double GetLastValueAsDouble(ProfilerRecorder handle)
		{
			return GetLastValueAsDouble_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static int GetCount(ProfilerRecorder handle, CountOptions countOptions)
		{
			return GetCount_Injected(ref handle, countOptions);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static bool GetValid(ProfilerRecorder handle)
		{
			return GetValid_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static bool GetWrapped(ProfilerRecorder handle)
		{
			return GetWrapped_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true)]
		private static bool GetRunning(ProfilerRecorder handle)
		{
			return GetRunning_Injected(ref handle);
		}

		[NativeMethod(IsThreadSafe = true, ThrowsException = true)]
		private static ProfilerRecorderSample GetSampleInternal(ProfilerRecorder handle, int index)
		{
			GetSampleInternal_Injected(ref handle, index, out var ret);
			return ret;
		}

		[NativeMethod(IsThreadSafe = true)]
		private static void CopyTo_List(ProfilerRecorder handle, List<ProfilerRecorderSample> outSamples, bool reset)
		{
			CopyTo_List_Injected(ref handle, outSamples, reset);
		}

		[NativeMethod(IsThreadSafe = true)]
		private unsafe static int CopyTo_Pointer(ProfilerRecorder handle, ProfilerRecorderSample* outSamples, int outSamplesSize, bool reset)
		{
			return CopyTo_Pointer_Injected(ref handle, outSamples, outSamplesSize, reset);
		}

		public void Dispose()
		{
			if (handle != 0)
			{
				Control(this, ControlOptions.Release);
				handle = 0uL;
			}
		}

		[BurstDiscard]
		private unsafe void CheckInitializedWithParamsAndThrow(ProfilerRecorderSample* dest)
		{
			if (handle == 0)
			{
				throw new InvalidOperationException("ProfilerRecorder object is not initialized or has been disposed.");
			}
			if (dest == null)
			{
				throw new ArgumentNullException("dest");
			}
		}

		[BurstDiscard]
		private void CheckInitializedAndThrow()
		{
			if (handle == 0)
			{
				throw new InvalidOperationException("ProfilerRecorder object is not initialized or has been disposed.");
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Create_Injected(ref ProfilerRecorderHandle statHandle, int maxSampleCount, ProfilerRecorderOptions options, out ProfilerRecorder ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Control_Injected(ref ProfilerRecorder handle, ControlOptions options);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern ProfilerMarkerDataUnit GetValueUnitType_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern ProfilerMarkerDataType GetValueDataType_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern long GetCurrentValue_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern double GetCurrentValueAsDouble_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern long GetLastValue_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern double GetLastValueAsDouble_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern int GetCount_Injected(ref ProfilerRecorder handle, CountOptions countOptions);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool GetValid_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool GetWrapped_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool GetRunning_Injected(ref ProfilerRecorder handle);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetSampleInternal_Injected(ref ProfilerRecorder handle, int index, out ProfilerRecorderSample ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void CopyTo_List_Injected(ref ProfilerRecorder handle, List<ProfilerRecorderSample> outSamples, bool reset);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern int CopyTo_Pointer_Injected(ref ProfilerRecorder handle, ProfilerRecorderSample* outSamples, int outSamplesSize, bool reset);
	}
	internal sealed class ProfilerRecorderDebugView
	{
		private ProfilerRecorder m_Recorder;

		public ProfilerRecorderSample[] Items => m_Recorder.ToArray();

		public ProfilerRecorderDebugView(ProfilerRecorder r)
		{
			m_Recorder = r;
		}
	}
}
namespace Unity.Profiling.LowLevel
{
	[Flags]
	public enum MarkerFlags : ushort
	{
		Default = 0,
		Script = 2,
		ScriptInvoke = 0x20,
		ScriptDeepProfiler = 0x40,
		AvailabilityEditor = 4,
		Warning = 0x10,
		Counter = 0x80
	}
	public enum ProfilerMarkerDataType : byte
	{
		Int32 = 2,
		UInt32 = 3,
		Int64 = 4,
		UInt64 = 5,
		Float = 6,
		Double = 7,
		String16 = 9,
		Blob8 = 11
	}
}
namespace Unity.Profiling.LowLevel.Unsafe
{
	[StructLayout(LayoutKind.Explicit, Size = 24)]
	[UsedByNativeCode]
	public readonly struct ProfilerRecorderDescription
	{
		[FieldOffset(0)]
		private readonly ProfilerCategory category;

		[FieldOffset(2)]
		private readonly MarkerFlags flags;

		[FieldOffset(4)]
		private readonly ProfilerMarkerDataType dataType;

		[FieldOffset(5)]
		private readonly ProfilerMarkerDataUnit unitType;

		[FieldOffset(8)]
		private readonly int reserved0;

		[FieldOffset(12)]
		private readonly int nameUtf8Len;

		[FieldOffset(16)]
		private unsafe readonly byte* nameUtf8;

		public ProfilerCategory Category => category;

		public MarkerFlags Flags => flags;

		public ProfilerMarkerDataType DataType => dataType;

		public ProfilerMarkerDataUnit UnitType => unitType;

		public int NameUtf8Len => nameUtf8Len;

		public unsafe byte* NameUtf8 => nameUtf8;

		public unsafe string Name => ProfilerUnsafeUtility.Utf8ToString(nameUtf8, nameUtf8Len);
	}
	[StructLayout(LayoutKind.Explicit, Size = 8)]
	[UsedByNativeCode]
	public readonly struct ProfilerRecorderHandle
	{
		private const ulong k_InvalidHandle = ulong.MaxValue;

		[FieldOffset(0)]
		internal readonly ulong handle;

		public bool Valid => handle != 0L && handle != ulong.MaxValue;

		internal ProfilerRecorderHandle(ulong handle)
		{
			this.handle = handle;
		}

		internal static ProfilerRecorderHandle Get(ProfilerMarker marker)
		{
			return new ProfilerRecorderHandle((ulong)marker.Handle.ToInt64());
		}

		internal static ProfilerRecorderHandle Get(ProfilerCategory category, string statName)
		{
			if (string.IsNullOrEmpty(statName))
			{
				throw new ArgumentException("String must be not null or empty", "statName");
			}
			return GetByName(category, statName);
		}

		public static ProfilerRecorderDescription GetDescription(ProfilerRecorderHandle handle)
		{
			if (!handle.Valid)
			{
				throw new ArgumentException("ProfilerRecorderHandle is not initialized or is not available", "handle");
			}
			return GetDescriptionInternal(handle);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsThreadSafe = true, ThrowsException = true)]
		public static extern void GetAvailable(List<ProfilerRecorderHandle> outRecorderHandleList);

		[NativeMethod(IsThreadSafe = true)]
		internal static ProfilerRecorderHandle GetByName(ProfilerCategory category, string name)
		{
			GetByName_Injected(ref category, name, out var ret);
			return ret;
		}

		[NativeMethod(IsThreadSafe = true)]
		internal unsafe static ProfilerRecorderHandle GetByName__Unmanaged(ProfilerCategory category, byte* name, int nameLen)
		{
			GetByName__Unmanaged_Injected(ref category, name, nameLen, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		internal unsafe static ProfilerRecorderHandle GetByName(ProfilerCategory category, char* name, int nameLen)
		{
			return GetByName_Unsafe(category, name, nameLen);
		}

		[NativeMethod(IsThreadSafe = true)]
		private unsafe static ProfilerRecorderHandle GetByName_Unsafe(ProfilerCategory category, char* name, int nameLen)
		{
			GetByName_Unsafe_Injected(ref category, name, nameLen, out var ret);
			return ret;
		}

		[NativeMethod(IsThreadSafe = true)]
		private static ProfilerRecorderDescription GetDescriptionInternal(ProfilerRecorderHandle handle)
		{
			GetDescriptionInternal_Injected(ref handle, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetByName_Injected(ref ProfilerCategory category, string name, out ProfilerRecorderHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void GetByName__Unmanaged_Injected(ref ProfilerCategory category, byte* name, int nameLen, out ProfilerRecorderHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void GetByName_Unsafe_Injected(ref ProfilerCategory category, char* name, int nameLen, out ProfilerRecorderHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetDescriptionInternal_Injected(ref ProfilerRecorderHandle handle, out ProfilerRecorderDescription ret);
	}
	[StructLayout(LayoutKind.Explicit, Size = 16)]
	public struct ProfilerMarkerData
	{
		[FieldOffset(0)]
		public byte Type;

		[FieldOffset(1)]
		private readonly byte reserved0;

		[FieldOffset(2)]
		private readonly ushort reserved1;

		[FieldOffset(4)]
		public uint Size;

		[FieldOffset(8)]
		public unsafe void* Ptr;
	}
	[StructLayout(LayoutKind.Explicit, Size = 24)]
	public readonly struct ProfilerCategoryDescription
	{
		[FieldOffset(0)]
		public readonly ushort Id;

		[FieldOffset(4)]
		public readonly Color32 Color;

		[FieldOffset(8)]
		private readonly int reserved0;

		[FieldOffset(12)]
		public readonly int NameUtf8Len;

		[FieldOffset(16)]
		public unsafe readonly byte* NameUtf8;

		public unsafe string Name => ProfilerUnsafeUtility.Utf8ToString(NameUtf8, NameUtf8Len);
	}
	[NativeHeader("Runtime/Profiler/ScriptBindings/ProfilerMarker.bindings.h")]
	[UsedByNativeCode]
	public static class ProfilerUnsafeUtility
	{
		public struct TimestampConversionRatio
		{
			public long Numerator;

			public long Denominator;
		}

		public const ushort CategoryRender = 0;

		public const ushort CategoryScripts = 1;

		public const ushort CategoryGUI = 4;

		public const ushort CategoryPhysics = 5;

		public const ushort CategoryAnimation = 6;

		public const ushort CategoryAi = 7;

		public const ushort CategoryAudio = 8;

		public const ushort CategoryVideo = 11;

		public const ushort CategoryParticles = 12;

		public const ushort CategoryLighting = 13;

		[Obsolete("CategoryLightning has been renamed. Use CategoryLighting instead (UnityUpgradable) -> CategoryLighting", false)]
		public const ushort CategoryLightning = 13;

		public const ushort CategoryNetwork = 14;

		public const ushort CategoryLoading = 15;

		public const ushort CategoryOther = 16;

		public const ushort CategoryVr = 22;

		public const ushort CategoryAllocation = 23;

		public const ushort CategoryInternal = 24;

		public const ushort CategoryInput = 30;

		public const ushort CategoryVirtualTexturing = 31;

		internal const ushort CategoryAny = ushort.MaxValue;

		public static extern long Timestamp
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[ThreadSafe]
			get;
		}

		public static TimestampConversionRatio TimestampToNanosecondsConversionRatio
		{
			[ThreadSafe]
			get
			{
				get_TimestampToNanosecondsConversionRatio_Injected(out var ret);
				return ret;
			}
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal static extern ushort GetCategoryByName(string name);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal unsafe static extern ushort GetCategoryByName__Unmanaged(byte* name, int nameLen);

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public unsafe static ushort GetCategoryByName(char* name, int nameLen)
		{
			return GetCategoryByName_Unsafe(name, nameLen);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern ushort GetCategoryByName_Unsafe(char* name, int nameLen);

		[ThreadSafe]
		public static ProfilerCategoryDescription GetCategoryDescription(ushort categoryId)
		{
			GetCategoryDescription_Injected(categoryId, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public static extern IntPtr CreateMarker(string name, ushort categoryId, MarkerFlags flags, int metadataCount);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal unsafe static extern IntPtr CreateMarker__Unmanaged(byte* name, int nameLen, ushort categoryId, MarkerFlags flags, int metadataCount);

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public unsafe static IntPtr CreateMarker(char* name, int nameLen, ushort categoryId, MarkerFlags flags, int metadataCount)
		{
			return CreateMarker_Unsafe(name, nameLen, categoryId, flags, metadataCount);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern IntPtr CreateMarker_Unsafe(char* name, int nameLen, ushort categoryId, MarkerFlags flags, int metadataCount);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public static extern void SetMarkerMetadata(IntPtr markerPtr, int index, string name, byte type, byte unit);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal unsafe static extern void SetMarkerMetadata__Unmanaged(IntPtr markerPtr, int index, byte* name, int nameLen, byte type, byte unit);

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public unsafe static void SetMarkerMetadata(IntPtr markerPtr, int index, char* name, int nameLen, byte type, byte unit)
		{
			SetMarkerMetadata_Unsafe(markerPtr, index, name, nameLen, type, unit);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern void SetMarkerMetadata_Unsafe(IntPtr markerPtr, int index, char* name, int nameLen, byte type, byte unit);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public static extern void BeginSample(IntPtr markerPtr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public unsafe static extern void BeginSampleWithMetadata(IntPtr markerPtr, int metadataCount, void* metadata);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public static extern void EndSample(IntPtr markerPtr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public unsafe static extern void SingleSampleWithMetadata(IntPtr markerPtr, int metadataCount, void* metadata);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public unsafe static extern void* CreateCounterValue(out IntPtr counterPtr, string name, ushort categoryId, MarkerFlags flags, byte dataType, byte dataUnit, int dataSize, ProfilerCounterOptions counterOptions);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal unsafe static extern void* CreateCounterValue__Unmanaged(out IntPtr counterPtr, byte* name, int nameLen, ushort categoryId, MarkerFlags flags, byte dataType, byte dataUnit, int dataSize, ProfilerCounterOptions counterOptions);

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		public unsafe static void* CreateCounterValue(out IntPtr counterPtr, char* name, int nameLen, ushort categoryId, MarkerFlags flags, byte dataType, byte dataUnit, int dataSize, ProfilerCounterOptions counterOptions)
		{
			return CreateCounterValue_Unsafe(out counterPtr, name, nameLen, categoryId, flags, dataType, dataUnit, dataSize, counterOptions);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		private unsafe static extern void* CreateCounterValue_Unsafe(out IntPtr counterPtr, char* name, int nameLen, ushort categoryId, MarkerFlags flags, byte dataType, byte dataUnit, int dataSize, ProfilerCounterOptions counterOptions);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public unsafe static extern void FlushCounterValue(void* counterValuePtr);

		internal unsafe static string Utf8ToString(byte* chars, int charsLen)
		{
			if (chars == null)
			{
				return null;
			}
			byte[] array = new byte[charsLen];
			Marshal.Copy((IntPtr)chars, array, 0, charsLen);
			return Encoding.UTF8.GetString(array, 0, charsLen);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public static extern uint CreateFlow(ushort categoryId);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		public static extern void FlowEvent(uint flowId, ProfilerFlowEventType flowEventType);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[ThreadSafe]
		internal static extern void Internal_BeginWithObject(IntPtr markerPtr, UnityEngine.Object contextUnityObject);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeConditional("ENABLE_PROFILER")]
		internal static extern string Internal_GetName(IntPtr markerPtr);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void GetCategoryDescription_Injected(ushort categoryId, out ProfilerCategoryDescription ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[SpecialName]
		private static extern void get_TimestampToNanosecondsConversionRatio_Injected(out TimestampConversionRatio ret);
	}
}
namespace Unity.Jobs
{
	[JobProducerType(typeof(IJobExtensions.JobStruct<>))]
	public interface IJob
	{
		void Execute();
	}
	public static class IJobExtensions
	{
		[StructLayout(LayoutKind.Sequential, Size = 1)]
		internal struct JobStruct<T> where T : struct, IJob
		{
			public delegate void ExecuteJobFunction(ref T data, IntPtr additionalPtr, IntPtr bufferRangePatchData, ref JobRanges ranges, int jobIndex);

			public static IntPtr jobReflectionData;

			public static IntPtr Initialize()
			{
				if (jobReflectionData == IntPtr.Zero)
				{
					jobReflectionData = JobsUtility.CreateJobReflectionData(typeof(T), new ExecuteJobFunction(Execute));
				}
				return jobReflectionData;
			}

			public static void Execute(ref T data, IntPtr additionalPtr, IntPtr bufferRangePatchData, ref JobRanges ranges, int jobIndex)
			{
				data.Execute();
			}
		}

		public unsafe static JobHandle Schedule<T>(this T jobData, JobHandle dependsOn = default(JobHandle)) where T : struct, IJob
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), JobStruct<T>.Initialize(), dependsOn, ScheduleMode.Single);
			return JobsUtility.Schedule(ref parameters);
		}

		public unsafe static void Run<T>(this T jobData) where T : struct, IJob
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), JobStruct<T>.Initialize(), default(JobHandle), ScheduleMode.Run);
			JobsUtility.Schedule(ref parameters);
		}
	}
	[JobProducerType(typeof(IJobForExtensions.ForJobStruct<>))]
	public interface IJobFor
	{
		void Execute(int index);
	}
	public static class IJobForExtensions
	{
		[StructLayout(LayoutKind.Sequential, Size = 1)]
		internal struct ForJobStruct<T> where T : struct, IJobFor
		{
			public delegate void ExecuteJobFunction(ref T data, IntPtr additionalPtr, IntPtr bufferRangePatchData, ref JobRanges ranges, int jobIndex);

			public static IntPtr jobReflectionData;

			public static IntPtr Initialize()
			{
				if (jobReflectionData == IntPtr.Zero)
				{
					jobReflectionData = JobsUtility.CreateJobReflectionData(typeof(T), new ExecuteJobFunction(Execute));
				}
				return jobReflectionData;
			}

			public static void Execute(ref T jobData, IntPtr additionalPtr, IntPtr bufferRangePatchData, ref JobRanges ranges, int jobIndex)
			{
				int beginIndex;
				int endIndex;
				while (JobsUtility.GetWorkStealingRange(ref ranges, jobIndex, out beginIndex, out endIndex))
				{
					int num = endIndex;
					for (int i = beginIndex; i < num; i++)
					{
						jobData.Execute(i);
					}
				}
			}
		}

		public unsafe static JobHandle Schedule<T>(this T jobData, int arrayLength, JobHandle dependency) where T : struct, IJobFor
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ForJobStruct<T>.Initialize(), dependency, ScheduleMode.Single);
			return JobsUtility.ScheduleParallelFor(ref parameters, arrayLength, arrayLength);
		}

		public unsafe static JobHandle ScheduleParallel<T>(this T jobData, int arrayLength, int innerloopBatchCount, JobHandle dependency) where T : struct, IJobFor
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ForJobStruct<T>.Initialize(), dependency, ScheduleMode.Batched);
			return JobsUtility.ScheduleParallelFor(ref parameters, arrayLength, innerloopBatchCount);
		}

		public unsafe static void Run<T>(this T jobData, int arrayLength) where T : struct, IJobFor
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ForJobStruct<T>.Initialize(), default(JobHandle), ScheduleMode.Run);
			JobsUtility.ScheduleParallelFor(ref parameters, arrayLength, arrayLength);
		}
	}
	[JobProducerType(typeof(IJobParallelForExtensions.ParallelForJobStruct<>))]
	public interface IJobParallelFor
	{
		void Execute(int index);
	}
	public static class IJobParallelForExtensions
	{
		[StructLayout(LayoutKind.Sequential, Size = 1)]
		internal struct ParallelForJobStruct<T> where T : struct, IJobParallelFor
		{
			public delegate void ExecuteJobFunction(ref T data, IntPtr additionalPtr, IntPtr bufferRangePatchData, ref JobRanges ranges, int jobIndex);

			public static IntPtr jobReflectionData;

			public static IntPtr Initialize()
			{
				if (jobReflectionData == IntPtr.Zero)
				{
					jobReflectionData = JobsUtility.CreateJobReflectionData(typeof(T), new ExecuteJobFunction(Execute));
				}
				return jobReflectionData;
			}

			public static void Execute(ref T jobData, IntPtr additionalPtr, IntPtr bufferRangePatchData, ref JobRanges ranges, int jobIndex)
			{
				int beginIndex;
				int endIndex;
				while (JobsUtility.GetWorkStealingRange(ref ranges, jobIndex, out beginIndex, out endIndex))
				{
					int num = endIndex;
					for (int i = beginIndex; i < num; i++)
					{
						jobData.Execute(i);
					}
				}
			}
		}

		public unsafe static JobHandle Schedule<T>(this T jobData, int arrayLength, int innerloopBatchCount, JobHandle dependsOn = default(JobHandle)) where T : struct, IJobParallelFor
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ParallelForJobStruct<T>.Initialize(), dependsOn, ScheduleMode.Batched);
			return JobsUtility.ScheduleParallelFor(ref parameters, arrayLength, innerloopBatchCount);
		}

		public unsafe static void Run<T>(this T jobData, int arrayLength) where T : struct, IJobParallelFor
		{
			JobsUtility.JobScheduleParameters parameters = new JobsUtility.JobScheduleParameters(UnsafeUtility.AddressOf(ref jobData), ParallelForJobStruct<T>.Initialize(), default(JobHandle), ScheduleMode.Run);
			JobsUtility.ScheduleParallelFor(ref parameters, arrayLength, arrayLength);
		}
	}
	[NativeType(Header = "Runtime/Jobs/ScriptBindings/JobsBindings.h")]
	public struct JobHandle
	{
		[NativeDisableUnsafePtrRestriction]
		internal IntPtr jobGroup;

		internal int version;

		public bool IsCompleted => ScheduleBatchedJobsAndIsCompleted(ref this);

		public void Complete()
		{
			if (!(jobGroup == IntPtr.Zero))
			{
				ScheduleBatchedJobsAndComplete(ref this);
			}
		}

		public unsafe static void CompleteAll(ref JobHandle job0, ref JobHandle job1)
		{
			JobHandle* ptr = stackalloc JobHandle[2];
			*ptr = job0;
			ptr[1] = job1;
			ScheduleBatchedJobsAndCompleteAll(ptr, 2);
			job0 = default(JobHandle);
			job1 = default(JobHandle);
		}

		public unsafe static void CompleteAll(ref JobHandle job0, ref JobHandle job1, ref JobHandle job2)
		{
			JobHandle* ptr = stackalloc JobHandle[3];
			*ptr = job0;
			ptr[1] = job1;
			ptr[2] = job2;
			ScheduleBatchedJobsAndCompleteAll(ptr, 3);
			job0 = default(JobHandle);
			job1 = default(JobHandle);
			job2 = default(JobHandle);
		}

		public unsafe static void CompleteAll(NativeArray<JobHandle> jobs)
		{
			ScheduleBatchedJobsAndCompleteAll(jobs.GetUnsafeReadOnlyPtr(), jobs.Length);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true)]
		public static extern void ScheduleBatchedJobs();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true)]
		private static extern void ScheduleBatchedJobsAndComplete(ref JobHandle job);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true)]
		private static extern bool ScheduleBatchedJobsAndIsCompleted(ref JobHandle job);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true)]
		private unsafe static extern void ScheduleBatchedJobsAndCompleteAll(void* jobs, int count);

		public static JobHandle CombineDependencies(JobHandle job0, JobHandle job1)
		{
			return CombineDependenciesInternal2(ref job0, ref job1);
		}

		public static JobHandle CombineDependencies(JobHandle job0, JobHandle job1, JobHandle job2)
		{
			return CombineDependenciesInternal3(ref job0, ref job1, ref job2);
		}

		public unsafe static JobHandle CombineDependencies(NativeArray<JobHandle> jobs)
		{
			return CombineDependenciesInternalPtr(jobs.GetUnsafeReadOnlyPtr(), jobs.Length);
		}

		public unsafe static JobHandle CombineDependencies(NativeSlice<JobHandle> jobs)
		{
			return CombineDependenciesInternalPtr(jobs.GetUnsafeReadOnlyPtr(), jobs.Length);
		}

		[NativeMethod(IsFreeFunction = true)]
		private static JobHandle CombineDependenciesInternal2(ref JobHandle job0, ref JobHandle job1)
		{
			CombineDependenciesInternal2_Injected(ref job0, ref job1, out var ret);
			return ret;
		}

		[NativeMethod(IsFreeFunction = true)]
		private static JobHandle CombineDependenciesInternal3(ref JobHandle job0, ref JobHandle job1, ref JobHandle job2)
		{
			CombineDependenciesInternal3_Injected(ref job0, ref job1, ref job2, out var ret);
			return ret;
		}

		[NativeMethod(IsFreeFunction = true)]
		internal unsafe static JobHandle CombineDependenciesInternalPtr(void* jobs, int count)
		{
			CombineDependenciesInternalPtr_Injected(jobs, count, out var ret);
			return ret;
		}

		[NativeMethod(IsFreeFunction = true)]
		public static bool CheckFenceIsDependencyOrDidSyncFence(JobHandle jobHandle, JobHandle dependsOn)
		{
			return CheckFenceIsDependencyOrDidSyncFence_Injected(ref jobHandle, ref dependsOn);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void CombineDependenciesInternal2_Injected(ref JobHandle job0, ref JobHandle job1, out JobHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void CombineDependenciesInternal3_Injected(ref JobHandle job0, ref JobHandle job1, ref JobHandle job2, out JobHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void CombineDependenciesInternalPtr_Injected(void* jobs, int count, out JobHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern bool CheckFenceIsDependencyOrDidSyncFence_Injected(ref JobHandle jobHandle, ref JobHandle dependsOn);
	}
}
namespace Unity.Jobs.LowLevel.Unsafe
{
	public struct BatchQueryJob<CommandT, ResultT> where CommandT : struct where ResultT : struct
	{
		[Unity.Collections.ReadOnly]
		internal NativeArray<CommandT> commands;

		internal NativeArray<ResultT> results;

		public BatchQueryJob(NativeArray<CommandT> commands, NativeArray<ResultT> results)
		{
			this.commands = commands;
			this.results = results;
		}
	}
	[StructLayout(LayoutKind.Sequential, Size = 1)]
	public struct BatchQueryJobStruct<T> where T : struct
	{
		internal static IntPtr jobReflectionData;

		public static IntPtr Initialize()
		{
			if (jobReflectionData == IntPtr.Zero)
			{
				jobReflectionData = JobsUtility.CreateJobReflectionData(typeof(T), null);
			}
			return jobReflectionData;
		}
	}
	public static class JobHandleUnsafeUtility
	{
		public unsafe static JobHandle CombineDependencies(JobHandle* jobs, int count)
		{
			return JobHandle.CombineDependenciesInternalPtr(jobs, count);
		}
	}
	[AttributeUsage(AttributeTargets.Interface)]
	public sealed class JobProducerTypeAttribute : Attribute
	{
		public Type ProducerType { get; }

		public JobProducerTypeAttribute(Type producerType)
		{
			ProducerType = producerType;
		}
	}
	public struct JobRanges
	{
		internal int BatchSize;

		internal int NumJobs;

		public int TotalIterationCount;

		internal int NumPhases;

		internal IntPtr StartEndIndex;

		internal IntPtr PhaseData;
	}
	public enum ScheduleMode
	{
		Run = 0,
		[Obsolete("Batched is obsolete, use Parallel or Single depending on job type. (UnityUpgradable) -> Parallel", false)]
		Batched = 1,
		Parallel = 1,
		Single = 2
	}
	[Obsolete("Reflection data is now universal between job types. The parameter can be removed.", false)]
	public enum JobType
	{
		Single,
		ParallelFor
	}
	[NativeHeader("Runtime/Jobs/JobSystem.h")]
	[NativeType(Header = "Runtime/Jobs/ScriptBindings/JobsBindings.h")]
	public static class JobsUtility
	{
		public struct JobScheduleParameters
		{
			public JobHandle Dependency;

			public int ScheduleMode;

			public IntPtr ReflectionData;

			public IntPtr JobDataPtr;

			public unsafe JobScheduleParameters(void* i_jobData, IntPtr i_reflectionData, JobHandle i_dependency, ScheduleMode i_scheduleMode)
			{
				Dependency = i_dependency;
				JobDataPtr = (IntPtr)i_jobData;
				ReflectionData = i_reflectionData;
				ScheduleMode = (int)i_scheduleMode;
			}
		}

		internal delegate void PanicFunction_();

		public const int MaxJobThreadCount = 128;

		public const int CacheLineSize = 64;

		internal static PanicFunction_ PanicFunction;

		public static extern bool IsExecutingJob
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[NativeMethod(IsFreeFunction = true, IsThreadSafe = true)]
			get;
		}

		public static extern bool JobDebuggerEnabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			set;
		}

		public static extern bool JobCompilerEnabled
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			get;
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction]
			set;
		}

		public static extern int JobWorkerMaximumCount
		{
			[MethodImpl(MethodImplOptions.InternalCall)]
			[FreeFunction("JobSystem::GetJobQueueMaximumThreadCount")]
			get;
		}

		public static int JobWorkerCount
		{
			get
			{
				return GetJobQueueWorkerThreadCount();
			}
			set
			{
				if (value < 0 || value > JobWorkerMaximumCount)
				{
					throw new ArgumentOutOfRangeException("JobWorkerCount", $"Invalid JobWorkerCount {value} must be in the range 0 -> {JobWorkerMaximumCount}");
				}
				SetJobQueueMaximumActiveThreadCount(value);
			}
		}

		public unsafe static void GetJobRange(ref JobRanges ranges, int jobIndex, out int beginIndex, out int endIndex)
		{
			int* ptr = (int*)(void*)ranges.StartEndIndex;
			beginIndex = ptr[jobIndex * 2];
			endIndex = ptr[jobIndex * 2 + 1];
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[NativeMethod(IsFreeFunction = true, IsThreadSafe = true)]
		public static extern bool GetWorkStealingRange(ref JobRanges ranges, int jobIndex, out int beginIndex, out int endIndex);

		[FreeFunction("ScheduleManagedJob", ThrowsException = true)]
		public static JobHandle Schedule(ref JobScheduleParameters parameters)
		{
			Schedule_Injected(ref parameters, out var ret);
			return ret;
		}

		[FreeFunction("ScheduleManagedJobParallelFor", ThrowsException = true)]
		public static JobHandle ScheduleParallelFor(ref JobScheduleParameters parameters, int arrayLength, int innerloopBatchCount)
		{
			ScheduleParallelFor_Injected(ref parameters, arrayLength, innerloopBatchCount, out var ret);
			return ret;
		}

		[FreeFunction("ScheduleManagedJobParallelForDeferArraySize", ThrowsException = true)]
		public unsafe static JobHandle ScheduleParallelForDeferArraySize(ref JobScheduleParameters parameters, int innerloopBatchCount, void* listData, void* listDataAtomicSafetyHandle)
		{
			ScheduleParallelForDeferArraySize_Injected(ref parameters, innerloopBatchCount, listData, listDataAtomicSafetyHandle, out var ret);
			return ret;
		}

		[FreeFunction("ScheduleManagedJobParallelForTransform", ThrowsException = true)]
		public static JobHandle ScheduleParallelForTransform(ref JobScheduleParameters parameters, IntPtr transfromAccesssArray)
		{
			ScheduleParallelForTransform_Injected(ref parameters, transfromAccesssArray, out var ret);
			return ret;
		}

		[FreeFunction("ScheduleManagedJobParallelForTransformReadOnly", ThrowsException = true)]
		public static JobHandle ScheduleParallelForTransformReadOnly(ref JobScheduleParameters parameters, IntPtr transfromAccesssArray, int innerloopBatchCount)
		{
			ScheduleParallelForTransformReadOnly_Injected(ref parameters, transfromAccesssArray, innerloopBatchCount, out var ret);
			return ret;
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[Conditional("ENABLE_UNITY_COLLECTIONS_CHECKS")]
		[NativeMethod(IsThreadSafe = true, IsFreeFunction = true)]
		public unsafe static extern void PatchBufferMinMaxRanges(IntPtr bufferRangePatchData, void* jobdata, int startIndex, int rangeSize);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction(ThrowsException = true)]
		private static extern IntPtr CreateJobReflectionData(Type wrapperJobType, Type userJobType, object managedJobFunction0, object managedJobFunction1, object managedJobFunction2);

		[Obsolete("JobType is obsolete. The parameter should be removed. (UnityUpgradable) -> !1")]
		public static IntPtr CreateJobReflectionData(Type type, JobType jobType, object managedJobFunction0, object managedJobFunction1 = null, object managedJobFunction2 = null)
		{
			return CreateJobReflectionData(type, type, managedJobFunction0, managedJobFunction1, managedJobFunction2);
		}

		public static IntPtr CreateJobReflectionData(Type type, object managedJobFunction0, object managedJobFunction1 = null, object managedJobFunction2 = null)
		{
			return CreateJobReflectionData(type, type, managedJobFunction0, managedJobFunction1, managedJobFunction2);
		}

		[Obsolete("JobType is obsolete. The parameter should be removed. (UnityUpgradable) -> !2")]
		public static IntPtr CreateJobReflectionData(Type wrapperJobType, Type userJobType, JobType jobType, object managedJobFunction0)
		{
			return CreateJobReflectionData(wrapperJobType, userJobType, managedJobFunction0, null, null);
		}

		public static IntPtr CreateJobReflectionData(Type wrapperJobType, Type userJobType, object managedJobFunction0)
		{
			return CreateJobReflectionData(wrapperJobType, userJobType, managedJobFunction0, null, null);
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("JobSystem::GetJobQueueWorkerThreadCount")]
		private static extern int GetJobQueueWorkerThreadCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("JobSystem::ForceSetJobQueueWorkerThreadCount")]
		private static extern void SetJobQueueMaximumActiveThreadCount(int count);

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("JobSystem::ResetJobQueueWorkerThreadCount")]
		public static extern void ResetJobWorkerCount();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("JobDebuggerGetSystemIdCellPtr")]
		internal static extern IntPtr GetSystemIdCellPtr();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("JobDebuggerClearSystemIds")]
		internal static extern void ClearSystemIds();

		[MethodImpl(MethodImplOptions.InternalCall)]
		[FreeFunction("JobDebuggerGetSystemIdMappings")]
		internal unsafe static extern int GetSystemIdMappings(JobHandle* handles, int* systemIds, int maxCount);

		[RequiredByNativeCode]
		private static void InvokePanicFunction()
		{
			PanicFunction?.Invoke();
		}

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void Schedule_Injected(ref JobScheduleParameters parameters, out JobHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private static extern void ScheduleParallelFor_Injected(ref JobScheduleParameters parameters, int arrayLength, int innerloopBatchCount, out JobHandle ret);

		[MethodImpl(MethodImplOptions.InternalCall)]
		private unsafe static extern void ScheduleParallelForDeferArraySize_Injected(ref JobScheduleParamet

UnityEngine.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using AOT;
using JetBrains.Annotations;
using Unity.Audio;
using Unity.Baselib;
using Unity.Baselib.LowLevel;
using Unity.Burst;
using Unity.Burst.LowLevel;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Curl;
using Unity.IL2CPP.CompilerServices;
using Unity.IO.LowLevel.Unsafe;
using Unity.Jobs;
using Unity.Jobs.LowLevel.Unsafe;
using Unity.Profiling;
using Unity.Profiling.LowLevel;
using Unity.Profiling.LowLevel.Unsafe;
using Unity.Rendering.HybridV2;
using Unity.TLS;
using Unity.TLS.LowLevel;
using UnityEditor.Experimental;
using UnityEditor.UIElements;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Accessibility;
using UnityEngine.Advertisements;
using UnityEngine.Analytics;
using UnityEngine.Android;
using UnityEngine.Animations;
using UnityEngine.Apple;
using UnityEngine.Assertions;
using UnityEngine.Assertions.Comparers;
using UnityEngine.Assertions.Must;
using UnityEngine.Audio;
using UnityEngine.Bindings;
using UnityEngine.Connect;
using UnityEngine.CrashReportHandler;
using UnityEngine.Diagnostics;
using UnityEngine.Events;
using UnityEngine.Experimental.AI;
using UnityEngine.Experimental.Animations;
using UnityEngine.Experimental.AssetBundlePatching;
using UnityEngine.Experimental.Audio;
using UnityEngine.Experimental.GlobalIllumination;
using UnityEngine.Experimental.Playables;
using UnityEngine.Experimental.Rendering;
using UnityEngine.Experimental.TerrainAPI;
using UnityEngine.Experimental.U2D;
using UnityEngine.Experimental.VFX;
using UnityEngine.Experimental.Video;
using UnityEngine.Experimental.XR;
using UnityEngine.IO;
using UnityEngine.Internal;
using UnityEngine.Jobs;
using UnityEngine.LowLevel;
using UnityEngine.Lumin;
using UnityEngine.Networking;
using UnityEngine.Networking.Match;
using UnityEngine.Networking.PlayerConnection;
using UnityEngine.Networking.Types;
using UnityEngine.ParticleSystemJobs;
using UnityEngine.Playables;
using UnityEngine.PlayerLoop;
using UnityEngine.Profiling;
using UnityEngine.Profiling.Experimental;
using UnityEngine.Profiling.Memory.Experimental;
using UnityEngine.Rendering;
using UnityEngine.Rendering.VirtualTexturing;
using UnityEngine.SceneManagement;
using UnityEngine.Scripting;
using UnityEngine.Scripting.APIUpdating;
using UnityEngine.SearchService;
using UnityEngine.Serialization;
using UnityEngine.SocialPlatforms;
using UnityEngine.SocialPlatforms.Impl;
using UnityEngine.Sprites;
using UnityEngine.Subsystems;
using UnityEngine.SubsystemsImplementation;
using UnityEngine.SubsystemsImplementation.Extensions;
using UnityEngine.TestTools;
using UnityEngine.TextCore;
using UnityEngine.TextCore.LowLevel;
using UnityEngine.Tilemaps;
using UnityEngine.U2D;
using UnityEngine.UIElements;
using UnityEngine.UIElements.Experimental;
using UnityEngine.UIElements.StyleSheets;
using UnityEngine.UIElements.StyleSheets.Syntax;
using UnityEngine.UIElements.UIR;
using UnityEngine.UIElements.UIR.Implementation;
using UnityEngine.VFX;
using UnityEngine.Video;
using UnityEngine.Windows;
using UnityEngine.Windows.Speech;
using UnityEngine.Windows.WebCam;
using UnityEngine.XR;
using UnityEngine.XR.Provider;
using UnityEngine.XR.Tango;
using UnityEngine.XR.WSA;
using UnityEngine.XR.WSA.Input;
using UnityEngine.Yoga;
using UnityEngine._Scripting.APIUpdating;
using UnityEngineInternal;
using UnityEngineInternal.Input;
using UnityEngineInternal.Video;
using UnityEngineInternal.XR.WSA;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyVersion("0.0.0.0")]
[assembly: TypeForwardedTo(typeof(MonoPInvokeCallbackAttribute))]
[assembly: TypeForwardedTo(typeof(AssertionConditionAttribute))]
[assembly: TypeForwardedTo(typeof(AssertionConditionType))]
[assembly: TypeForwardedTo(typeof(AssertionMethodAttribute))]
[assembly: TypeForwardedTo(typeof(BaseTypeRequiredAttribute))]
[assembly: TypeForwardedTo(typeof(CanBeNullAttribute))]
[assembly: TypeForwardedTo(typeof(CannotApplyEqualityOperatorAttribute))]
[assembly: TypeForwardedTo(typeof(CollectionAccessAttribute))]
[assembly: TypeForwardedTo(typeof(CollectionAccessType))]
[assembly: TypeForwardedTo(typeof(ContractAnnotationAttribute))]
[assembly: TypeForwardedTo(typeof(ImplicitUseKindFlags))]
[assembly: TypeForwardedTo(typeof(ImplicitUseTargetFlags))]
[assembly: TypeForwardedTo(typeof(InstantHandleAttribute))]
[assembly: TypeForwardedTo(typeof(InvokerParameterNameAttribute))]
[assembly: TypeForwardedTo(typeof(ItemCanBeNullAttribute))]
[assembly: TypeForwardedTo(typeof(ItemNotNullAttribute))]
[assembly: TypeForwardedTo(typeof(LinqTunnelAttribute))]
[assembly: TypeForwardedTo(typeof(LocalizationRequiredAttribute))]
[assembly: TypeForwardedTo(typeof(MacroAttribute))]
[assembly: TypeForwardedTo(typeof(MeansImplicitUseAttribute))]
[assembly: TypeForwardedTo(typeof(MustUseReturnValueAttribute))]
[assembly: TypeForwardedTo(typeof(NoEnumerationAttribute))]
[assembly: TypeForwardedTo(typeof(NoReorderAttribute))]
[assembly: TypeForwardedTo(typeof(NotifyPropertyChangedInvocatorAttribute))]
[assembly: TypeForwardedTo(typeof(NotNullAttribute))]
[assembly: TypeForwardedTo(typeof(PathReferenceAttribute))]
[assembly: TypeForwardedTo(typeof(ProvidesContextAttribute))]
[assembly: TypeForwardedTo(typeof(PublicAPIAttribute))]
[assembly: TypeForwardedTo(typeof(PureAttribute))]
[assembly: TypeForwardedTo(typeof(RegexPatternAttribute))]
[assembly: TypeForwardedTo(typeof(SourceTemplateAttribute))]
[assembly: TypeForwardedTo(typeof(StringFormatMethodAttribute))]
[assembly: TypeForwardedTo(typeof(TerminatesProgramAttribute))]
[assembly: TypeForwardedTo(typeof(UsedImplicitlyAttribute))]
[assembly: TypeForwardedTo(typeof(ValueProviderAttribute))]
[assembly: TypeForwardedTo(typeof(AudioMemoryManager))]
[assembly: TypeForwardedTo(typeof(AudioOutputHookManager))]
[assembly: TypeForwardedTo(typeof(DSPCommandBlockInternal))]
[assembly: TypeForwardedTo(typeof(DSPGraphExecutionNode))]
[assembly: TypeForwardedTo(typeof(DSPGraphInternal))]
[assembly: TypeForwardedTo(typeof(DSPNodeUpdateRequestHandleInternal))]
[assembly: TypeForwardedTo(typeof(DSPSampleProviderInternal))]
[assembly: TypeForwardedTo(typeof(ExecuteContextInternal))]
[assembly: TypeForwardedTo(typeof(Handle))]
[assembly: TypeForwardedTo(typeof(IHandle<>))]
[assembly: TypeForwardedTo(typeof(IValidatable))]
[assembly: TypeForwardedTo(typeof(BaselibException))]
[assembly: TypeForwardedTo(typeof(BaselibNativeLibrary))]
[assembly: TypeForwardedTo(typeof(ErrorState))]
[assembly: TypeForwardedTo(typeof(Binding))]
[assembly: TypeForwardedTo(typeof(BurstDiscardAttribute))]
[assembly: TypeForwardedTo(typeof(BurstCompilerService))]
[assembly: TypeForwardedTo(typeof(Allocator))]
[assembly: TypeForwardedTo(typeof(DeallocateOnJobCompletionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeArrayUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(NativeContainerAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerIsAtomicWriteOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerIsReadOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerNeedsThreadIndexAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerSupportsDeallocateOnJobCompletionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeContainerSupportsDeferredConvertListToArray))]
[assembly: TypeForwardedTo(typeof(NativeContainerSupportsMinMaxWriteRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeDisableContainerSafetyRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeDisableUnsafePtrRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeSetClassTypeToNullOnScheduleAttribute))]
[assembly: TypeForwardedTo(typeof(NativeSetThreadIndexAttribute))]
[assembly: TypeForwardedTo(typeof(NativeSliceUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(UnsafeUtility))]
[assembly: TypeForwardedTo(typeof(WriteAccessRequiredAttribute))]
[assembly: TypeForwardedTo(typeof(NativeArray<>))]
[assembly: TypeForwardedTo(typeof(NativeArrayDebugView<>))]
[assembly: TypeForwardedTo(typeof(NativeArrayDispose))]
[assembly: TypeForwardedTo(typeof(NativeArrayDisposeJob))]
[assembly: TypeForwardedTo(typeof(NativeArrayOptions))]
[assembly: TypeForwardedTo(typeof(NativeArrayReadOnlyDebugView<>))]
[assembly: TypeForwardedTo(typeof(NativeDisableParallelForRestrictionAttribute))]
[assembly: TypeForwardedTo(typeof(NativeFixedLengthAttribute))]
[assembly: TypeForwardedTo(typeof(NativeLeakDetection))]
[assembly: TypeForwardedTo(typeof(NativeLeakDetectionMode))]
[assembly: TypeForwardedTo(typeof(NativeMatchesParallelForLengthAttribute))]
[assembly: TypeForwardedTo(typeof(NativeSlice<>))]
[assembly: TypeForwardedTo(typeof(NativeSliceDebugView<>))]
[assembly: TypeForwardedTo(typeof(NativeSliceExtensions))]
[assembly: TypeForwardedTo(typeof(ReadOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(WriteOnlyAttribute))]
[assembly: TypeForwardedTo(typeof(BufferOwnership))]
[assembly: TypeForwardedTo(typeof(CurlEasyHandleFlags))]
[assembly: TypeForwardedTo(typeof(UnityCurl))]
[assembly: TypeForwardedTo(typeof(Il2CppEagerStaticClassConstructionAttribute))]
[assembly: TypeForwardedTo(typeof(AssetLoadingSubsystem))]
[assembly: TypeForwardedTo(typeof(AsyncReadManager))]
[assembly: TypeForwardedTo(typeof(AsyncReadManagerMetrics))]
[assembly: TypeForwardedTo(typeof(AsyncReadManagerMetricsFilters))]
[assembly: TypeForwardedTo(typeof(AsyncReadManagerRequestMetric))]
[assembly: TypeForwardedTo(typeof(AsyncReadManagerSummaryMetrics))]
[assembly: TypeForwardedTo(typeof(FileInfoResult))]
[assembly: TypeForwardedTo(typeof(FileReadType))]
[assembly: TypeForwardedTo(typeof(FileState))]
[assembly: TypeForwardedTo(typeof(Priority))]
[assembly: TypeForwardedTo(typeof(ProcessingState))]
[assembly: TypeForwardedTo(typeof(ReadCommand))]
[assembly: TypeForwardedTo(typeof(ReadHandle))]
[assembly: TypeForwardedTo(typeof(ReadStatus))]
[assembly: TypeForwardedTo(typeof(VirtualFileSystem))]
[assembly: TypeForwardedTo(typeof(IJob))]
[assembly: TypeForwardedTo(typeof(IJobExtensions))]
[assembly: TypeForwardedTo(typeof(IJobFor))]
[assembly: TypeForwardedTo(typeof(IJobForExtensions))]
[assembly: TypeForwardedTo(typeof(IJobParallelFor))]
[assembly: TypeForwardedTo(typeof(IJobParallelForExtensions))]
[assembly: TypeForwardedTo(typeof(JobHandle))]
[assembly: TypeForwardedTo(typeof(BatchQueryJob<, >))]
[assembly: TypeForwardedTo(typeof(BatchQueryJobStruct<>))]
[assembly: TypeForwardedTo(typeof(JobHandleUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(JobProducerTypeAttribute))]
[assembly: TypeForwardedTo(typeof(JobRanges))]
[assembly: TypeForwardedTo(typeof(JobsUtility))]
[assembly: TypeForwardedTo(typeof(JobType))]
[assembly: TypeForwardedTo(typeof(ScheduleMode))]
[assembly: TypeForwardedTo(typeof(MarkerFlags))]
[assembly: TypeForwardedTo(typeof(ProfilerMarkerDataType))]
[assembly: TypeForwardedTo(typeof(ProfilerCategoryDescription))]
[assembly: TypeForwardedTo(typeof(ProfilerMarkerData))]
[assembly: TypeForwardedTo(typeof(ProfilerRecorderDescription))]
[assembly: TypeForwardedTo(typeof(ProfilerRecorderHandle))]
[assembly: TypeForwardedTo(typeof(ProfilerUnsafeUtility))]
[assembly: TypeForwardedTo(typeof(ProfilerCategory))]
[assembly: TypeForwardedTo(typeof(ProfilerCategoryFlags))]
[assembly: TypeForwardedTo(typeof(ProfilerCounterOptions))]
[assembly: TypeForwardedTo(typeof(ProfilerFlowEventType))]
[assembly: TypeForwardedTo(typeof(ProfilerMarker))]
[assembly: TypeForwardedTo(typeof(ProfilerMarkerDataUnit))]
[assembly: TypeForwardedTo(typeof(ProfilerMarkerWithStringData))]
[assembly: TypeForwardedTo(typeof(ProfilerRecorder))]
[assembly: TypeForwardedTo(typeof(ProfilerRecorderDebugView))]
[assembly: TypeForwardedTo(typeof(ProfilerRecorderOptions))]
[assembly: TypeForwardedTo(typeof(ProfilerRecorderSample))]
[assembly: TypeForwardedTo(typeof(DOTSInstancingCbuffer))]
[assembly: TypeForwardedTo(typeof(DOTSInstancingProperty))]
[assembly: TypeForwardedTo(typeof(DOTSInstancingPropertyType))]
[assembly: TypeForwardedTo(typeof(HybridV2ShaderReflection))]
[assembly: TypeForwardedTo(typeof(Binding))]
[assembly: TypeForwardedTo(typeof(UnityTLSNativeLibrary))]
[assembly: TypeForwardedTo(typeof(RenderSettings))]
[assembly: TypeForwardedTo(typeof(EditorAtlasMonitorBridge))]
[assembly: TypeForwardedTo(typeof(PackageEditorAtlasMonitor))]
[assembly: TypeForwardedTo(typeof(_AndroidJNIHelper))]
[assembly: TypeForwardedTo(typeof(APIUpdaterRuntimeHelpers))]
[assembly: TypeForwardedTo(typeof(AccelerationEvent))]
[assembly: TypeForwardedTo(typeof(VisionUtility))]
[assembly: TypeForwardedTo(typeof(AddComponentMenu))]
[assembly: TypeForwardedTo(typeof(AdditionalCanvasShaderChannels))]
[assembly: TypeForwardedTo(typeof(UnityAdsSettings))]
[assembly: TypeForwardedTo(typeof(NavMesh))]
[assembly: TypeForwardedTo(typeof(NavMeshAgent))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildDebugFlags))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildDebugSettings))]
[assembly: TypeForwardedTo(typeof(NavMeshBuilder))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildMarkup))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildSettings))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildSource))]
[assembly: TypeForwardedTo(typeof(NavMeshBuildSourceShape))]
[assembly: TypeForwardedTo(typeof(NavMeshCollectGeometry))]
[assembly: TypeForwardedTo(typeof(NavMeshData))]
[assembly: TypeForwardedTo(typeof(NavMeshDataInstance))]
[assembly: TypeForwardedTo(typeof(NavMeshHit))]
[assembly: TypeForwardedTo(typeof(NavMeshLinkData))]
[assembly: TypeForwardedTo(typeof(NavMeshLinkInstance))]
[assembly: TypeForwardedTo(typeof(NavMeshObstacle))]
[assembly: TypeForwardedTo(typeof(NavMeshObstacleShape))]
[assembly: TypeForwardedTo(typeof(NavMeshPath))]
[assembly: TypeForwardedTo(typeof(NavMeshPathStatus))]
[assembly: TypeForwardedTo(typeof(NavMeshQueryFilter))]
[assembly: TypeForwardedTo(typeof(NavMeshTriangulation))]
[assembly: TypeForwardedTo(typeof(ObstacleAvoidanceType))]
[assembly: TypeForwardedTo(typeof(OffMeshLink))]
[assembly: TypeForwardedTo(typeof(OffMeshLinkData))]
[assembly: TypeForwardedTo(typeof(OffMeshLinkType))]
[assembly: TypeForwardedTo(typeof(Analytics))]
[assembly: TypeForwardedTo(typeof(AnalyticsEventPriority))]
[assembly: TypeForwardedTo(typeof(AnalyticsResult))]
[assembly: TypeForwardedTo(typeof(AnalyticsSessionInfo))]
[assembly: TypeForwardedTo(typeof(AnalyticsSessionState))]
[assembly: TypeForwardedTo(typeof(ContinuousEvent))]
[assembly: TypeForwardedTo(typeof(CustomEventData))]
[assembly: TypeForwardedTo(typeof(Gender))]
[assembly: TypeForwardedTo(typeof(PerformanceReporting))]
[assembly: TypeForwardedTo(typeof(AnchoredJoint2D))]
[assembly: TypeForwardedTo(typeof(AndroidAssetPackError))]
[assembly: TypeForwardedTo(typeof(AndroidAssetPackInfo))]
[assembly: TypeForwardedTo(typeof(AndroidAssetPacks))]
[assembly: TypeForwardedTo(typeof(AndroidAssetPackState))]
[assembly: TypeForwardedTo(typeof(AndroidAssetPackStatus))]
[assembly: TypeForwardedTo(typeof(AndroidAssetPackUseMobileDataRequestResult))]
[assembly: TypeForwardedTo(typeof(AndroidDevice))]
[assembly: TypeForwardedTo(typeof(AndroidHardwareType))]
[assembly: TypeForwardedTo(typeof(DownloadAssetPackAsyncOperation))]
[assembly: TypeForwardedTo(typeof(GetAssetPackStateAsyncOperation))]
[assembly: TypeForwardedTo(typeof(Permission))]
[assembly: TypeForwardedTo(typeof(PermissionCallbacks))]
[assembly: TypeForwardedTo(typeof(RequestToUseMobileDataAsyncOperation))]
[assembly: TypeForwardedTo(typeof(AndroidJavaClass))]
[assembly: TypeForwardedTo(typeof(AndroidJavaException))]
[assembly: TypeForwardedTo(typeof(AndroidJavaObject))]
[assembly: TypeForwardedTo(typeof(AndroidJavaProxy))]
[assembly: TypeForwardedTo(typeof(AndroidJavaRunnable))]
[assembly: TypeForwardedTo(typeof(AndroidJavaRunnableProxy))]
[assembly: TypeForwardedTo(typeof(AndroidJNI))]
[assembly: TypeForwardedTo(typeof(AndroidJNIHelper))]
[assembly: TypeForwardedTo(typeof(AndroidJNISafe))]
[assembly: TypeForwardedTo(typeof(AndroidReflection))]
[assembly: TypeForwardedTo(typeof(Animation))]
[assembly: TypeForwardedTo(typeof(AnimationBlendMode))]
[assembly: TypeForwardedTo(typeof(AnimationClip))]
[assembly: TypeForwardedTo(typeof(AnimationClipPair))]
[assembly: TypeForwardedTo(typeof(AnimationCullingType))]
[assembly: TypeForwardedTo(typeof(AnimationCurve))]
[assembly: TypeForwardedTo(typeof(AnimationEvent))]
[assembly: TypeForwardedTo(typeof(AnimationEventSource))]
[assembly: TypeForwardedTo(typeof(AnimationPlayMode))]
[assembly: TypeForwardedTo(typeof(AimConstraint))]
[assembly: TypeForwardedTo(typeof(AnimationClipPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationHumanStream))]
[assembly: TypeForwardedTo(typeof(AnimationLayerMixerPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationMixerPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationMotionXToDeltaPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationOffsetPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableBinding))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableGraphExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableOutput))]
[assembly: TypeForwardedTo(typeof(AnimationPosePlayable))]
[assembly: TypeForwardedTo(typeof(AnimationRemoveScalePlayable))]
[assembly: TypeForwardedTo(typeof(AnimationSceneHandleUtility))]
[assembly: TypeForwardedTo(typeof(AnimationScriptPlayable))]
[assembly: TypeForwardedTo(typeof(AnimationStream))]
[assembly: TypeForwardedTo(typeof(AnimationStreamHandleUtility))]
[assembly: TypeForwardedTo(typeof(AnimatorBindingsVersion))]
[assembly: TypeForwardedTo(typeof(AnimatorControllerPlayable))]
[assembly: TypeForwardedTo(typeof(AnimatorJobExtensions))]
[assembly: TypeForwardedTo(typeof(Axis))]
[assembly: TypeForwardedTo(typeof(BindType))]
[assembly: TypeForwardedTo(typeof(ConstraintSource))]
[assembly: TypeForwardedTo(typeof(CustomStreamPropertyType))]
[assembly: TypeForwardedTo(typeof(IAnimationJob))]
[assembly: TypeForwardedTo(typeof(IAnimationJobPlayable))]
[assembly: TypeForwardedTo(typeof(IAnimationWindowPreview))]
[assembly: TypeForwardedTo(typeof(IConstraint))]
[assembly: TypeForwardedTo(typeof(IConstraintInternal))]
[assembly: TypeForwardedTo(typeof(JobMethodIndex))]
[assembly: TypeForwardedTo(typeof(LookAtConstraint))]
[assembly: TypeForwardedTo(typeof(MuscleHandle))]
[assembly: TypeForwardedTo(typeof(NotKeyableAttribute))]
[assembly: TypeForwardedTo(typeof(ParentConstraint))]
[assembly: TypeForwardedTo(typeof(PositionConstraint))]
[assembly: TypeForwardedTo(typeof(ProcessAnimationJobStruct<>))]
[assembly: TypeForwardedTo(typeof(PropertySceneHandle))]
[assembly: TypeForwardedTo(typeof(PropertyStreamHandle))]
[assembly: TypeForwardedTo(typeof(RotationConstraint))]
[assembly: TypeForwardedTo(typeof(ScaleConstraint))]
[assembly: TypeForwardedTo(typeof(TransformSceneHandle))]
[assembly: TypeForwardedTo(typeof(TransformStreamHandle))]
[assembly: TypeForwardedTo(typeof(AnimationState))]
[assembly: TypeForwardedTo(typeof(Animator))]
[assembly: TypeForwardedTo(typeof(AnimatorClipInfo))]
[assembly: TypeForwardedTo(typeof(AnimatorControllerParameter))]
[assembly: TypeForwardedTo(typeof(AnimatorControllerParameterType))]
[assembly: TypeForwardedTo(typeof(AnimatorCullingMode))]
[assembly: TypeForwardedTo(typeof(AnimatorOverrideController))]
[assembly: TypeForwardedTo(typeof(AnimatorRecorderMode))]
[assembly: TypeForwardedTo(typeof(AnimatorStateInfo))]
[assembly: TypeForwardedTo(typeof(AnimatorTransitionInfo))]
[assembly: TypeForwardedTo(typeof(AnimatorUpdateMode))]
[assembly: TypeForwardedTo(typeof(AnimatorUtility))]
[assembly: TypeForwardedTo(typeof(AnisotropicFiltering))]
[assembly: TypeForwardedTo(typeof(FrameCapture))]
[assembly: TypeForwardedTo(typeof(FrameCaptureDestination))]
[assembly: TypeForwardedTo(typeof(Application))]
[assembly: TypeForwardedTo(typeof(ApplicationInstallMode))]
[assembly: TypeForwardedTo(typeof(ApplicationSandboxType))]
[assembly: TypeForwardedTo(typeof(AreaEffector2D))]
[assembly: TypeForwardedTo(typeof(ArmDof))]
[assembly: TypeForwardedTo(typeof(ArticulationBody))]
[assembly: TypeForwardedTo(typeof(ArticulationDofLock))]
[assembly: TypeForwardedTo(typeof(ArticulationDrive))]
[assembly: TypeForwardedTo(typeof(ArticulationJacobian))]
[assembly: TypeForwardedTo(typeof(ArticulationJointType))]
[assembly: TypeForwardedTo(typeof(ArticulationReducedSpace))]
[assembly: TypeForwardedTo(typeof(AssemblyIsEditorAssembly))]
[assembly: TypeForwardedTo(typeof(Assert))]
[assembly: TypeForwardedTo(typeof(AssertionException))]
[assembly: TypeForwardedTo(typeof(AssertionMessageUtil))]
[assembly: TypeForwardedTo(typeof(FloatComparer))]
[assembly: TypeForwardedTo(typeof(MustExtensions))]
[assembly: TypeForwardedTo(typeof(AssetBundle))]
[assembly: TypeForwardedTo(typeof(AssetBundleCreateRequest))]
[assembly: TypeForwardedTo(typeof(AssetBundleLoadingCache))]
[assembly: TypeForwardedTo(typeof(AssetBundleLoadResult))]
[assembly: TypeForwardedTo(typeof(AssetBundleManifest))]
[assembly: TypeForwardedTo(typeof(AssetBundleRecompressOperation))]
[assembly: TypeForwardedTo(typeof(AssetBundleRequest))]
[assembly: TypeForwardedTo(typeof(AssetFileNameExtensionAttribute))]
[assembly: TypeForwardedTo(typeof(AsyncOperation))]
[assembly: TypeForwardedTo(typeof(AttributeHelperEngine))]
[assembly: TypeForwardedTo(typeof(AudioClipPlayable))]
[assembly: TypeForwardedTo(typeof(AudioMixer))]
[assembly: TypeForwardedTo(typeof(AudioMixerGroup))]
[assembly: TypeForwardedTo(typeof(AudioMixerPlayable))]
[assembly: TypeForwardedTo(typeof(AudioMixerSnapshot))]
[assembly: TypeForwardedTo(typeof(AudioMixerUpdateMode))]
[assembly: TypeForwardedTo(typeof(AudioPlayableBinding))]
[assembly: TypeForwardedTo(typeof(AudioPlayableGraphExtensions))]
[assembly: TypeForwardedTo(typeof(AudioPlayableOutput))]
[assembly: TypeForwardedTo(typeof(AudioBehaviour))]
[assembly: TypeForwardedTo(typeof(AudioChorusFilter))]
[assembly: TypeForwardedTo(typeof(AudioClip))]
[assembly: TypeForwardedTo(typeof(AudioClipLoadType))]
[assembly: TypeForwardedTo(typeof(AudioCompressionFormat))]
[assembly: TypeForwardedTo(typeof(AudioConfiguration))]
[assembly: TypeForwardedTo(typeof(AudioDataLoadState))]
[assembly: TypeForwardedTo(typeof(AudioDistortionFilter))]
[assembly: TypeForwardedTo(typeof(AudioEchoFilter))]
[assembly: TypeForwardedTo(typeof(AudioHighPassFilter))]
[assembly: TypeForwardedTo(typeof(AudioListener))]
[assembly: TypeForwardedTo(typeof(AudioLowPassFilter))]
[assembly: TypeForwardedTo(typeof(AudioRenderer))]
[assembly: TypeForwardedTo(typeof(AudioReverbFilter))]
[assembly: TypeForwardedTo(typeof(AudioReverbPreset))]
[assembly: TypeForwardedTo(typeof(AudioReverbZone))]
[assembly: TypeForwardedTo(typeof(AudioRolloffMode))]
[assembly: TypeForwardedTo(typeof(AudioSettings))]
[assembly: TypeForwardedTo(typeof(AudioSource))]
[assembly: TypeForwardedTo(typeof(AudioSourceCurveType))]
[assembly: TypeForwardedTo(typeof(AudioSpeakerMode))]
[assembly: TypeForwardedTo(typeof(AudioType))]
[assembly: TypeForwardedTo(typeof(AudioVelocityUpdateMode))]
[assembly: TypeForwardedTo(typeof(Avatar))]
[assembly: TypeForwardedTo(typeof(AvatarBuilder))]
[assembly: TypeForwardedTo(typeof(AvatarIKGoal))]
[assembly: TypeForwardedTo(typeof(AvatarIKHint))]
[assembly: TypeForwardedTo(typeof(AvatarMask))]
[assembly: TypeForwardedTo(typeof(AvatarMaskBodyPart))]
[assembly: TypeForwardedTo(typeof(AvatarTarget))]
[assembly: TypeForwardedTo(typeof(BatteryStatus))]
[assembly: TypeForwardedTo(typeof(BeforeRenderHelper))]
[assembly: TypeForwardedTo(typeof(BeforeRenderOrderAttribute))]
[assembly: TypeForwardedTo(typeof(Behaviour))]
[assembly: TypeForwardedTo(typeof(BillboardAsset))]
[assembly: TypeForwardedTo(typeof(BillboardRenderer))]
[assembly: TypeForwardedTo(typeof(CodegenOptions))]
[assembly: TypeForwardedTo(typeof(FreeFunctionAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsGenerateMarshallingTypeAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsHeaderProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsIsFreeFunctionProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsIsThreadSafeProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsNameProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsPreventExecution))]
[assembly: TypeForwardedTo(typeof(IBindingsThrowsProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IBindingsWritableSelfProviderAttribute))]
[assembly: TypeForwardedTo(typeof(IgnoreAttribute))]
[assembly: TypeForwardedTo(typeof(MarshalUnityObjectAs))]
[assembly: TypeForwardedTo(typeof(NativeAsStructAttribute))]
[assembly: TypeForwardedTo(typeof(NativeConditionalAttribute))]
[assembly: TypeForwardedTo(typeof(NativeHeaderAttribute))]
[assembly: TypeForwardedTo(typeof(NativeMethodAttribute))]
[assembly: TypeForwardedTo(typeof(NativeNameAttribute))]
[assembly: TypeForwardedTo(typeof(NativePropertyAttribute))]
[assembly: TypeForwardedTo(typeof(NativeThrowsAttribute))]
[assembly: TypeForwardedTo(typeof(NativeTypeAttribute))]
[assembly: TypeForwardedTo(typeof(NativeWritableSelfAttribute))]
[assembly: TypeForwardedTo(typeof(NotNullAttribute))]
[assembly: TypeForwardedTo(typeof(PreventExecutionInStateAttribute))]
[assembly: TypeForwardedTo(typeof(PreventExecutionSeverity))]
[assembly: TypeForwardedTo(typeof(PreventReadOnlyInstanceModificationAttribute))]
[assembly: TypeForwardedTo(typeof(StaticAccessorAttribute))]
[assembly: TypeForwardedTo(typeof(StaticAccessorType))]
[assembly: TypeForwardedTo(typeof(TargetType))]
[assembly: TypeForwardedTo(typeof(ThreadSafeAttribute))]
[assembly: TypeForwardedTo(typeof(UnityTypeAttribute))]
[assembly: TypeForwardedTo(typeof(UnmarshalledAttribute))]
[assembly: TypeForwardedTo(typeof(VisibleToOtherModulesAttribute))]
[assembly: TypeForwardedTo(typeof(BodyDof))]
[assembly: TypeForwardedTo(typeof(BoneWeight))]
[assembly: TypeForwardedTo(typeof(BoneWeight1))]
[assembly: TypeForwardedTo(typeof(BootConfigData))]
[assembly: TypeForwardedTo(typeof(BoundingSphere))]
[assembly: TypeForwardedTo(typeof(Bounds))]
[assembly: TypeForwardedTo(typeof(BoundsInt))]
[assembly: TypeForwardedTo(typeof(BoxcastCommand))]
[assembly: TypeForwardedTo(typeof(BoxCollider))]
[assembly: TypeForwardedTo(typeof(BoxCollider2D))]
[assembly: TypeForwardedTo(typeof(BuildCompression))]
[assembly: TypeForwardedTo(typeof(BuoyancyEffector2D))]
[assembly: TypeForwardedTo(typeof(Cache))]
[assembly: TypeForwardedTo(typeof(CachedAssetBundle))]
[assembly: TypeForwardedTo(typeof(CacheIndex))]
[assembly: TypeForwardedTo(typeof(Caching))]
[assembly: TypeForwardedTo(typeof(Camera))]
[assembly: TypeForwardedTo(typeof(CameraClearFlags))]
[assembly: TypeForwardedTo(typeof(CameraRaycastHelper))]
[assembly: TypeForwardedTo(typeof(CameraType))]
[assembly: TypeForwardedTo(typeof(Canvas))]
[assembly: TypeForwardedTo(typeof(CanvasGroup))]
[assembly: TypeForwardedTo(typeof(CanvasRenderer))]
[assembly: TypeForwardedTo(typeof(CapsulecastCommand))]
[assembly: TypeForwardedTo(typeof(CapsuleCollider))]
[assembly: TypeForwardedTo(typeof(CapsuleCollider2D))]
[assembly: TypeForwardedTo(typeof(CapsuleDirection2D))]
[assembly: TypeForwardedTo(typeof(CastHelper<>))]
[assembly: TypeForwardedTo(typeof(CharacterController))]
[assembly: TypeForwardedTo(typeof(CharacterInfo))]
[assembly: TypeForwardedTo(typeof(CharacterJoint))]
[assembly: TypeForwardedTo(typeof(CircleCollider2D))]
[assembly: TypeForwardedTo(typeof(ClassLibraryInitializer))]
[assembly: TypeForwardedTo(typeof(Cloth))]
[assembly: TypeForwardedTo(typeof(ClothSkinningCoefficient))]
[assembly: TypeForwardedTo(typeof(ClothSphereColliderPair))]
[assembly: TypeForwardedTo(typeof(ClusterInput))]
[assembly: TypeForwardedTo(typeof(ClusterInputType))]
[assembly: TypeForwardedTo(typeof(ClusterNetwork))]
[assembly: TypeForwardedTo(typeof(ClusterSerialization))]
[assembly: TypeForwardedTo(typeof(Collider))]
[assembly: TypeForwardedTo(typeof(Collider2D))]
[assembly: TypeForwardedTo(typeof(ColliderDistance2D))]
[assembly: TypeForwardedTo(typeof(ColliderErrorState2D))]
[assembly: TypeForwardedTo(typeof(Collision))]
[assembly: TypeForwardedTo(typeof(Collision2D))]
[assembly: TypeForwardedTo(typeof(CollisionDetectionMode))]
[assembly: TypeForwardedTo(typeof(CollisionDetectionMode2D))]
[assembly: TypeForwardedTo(typeof(CollisionFlags))]
[assembly: TypeForwardedTo(typeof(Color))]
[assembly: TypeForwardedTo(typeof(Color32))]
[assembly: TypeForwardedTo(typeof(ColorGamut))]
[assembly: TypeForwardedTo(typeof(ColorSpace))]
[assembly: TypeForwardedTo(typeof(ColorUsageAttribute))]
[assembly: TypeForwardedTo(typeof(ColorUtility))]
[assembly: TypeForwardedTo(typeof(CombineInstance))]
[assembly: TypeForwardedTo(typeof(Compass))]
[assembly: TypeForwardedTo(typeof(Component))]
[assembly: TypeForwardedTo(typeof(CompositeCollider2D))]
[assembly: TypeForwardedTo(typeof(CompressionLevel))]
[assembly: TypeForwardedTo(typeof(CompressionType))]
[assembly: TypeForwardedTo(typeof(ComputeBuffer))]
[assembly: TypeForwardedTo(typeof(ComputeBufferMode))]
[assembly: TypeForwardedTo(typeof(ComputeBufferType))]
[assembly: TypeForwardedTo(typeof(ComputeShader))]
[assembly: TypeForwardedTo(typeof(ConfigurableJoint))]
[assembly: TypeForwardedTo(typeof(ConfigurableJointMotion))]
[assembly: TypeForwardedTo(typeof(UnityConnectSettings))]
[assembly: TypeForwardedTo(typeof(ConstantForce))]
[assembly: TypeForwardedTo(typeof(ConstantForce2D))]
[assembly: TypeForwardedTo(typeof(ContactFilter2D))]
[assembly: TypeForwardedTo(typeof(ContactPoint))]
[assembly: TypeForwardedTo(typeof(ContactPoint2D))]
[assembly: TypeForwardedTo(typeof(ContextMenu))]
[assembly: TypeForwardedTo(typeof(ContextMenuItemAttribute))]
[assembly: TypeForwardedTo(typeof(ControllerColliderHit))]
[assembly: TypeForwardedTo(typeof(Coroutine))]
[assembly: TypeForwardedTo(typeof(CrashReport))]
[assembly: TypeForwardedTo(typeof(CrashReportHandler))]
[assembly: TypeForwardedTo(typeof(CreateAssetMenuAttribute))]
[assembly: TypeForwardedTo(typeof(Cubemap))]
[assembly: TypeForwardedTo(typeof(CubemapArray))]
[assembly: TypeForwardedTo(typeof(CubemapFace))]
[assembly: TypeForwardedTo(typeof(CullingGroup))]
[assembly: TypeForwardedTo(typeof(CullingGroupEvent))]
[assembly: TypeForwardedTo(typeof(CullingQueryOptions))]
[assembly: TypeForwardedTo(typeof(Cursor))]
[assembly: TypeForwardedTo(typeof(CursorLockMode))]
[assembly: TypeForwardedTo(typeof(CursorMode))]
[assembly: TypeForwardedTo(typeof(CustomGridBrushAttribute))]
[assembly: TypeForwardedTo(typeof(CustomRenderTexture))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureInitializationSource))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureManager))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureUpdateMode))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureUpdateZone))]
[assembly: TypeForwardedTo(typeof(CustomRenderTextureUpdateZoneSpace))]
[assembly: TypeForwardedTo(typeof(CustomYieldInstruction))]
[assembly: TypeForwardedTo(typeof(D3DHDRDisplayBitDepth))]
[assembly: TypeForwardedTo(typeof(Debug))]
[assembly: TypeForwardedTo(typeof(DebugLogHandler))]
[assembly: TypeForwardedTo(typeof(DefaultExecutionOrder))]
[assembly: TypeForwardedTo(typeof(DelayedAttribute))]
[assembly: TypeForwardedTo(typeof(DepthTextureMode))]
[assembly: TypeForwardedTo(typeof(DetailPrototype))]
[assembly: TypeForwardedTo(typeof(DetailRenderMode))]
[assembly: TypeForwardedTo(typeof(DeviceOrientation))]
[assembly: TypeForwardedTo(typeof(DeviceType))]
[assembly: TypeForwardedTo(typeof(ForcedCrashCategory))]
[assembly: TypeForwardedTo(typeof(PlayerConnection))]
[assembly: TypeForwardedTo(typeof(Utils))]
[assembly: TypeForwardedTo(typeof(DiagnosticSwitch))]
[assembly: TypeForwardedTo(typeof(DiagnosticSwitchFlags))]
[assembly: TypeForwardedTo(typeof(DisableBatchingType))]
[assembly: TypeForwardedTo(typeof(DisallowMultipleComponent))]
[assembly: TypeForwardedTo(typeof(Display))]
[assembly: TypeForwardedTo(typeof(DistanceJoint2D))]
[assembly: TypeForwardedTo(typeof(Dof))]
[assembly: TypeForwardedTo(typeof(DrivenPropertyManager))]
[assembly: TypeForwardedTo(typeof(DrivenRectTransformTracker))]
[assembly: TypeForwardedTo(typeof(DrivenTransformProperties))]
[assembly: TypeForwardedTo(typeof(DurationUnit))]
[assembly: TypeForwardedTo(typeof(DynamicGI))]
[assembly: TypeForwardedTo(typeof(EdgeCollider2D))]
[assembly: TypeForwardedTo(typeof(Effector2D))]
[assembly: TypeForwardedTo(typeof(EffectorForceMode2D))]
[assembly: TypeForwardedTo(typeof(EffectorSelection2D))]
[assembly: TypeForwardedTo(typeof(EnabledOrientation))]
[assembly: TypeForwardedTo(typeof(EnumInfo))]
[assembly: TypeForwardedTo(typeof(Event))]
[assembly: TypeForwardedTo(typeof(EventCommandNames))]
[assembly: TypeForwardedTo(typeof(EventInterests))]
[assembly: TypeForwardedTo(typeof(EventModifiers))]
[assembly: TypeForwardedTo(typeof(ArgumentCache))]
[assembly: TypeForwardedTo(typeof(BaseInvokableCall))]
[assembly: TypeForwardedTo(typeof(CachedInvokableCall<>))]
[assembly: TypeForwardedTo(typeof(InvokableCall))]
[assembly: TypeForwardedTo(typeof(InvokableCall<>))]
[assembly: TypeForwardedTo(typeof(InvokableCall<, >))]
[assembly: TypeForwardedTo(typeof(InvokableCall<, , >))]
[assembly: TypeForwardedTo(typeof(InvokableCall<, , , >))]
[assembly: TypeForwardedTo(typeof(InvokableCallList))]
[assembly: TypeForwardedTo(typeof(PersistentCall))]
[assembly: TypeForwardedTo(typeof(PersistentCallGroup))]
[assembly: TypeForwardedTo(typeof(PersistentListenerMode))]
[assembly: TypeForwardedTo(typeof(UnityAction))]
[assembly: TypeForwardedTo(typeof(UnityAction<>))]
[assembly: TypeForwardedTo(typeof(UnityAction<, >))]
[assembly: TypeForwardedTo(typeof(UnityAction<, , >))]
[assembly: TypeForwardedTo(typeof(UnityAction<, , , >))]
[assembly: TypeForwardedTo(typeof(UnityEvent))]
[assembly: TypeForwardedTo(typeof(UnityEvent<>))]
[assembly: TypeForwardedTo(typeof(UnityEvent<, >))]
[assembly: TypeForwardedTo(typeof(UnityEvent<, , >))]
[assembly: TypeForwardedTo(typeof(UnityEvent<, , , >))]
[assembly: TypeForwardedTo(typeof(UnityEventBase))]
[assembly: TypeForwardedTo(typeof(UnityEventCallState))]
[assembly: TypeForwardedTo(typeof(UnityEventTools))]
[assembly: TypeForwardedTo(typeof(EventType))]
[assembly: TypeForwardedTo(typeof(ExcludeFromObjectFactoryAttribute))]
[assembly: TypeForwardedTo(typeof(ExcludeFromPresetAttribute))]
[assembly: TypeForwardedTo(typeof(ExecuteAlways))]
[assembly: TypeForwardedTo(typeof(ExecuteInEditMode))]
[assembly: TypeForwardedTo(typeof(ExitGUIException))]
[assembly: TypeForwardedTo(typeof(NavMeshLocation))]
[assembly: TypeForwardedTo(typeof(NavMeshPolyTypes))]
[assembly: TypeForwardedTo(typeof(NavMeshQuery))]
[assembly: TypeForwardedTo(typeof(NavMeshWorld))]
[assembly: TypeForwardedTo(typeof(PathQueryStatus))]
[assembly: TypeForwardedTo(typeof(PolygonId))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableOutputExtensions))]
[assembly: TypeForwardedTo(typeof(AnimationStreamSource))]
[assembly: TypeForwardedTo(typeof(AssetBundleUtility))]
[assembly: TypeForwardedTo(typeof(AudioClipExtensionsInternal))]
[assembly: TypeForwardedTo(typeof(AudioSampleProvider))]
[assembly: TypeForwardedTo(typeof(AudioSourceExtensionsInternal))]
[assembly: TypeForwardedTo(typeof(AngularFalloffType))]
[assembly: TypeForwardedTo(typeof(Cookie))]
[assembly: TypeForwardedTo(typeof(DirectionalLight))]
[assembly: TypeForwardedTo(typeof(DiscLight))]
[assembly: TypeForwardedTo(typeof(FalloffType))]
[assembly: TypeForwardedTo(typeof(LightDataGI))]
[assembly: TypeForwardedTo(typeof(LightmapperUtils))]
[assembly: TypeForwardedTo(typeof(Lightmapping))]
[assembly: TypeForwardedTo(typeof(LightMode))]
[assembly: TypeForwardedTo(typeof(LightType))]
[assembly: TypeForwardedTo(typeof(LinearColor))]
[assembly: TypeForwardedTo(typeof(PointLight))]
[assembly: TypeForwardedTo(typeof(RectangleLight))]
[assembly: TypeForwardedTo(typeof(RenderSettings))]
[assembly: TypeForwardedTo(typeof(SpotLight))]
[assembly: TypeForwardedTo(typeof(SpotLightBoxShape))]
[assembly: TypeForwardedTo(typeof(SpotLightPyramidShape))]
[assembly: TypeForwardedTo(typeof(CameraPlayable))]
[assembly: TypeForwardedTo(typeof(MaterialEffectPlayable))]
[assembly: TypeForwardedTo(typeof(TextureMixerPlayable))]
[assembly: TypeForwardedTo(typeof(TexturePlayableBinding))]
[assembly: TypeForwardedTo(typeof(TexturePlayableGraphExtensions))]
[assembly: TypeForwardedTo(typeof(TexturePlayableOutput))]
[assembly: TypeForwardedTo(typeof(BuiltinRuntimeReflectionSystem))]
[assembly: TypeForwardedTo(typeof(DefaultFormat))]
[assembly: TypeForwardedTo(typeof(ExternalGPUProfiler))]
[assembly: TypeForwardedTo(typeof(FormatUsage))]
[assembly: TypeForwardedTo(typeof(GraphicsDeviceSettings))]
[assembly: TypeForwardedTo(typeof(GraphicsFormat))]
[assembly: TypeForwardedTo(typeof(GraphicsFormatUtility))]
[assembly: TypeForwardedTo(typeof(GraphicsJobsSyncPoint))]
[assembly: TypeForwardedTo(typeof(IScriptableRuntimeReflectionSystem))]
[assembly: TypeForwardedTo(typeof(RayTracingAccelerationStructure))]
[assembly: TypeForwardedTo(typeof(RayTracingMode))]
[assembly: TypeForwardedTo(typeof(RayTracingShader))]
[assembly: TypeForwardedTo(typeof(ScriptableRuntimeReflectionSystem))]
[assembly: TypeForwardedTo(typeof(ScriptableRuntimeReflectionSystemSettings))]
[assembly: TypeForwardedTo(typeof(ScriptableRuntimeReflectionSystemWrapper))]
[assembly: TypeForwardedTo(typeof(ShaderWarmup))]
[assembly: TypeForwardedTo(typeof(ShaderWarmupSetup))]
[assembly: TypeForwardedTo(typeof(TextureCreationFlags))]
[assembly: TypeForwardedTo(typeof(WaitForPresentSyncPoint))]
[assembly: TypeForwardedTo(typeof(BrushTransform))]
[assembly: TypeForwardedTo(typeof(PaintContext))]
[assembly: TypeForwardedTo(typeof(TerrainCallbacks))]
[assembly: TypeForwardedTo(typeof(TerrainPaintUtility))]
[assembly: TypeForwardedTo(typeof(TerrainUtility))]
[assembly: TypeForwardedTo(typeof(SpriteIntermediateRendererInfo))]
[assembly: TypeForwardedTo(typeof(SpriteRendererGroup))]
[assembly: TypeForwardedTo(typeof(VFXManager))]
[assembly: TypeForwardedTo(typeof(VideoClipPlayable))]
[assembly: TypeForwardedTo(typeof(VideoPlayerExtensions))]
[assembly: TypeForwardedTo(typeof(DeleteMe))]
[assembly: TypeForwardedTo(typeof(ExposedPropertyResolver))]
[assembly: TypeForwardedTo(typeof(ExposedReference<>))]
[assembly: TypeForwardedTo(typeof(ExtensionOfNativeClassAttribute))]
[assembly: TypeForwardedTo(typeof(FailedToLoadScriptObject))]
[assembly: TypeForwardedTo(typeof(FFTWindow))]
[assembly: TypeForwardedTo(typeof(FilterMode))]
[assembly: TypeForwardedTo(typeof(FingerDof))]
[assembly: TypeForwardedTo(typeof(FixedJoint))]
[assembly: TypeForwardedTo(typeof(FixedJoint2D))]
[assembly: TypeForwardedTo(typeof(Flare))]
[assembly: TypeForwardedTo(typeof(FlareLayer))]
[assembly: TypeForwardedTo(typeof(FocusType))]
[assembly: TypeForwardedTo(typeof(FogMode))]
[assembly: TypeForwardedTo(typeof(Font))]
[assembly: TypeForwardedTo(typeof(FontStyle))]
[assembly: TypeForwardedTo(typeof(ForceMode))]
[assembly: TypeForwardedTo(typeof(ForceMode2D))]
[assembly: TypeForwardedTo(typeof(FrameTiming))]
[assembly: TypeForwardedTo(typeof(FrameTimingManager))]
[assembly: TypeForwardedTo(typeof(FrictionJoint2D))]
[assembly: TypeForwardedTo(typeof(FrustumPlanes))]
[assembly: TypeForwardedTo(typeof(FullScreenMode))]
[assembly: TypeForwardedTo(typeof(GameObject))]
[assembly: TypeForwardedTo(typeof(GeometryUtility))]
[assembly: TypeForwardedTo(typeof(Gizmos))]
[assembly: TypeForwardedTo(typeof(GL))]
[assembly: TypeForwardedTo(typeof(GlobalJavaObjectRef))]
[assembly: TypeForwardedTo(typeof(Gradient))]
[assembly: TypeForwardedTo(typeof(GradientAlphaKey))]
[assembly: TypeForwardedTo(typeof(GradientColorKey))]
[assembly: TypeForwardedTo(typeof(GradientMode))]
[assembly: TypeForwardedTo(typeof(GradientUsageAttribute))]
[assembly: TypeForwardedTo(typeof(Graphics))]
[assembly: TypeForwardedTo(typeof(GraphicsBuffer))]
[assembly: TypeForwardedTo(typeof(Grid))]
[assembly: TypeForwardedTo(typeof(GridBrushBase))]
[assembly: TypeForwardedTo(typeof(GridLayout))]
[assembly: TypeForwardedTo(typeof(GUI))]
[assembly: TypeForwardedTo(typeof(GUIAspectSizer))]
[assembly: TypeForwardedTo(typeof(GUIClip))]
[assembly: TypeForwardedTo(typeof(GUIContent))]
[assembly: TypeForwardedTo(typeof(GUIDebugger))]
[assembly: TypeForwardedTo(typeof(GUIGridSizer))]
[assembly: TypeForwardedTo(typeof(GUILayout))]
[assembly: TypeForwardedTo(typeof(GUILayoutEntry))]
[assembly: TypeForwardedTo(typeof(GUILayoutGroup))]
[assembly: TypeForwardedTo(typeof(GUILayoutOption))]
[assembly: TypeForwardedTo(typeof(GUILayoutUtility))]
[assembly: TypeForwardedTo(typeof(GUIScrollGroup))]
[assembly: TypeForwardedTo(typeof(GUISettings))]
[assembly: TypeForwardedTo(typeof(GUISkin))]
[assembly: TypeForwardedTo(typeof(GUIStateObjects))]
[assembly: TypeForwardedTo(typeof(GUIStyle))]
[assembly: TypeForwardedTo(typeof(GUIStyleState))]
[assembly: TypeForwardedTo(typeof(GUITargetAttribute))]
[assembly: TypeForwardedTo(typeof(GUIUtility))]
[assembly: TypeForwardedTo(typeof(GUIWordWrapSizer))]
[assembly: TypeForwardedTo(typeof(Gyroscope))]
[assembly: TypeForwardedTo(typeof(Halo))]
[assembly: TypeForwardedTo(typeof(Hash128))]
[assembly: TypeForwardedTo(typeof(HashUnsafeUtilities))]
[assembly: TypeForwardedTo(typeof(HashUtilities))]
[assembly: TypeForwardedTo(typeof(HDRDisplaySupportFlags))]
[assembly: TypeForwardedTo(typeof(HDROutputSettings))]
[assembly: TypeForwardedTo(typeof(HeadDof))]
[assembly: TypeForwardedTo(typeof(HeaderAttribute))]
[assembly: TypeForwardedTo(typeof(HelpURLAttribute))]
[assembly: TypeForwardedTo(typeof(HideFlags))]
[assembly: TypeForwardedTo(typeof(HideInInspector))]
[assembly: TypeForwardedTo(typeof(HingeJoint))]
[assembly: TypeForwardedTo(typeof(HingeJoint2D))]
[assembly: TypeForwardedTo(typeof(HorizontalWrapMode))]
[assembly: TypeForwardedTo(typeof(HotReloadDeserializer))]
[assembly: TypeForwardedTo(typeof(HumanBodyBones))]
[assembly: TypeForwardedTo(typeof(HumanBone))]
[assembly: TypeForwardedTo(typeof(HumanDescription))]
[assembly: TypeForwardedTo(typeof(HumanLimit))]
[assembly: TypeForwardedTo(typeof(HumanParameter))]
[assembly: TypeForwardedTo(typeof(HumanPartDof))]
[assembly: TypeForwardedTo(typeof(HumanPose))]
[assembly: TypeForwardedTo(typeof(HumanPoseHandler))]
[assembly: TypeForwardedTo(typeof(HumanTrait))]
[assembly: TypeForwardedTo(typeof(IAnimationClipSource))]
[assembly: TypeForwardedTo(typeof(ICanvasRaycastFilter))]
[assembly: TypeForwardedTo(typeof(IconAttribute))]
[assembly: TypeForwardedTo(typeof(IExposedPropertyTable))]
[assembly: TypeForwardedTo(typeof(IL2CPPStructAlignmentAttribute))]
[assembly: TypeForwardedTo(typeof(ILogger))]
[assembly: TypeForwardedTo(typeof(ILogHandler))]
[assembly: TypeForwardedTo(typeof(ImageConversion))]
[assembly: TypeForwardedTo(typeof(ImageEffectAfterScale))]
[assembly: TypeForwardedTo(typeof(ImageEffectAllowedInSceneView))]
[assembly: TypeForwardedTo(typeof(ImageEffectOpaque))]
[assembly: TypeForwardedTo(typeof(ImageEffectTransformsToLDR))]
[assembly: TypeForwardedTo(typeof(ImageEffectUsesCommandBuffer))]
[assembly: TypeForwardedTo(typeof(ImagePosition))]
[assembly: TypeForwardedTo(typeof(IMECompositionMode))]
[assembly: TypeForwardedTo(typeof(Input))]
[assembly: TypeForwardedTo(typeof(InspectorNameAttribute))]
[assembly: TypeForwardedTo(typeof(IntegratedSubsystem))]
[assembly: TypeForwardedTo(typeof(IntegratedSubsystem<>))]
[assembly: TypeForwardedTo(typeof(IntegratedSubsystemDescriptor))]
[assembly: TypeForwardedTo(typeof(IntegratedSubsystemDescriptor<>))]
[assembly: TypeForwardedTo(typeof(DefaultValueAttribute))]
[assembly: TypeForwardedTo(typeof(ExcludeFromDocsAttribute))]
[assembly: TypeForwardedTo(typeof(ISubAssetNotDuplicatable))]
[assembly: TypeForwardedTo(typeof(Internal_DrawTextureArguments))]
[assembly: TypeForwardedTo(typeof(Internal_SubsystemDescriptors))]
[assembly: TypeForwardedTo(typeof(InternalStaticBatchingUtility))]
[assembly: TypeForwardedTo(typeof(File))]
[assembly: TypeForwardedTo(typeof(ThreadIORestrictionMode))]
[assembly: TypeForwardedTo(typeof(IPlayerEditorConnectionNative))]
[assembly: TypeForwardedTo(typeof(ISerializationCallbackReceiver))]
[assembly: TypeForwardedTo(typeof(ISubsystem))]
[assembly: TypeForwardedTo(typeof(ISubsystemDescriptor))]
[assembly: TypeForwardedTo(typeof(ISubsystemDescriptorImpl))]
[assembly: TypeForwardedTo(typeof(IJobParallelForTransform))]
[assembly: TypeForwardedTo(typeof(IJobParallelForTransformExtensions))]
[assembly: TypeForwardedTo(typeof(TransformAccess))]
[assembly: TypeForwardedTo(typeof(TransformAccessArray))]
[assembly: TypeForwardedTo(typeof(Joint))]
[assembly: TypeForwardedTo(typeof(Joint2D))]
[assembly: TypeForwardedTo(typeof(JointAngleLimits2D))]
[assembly: TypeForwardedTo(typeof(JointDrive))]
[assembly: TypeForwardedTo(typeof(JointDriveMode))]
[assembly: TypeForwardedTo(typeof(JointLimits))]
[assembly: TypeForwardedTo(typeof(JointLimitState2D))]
[assembly: TypeForwardedTo(typeof(JointMotor))]
[assembly: TypeForwardedTo(typeof(JointMotor2D))]
[assembly: TypeForwardedTo(typeof(JointProjectionMode))]
[assembly: TypeForwardedTo(typeof(JointSpring))]
[assembly: TypeForwardedTo(typeof(JointSuspension2D))]
[assembly: TypeForwardedTo(typeof(JointTranslationLimits2D))]
[assembly: TypeForwardedTo(typeof(JsonUtility))]
[assembly: TypeForwardedTo(typeof(jvalue))]
[assembly: TypeForwardedTo(typeof(KeyCode))]
[assembly: TypeForwardedTo(typeof(Keyframe))]
[assembly: TypeForwardedTo(typeof(LayerMask))]
[assembly: TypeForwardedTo(typeof(LazyLoadReference<>))]
[assembly: TypeForwardedTo(typeof(LegDof))]
[assembly: TypeForwardedTo(typeof(LensFlare))]
[assembly: TypeForwardedTo(typeof(Light))]
[assembly: TypeForwardedTo(typeof(LightBakingOutput))]
[assembly: TypeForwardedTo(typeof(LightingSettings))]
[assembly: TypeForwardedTo(typeof(LightmapBakeType))]
[assembly: TypeForwardedTo(typeof(LightmapData))]
[assembly: TypeForwardedTo(typeof(LightmapSettings))]
[assembly: TypeForwardedTo(typeof(LightmapsMode))]
[assembly: TypeForwardedTo(typeof(LightmapsModeLegacy))]
[assembly: TypeForwardedTo(typeof(LightProbeGroup))]
[assembly: TypeForwardedTo(typeof(LightProbeProxyVolume))]
[assembly: TypeForwardedTo(typeof(LightProbes))]
[assembly: TypeForwardedTo(typeof(LightRenderMode))]
[assembly: TypeForwardedTo(typeof(LightShadowCasterMode))]
[assembly: TypeForwardedTo(typeof(LightShadows))]
[assembly: TypeForwardedTo(typeof(LightShape))]
[assembly: TypeForwardedTo(typeof(LightType))]
[assembly: TypeForwardedTo(typeof(LineAlignment))]
[assembly: TypeForwardedTo(typeof(LineRenderer))]
[assembly: TypeForwardedTo(typeof(LineTextureMode))]
[assembly: TypeForwardedTo(typeof(LineUtility))]
[assembly: TypeForwardedTo(typeof(LocalizationAsset))]
[assembly: TypeForwardedTo(typeof(LocationInfo))]
[assembly: TypeForwardedTo(typeof(LocationService))]
[assembly: TypeForwardedTo(typeof(LocationServiceStatus))]
[assembly: TypeForwardedTo(typeof(LOD))]
[assembly: TypeForwardedTo(typeof(LODFadeMode))]
[assembly: TypeForwardedTo(typeof(LODGroup))]
[assembly: TypeForwardedTo(typeof(Logger))]
[assembly: TypeForwardedTo(typeof(LogOption))]
[assembly: TypeForwardedTo(typeof(LogType))]
[assembly: TypeForwardedTo(typeof(LowerResBlitTexture))]
[assembly: TypeForwardedTo(typeof(PlayerLoop))]
[assembly: TypeForwardedTo(typeof(PlayerLoopSystem))]
[assembly: TypeForwardedTo(typeof(PlayerLoopSystemInternal))]
[assembly: TypeForwardedTo(typeof(UsesLuminPlatformLevelAttribute))]
[assembly: TypeForwardedTo(typeof(UsesLuminPrivilegeAttribute))]
[assembly: TypeForwardedTo(typeof(ManagedStreamHelpers))]
[assembly: TypeForwardedTo(typeof(MatchTargetWeightMask))]
[assembly: TypeForwardedTo(typeof(Material))]
[assembly: TypeForwardedTo(typeof(MaterialGlobalIlluminationFlags))]
[assembly: TypeForwardedTo(typeof(MaterialPropertyBlock))]
[assembly: TypeForwardedTo(typeof(Mathf))]
[assembly: TypeForwardedTo(typeof(Matrix4x4))]
[assembly: TypeForwardedTo(typeof(Mesh))]
[assembly: TypeForwardedTo(typeof(MeshCollider))]
[assembly: TypeForwardedTo(typeof(MeshColliderCookingOptions))]
[assembly: TypeForwardedTo(typeof(MeshFilter))]
[assembly: TypeForwardedTo(typeof(MeshGraphicsTestHelper))]
[assembly: TypeForwardedTo(typeof(MeshRenderer))]
[assembly: TypeForwardedTo(typeof(MeshSubsetCombineUtility))]
[assembly: TypeForwardedTo(typeof(MeshTopology))]
[assembly: TypeForwardedTo(typeof(MethodImplOptionsEx))]
[assembly: TypeForwardedTo(typeof(Microphone))]
[assembly: TypeForwardedTo(typeof(MinAttribute))]
[assembly: TypeForwardedTo(typeof(MissingComponentException))]
[assembly: TypeForwardedTo(typeof(MissingReferenceException))]
[assembly: TypeForwardedTo(typeof(MixedLightingMode))]
[assembly: TypeForwardedTo(typeof(MonoBehaviour))]
[assembly: TypeForwardedTo(typeof(Motion))]
[assembly: TypeForwardedTo(typeof(MotionVectorGenerationMode))]
[assembly: TypeForwardedTo(typeof(MultilineAttribute))]
[assembly: TypeForwardedTo(typeof(NativeClassAttribute))]
[assembly: TypeForwardedTo(typeof(CertificateHandler))]
[assembly: TypeForwardedTo(typeof(ChannelQOS))]
[assembly: TypeForwardedTo(typeof(ConnectionAcksType))]
[assembly: TypeForwardedTo(typeof(ConnectionConfig))]
[assembly: TypeForwardedTo(typeof(ConnectionConfigInternal))]
[assembly: TypeForwardedTo(typeof(ConnectionSimulatorConfig))]
[assembly: TypeForwardedTo(typeof(ConnectionSimulatorConfigInternal))]
[assembly: TypeForwardedTo(typeof(DownloadHandler))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerAssetBundle))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerAudioClip))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerBuffer))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerFile))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerScript))]
[assembly: TypeForwardedTo(typeof(DownloadHandlerTexture))]
[assembly: TypeForwardedTo(typeof(GlobalConfig))]
[assembly: TypeForwardedTo(typeof(GlobalConfigInternal))]
[assembly: TypeForwardedTo(typeof(HostTopology))]
[assembly: TypeForwardedTo(typeof(HostTopologyInternal))]
[assembly: TypeForwardedTo(typeof(IMultipartFormSection))]
[assembly: TypeForwardedTo(typeof(BasicResponse))]
[assembly: TypeForwardedTo(typeof(CreateMatchRequest))]
[assembly: TypeForwardedTo(typeof(CreateMatchResponse))]
[assembly: TypeForwardedTo(typeof(CreateOrJoinMatchRequest))]
[assembly: TypeForwardedTo(typeof(DestroyMatchRequest))]
[assembly: TypeForwardedTo(typeof(DropConnectionRequest))]
[assembly: TypeForwardedTo(typeof(DropConnectionResponse))]
[assembly: TypeForwardedTo(typeof(IResponse))]
[assembly: TypeForwardedTo(typeof(JoinMatchRequest))]
[assembly: TypeForwardedTo(typeof(JoinMatchResponse))]
[assembly: TypeForwardedTo(typeof(ListMatchRequest))]
[assembly: TypeForwardedTo(typeof(ListMatchResponse))]
[assembly: TypeForwardedTo(typeof(MatchDesc))]
[assembly: TypeForwardedTo(typeof(MatchDirectConnectInfo))]
[assembly: TypeForwardedTo(typeof(MatchInfo))]
[assembly: TypeForwardedTo(typeof(MatchInfoSnapshot))]
[assembly: TypeForwardedTo(typeof(NetworkMatch))]
[assembly: TypeForwardedTo(typeof(Request))]
[assembly: TypeForwardedTo(typeof(Response))]
[assembly: TypeForwardedTo(typeof(SetMatchAttributesRequest))]
[assembly: TypeForwardedTo(typeof(MultipartFormDataSection))]
[assembly: TypeForwardedTo(typeof(MultipartFormFileSection))]
[assembly: TypeForwardedTo(typeof(NetworkError))]
[assembly: TypeForwardedTo(typeof(NetworkEventType))]
[assembly: TypeForwardedTo(typeof(NetworkTransport))]
[assembly: TypeForwardedTo(typeof(ConnectionTarget))]
[assembly: TypeForwardedTo(typeof(IConnectionState))]
[assembly: TypeForwardedTo(typeof(IEditorPlayerConnection))]
[assembly: TypeForwardedTo(typeof(MessageEventArgs))]
[assembly: TypeForwardedTo(typeof(PlayerConnection))]
[assembly: TypeForwardedTo(typeof(PlayerEditorConnectionEvents))]
[assembly: TypeForwardedTo(typeof(QosType))]
[assembly: TypeForwardedTo(typeof(ReactorModel))]
[assembly: TypeForwardedTo(typeof(AppID))]
[assembly: TypeForwardedTo(typeof(HostPriority))]
[assembly: TypeForwardedTo(typeof(NetworkAccessLevel))]
[assembly: TypeForwardedTo(typeof(NetworkAccessToken))]
[assembly: TypeForwardedTo(typeof(NetworkID))]
[assembly: TypeForwardedTo(typeof(NodeID))]
[assembly: TypeForwardedTo(typeof(SourceID))]
[assembly: TypeForwardedTo(typeof(UnityWebRequest))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestAssetBundle))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestAsyncOperation))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestMultimedia))]
[assembly: TypeForwardedTo(typeof(UnityWebRequestTexture))]
[assembly: TypeForwardedTo(typeof(UploadHandler))]
[assembly: TypeForwardedTo(typeof(UploadHandlerFile))]
[assembly: TypeForwardedTo(typeof(UploadHandlerRaw))]
[assembly: TypeForwardedTo(typeof(Utility))]
[assembly: TypeForwardedTo(typeof(WebRequestWWW))]
[assembly: TypeForwardedTo(typeof(NetworkReachability))]
[assembly: TypeForwardedTo(typeof(NoAllocHelpers))]
[assembly: TypeForwardedTo(typeof(NonReorderableAttribute))]
[assembly: TypeForwardedTo(typeof(NPOTSupport))]
[assembly: TypeForwardedTo(typeof(Object))]
[assembly: TypeForwardedTo(typeof(ObjectGUIState))]
[assembly: TypeForwardedTo(typeof(OcclusionArea))]
[assembly: TypeForwardedTo(typeof(OcclusionPortal))]
[assembly: TypeForwardedTo(typeof(OperatingSystemFamily))]
[assembly: TypeForwardedTo(typeof(ParticleCollisionEvent))]
[assembly: TypeForwardedTo(typeof(ParticlePhysicsExtensions))]
[assembly: TypeForwardedTo(typeof(ParticleSystem))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationRowMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationTimeMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemAnimationType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemColliderQueryMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCollisionMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCollisionQuality))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCollisionType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCullingMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCurveMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCustomData))]
[assembly: TypeForwardedTo(typeof(ParticleSystemCustomDataMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemEmissionType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemEmitterVelocityMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemExtensionsImpl))]
[assembly: TypeForwardedTo(typeof(ParticleSystemForceField))]
[assembly: TypeForwardedTo(typeof(ParticleSystemForceFieldShape))]
[assembly: TypeForwardedTo(typeof(ParticleSystemGameObjectFilter))]
[assembly: TypeForwardedTo(typeof(ParticleSystemGradientMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemInheritVelocityMode))]
[assembly: TypeForwardedTo(typeof(IJobParticleSystem))]
[assembly: TypeForwardedTo(typeof(IJobParticleSystemParallelFor))]
[assembly: TypeForwardedTo(typeof(IJobParticleSystemParallelForBatch))]
[assembly: TypeForwardedTo(typeof(IParticleSystemJobExtensions))]
[assembly: TypeForwardedTo(typeof(NativeListData))]
[assembly: TypeForwardedTo(typeof(NativeParticleData))]
[assembly: TypeForwardedTo(typeof(ParticleSystemJobData))]
[assembly: TypeForwardedTo(typeof(ParticleSystemJobStruct<>))]
[assembly: TypeForwardedTo(typeof(ParticleSystemNativeArray3))]
[assembly: TypeForwardedTo(typeof(ParticleSystemNativeArray4))]
[assembly: TypeForwardedTo(typeof(ParticleSystemParallelForBatchJobStruct<>))]
[assembly: TypeForwardedTo(typeof(ParticleSystemParallelForJobStruct<>))]
[assembly: TypeForwardedTo(typeof(ParticleSystemMeshShapeType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemNoiseQuality))]
[assembly: TypeForwardedTo(typeof(ParticleSystemOverlapAction))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRenderer))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRenderMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRenderSpace))]
[assembly: TypeForwardedTo(typeof(ParticleSystemRingBufferMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemScalingMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemShapeMultiModeValue))]
[assembly: TypeForwardedTo(typeof(ParticleSystemShapeTextureChannel))]
[assembly: TypeForwardedTo(typeof(ParticleSystemShapeType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSimulationSpace))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSortMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemStopAction))]
[assembly: TypeForwardedTo(typeof(ParticleSystemStopBehavior))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSubEmitterProperties))]
[assembly: TypeForwardedTo(typeof(ParticleSystemSubEmitterType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemTrailMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemTrailTextureMode))]
[assembly: TypeForwardedTo(typeof(ParticleSystemTriggerEventType))]
[assembly: TypeForwardedTo(typeof(ParticleSystemVertexStream))]
[assembly: TypeForwardedTo(typeof(ParticleSystemVertexStreams))]
[assembly: TypeForwardedTo(typeof(PatchExtents))]
[assembly: TypeForwardedTo(typeof(PhysicMaterial))]
[assembly: TypeForwardedTo(typeof(PhysicMaterialCombine))]
[assembly: TypeForwardedTo(typeof(Physics))]
[assembly: TypeForwardedTo(typeof(Physics2D))]
[assembly: TypeForwardedTo(typeof(PhysicsJobOptions2D))]
[assembly: TypeForwardedTo(typeof(PhysicsMaterial2D))]
[assembly: TypeForwardedTo(typeof(PhysicsScene))]
[assembly: TypeForwardedTo(typeof(PhysicsScene2D))]
[assembly: TypeForwardedTo(typeof(PhysicsSceneExtensions))]
[assembly: TypeForwardedTo(typeof(PhysicsSceneExtensions2D))]
[assembly: TypeForwardedTo(typeof(PhysicsUpdateBehaviour2D))]
[assembly: TypeForwardedTo(typeof(Ping))]
[assembly: TypeForwardedTo(typeof(Plane))]
[assembly: TypeForwardedTo(typeof(PlatformEffector2D))]
[assembly: TypeForwardedTo(typeof(PlatformSelection))]
[assembly: TypeForwardedTo(typeof(AnimationPlayableUtilities))]
[assembly: TypeForwardedTo(typeof(DataStreamType))]
[assembly: TypeForwardedTo(typeof(DirectorUpdateMode))]
[assembly: TypeForwardedTo(typeof(DirectorWrapMode))]
[assembly: TypeForwardedTo(typeof(FrameData))]
[assembly: TypeForwardedTo(typeof(INotification))]
[assembly: TypeForwardedTo(typeof(INotificationReceiver))]
[assembly: TypeForwardedTo(typeof(IPlayable))]
[assembly: TypeForwardedTo(typeof(IPlayableAsset))]
[assembly: TypeForwardedTo(typeof(IPlayableBehaviour))]
[assembly: TypeForwardedTo(typeof(IPlayableOutput))]
[assembly: TypeForwardedTo(typeof(Notification))]
[assembly: TypeForwardedTo(typeof(Playable))]
[assembly: TypeForwardedTo(typeof(PlayableAsset))]
[assembly: TypeForwardedTo(typeof(PlayableBehaviour))]
[assembly: TypeForwardedTo(typeof(PlayableBinding))]
[assembly: TypeForwardedTo(typeof(PlayableDirector))]
[assembly: TypeForwardedTo(typeof(PlayableExtensions))]
[assembly: TypeForwardedTo(typeof(PlayableGraph))]
[assembly: TypeForwardedTo(typeof(PlayableHandle))]
[assembly: TypeForwardedTo(typeof(PlayableOutput))]
[assembly: TypeForwardedTo(typeof(PlayableOutputExtensions))]
[assembly: TypeForwardedTo(typeof(PlayableOutputHandle))]
[assembly: TypeForwardedTo(typeof(PlayableTraversalMode))]
[assembly: TypeForwardedTo(typeof(PlayState))]
[assembly: TypeForwardedTo(typeof(ScriptPlayable<>))]
[assembly: TypeForwardedTo(typeof(ScriptPlayableBinding))]
[assembly: TypeForwardedTo(typeof(ScriptPlayableOutput))]
[assembly: TypeForwardedTo(typeof(PlayerConnectionInternal))]
[assembly: TypeForwardedTo(typeof(EarlyUpdate))]
[assembly: TypeForwardedTo(typeof(FixedUpdate))]
[assembly: TypeForwardedTo(typeof(Initialization))]
[assembly: TypeForwardedTo(typeof(PostLateUpdate))]
[assembly: TypeForwardedTo(typeof(PreLateUpdate))]
[assembly: TypeForwardedTo(typeof(PreUpdate))]
[assembly: TypeForwardedTo(typeof(TimeUpdate))]
[assembly: TypeForwardedTo(typeof(Update))]
[assembly: TypeForwardedTo(typeof(PlayerPrefs))]
[assembly: TypeForwardedTo(typeof(PlayerPrefsException))]
[assembly: TypeForwardedTo(typeof(PlayMode))]
[assembly: TypeForwardedTo(typeof(PointEffector2D))]
[assembly: TypeForwardedTo(typeof(PointerType))]
[assembly: TypeForwardedTo(typeof(PolygonCollider2D))]
[assembly: TypeForwardedTo(typeof(Pose))]
[assembly: TypeForwardedTo(typeof(PreferBinarySerialization))]
[assembly: TypeForwardedTo(typeof(PreloadData))]
[assembly: TypeForwardedTo(typeof(PrimitiveType))]
[assembly: TypeForwardedTo(typeof(CustomSampler))]
[assembly: TypeForwardedTo(typeof(DebugScreenCapture))]
[assembly: TypeForwardedTo(typeof(CaptureFlags))]
[assembly: TypeForwardedTo(typeof(MemoryProfiler))]
[assembly: TypeForwardedTo(typeof(MetaData))]
[assembly: TypeForwardedTo(typeof(Profiler))]
[assembly: TypeForwardedTo(typeof(ProfilerArea))]
[assembly: TypeForwardedTo(typeof(Recorder))]
[assembly: TypeForwardedTo(typeof(Sampler))]
[assembly: TypeForwardedTo(typeof(Projector))]
[assembly: TypeForwardedTo(typeof(PropertyAttribute))]
[assembly: TypeForwardedTo(typeof(PropertyName))]
[assembly: TypeForwardedTo(typeof(PropertyNameUtils))]
[assembly: TypeForwardedTo(typeof(QualityLevel))]
[assembly: TypeForwardedTo(typeof(QualitySettings))]
[assembly: TypeForwardedTo(typeof(Quaternion))]
[assembly: TypeForwardedTo(typeof(QueryTriggerInteraction))]
[assembly: TypeForwardedTo(typeof(QueueMode))]
[assembly: TypeForwardedTo(typeof(Random))]
[assembly: TypeForwardedTo(typeof(RangeAttribute))]
[assembly: TypeForwardedTo(typeof(RangeInt))]
[assembly: TypeForwardedTo(typeof(Ray))]
[assembly: TypeForwardedTo(typeof(Ray2D))]
[assembly: TypeForwardedTo(typeof(RaycastCommand))]
[assembly: TypeForwardedTo(typeof(RaycastHit))]
[assembly: TypeForwardedTo(typeof(RaycastHit2D))]
[assembly: TypeForwardedTo(typeof(ReceiveGI))]
[assembly: TypeForwardedTo(typeof(Rect))]
[assembly: TypeForwardedTo(typeof(RectInt))]
[assembly: TypeForwardedTo(typeof(RectOffset))]
[assembly: TypeForwardedTo(typeof(RectTransform))]
[assembly: TypeForwardedTo(typeof(RectTransformUtility))]
[assembly: TypeForwardedTo(typeof(ReflectionProbe))]
[assembly: TypeForwardedTo(typeof(RejectDragAndDropMaterial))]
[assembly: TypeForwardedTo(typeof(RelativeJoint2D))]
[assembly: TypeForwardedTo(typeof(RemoteConfigSettings))]
[assembly: TypeForwardedTo(typeof(RemoteConfigSettingsHelper))]
[assembly: TypeForwardedTo(typeof(RemoteSettings))]
[assembly: TypeForwardedTo(typeof(RenderBuffer))]
[assembly: TypeForwardedTo(typeof(Renderer))]
[assembly: TypeForwardedTo(typeof(RendererExtensions))]
[assembly: TypeForwardedTo(typeof(AmbientMode))]
[assembly: TypeForwardedTo(typeof(AsyncGPUReadback))]
[assembly: TypeForwardedTo(typeof(AsyncGPUReadbackRequest))]
[assembly: TypeForwardedTo(typeof(AsyncRequestNativeArrayData))]
[assembly: TypeForwardedTo(typeof(AttachmentDescriptor))]
[assembly: TypeForwardedTo(typeof(BatchCullingContext))]
[assembly: TypeForwardedTo(typeof(BatchRendererCullingOutput))]
[assembly: TypeForwardedTo(typeof(BatchRendererGroup))]
[assembly: TypeForwardedTo(typeof(BatchVisibility))]
[assembly: TypeForwardedTo(typeof(BlendMode))]
[assembly: TypeForwardedTo(typeof(BlendOp))]
[assembly: TypeForwardedTo(typeof(BlendState))]
[assembly: TypeForwardedTo(typeof(BuiltinRenderTextureType))]
[assembly: TypeForwardedTo(typeof(BuiltinShaderDefine))]
[assembly: TypeForwardedTo(typeof(BuiltinShaderMode))]
[assembly: TypeForwardedTo(typeof(BuiltinShaderType))]
[assembly: TypeForwardedTo(typeof(CameraEvent))]
[assembly: TypeForwardedTo(typeof(CameraEventUtils))]
[assembly: TypeForwardedTo(typeof(CameraHDRMode))]
[assembly: TypeForwardedTo(typeof(CameraLateLatchMatrixType))]
[assembly: TypeForwardedTo(typeof(CameraProperties))]
[assembly: TypeForwardedTo(typeof(ColorWriteMask))]
[assembly: TypeForwardedTo(typeof(CommandBuffer))]
[assembly: TypeForwardedTo(typeof(CommandBufferExecutionFlags))]
[assembly: TypeForwardedTo(typeof(CommandBufferExtensions))]
[assembly: TypeForwardedTo(typeof(CompareFunction))]
[assembly: TypeForwardedTo(typeof(ComputeQueueType))]
[assembly: TypeForwardedTo(typeof(CopyTextureSupport))]
[assembly: TypeForwardedTo(typeof(CoreCameraValues))]
[assembly: TypeForwardedTo(typeof(CullingAllocationInfo))]
[assembly: TypeForwardedTo(typeof(CullingOptions))]
[assembly: TypeForwardedTo(typeof(CullingResults))]
[assembly: TypeForwardedTo(typeof(CullMode))]
[assembly: TypeForwardedTo(typeof(DefaultReflectionMode))]
[assembly: TypeForwardedTo(typeof(DepthState))]
[assembly: TypeForwardedTo(typeof(DistanceMetric))]
[assembly: TypeForwardedTo(typeof(DrawingSettings))]
[assembly: TypeForwardedTo(typeof(DrawRendererFlags))]
[assembly: TypeForwardedTo(typeof(FastMemoryFlags))]
[assembly: TypeForwardedTo(typeof(FilteringSettings))]
[assembly: TypeForwardedTo(typeof(FormatSwizzle))]
[assembly: TypeForwardedTo(typeof(GizmoSubset))]
[assembly: TypeForwardedTo(typeof(GPUFence))]
[assembly: TypeForwardedTo(typeof(GraphicsDeviceType))]
[assembly: TypeForwardedTo(typeof(GraphicsFence))]
[assembly: TypeForwardedTo(typeof(GraphicsFenceType))]
[assembly: TypeForwardedTo(typeof(GraphicsSettings))]
[assembly: TypeForwardedTo(typeof(GraphicsTier))]
[assembly: TypeForwardedTo(typeof(IndexFormat))]
[assembly: TypeForwardedTo(typeof(LightEvent))]
[assembly: TypeForwardedTo(typeof(LightProbeUsage))]
[assembly: TypeForwardedTo(typeof(LightShadowResolution))]
[assembly: TypeForwardedTo(typeof(LODParameters))]
[assembly: TypeForwardedTo(typeof(MeshUpdateFlags))]
[assembly: TypeForwardedTo(typeof(OnDemandRendering))]
[assembly: TypeForwardedTo(typeof(OpaqueSortMode))]
[assembly: TypeForwardedTo(typeof(OpenGLESVersion))]
[assembly: TypeForwardedTo(typeof(PassType))]
[assembly: TypeForwardedTo(typeof(PerObjectData))]
[assembly: TypeForwardedTo(typeof(PIX))]
[assembly: TypeForwardedTo(typeof(PlatformKeywordSet))]
[assembly: TypeForwardedTo(typeof(RasterState))]
[assembly: TypeForwardedTo(typeof(RealtimeGICPUUsage))]
[assembly: TypeForwardedTo(typeof(ReflectionCubemapCompression))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeBlendInfo))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeClearFlags))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeMode))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeRefreshMode))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeSortingCriteria))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeTimeSlicingMode))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeType))]
[assembly: TypeForwardedTo(typeof(ReflectionProbeUsage))]
[assembly: TypeForwardedTo(typeof(RenderBufferLoadAction))]
[assembly: TypeForwardedTo(typeof(RenderBufferStoreAction))]
[assembly: TypeForwardedTo(typeof(RenderingThreadingMode))]
[assembly: TypeForwardedTo(typeof(RenderPipeline))]
[assembly: TypeForwardedTo(typeof(RenderPipelineAsset))]
[assembly: TypeForwardedTo(typeof(RenderPipelineManager))]
[assembly: TypeForwardedTo(typeof(RenderQueue))]
[assembly: TypeForwardedTo(typeof(RenderQueueRange))]
[assembly: TypeForwardedTo(typeof(RenderStateBlock))]
[assembly: TypeForwardedTo(typeof(RenderStateMask))]
[assembly: TypeForwardedTo(typeof(RenderTargetBinding))]
[assembly: TypeForwardedTo(typeof(RenderTargetBlendState))]
[assembly: TypeForwardedTo(typeof(RenderTargetFlags))]
[assembly: TypeForwardedTo(typeof(RenderTargetIdentifier))]
[assembly: TypeForwardedTo(typeof(RenderTextureSubElement))]
[assembly: TypeForwardedTo(typeof(ScopedRenderPass))]
[assembly: TypeForwardedTo(typeof(ScopedSubPass))]
[assembly: TypeForwardedTo(typeof(ScriptableCullingParameters))]
[assembly: TypeForwardedTo(typeof(ScriptableRenderContext))]
[assembly: TypeForwardedTo(typeof(ShaderConstantType))]
[assembly: TypeForwardedTo(typeof(ShaderHardwareTier))]
[assembly: TypeForwardedTo(typeof(ShaderKeyword))]
[assembly: TypeForwardedTo(typeof(ShaderKeywordSet))]
[assembly: TypeForwardedTo(typeof(ShaderKeywordType))]
[assembly: TypeForwardedTo(typeof(ShaderParamType))]
[assembly: TypeForwardedTo(typeof(ShaderPropertyFlags))]
[assembly: TypeForwardedTo(typeof(ShaderPropertyType))]
[assembly: TypeForwardedTo(typeof(ShaderTagId))]
[assembly: TypeForwardedTo(typeof(ShadowCastingMode))]
[assembly: TypeForwardedTo(typeof(ShadowDrawingSettings))]
[assembly: TypeForwardedTo(typeof(ShadowMapPass))]
[assembly: TypeForwardedTo(typeof(ShadowSamplingMode))]
[assembly: TypeForwardedTo(typeof(ShadowSplitData))]
[assembly: TypeForwardedTo(typeof(SinglePassStereoMode))]
[assembly: TypeForwardedTo(typeof(SortingCriteria))]
[assembly: TypeForwardedTo(typeof(SortingGroup))]
[assembly: TypeForwardedTo(typeof(SortingLayerRange))]
[assembly: TypeForwardedTo(typeof(SortingSettings))]
[assembly: TypeForwardedTo(typeof(SphericalHarmonicsL2))]
[assembly: TypeForwardedTo(typeof(SplashScreen))]
[assembly: TypeForwardedTo(typeof(StencilOp))]
[assembly: TypeForwardedTo(typeof(StencilState))]
[assembly: TypeForwardedTo(typeof(SubMeshDescriptor))]
[assembly: TypeForwardedTo(typeof(SupportedRenderingFeatures))]
[assembly: TypeForwardedTo(typeof(SynchronisationStage))]
[assembly: TypeForwardedTo(typeof(SynchronisationStageFlags))]
[assembly: TypeForwardedTo(typeof(TextureDimension))]
[assembly: TypeForwardedTo(typeof(UVChannelFlags))]
[assembly: TypeForwardedTo(typeof(VertexAttribute))]
[assembly: TypeForwardedTo(typeof(VertexAttributeDescriptor))]
[assembly: TypeForwardedTo(typeof(VertexAttributeFormat))]
[assembly: TypeForwardedTo(typeof(VideoShadersIncludeMode))]
[assembly: TypeForwardedTo(typeof(Debugging))]
[assembly: TypeForwardedTo(typeof(EditorHelpers))]
[assembly: TypeForwardedTo(typeof(FilterMode))]
[assembly: TypeForwardedTo(typeof(GPUCacheSetting))]
[assembly: TypeForwardedTo(typeof(Procedural))]
[assembly: TypeForwardedTo(typeof(Resolver))]
[assembly: TypeForwardedTo(typeof(Streaming))]
[assembly: TypeForwardedTo(typeof(System))]
[assembly: TypeForwardedTo(typeof(VisibleLight))]
[assembly: TypeForwardedTo(typeof(VisibleLightFlags))]
[assembly: TypeForwardedTo(typeof(VisibleReflectionProbe))]
[assembly: TypeForwardedTo(typeof(RenderingPath))]
[assembly: TypeForwardedTo(typeof(RenderMode))]
[assembly: TypeForwardedTo(typeof(RenderSettings))]
[assembly: TypeForwardedTo(typeof(RenderTargetSetup))]
[assembly: TypeForwardedTo(typeof(RenderTexture))]
[assembly: TypeForwardedTo(typeof(RenderTextureCreationFlags))]
[assembly: TypeForwardedTo(typeof(RenderTextureDescriptor))]
[assembly: TypeForwardedTo(typeof(RenderTextureFormat))]
[assembly: TypeForwardedTo(typeof(RenderTextureMemoryless))]
[assembly: TypeForwardedTo(typeof(RenderTextureReadWrite))]
[assembly: TypeForwardedTo(typeof(RequireComponent))]
[assembly: TypeForwardedTo(typeof(Resolution))]
[assembly: TypeForwardedTo(typeof(ResourceRequest))]
[assembly: TypeForwardedTo(typeof(Resources))]
[assembly: TypeForwardedTo(typeof(ResourcesAPI))]
[assembly: TypeForwardedTo(typeof(ResourcesAPIInternal))]
[assembly: TypeForwardedTo(typeof(Rigidbody))]
[assembly: TypeForwardedTo(typeof(Rigidbody2D))]
[assembly: TypeForwardedTo(typeof(RigidbodyConstraints))]
[assembly: TypeForwardedTo(typeof(RigidbodyConstraints2D))]
[assembly: TypeForwardedTo(typeof(RigidbodyInterpolation))]
[assembly: TypeForwardedTo(typeof(RigidbodyInterpolation2D))]
[assembly: TypeForwardedTo(typeof(RigidbodySleepMode2D))]
[assembly: TypeForwardedTo(typeof(RigidbodyType2D))]
[assembly: TypeForwardedTo(typeof(RotationDriveMode))]
[assembly: TypeForwardedTo(typeof(RotationOrder))]
[assembly: TypeForwardedTo(typeof(RuntimeAnimatorController))]
[assembly: TypeForwardedTo(typeof(RuntimeInitializeLoadType))]
[assembly: TypeForwardedTo(typeof(RuntimeInitializeOnLoadMethodAttribute))]
[assembly: TypeForwardedTo(typeof(RuntimePlatform))]
[assembly: TypeForwardedTo(typeof(ScalableBufferManager))]
[assembly: TypeForwardedTo(typeof(ScaleMode))]
[assembly: TypeForwardedTo(typeof(CreateSceneParameters))]
[assembly: TypeForwardedTo(typeof(LoadSceneMode))]
[assembly: TypeForwardedTo(typeof(LoadSceneParameters))]
[assembly: TypeForwardedTo(typeof(LocalPhysicsMode))]
[assembly: TypeForwardedTo(typeof(Scene))]
[assembly: TypeForwardedTo(typeof(SceneManager))]
[assembly: TypeForwardedTo(typeof(SceneManagerAPI))]
[assembly: TypeForwardedTo(typeof(SceneManagerAPIInternal))]
[assembly: TypeForwardedTo(typeof(SceneUtility))]
[assembly: TypeForwardedTo(typeof(UnloadSceneOptions))]
[assembly: TypeForwardedTo(typeof(Screen))]
[assembly: TypeForwardedTo(typeof(ScreenCapture))]
[assembly: TypeForwardedTo(typeof(ScreenOrientation))]
[assembly: TypeForwardedTo(typeof(ScriptableObject))]
[assembly: TypeForwardedTo(typeof(AlwaysLinkAssemblyAttribute))]
[assembly: TypeForwardedTo(typeof(MovedFromAttribute))]
[assembly: TypeForwardedTo(typeof(MovedFromAttributeData))]
[assembly: TypeForwardedTo(typeof(GarbageCollector))]
[assembly: TypeForwardedTo(typeof(PreserveAttribute))]
[assembly: TypeForwardedTo(typeof(RequireAttributeUsagesAttribute))]
[assembly: TypeForwardedTo(typeof(RequiredByNativeCodeAttribute))]
[assembly: TypeForwardedTo(typeof(RequireDerivedAttribute))]
[assembly: TypeForwardedTo(typeof(RequiredInterfaceAttribute))]
[assembly: TypeForwardedTo(typeof(RequiredMemberAttribute))]
[assembly: TypeForwardedTo(typeof(RequireImplementorsAttribute))]
[assembly: TypeForwardedTo(typeof(UsedByNativeCodeAttribute))]
[assembly: TypeForwardedTo(typeof(ScriptingRuntime))]
[assembly: TypeForwardedTo(typeof(ScriptingUtility))]
[assembly: TypeForwardedTo(typeof(ScrollViewState))]
[assembly: TypeForwardedTo(typeof(ScrollWaitDefinitions))]
[assembly: TypeForwardedTo(typeof(ObjectSelectorHandlerWithLabelsAttribute))]
[assembly: TypeForwardedTo(typeof(ObjectSelectorHandlerWithTagsAttribute))]
[assembly: TypeForwardedTo(typeof(SecondarySpriteTexture))]
[assembly: TypeForwardedTo(typeof(Security))]
[assembly: TypeForwardedTo(typeof(SelectionBaseAttribute))]
[assembly: TypeForwardedTo(typeof(SendMessageOptions))]
[assembly: TypeForwardedTo(typeof(SendMouseEvents))]
[assembly: TypeForwardedTo(typeof(DictionarySerializationSurrogate<, >))]
[assembly: TypeForwardedTo(typeof(FormerlySerializedAsAttribute))]
[assembly: TypeForwardedTo(typeof(ListSerializationSurrogate))]
[assembly: TypeForwardedTo(typeof(UnitySurrogateSelector))]
[assembly: TypeForwardedTo(typeof(SerializeField))]
[assembly: TypeForwardedTo(typeof(SerializeReference))]
[assembly: TypeForwardedTo(typeof(SetupCoroutine))]
[assembly: TypeForwardedTo(typeof(Shader))]
[assembly: TypeForwardedTo(typeof(ShaderVariantCollection))]
[assembly: TypeForwardedTo(typeof(ShadowmaskMode))]
[assembly: TypeForwardedTo(typeof(ShadowProjection))]
[assembly: TypeForwardedTo(typeof(ShadowQuality))]
[assembly: TypeForwardedTo(typeof(ShadowResolution))]
[assembly: TypeForwardedTo(typeof(SharedBetweenAnimatorsAttribute))]
[assembly: TypeForwardedTo(typeof(SimulationMode2D))]
[assembly: TypeForwardedTo(typeof(SkeletonBone))]
[assembly: TypeForwardedTo(typeof(SkinnedMeshRenderer))]
[assembly: TypeForwardedTo(typeof(SkinQuality))]
[assembly: TypeForwardedTo(typeof(SkinWeights))]
[assembly: TypeForwardedTo(typeof(Skybox))]
[assembly: TypeForwardedTo(typeof(SleepTimeout))]
[assembly: TypeForwardedTo(typeof(SliderHandler))]
[assembly: TypeForwardedTo(typeof(SliderJoint2D))]
[assembly: TypeForwardedTo(typeof(SliderState))]
[assembly: TypeForwardedTo(typeof(SnapAxis))]
[assembly: TypeForwardedTo(typeof(SnapAxisFilter))]
[assembly: TypeForwardedTo(typeof(Snapping))]
[assembly: TypeForwardedTo(typeof(Social))]
[assembly: TypeForwardedTo(typeof(ActivePlatform))]
[assembly: TypeForwardedTo(typeof(IAchievement))]
[assembly: TypeForwardedTo(typeof(IAchievementDescription))]
[assembly: TypeForwardedTo(typeof(ILeaderboard))]
[assembly: TypeForwardedTo(typeof(ILocalUser))]
[assembly: TypeForwardedTo(typeof(Achievement))]
[assembly: TypeForwardedTo(typeof(AchievementDescription))]
[assembly: TypeForwardedTo(typeof(Leaderboard))]
[assembly: TypeForwardedTo(typeof(LocalUser))]
[assembly: TypeForwardedTo(typeof(Score))]
[assembly: TypeForwardedTo(typeof(UserProfile))]
[assembly: TypeForwardedTo(typeof(IScore))]
[assembly: TypeForwardedTo(typeof(ISocialPlatform))]
[assembly: TypeForwardedTo(typeof(IUserProfile))]
[assembly: TypeForwardedTo(typeof(Local))]
[assembly: TypeForwardedTo(typeof(Range))]
[assembly: TypeForwardedTo(typeof(TimeScope))]
[assembly: TypeForwardedTo(typeof(UserScope))]
[assembly: TypeForwardedTo(typeof(UserState))]
[assembly: TypeForwardedTo(typeof(SoftJointLimit))]
[assembly: TypeForwardedTo(typeof(SoftJointLimitSpring))]
[assembly: TypeForwardedTo(typeof(SortingLayer))]
[assembly: TypeForwardedTo(typeof(Space))]
[assembly: TypeForwardedTo(typeof(SpaceAttribute))]
[assembly: TypeForwardedTo(typeof(SparseTexture))]
[assembly: TypeForwardedTo(typeof(SpeedTreeWindAsset))]
[assembly: TypeForwardedTo(typeof(SpherecastCommand))]
[assembly: TypeForwardedTo(typeof(SphereCollider))]
[assembly: TypeForwardedTo(typeof(SplatPrototype))]
[assembly: TypeForwardedTo(typeof(SpookyHash))]
[assembly: TypeForwardedTo(typeof(SpringJoint))]
[assembly: TypeForwardedTo(typeof(SpringJoint2D))]
[assembly: TypeForwardedTo(typeof(Sprite))]
[assembly: TypeForwardedTo(typeof(SpriteAlignment))]
[assembly: TypeForwardedTo(typeof(SpriteDrawMode))]
[assembly: TypeForwardedTo(typeof(SpriteMask))]
[assembly: TypeForwardedTo(typeof(SpriteMaskInteraction))]
[assembly: TypeForwardedTo(typeof(SpriteMeshType))]
[assembly: TypeForwardedTo(typeof(SpritePackingMode))]
[assembly: TypeForwardedTo(typeof(SpritePackingRotation))]
[assembly: TypeForwardedTo(typeof(SpriteRenderer))]
[assembly: TypeForwardedTo(typeof(DataUtility))]
[assembly: TypeForwardedTo(typeof(SpriteSortPoint))]
[assembly: TypeForwardedTo(typeof(SpriteTileMode))]
[assembly: TypeForwardedTo(typeof(StackTraceLogType))]
[assembly: TypeForwardedTo(typeof(StackTraceUtility))]
[assembly: TypeForwardedTo(typeof(StateInfoIndex))]
[assembly: TypeForwardedTo(typeof(StateMachineBehaviour))]
[assembly: TypeForwardedTo(typeof(StaticBatchingHelper))]
[assembly: TypeForwardedTo(typeof(StaticBatchingUtility))]
[assembly: TypeForwardedTo(typeof(StereoTargetEyeMask))]
[assembly: TypeForwardedTo(typeof(StreamingController))]
[assembly: TypeForwardedTo(typeof(Subsystem))]
[assembly: TypeForwardedTo(typeof(Subsystem<>))]
[assembly: TypeForwardedTo(typeof(SubsystemBindings))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptor))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptor<>))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptorBindings))]
[assembly: TypeForwardedTo(typeof(SubsystemManager))]
[assembly: TypeForwardedTo(typeof(ExampleSubsystem))]
[assembly: TypeForwardedTo(typeof(ExampleSubsystemDescriptor))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptorExtensions))]
[assembly: TypeForwardedTo(typeof(SubsystemExtensions))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptorStore))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptorWithProvider))]
[assembly: TypeForwardedTo(typeof(SubsystemDescriptorWithProvider<, >))]
[assembly: TypeForwardedTo(typeof(SubsystemProvider))]
[assembly: TypeForwardedTo(typeof(SubsystemProvider<>))]
[assembly: TypeForwardedTo(typeof(SubsystemProxy<, >))]
[assembly: TypeForwardedTo(typeof(SubsystemWithProvider))]
[assembly: TypeForwardedTo(typeof(SubsystemWithProvider<, , >))]
[assembly: TypeForwardedTo(typeof(SurfaceEffector2D))]
[assembly: TypeForwardedTo(typeof(SystemClock))]
[assembly: TypeForwardedTo(typeof(SystemInfo))]
[assembly: TypeForwardedTo(typeof(SystemLanguage))]
[assembly: TypeForwardedTo(typeof(TargetJoint2D))]
[assembly: TypeForwardedTo(typeof(Terrain))]
[assembly: TypeForwardedTo(typeof(TerrainChangedFlags))]
[assembly: TypeForwardedTo(typeof(TerrainCollider))]
[assembly: TypeForwardedTo(typeof(TerrainData))]
[assembly: TypeForwardedTo(typeof(TerrainExtensions))]
[assembly: TypeForwardedTo(typeof(TerrainHeightmapSyncControl))]
[assembly: TypeForwardedTo(typeof(TerrainLayer))]
[assembly: TypeForwardedTo(typeof(TerrainRenderFlags))]
[assembly: TypeForwardedTo(typeof(Coverage))]
[assembly: TypeForwardedTo(typeof(CoveredMethodStats))]
[assembly: TypeForwardedTo(typeof(CoveredSequencePoint))]
[assembly: TypeForwardedTo(typeof(ExcludeFromCoverageAttribute))]
[assembly: TypeForwardedTo(typeof(TexGenMode))]
[assembly: TypeForwardedTo(typeof(TextAlignment))]
[assembly: TypeForwardedTo(typeof(TextAnchor))]
[assembly: TypeForwardedTo(typeof(TextAreaAttribute))]
[assembly: TypeForwardedTo(typeof(TextAsset))]
[assembly: TypeForwardedTo(typeof(TextClipping))]
[assembly: TypeForwardedTo(typeof(Character))]
[assembly: TypeForwardedTo(typeof(ColorMode))]
[assembly: TypeForwardedTo(typeof(ColorUtilities))]
[assembly: TypeForwardedTo(typeof(Extents))]
[assembly: TypeForwardedTo(typeof(FaceInfo))]
[assembly: TypeForwardedTo(typeof(FontAsset))]
[assembly: TypeForwardedTo(typeof(FontAssetCreationSettings))]
[assembly: TypeForwardedTo(typeof(FontStyles))]
[assembly: TypeForwardedTo(typeof(FontStyleStack))]
[assembly: TypeForwardedTo(typeof(FontUtilities))]
[assembly: TypeForwardedTo(typeof(FontWeight))]
[assembly: TypeForwardedTo(typeof(FontWeights))]
[assembly: TypeForwardedTo(typeof(Glyph))]
[assembly: TypeForwardedTo(typeof(GlyphMetrics))]
[assembly: TypeForwardedTo(typeof(GlyphRect))]
[assembly: TypeForwardedTo(typeof(HorizontalAlignment))]
[assembly: TypeForwardedTo(typeof(KerningPair))]
[assembly: TypeForwardedTo(typeof(KerningPairKey))]
[assembly: TypeForwardedTo(typeof(KerningTable))]
[assembly: TypeForwardedTo(typeof(LineInfo))]
[assembly: TypeForwardedTo(typeof(LinkInfo))]
[assembly: TypeForwardedTo(typeof(FontEngine))]
[assembly: TypeForwardedTo(typeof(FontEngineError))]
[assembly: TypeForwardedTo(typeof(FontEngineUtilities))]
[assembly: TypeForwardedTo(typeof(FontFeatureLookupFlags))]
[assembly: TypeForwardedTo(typeof(FontReference))]
[assembly: TypeForwardedTo(typeof(GlyphAdjustmentRecord))]
[assembly: TypeForwardedTo(typeof(GlyphLoadFlags))]
[assembly: TypeForwardedTo(typeof(GlyphMarshallingStruct))]
[assembly: TypeForwardedTo(typeof(GlyphPackingMode))]
[assembly: TypeForwardedTo(typeof(GlyphPairAdjustmentRecord))]
[assembly: TypeForwardedTo(typeof(GlyphRasterModes))]
[assembly: TypeForwardedTo(typeof(GlyphRenderMode))]
[assembly: TypeForwardedTo(typeof(GlyphValueRecord))]
[assembly: TypeForwardedTo(typeof(OTFLayoutTableType))]
[assembly: TypeForwardedTo(typeof(OTFLookupTableType))]
[assembly: TypeForwardedTo(typeof(MaterialManager))]
[assembly: TypeForwardedTo(typeof(MaterialReference))]
[assembly: TypeForwardedTo(typeof(MaterialReferenceManager))]
[assembly: TypeForwardedTo(typeof(MeshExtents))]
[assembly: TypeForwardedTo(typeof(MeshInfo))]
[assembly: TypeForwardedTo(typeof(PageInfo))]
[assembly: TypeForwardedTo(typeof(RichTextTagAttribute))]
[assembly: TypeForwardedTo(typeof(RichTextTagStack<>))]
[assembly: TypeForwardedTo(typeof(ShaderUtilities))]
[assembly: TypeForwardedTo(typeof(SpriteCharacter))]
[assembly: TypeForwardedTo(typeof(SpriteGlyph))]
[assembly: TypeForwardedTo(typeof(TagHashCode))]
[assembly: TypeForwardedTo(typeof(TagUnitType))]
[assembly: TypeForwardedTo(typeof(TagValueType))]
[assembly: TypeForwardedTo(typeof(TextAlignment))]
[assembly: TypeForwardedTo(typeof(TextElement))]
[assembly: TypeForwardedTo(typeof(TextElementInfo))]
[assembly: TypeForwardedTo(typeof(TextElementType))]
[assembly: TypeForwardedTo(typeof(TextGenerationSettings))]
[assembly: TypeForwardedTo(typeof(TextGenerator))]
[assembly: TypeForwardedTo(typeof(TextGeneratorUtilities))]
[assembly: TypeForwardedTo(typeof(TextGradientPreset))]
[assembly: TypeForwardedTo(typeof(TextInfo))]
[assembly: TypeForwardedTo(typeof(TextOverflowMode))]
[assembly: TypeForwardedTo(typeof(TextSettings))]
[assembly: TypeForwardedTo(typeof(TextSpriteAsset))]
[assembly: TypeForwardedTo(typeof(TextStyle))]
[assembly: TypeForwardedTo(typeof(TextStyleSheet))]
[assembly: TypeForwardedTo(typeof(TextureMapping))]
[assembly: TypeForwardedTo(typeof(TextUtilities))]
[assembly: TypeForwardedTo(typeof(TextVertex))]
[assembly: TypeForwardedTo(typeof(Unicode))]
[assembly: TypeForwardedTo(typeof(VertexSortingOrder))]
[assembly: TypeForwardedTo(typeof(VerticalAlignment))]
[assembly: TypeForwardedTo(typeof(WordInfo))]
[assembly: TypeForwardedTo(typeof(WordWrapState))]
[assembly: TypeForwardedTo(typeof(XmlTagAttribute))]
[assembly: TypeForwardedTo(typeof(TextEditor))]
[assembly: TypeForwardedTo(typeof(TextGenerationError))]
[assembly: TypeForwardedTo(typeof(TextGenerationSettings))]
[assembly: TypeForwardedTo(typeof(TextGenerator))]
[assembly: TypeForwardedTo(typeof(TextMesh))]
[assembly: TypeForwardedTo(typeof(Texture))]
[assembly: TypeForwardedTo(typeof(Texture2D))]
[assembly: TypeForwardedTo(typeof(Texture2DArray))]
[assembly: TypeForwardedTo(typeof(Texture3D))]
[assembly: TypeForwardedTo(typeof(TextureFormat))]
[assembly: TypeForwardedTo(typeof(TextureWrapMode))]
[assembly: TypeForwardedTo(typeof(ThreadAndSerializationSafeAttribute))]
[assembly: TypeForwardedTo(typeof(ThreadPriority))]
[assembly: TypeForwardedTo(typeof(ITilemap))]
[assembly: TypeForwardedTo(typeof(Tile))]
[assembly: TypeForwardedTo(typeof(TileAnimationData))]
[assembly: TypeForwardedTo(typeof(TileBase))]
[assembly: TypeForwardedTo(typeof(TileData))]
[assembly: TypeForwardedTo(typeof(TileFlags))]
[assembly: TypeForwardedTo(typeof(Tilemap))]
[assembly: TypeForwardedTo(typeof(TilemapCollider2D))]
[assembly: TypeForwardedTo(typeof(TilemapRenderer))]
[assembly: TypeForwardedTo(typeof(Time))]
[assembly: TypeForwardedTo(typeof(TooltipAttribute))]
[assembly: TypeForwardedTo(typeof(Touch))]
[assembly: TypeForwardedTo(typeof(TouchPhase))]
[assembly: TypeForwardedTo(typeof(TouchScreenKeyboard))]
[assembly: TypeForwardedTo(typeof(TouchScreenKeyboard_InternalConstructorHelperArguments))]
[assembly: TypeForwardedTo(typeof(TouchScreenKeyboardType))]
[assembly: TypeForwardedTo(typeof(TouchType))]
[assembly: TypeForwardedTo(typeof(TrackedReference))]
[assembly: TypeForwardedTo(typeof(TrailRenderer))]
[assembly: TypeForwardedTo(typeof(Transform))]
[assembly: TypeForwardedTo(typeof(TransitionType))]
[assembly: TypeForwardedTo(typeof(TransparencySortMode))]
[assembly: TypeForwardedTo(typeof(Tree))]
[assembly: TypeForwardedTo(typeof(TreeInstance))]
[assembly: TypeForwardedTo(typeof(TreePrototype))]
[assembly: TypeForwardedTo(typeof(Types))]
[assembly: TypeForwardedTo(typeof(AngleRangeInfo))]
[assembly: TypeForwardedTo(typeof(PixelPerfectRendering))]
[assembly: TypeForwardedTo(typeof(ShapeControlPoint))]
[assembly: TypeForwardedTo(typeof(SpriteAtlas))]
[assembly: TypeForwardedTo(typeof(SpriteAtlasManager))]
[assembly: TypeForwardedTo(typeof(SpriteBone))]
[assembly: TypeForwardedTo(typeof(SpriteChannelInfo))]
[assembly: TypeForwardedTo(typeof(SpriteDataAccessExtensions))]
[assembly: TypeForwardedTo(typeof(SpriteRendererDataAccessExtensions))]
[assembly: TypeForwardedTo(typeof(SpriteShapeDataType))]
[assembly: TypeForwardedTo(typeof(SpriteShapeMetaData))]
[assembly: TypeForwardedTo(typeof(SpriteShapeParameters))]
[assembly: TypeForwardedTo(typeof(SpriteShapeRenderer))]
[assembly: TypeForwardedTo(typeof(SpriteShapeSegment))]
[assembly: TypeForwardedTo(typeof(SpriteShapeUtility))]
[assembly: TypeForwardedTo(typeof(UICharInfo))]
[assembly: TypeForwardedTo(typeof(AddressMode))]
[assembly: TypeForwardedTo(typeof(Align))]
[assembly: TypeForwardedTo(typeof(AlignmentUtils))]
[assembly: TypeForwardedTo(typeof(AlternatingRowBackground))]
[assembly: TypeForwardedTo(typeof(AttachToPanelEvent))]
[assembly: TypeForwardedTo(typeof(Background))]
[assembly: TypeForwardedTo(typeof(BaseField<>))]
[assembly: TypeForwardedTo(typeof(BaseFieldTraits<, >))]
[assembly: TypeForwardedTo(typeof(BaseRuntimePanel))]
[assembly: TypeForwardedTo(typeof(BaseSlider<>))]
[assembly: TypeForwardedTo(typeof(BaseVisualElementPanel))]
[assembly: TypeForwardedTo(typeof(BaseVisualTreeHierarchyTrackerUpdater))]
[assembly: TypeForwardedTo(typeof(BaseVisualTreeUpdater))]
[assembly: TypeForwardedTo(typeof(BindableElement))]
[assembly: TypeForwardedTo(typeof(BlurEvent))]
[assembly: TypeForwardedTo(typeof(Box))]
[assembly: TypeForwardedTo(typeof(Button))]
[assembly: TypeForwardedTo(typeof(CallbackEventHandler))]
[assembly: TypeForwardedTo(typeof(CallbackPhase))]
[assembly: TypeForwardedTo(typeof(ChangeEvent<>))]
[assembly: TypeForwardedTo(typeof(ClampedDragger<>))]
[assembly: TypeForwardedTo(typeof(Clickable))]
[assembly: TypeForwardedTo(typeof(ClickDetector))]
[assembly: TypeForwardedTo(typeof(ClickEvent))]
[assembly: TypeForwardedTo(typeof(CommandEventBase<>))]
[assembly: TypeForwardedTo(typeof(CommandEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(ComputedStyle))]
[assembly: TypeForwardedTo(typeof(ContextClickEvent))]
[assembly: TypeForwardedTo(typeof(ContextType))]
[assembly: TypeForwardedTo(typeof(ContextualMenuManager))]
[assembly: TypeForwardedTo(typeof(ContextualMenuManipulator))]
[assembly: TypeForwardedTo(typeof(ContextualMenuPopulateEvent))]
[assembly: TypeForwardedTo(typeof(CreationContext))]
[assembly: TypeForwardedTo(typeof(Cursor))]
[assembly: TypeForwardedTo(typeof(CursorManager))]
[assembly: TypeForwardedTo(typeof(CursorPositionStylePainterParameters))]
[assembly: TypeForwardedTo(typeof(CustomStyleProperty<>))]
[assembly: TypeForwardedTo(typeof(CustomStyleResolvedEvent))]
[assembly: TypeForwardedTo(typeof(DebuggerEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(DefaultDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(DefaultDragAndDropClient))]
[assembly: TypeForwardedTo(typeof(DetachFromPanelEvent))]
[assembly: TypeForwardedTo(typeof(DispatchMode))]
[assembly: TypeForwardedTo(typeof(DisplayStyle))]
[assembly: TypeForwardedTo(typeof(DisposeHelper))]
[assembly: TypeForwardedTo(typeof(DragAndDropEventBase<>))]
[assembly: TypeForwardedTo(typeof(DragAndDropPosition))]
[assembly: TypeForwardedTo(typeof(DragAndDropUtility))]
[assembly: TypeForwardedTo(typeof(DragEnterEvent))]
[assembly: TypeForwardedTo(typeof(DragEventsProcessor))]
[assembly: TypeForwardedTo(typeof(DragExitedEvent))]
[assembly: TypeForwardedTo(typeof(DragLeaveEvent))]
[assembly: TypeForwardedTo(typeof(DragPerformEvent))]
[assembly: TypeForwardedTo(typeof(DragUpdatedEvent))]
[assembly: TypeForwardedTo(typeof(DragVisualMode))]
[assembly: TypeForwardedTo(typeof(DropdownMenu))]
[assembly: TypeForwardedTo(typeof(DropdownMenuAction))]
[assembly: TypeForwardedTo(typeof(DropdownMenuEventInfo))]
[assembly: TypeForwardedTo(typeof(DropdownMenuItem))]
[assembly: TypeForwardedTo(typeof(DropdownMenuSeparator))]
[assembly: TypeForwardedTo(typeof(ElementUnderPointer))]
[assembly: TypeForwardedTo(typeof(EventBase))]
[assembly: TypeForwardedTo(typeof(EventBase<>))]
[assembly: TypeForwardedTo(typeof(EventCallback<>))]
[assembly: TypeForwardedTo(typeof(EventCallback<, >))]
[assembly: TypeForwardedTo(typeof(EventCallbackFunctor<>))]
[assembly: TypeForwardedTo(typeof(EventCallbackFunctor<, >))]
[assembly: TypeForwardedTo(typeof(EventCallbackFunctorBase))]
[assembly: TypeForwardedTo(typeof(EventCallbackList))]
[assembly: TypeForwardedTo(typeof(EventCallbackListPool))]
[assembly: TypeForwardedTo(typeof(EventCallbackRegistry))]
[assembly: TypeForwardedTo(typeof(EventDebugger))]
[assembly: TypeForwardedTo(typeof(EventDebuggerCallTrace))]
[assembly: TypeForwardedTo(typeof(EventDebuggerDefaultActionTrace))]
[assembly: TypeForwardedTo(typeof(EventDebuggerEventRecord))]
[assembly: TypeForwardedTo(typeof(EventDebuggerLogCall))]
[assembly: TypeForwardedTo(typeof(EventDebuggerLogExecuteDefaultAction))]
[assembly: TypeForwardedTo(typeof(EventDebuggerLogIMGUICall))]
[assembly: TypeForwardedTo(typeof(EventDebuggerPathTrace))]
[assembly: TypeForwardedTo(typeof(EventDebuggerTrace))]
[assembly: TypeForwardedTo(typeof(EventDispatcher))]
[assembly: TypeForwardedTo(typeof(EventDispatcherGate))]
[assembly: TypeForwardedTo(typeof(EventDispatchUtilities))]
[assembly: TypeForwardedTo(typeof(EventInterpreter))]
[assembly: TypeForwardedTo(typeof(ExecuteCommandEvent))]
[assembly: TypeForwardedTo(typeof(Easing))]
[assembly: TypeForwardedTo(typeof(ITransitionAnimations))]
[assembly: TypeForwardedTo(typeof(IValueAnimation))]
[assembly: TypeForwardedTo(typeof(IValueAnimationUpdate))]
[assembly: TypeForwardedTo(typeof(Lerp))]
[assembly: TypeForwardedTo(typeof(StyleValues))]
[assembly: TypeForwardedTo(typeof(ValueAnimation<>))]
[assembly: TypeForwardedTo(typeof(FlexDirection))]
[assembly: TypeForwardedTo(typeof(Focusable))]
[assembly: TypeForwardedTo(typeof(FocusChangeDirection))]
[assembly: TypeForwardedTo(typeof(FocusController))]
[assembly: TypeForwardedTo(typeof(FocusEvent))]
[assembly: TypeForwardedTo(typeof(FocusEventBase<>))]
[assembly: TypeForwardedTo(typeof(FocusInEvent))]
[assembly: TypeForwardedTo(typeof(FocusOutEvent))]
[assembly: TypeForwardedTo(typeof(Foldout))]
[assembly: TypeForwardedTo(typeof(GeometryChangedEvent))]
[assembly: TypeForwardedTo(typeof(GetViewDataDictionary))]
[assembly: TypeForwardedTo(typeof(GlobalCallbackRegistry))]
[assembly: TypeForwardedTo(typeof(GradientSettings))]
[assembly: TypeForwardedTo(typeof(GradientType))]
[assembly: TypeForwardedTo(typeof(HelpBox))]
[assembly: TypeForwardedTo(typeof(HelpBoxMessageType))]
[assembly: TypeForwardedTo(typeof(HierarchyChangeType))]
[assembly: TypeForwardedTo(typeof(HierarchyEvent))]
[assembly: TypeForwardedTo(typeof(IBindable))]
[assembly: TypeForwardedTo(typeof(IBinding))]
[assembly: TypeForwardedTo(typeof(IBindingExtensions))]
[assembly: TypeForwardedTo(typeof(IBindingRequest))]
[assembly: TypeForwardedTo(typeof(IChangeEvent))]
[assembly: TypeForwardedTo(typeof(ICommandEvent))]
[assembly: TypeForwardedTo(typeof(ICursorManager))]
[assembly: TypeForwardedTo(typeof(ICustomStyle))]
[assembly: TypeForwardedTo(typeof(IDataWatchHandle))]
[assembly: TypeForwardedTo(typeof(IDataWatchService))]
[assembly: TypeForwardedTo(typeof(IDragAndDrop))]
[assembly: TypeForwardedTo(typeof(IDragAndDropController<, >))]
[assembly: TypeForwardedTo(typeof(IDragAndDropData))]
[assembly: TypeForwardedTo(typeof(IDragAndDropEvent))]
[assembly: TypeForwardedTo(typeof(IEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(IEventHandler))]
[assembly: TypeForwardedTo(typeof(IEventInterpreter))]
[assembly: TypeForwardedTo(typeof(IExperimentalFeatures))]
[assembly: TypeForwardedTo(typeof(IFocusEvent))]
[assembly: TypeForwardedTo(typeof(IFocusRing))]
[assembly: TypeForwardedTo(typeof(IKeyboardEvent))]
[assembly: TypeForwardedTo(typeof(IListDragAndDropArgs))]
[assembly: TypeForwardedTo(typeof(IListViewDragAndDropController))]
[assembly: TypeForwardedTo(typeof(Image))]
[assembly: TypeForwardedTo(typeof(IManipulator))]
[assembly: TypeForwardedTo(typeof(IMGUIContainer))]
[assembly: TypeForwardedTo(typeof(IMGUIEvent))]
[assembly: TypeForwardedTo(typeof(IMGUIEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(ImmediateModeElement))]
[assembly: TypeForwardedTo(typeof(ImmediateModeException))]
[assembly: TypeForwardedTo(typeof(ImmediateStylePainter))]
[assembly: TypeForwardedTo(typeof(IMouseCaptureEvent))]
[assembly: TypeForwardedTo(typeof(IMouseEvent))]
[assembly: TypeForwardedTo(typeof(IMouseEventInternal))]
[assembly: TypeForwardedTo(typeof(InheritedData))]
[assembly: TypeForwardedTo(typeof(InlineStyleAccess))]
[assembly: TypeForwardedTo(typeof(INotifyValueChanged<>))]
[assembly: TypeForwardedTo(typeof(INotifyValueChangedExtensions))]
[assembly: TypeForwardedTo(typeof(InputEvent))]
[assembly: TypeForwardedTo(typeof(IPanel))]
[assembly: TypeForwardedTo(typeof(IPanelChangedEvent))]
[assembly: TypeForwardedTo(typeof(IPointerCaptureEvent))]
[assembly: TypeForwardedTo(typeof(IPointerEvent))]
[assembly: TypeForwardedTo(typeof(IPointerEventInternal))]
[assembly: TypeForwardedTo(typeof(IReorderable<>))]
[assembly: TypeForwardedTo(typeof(IResolvedStyle))]
[assembly: TypeForwardedTo(typeof(IRuntimePanel))]
[assembly: TypeForwardedTo(typeof(IScheduler))]
[assembly: TypeForwardedTo(typeof(ISerializableJsonDictionary))]
[assembly: TypeForwardedTo(typeof(IStyle))]
[assembly: TypeForwardedTo(typeof(IStylePainter))]
[assembly: TypeForwardedTo(typeof(IStyleValue<>))]
[assembly: TypeForwardedTo(typeof(ItemMoveArgs<>))]
[assembly: TypeForwardedTo(typeof(ITextElement))]
[assembly: TypeForwardedTo(typeof(ITextInputField))]
[assembly: TypeForwardedTo(typeof(ITransform))]
[assembly: TypeForwardedTo(typeof(ITreeViewItem))]
[assembly: TypeForwardedTo(typeof(IUIElementsUtility))]
[assembly: TypeForwardedTo(typeof(IUxmlAttributes))]
[assembly: TypeForwardedTo(typeof(IUxmlFactory))]
[assembly: TypeForwardedTo(typeof(IVisualElementPanelActivatable))]
[assembly: TypeForwardedTo(typeof(IVisualElementScheduledItem))]
[assembly: TypeForwardedTo(typeof(IVisualElementScheduler))]
[assembly: TypeForwardedTo(typeof(IVisualTreeUpdater))]
[assembly: TypeForwardedTo(typeof(Justify))]
[assembly: TypeForwardedTo(typeof(KeyboardEventBase<>))]
[assembly: TypeForwardedTo(typeof(KeyboardEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(KeyboardTextEditorEventHandler))]
[assembly: TypeForwardedTo(typeof(KeyDownEvent))]
[assembly: TypeForwardedTo(typeof(KeyUpEvent))]
[assembly: TypeForwardedTo(typeof(Label))]
[assembly: TypeForwardedTo(typeof(Length))]
[assembly: TypeForwardedTo(typeof(LengthUnit))]
[assembly: TypeForwardedTo(typeof(ListDragAndDropArgs))]
[assembly: TypeForwardedTo(typeof(ListView))]
[assembly: TypeForwardedTo(typeof(ListViewDragger))]
[assembly: TypeForwardedTo(typeof(ListViewDraggerExtension))]
[assembly: TypeForwardedTo(typeof(ListViewReorderableDragAndDropController))]
[assembly: TypeForwardedTo(typeof(LoadResourceFunction))]
[assembly: TypeForwardedTo(typeof(Manipulator))]
[assembly: TypeForwardedTo(typeof(ManipulatorActivationFilter))]
[assembly: TypeForwardedTo(typeof(MeshGenerationContext))]
[assembly: TypeForwardedTo(typeof(MeshGenerationContextUtils))]
[assembly: TypeForwardedTo(typeof(MeshWriteData))]
[assembly: TypeForwardedTo(typeof(MinMaxSlider))]
[assembly: TypeForwardedTo(typeof(MouseButton))]
[assembly: TypeForwardedTo(typeof(MouseCaptureController))]
[assembly: TypeForwardedTo(typeof(MouseCaptureDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(MouseCaptureEvent))]
[assembly: TypeForwardedTo(typeof(MouseCaptureEventBase<>))]
[assembly: TypeForwardedTo(typeof(MouseCaptureOutEvent))]
[assembly: TypeForwardedTo(typeof(MouseDownEvent))]
[assembly: TypeForwardedTo(typeof(MouseEnterEvent))]
[assembly: TypeForwardedTo(typeof(MouseEnterWindowEvent))]
[assembly: TypeForwardedTo(typeof(MouseEventBase<>))]
[assembly: TypeForwardedTo(typeof(MouseEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(MouseEventsHelper))]
[assembly: TypeForwardedTo(typeof(MouseLeaveEvent))]
[assembly: TypeForwardedTo(typeof(MouseLeaveWindowEvent))]
[assembly: TypeForwardedTo(typeof(MouseManipulator))]
[assembly: TypeForwardedTo(typeof(MouseMoveEvent))]
[assembly: TypeForwardedTo(typeof(MouseOutEvent))]
[assembly: TypeForwardedTo(typeof(MouseOverEvent))]
[assembly: TypeForwardedTo(typeof(MouseUpEvent))]
[assembly: TypeForwardedTo(typeof(NavigationDirection))]
[assembly: TypeForwardedTo(typeof(NonInheritedData))]
[assembly: TypeForwardedTo(typeof(ObjectListPool<>))]
[assembly: TypeForwardedTo(typeof(ObjectPool<>))]
[assembly: TypeForwardedTo(typeof(Overflow))]
[assembly: TypeForwardedTo(typeof(OverflowClipBox))]
[assembly: TypeForwardedTo(typeof(OverflowInternal))]
[assembly: TypeForwardedTo(typeof(Panel))]
[assembly: TypeForwardedTo(typeof(PanelChangedEventBase<>))]
[assembly: TypeForwardedTo(typeof(PanelClearFlags))]
[assembly: TypeForwardedTo(typeof(PickingMode))]
[assembly: TypeForwardedTo(typeof(PointerCancelEvent))]
[assembly: TypeForwardedTo(typeof(PointerCaptureDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(PointerCaptureEvent))]
[assembly: TypeForwardedTo(typeof(PointerCaptureEventBase<>))]
[assembly: TypeForwardedTo(typeof(PointerCaptureHelper))]
[assembly: TypeForwardedTo(typeof(PointerCaptureOutEvent))]
[assembly: TypeForwardedTo(typeof(PointerClickable))]
[assembly: TypeForwardedTo(typeof(PointerDeviceState))]
[assembly: TypeForwardedTo(typeof(PointerDispatchState))]
[assembly: TypeForwardedTo(typeof(PointerDownEvent))]
[assembly: TypeForwardedTo(typeof(PointerEnterEvent))]
[assembly: TypeForwardedTo(typeof(PointerEventBase<>))]
[assembly: TypeForwardedTo(typeof(PointerEventDispatchingStrategy))]
[assembly: TypeForwardedTo(typeof(PointerEventsHelper))]
[assembly: TypeForwardedTo(typeof(PointerId))]
[assembly: TypeForwardedTo(typeof(PointerLeaveEvent))]
[assembly: TypeForwardedTo(typeof(PointerManipulator))]
[assembly: TypeForwardedTo(typeof(PointerMoveEvent))]
[assembly: TypeForwardedTo(typeof(PointerOutEvent))]
[assembly: TypeForwardedTo(typeof(PointerOverEvent))]
[assembly: TypeForwardedTo(typeof(PointerStationaryEvent))]
[assembly: TypeForwardedTo(typeof(PointerType))]
[assembly: TypeForwardedTo(typeof(PointerUpEvent))]
[assembly: TypeForwardedTo(typeof(PopupWindow))]
[assembly: TypeForwardedTo(typeof(Position))]
[assembly: TypeForwardedTo(typeof(ProjectionUtils))]
[assembly: TypeForwardedTo(typeof(PropagationPaths))]
[assembly: TypeForwardedTo(typeof(PropagationPhase))]
[assembly: TypeForwardedTo(typeof(PseudoStates))]
[assembly: TypeForwardedTo(typeof(RenderHints))]
[assembly: TypeForwardedTo(typeof(RepaintData))]
[assembly: TypeForwardedTo(typeof(RepeatButton))]
[assembly: TypeForwardedTo(typeof(RuleMatcher))]
[assembly: TypeForwardedTo(typeof(SavePersistentViewData))]
[assembly: TypeForwardedTo(typeof(ScheduledItem))]
[assembly: TypeForwardedTo(typeof(Scroller))]
[assembly: TypeForwardedTo(typeof(ScrollView))]
[assembly: TypeForwardedTo(typeof(ScrollViewMode))]
[assembly: TypeForwardedTo(typeof(SelectionType))]
[assembly: TypeForwardedTo(typeof(Slider))]
[assembly: TypeForwardedTo(typeof(SliderDirection))]
[assembly: TypeForwardedTo(typeof(SliderInt))]
[assembly: TypeForwardedTo(typeof(Spacing))]
[assembly: TypeForwardedTo(typeof(StartDragArgs))]
[assembly: TypeForwardedTo(typeof(StringListPool))]
[assembly: TypeForwardedTo(typeof(StringUtils))]
[assembly: TypeForwardedTo(typeof(StringUtilsExtensions))]
[assembly: TypeForwardedTo(typeof(StyleBackground))]
[assembly: TypeForwardedTo(typeof(StyleCache))]
[assembly: TypeForwardedTo(typeof(StyleColor))]
[assembly: TypeForwardedTo(typeof(StyleComplexSelector))]
[assembly: TypeForwardedTo(typeof(StyleCursor))]
[assembly: TypeForwardedTo(typeof(StyleDebug))]
[assembly: TypeForwardedTo(typeof(StyleEnum<>))]
[assembly: TypeForwardedTo(typeof(StyleFloat))]
[assembly: TypeForwardedTo(typeof(StyleFont))]
[assembly: TypeForwardedTo(typeof(StyleInt))]
[assembl

ValheimVRM.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text.RegularExpressions;
using BepInEx;
using HarmonyLib;
using UniGLTF;
using UnityEngine;
using VRM;
using VRMShaders;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: AssemblyCompany("ValheimVRM")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.2.0.0")]
[assembly: AssemblyInformationalVersion("1.2.0.0")]
[assembly: AssemblyProduct("ValheimVRM")]
[assembly: AssemblyTitle("ValheimVRM")]
[assembly: AssemblyVersion("1.2.0.0")]
namespace ValheimVRM;

public static class AccessUtil
{
	public static Tout GetField<Tin, Tout>(this Tin self, string fieldName)
	{
		return AccessTools.FieldRefAccess<Tin, Tout>(fieldName).Invoke(self);
	}
}
[BepInPlugin("com.yoship1639.plugins.valheimvrm", "ValheimVRM", "1.2.0.0")]
[BepInProcess("valheim.exe")]
public class MainPlugin : BaseUnityPlugin
{
	public const string PluginGuid = "com.yoship1639.plugins.valheimvrm";

	public const string PluginName = "ValheimVRM";

	public const string PluginVersion = "1.2.0.0";

	private void Awake()
	{
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		new Harmony("com.yoship1639.plugins.valheimvrm.patch").PatchAll();
		VRMShaders.Initialize();
	}
}
public class MToonColorSync : MonoBehaviour
{
	private class MatColor
	{
		public Material mat;

		public Color color;

		public Color shadeColor;

		public Color emission;

		public bool hasColor;

		public bool hasShadeColor;

		public bool hasEmission;
	}

	private int _SunColor;

	private int _AmbientColor;

	private List<MatColor> matColors = new List<MatColor>();

	private void Awake()
	{
		_SunColor = Shader.PropertyToID("_SunColor");
		_AmbientColor = Shader.PropertyToID("_AmbientColor");
	}

	public void Setup(GameObject vrm)
	{
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
		matColors.Clear();
		SkinnedMeshRenderer[] componentsInChildren = vrm.GetComponentsInChildren<SkinnedMeshRenderer>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			Material[] materials = ((Renderer)componentsInChildren[i]).materials;
			foreach (Material mat in materials)
			{
				if (!matColors.Exists((MatColor m) => (Object)(object)m.mat == (Object)(object)mat))
				{
					matColors.Add(new MatColor
					{
						mat = mat,
						color = (mat.HasProperty("_Color") ? mat.GetColor("_Color") : Color.white),
						shadeColor = (mat.HasProperty("_ShadeColor") ? mat.GetColor("_ShadeColor") : Color.white),
						emission = (mat.HasProperty("_EmissionColor") ? mat.GetColor("_EmissionColor") : Color.black),
						hasColor = mat.HasProperty("_Color"),
						hasShadeColor = mat.HasProperty("_ShadeColor"),
						hasEmission = mat.HasProperty("_EmissionColor")
					});
				}
			}
		}
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0065: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_0087: Unknown result type (might be due to invalid IL or missing references)
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_0130: Unknown result type (might be due to invalid IL or missing references)
		Color globalColor = Shader.GetGlobalColor(_SunColor);
		Color globalColor2 = Shader.GetGlobalColor(_AmbientColor);
		Color val = globalColor + globalColor2;
		if (((Color)(ref val)).maxColorComponent > 0.7f)
		{
			val /= 0.3f + ((Color)(ref val)).maxColorComponent;
		}
		foreach (MatColor matColor in matColors)
		{
			Color val2 = matColor.color * val;
			val2.a = matColor.color.a;
			if (((Color)(ref val2)).maxColorComponent > 1f)
			{
				val2 /= ((Color)(ref val2)).maxColorComponent;
			}
			Color val3 = matColor.shadeColor * val;
			val3.a = matColor.shadeColor.a;
			if (((Color)(ref val3)).maxColorComponent > 1f)
			{
				val3 /= ((Color)(ref val3)).maxColorComponent;
			}
			Color val4 = matColor.emission * ((Color)(ref val)).grayscale;
			if (matColor.hasColor)
			{
				matColor.mat.SetColor("_Color", val2);
			}
			if (matColor.hasShadeColor)
			{
				matColor.mat.SetColor("_ShadeColor", val3);
			}
			if (matColor.hasEmission)
			{
				matColor.mat.SetColor("_EmissionColor", val4);
			}
		}
	}
}
internal static class Settings
{
	private static Dictionary<string, string[]> playerSettings = new Dictionary<string, string[]>();

	public static string ValheimVRMDir => Path.Combine(Environment.CurrentDirectory, "ValheimVRM");

	public static string PlayerSettingsPath(string playerName)
	{
		return Path.Combine(ValheimVRMDir, "settings_" + playerName + ".txt");
	}

	public static void AddSettings(string playerName, string[] settings)
	{
		playerSettings[playerName] = settings;
	}

	public static string[] GetSettings(string playerName)
	{
		if (!playerSettings.ContainsKey(playerName))
		{
			return null;
		}
		return playerSettings[playerName];
	}

	public static bool AddSettingsFromFile(string playerName)
	{
		string path = PlayerSettingsPath(playerName);
		if (File.Exists(path))
		{
			playerSettings[playerName] = File.ReadAllLines(path);
			return true;
		}
		return false;
	}

	public static bool ContainsSettings(string playerName)
	{
		return playerSettings.ContainsKey(playerName);
	}

	public static string ReadSettings(string playername, string key)
	{
		if (!playerSettings.ContainsKey(playername))
		{
			return null;
		}
		string text = null;
		try
		{
			string[] array = playerSettings[playername];
			foreach (string text2 in array)
			{
				try
				{
					if (text2.Length <= 1 || !(text2.Substring(0, 2) == "//"))
					{
						string[] array2 = text2.Split(new char[1] { '=' });
						if (array2.Length == 2 && array2[0] == key)
						{
							text = array2[1];
						}
					}
				}
				catch
				{
				}
			}
		}
		catch
		{
		}
		if (text == null)
		{
			Debug.LogWarning((object)("[ValheimVRM] 設定項目が見つかりません: " + key));
		}
		return text;
	}

	public static int ReadInt(string playername, string key, int defaultValue = 0, bool debugLog = true)
	{
		string s = ReadSettings(playername, key);
		int result = defaultValue;
		if (int.TryParse(s, NumberStyles.Integer, CultureInfo.InvariantCulture, out result))
		{
			if (debugLog)
			{
				Debug.Log((object)("[ValheimVRM] " + key + ": " + result));
			}
			return result;
		}
		return defaultValue;
	}

	public static float ReadFloat(string playername, string key, float defaultValue = 0f, bool debugLog = true)
	{
		string s = ReadSettings(playername, key);
		float result = defaultValue;
		if (float.TryParse(s, NumberStyles.Float, CultureInfo.InvariantCulture, out result))
		{
			if (debugLog)
			{
				Debug.Log((object)("[ValheimVRM] " + key + ": " + result));
			}
			return result;
		}
		return defaultValue;
	}

	public static bool ReadBool(string playername, string key, bool defaultValue = false, bool debugLog = true)
	{
		string value = ReadSettings(playername, key);
		bool result = defaultValue;
		if (bool.TryParse(value, out result))
		{
			if (debugLog)
			{
				Debug.Log((object)("[ValheimVRM] " + key + ": " + result));
			}
			return result;
		}
		return defaultValue;
	}

	public static Vector3 ReadVector3(string playername, string key, Vector3 defaultValue = default(Vector3), bool debugLog = true)
	{
		//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0094: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00be: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		string text = ReadSettings(playername, key);
		if (text == null)
		{
			return defaultValue;
		}
		Match match = new Regex("\\((?<x>[^,]*?),(?<y>[^,]*?),(?<z>[^,]*?)\\)").Match(text);
		if (!match.Success)
		{
			return defaultValue;
		}
		Vector3 val;
		try
		{
			val = default(Vector3);
			val.x = float.Parse(match.Groups["x"].Value);
			val.y = float.Parse(match.Groups["y"].Value);
			val.z = float.Parse(match.Groups["z"].Value);
			Vector3 val2 = val;
			if (debugLog)
			{
				val = val2;
				Debug.Log((object)("[ValheimVRM] " + key + ": " + ((object)(Vector3)(ref val)).ToString()));
			}
			val = val2;
		}
		catch (FormatException ex)
		{
			Debug.LogError((object)ex);
			val = defaultValue;
		}
		return val;
	}
}
[HarmonyPatch(typeof(Shader))]
[HarmonyPatch("Find")]
internal static class ShaderPatch
{
	private static bool Prefix(ref Shader __result, string name)
	{
		if (VRMShaders.Shaders.TryGetValue(name, out var value))
		{
			__result = value;
			return false;
		}
		return true;
	}
}
public static class VRMShaders
{
	public static Dictionary<string, Shader> Shaders { get; } = new Dictionary<string, Shader>();


	public static void Initialize()
	{
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "ValheimVRM.shaders");
		if (File.Exists(text))
		{
			Shader[] array = AssetBundle.LoadFromFile(text).LoadAllAssets<Shader>();
			foreach (Shader val in array)
			{
				Debug.Log((object)("[ValheimVRM] Add Shader: " + ((Object)val).name));
				Shaders.Add(((Object)val).name, val);
			}
		}
	}
}
public static class VRMModels
{
	public static Dictionary<string, byte[]> VrmBufDic = new Dictionary<string, byte[]>();

	public static Dictionary<Player, GameObject> PlayerToVrmDic = new Dictionary<Player, GameObject>();

	public static Dictionary<Player, string> PlayerToNameDic = new Dictionary<Player, string>();
}
[HarmonyPatch(typeof(VisEquipment), "UpdateLodgroup")]
internal static class Patch_VisEquipment_UpdateLodgroup
{
	[HarmonyPostfix]
	private static void Postfix(VisEquipment __instance)
	{
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_021f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0225: Unknown result type (might be due to invalid IL or missing references)
		//IL_022f: Unknown result type (might be due to invalid IL or missing references)
		//IL_025e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0264: Unknown result type (might be due to invalid IL or missing references)
		//IL_026e: Unknown result type (might be due to invalid IL or missing references)
		if (!__instance.m_isPlayer)
		{
			return;
		}
		Player component = ((Component)__instance).GetComponent<Player>();
		if ((Object)(object)component == (Object)null || !VRMModels.PlayerToVrmDic.ContainsKey(component))
		{
			return;
		}
		GameObject field = __instance.GetField<VisEquipment, GameObject>("m_hairItemInstance");
		if ((Object)(object)field != (Object)null)
		{
			SetVisible(field, flag: false);
		}
		GameObject field2 = __instance.GetField<VisEquipment, GameObject>("m_beardItemInstance");
		if ((Object)(object)field2 != (Object)null)
		{
			SetVisible(field2, flag: false);
		}
		List<GameObject> field3 = __instance.GetField<VisEquipment, List<GameObject>>("m_chestItemInstances");
		if (field3 != null)
		{
			foreach (GameObject item in field3)
			{
				SetVisible(item, flag: false);
			}
		}
		List<GameObject> field4 = __instance.GetField<VisEquipment, List<GameObject>>("m_legItemInstances");
		if (field4 != null)
		{
			foreach (GameObject item2 in field4)
			{
				SetVisible(item2, flag: false);
			}
		}
		List<GameObject> field5 = __instance.GetField<VisEquipment, List<GameObject>>("m_shoulderItemInstances");
		if (field5 != null)
		{
			foreach (GameObject item3 in field5)
			{
				SetVisible(item3, flag: false);
			}
		}
		List<GameObject> field6 = __instance.GetField<VisEquipment, List<GameObject>>("m_utilityItemInstances");
		if (field6 != null)
		{
			foreach (GameObject item4 in field6)
			{
				SetVisible(item4, flag: false);
			}
		}
		GameObject field7 = __instance.GetField<VisEquipment, GameObject>("m_helmetItemInstance");
		if ((Object)(object)field7 != (Object)null)
		{
			SetVisible(field7, flag: false);
		}
		string playername = VRMModels.PlayerToNameDic[component];
		GameObject field8 = __instance.GetField<VisEquipment, GameObject>("m_leftItemInstance");
		if ((Object)(object)field8 != (Object)null)
		{
			field8.transform.localPosition = Settings.ReadVector3(playername, "LeftHandEuqipPos", Vector3.zero);
		}
		GameObject field9 = __instance.GetField<VisEquipment, GameObject>("m_rightItemInstance");
		if ((Object)(object)field9 != (Object)null)
		{
			field9.transform.localPosition = Settings.ReadVector3(playername, "RightHandEuqipPos", Vector3.zero);
		}
		GameObject field10 = __instance.GetField<VisEquipment, GameObject>("m_rightBackItemInstance");
		if ((Object)(object)field10 != (Object)null)
		{
			field10.transform.localPosition = Settings.ReadVector3(playername, "RightHandBackItemPos", Vector3.zero) / 100f;
		}
		GameObject field11 = __instance.GetField<VisEquipment, GameObject>("m_leftBackItemInstance");
		if ((Object)(object)field11 != (Object)null)
		{
			field11.transform.localPosition = Settings.ReadVector3(playername, "LeftHandBackItemPos", Vector3.zero) / 100f;
		}
	}

	private static void SetVisible(GameObject obj, bool flag)
	{
		MeshRenderer[] componentsInChildren = obj.GetComponentsInChildren<MeshRenderer>();
		for (int i = 0; i < componentsInChildren.Length; i++)
		{
			((Renderer)componentsInChildren[i]).enabled = flag;
		}
		SkinnedMeshRenderer[] componentsInChildren2 = obj.GetComponentsInChildren<SkinnedMeshRenderer>();
		for (int i = 0; i < componentsInChildren2.Length; i++)
		{
			((Renderer)componentsInChildren2[i]).enabled = flag;
		}
	}
}
[HarmonyPatch(typeof(Humanoid), "OnRagdollCreated")]
internal static class Patch_Humanoid_OnRagdollCreated
{
	[HarmonyPostfix]
	private static void Postfix(Humanoid __instance, Ragdoll ragdoll)
	{
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Expected O, but got Unknown
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Expected O, but got Unknown
		if (((Character)__instance).IsPlayer())
		{
			SkinnedMeshRenderer[] componentsInChildren = ((Component)ragdoll).GetComponentsInChildren<SkinnedMeshRenderer>();
			foreach (SkinnedMeshRenderer obj in componentsInChildren)
			{
				((Renderer)obj).forceRenderingOff = true;
				obj.updateWhenOffscreen = true;
			}
			Animator val = ((Component)ragdoll).gameObject.AddComponent<Animator>();
			val.keepAnimatorControllerStateOnDisable = true;
			val.cullingMode = (AnimatorCullingMode)0;
			Animator field = AccessUtil.GetField<Player, Animator>((Player)__instance, "m_animator");
			val.avatar = field.avatar;
			if (VRMModels.PlayerToVrmDic.TryGetValue((Player)__instance, out var value))
			{
				value.transform.SetParent(((Component)ragdoll).transform);
				value.GetComponent<VRMAnimationSync>().Setup(val, isRagdoll: true);
			}
		}
	}
}
[HarmonyPatch(typeof(Character), "SetVisible")]
internal static class Patch_Character_SetVisible
{
	[HarmonyPostfix]
	private static void Postfix(Character __instance, bool visible)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_001b: Expected O, but got Unknown
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		if (__instance.IsPlayer() && VRMModels.PlayerToVrmDic.TryGetValue((Player)__instance, out var value))
		{
			LODGroup component = value.GetComponent<LODGroup>();
			if (visible)
			{
				component.localReferencePoint = __instance.GetField<Character, Vector3>("m_originalLocalRef");
			}
			else
			{
				component.localReferencePoint = new Vector3(999999f, 999999f, 999999f);
			}
		}
	}
}
[HarmonyPatch(typeof(Player), "OnDeath")]
internal static class Patch_Player_OnDeath
{
	[HarmonyPostfix]
	private static void Postfix(Player __instance)
	{
		string text = null;
		if (VRMModels.PlayerToNameDic.ContainsKey(__instance))
		{
			text = VRMModels.PlayerToNameDic[__instance];
		}
		if (text != null && Settings.ReadBool(text, "FixCameraHeight", defaultValue: true))
		{
			Object.Destroy((Object)(object)((Component)__instance).GetComponent<VRMEyePositionSync>());
		}
	}
}
[HarmonyPatch(typeof(Character), "GetHeadPoint")]
internal static class Patch_Character_GetHeadPoint
{
	[HarmonyPostfix]
	private static bool Prefix(Character __instance, ref Vector3 __result)
	{
		//IL_0049: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		Player val = (Player)(object)((__instance is Player) ? __instance : null);
		if ((Object)(object)val == (Object)null)
		{
			return true;
		}
		if (VRMModels.PlayerToVrmDic.TryGetValue(val, out var value))
		{
			Animator componentInChildren = value.GetComponentInChildren<Animator>();
			if ((Object)(object)componentInChildren == (Object)null)
			{
				return true;
			}
			Transform boneTransform = componentInChildren.GetBoneTransform((HumanBodyBones)10);
			if ((Object)(object)boneTransform == (Object)null)
			{
				return true;
			}
			__result = boneTransform.position;
			return false;
		}
		return true;
	}
}
[HarmonyPatch(typeof(Player), "Awake")]
internal static class Patch_Player_Awake
{
	private static Dictionary<string, GameObject> vrmDic = new Dictionary<string, GameObject>();

	[HarmonyPostfix]
	private static void Postfix(Player __instance)
	{
		//IL_05de: Unknown result type (might be due to invalid IL or missing references)
		//IL_075c: Unknown result type (might be due to invalid IL or missing references)
		//IL_025f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0264: Unknown result type (might be due to invalid IL or missing references)
		//IL_0294: Unknown result type (might be due to invalid IL or missing references)
		//IL_0309: Unknown result type (might be due to invalid IL or missing references)
		//IL_02fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_04f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_04d8: Unknown result type (might be due to invalid IL or missing references)
		//IL_030e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0353: Unknown result type (might be due to invalid IL or missing references)
		//IL_035a: Expected O, but got Unknown
		//IL_0420: Unknown result type (might be due to invalid IL or missing references)
		//IL_036c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0371: Unknown result type (might be due to invalid IL or missing references)
		//IL_0373: Unknown result type (might be due to invalid IL or missing references)
		//IL_0378: Unknown result type (might be due to invalid IL or missing references)
		//IL_037a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0398: Unknown result type (might be due to invalid IL or missing references)
		//IL_039d: Unknown result type (might be due to invalid IL or missing references)
		//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
		string text = null;
		if ((Object)(object)Game.instance != (Object)null)
		{
			text = __instance.GetPlayerName();
			if (text == "" || text == "...")
			{
				text = Game.instance.GetPlayerProfile().GetName();
			}
		}
		else
		{
			int field = FejdStartup.instance.GetField<FejdStartup, int>("m_profileIndex");
			List<PlayerProfile> field2 = FejdStartup.instance.GetField<FejdStartup, List<PlayerProfile>>("m_profiles");
			if (field >= 0 && field < field2.Count)
			{
				text = field2[field].GetName();
			}
		}
		SkinnedMeshRenderer[] componentsInChildren;
		if (!string.IsNullOrEmpty(text) && !vrmDic.ContainsKey(text))
		{
			string text2 = Path.Combine(Environment.CurrentDirectory, "ValheimVRM", text + ".vrm");
			_ = ref AccessTools.FieldRefAccess<Player, ZNetView>("m_nview").Invoke(__instance);
			if (!File.Exists(text2))
			{
				Debug.LogError((object)"[ValheimVRM] VRMファイルが見つかりません.");
				Debug.LogError((object)("[ValheimVRM] 読み込み予定だったVRMファイルパス: " + text2));
			}
			else
			{
				if (!Settings.ContainsSettings(text) && !Settings.AddSettingsFromFile(text))
				{
					Debug.LogWarning((object)("[ValheimVRM] 設定ファイルが見つかりません.以下の設定ファイルが存在するか確認してください: " + Settings.PlayerSettingsPath(text)));
				}
				float scale = Settings.ReadFloat(text, "ModelScale", 1.1f);
				GameObject val = ImportVRM(text2, scale);
				if ((Object)(object)val != (Object)null)
				{
					Object.DontDestroyOnLoad((Object)(object)val);
					vrmDic[text] = val;
					VRMModels.VrmBufDic[text] = File.ReadAllBytes(text2);
					float num = Settings.ReadFloat(text, "ModelBrightness", 0.8f);
					List<Material> list = new List<Material>();
					componentsInChildren = val.GetComponentsInChildren<SkinnedMeshRenderer>();
					for (int i = 0; i < componentsInChildren.Length; i++)
					{
						Material[] materials = ((Renderer)componentsInChildren[i]).materials;
						foreach (Material item in materials)
						{
							if (!list.Contains(item))
							{
								list.Add(item);
							}
						}
					}
					MeshRenderer[] componentsInChildren2 = val.GetComponentsInChildren<MeshRenderer>();
					for (int i = 0; i < componentsInChildren2.Length; i++)
					{
						Material[] materials = ((Renderer)componentsInChildren2[i]).materials;
						foreach (Material item2 in materials)
						{
							if (!list.Contains(item2))
							{
								list.Add(item2);
							}
						}
					}
					if (Settings.ReadBool(text, "UseMToonShader"))
					{
						foreach (Material item3 in list)
						{
							if (item3.HasProperty("_Color"))
							{
								Color color = item3.GetColor("_Color");
								color.r *= num;
								color.g *= num;
								color.b *= num;
								item3.SetColor("_Color", color);
							}
						}
					}
					else
					{
						Shader val2 = Shader.Find("Custom/Player");
						float num2 = default(float);
						float num3 = default(float);
						float num4 = default(float);
						foreach (Material item4 in list)
						{
							if ((Object)(object)item4.shader == (Object)(object)val2)
							{
								continue;
							}
							Color val3 = (item4.HasProperty("_Color") ? item4.GetColor("_Color") : Color.white);
							Texture2D val4 = (Texture2D)(item4.HasProperty("_MainTex") ? /*isinst with value type is only supported in some contexts*/: null);
							Texture2D val5 = val4;
							if ((Object)(object)val4 != (Object)null)
							{
								val5 = new Texture2D(((Texture)val4).width, ((Texture)val4).height);
								Color[] pixels = val4.GetPixels();
								for (int k = 0; k < pixels.Length; k++)
								{
									Color val6 = pixels[k] * val3;
									Color.RGBToHSV(val6, ref num2, ref num3, ref num4);
									num4 *= num;
									pixels[k] = Color.HSVToRGB(num2, num3, num4);
									pixels[k].a = val6.a;
								}
								val5.SetPixels(pixels);
								val5.Apply();
							}
							Texture val7 = (item4.HasProperty("_BumpMap") ? item4.GetTexture("_BumpMap") : null);
							item4.shader = val2;
							item4.SetTexture("_MainTex", (Texture)(object)val5);
							item4.SetTexture("_SkinBumpMap", val7);
							item4.SetColor("_SkinColor", val3);
							item4.SetTexture("_ChestTex", (Texture)(object)val5);
							item4.SetTexture("_ChestBumpMap", val7);
							item4.SetTexture("_LegsTex", (Texture)(object)val5);
							item4.SetTexture("_LegsBumpMap", val7);
							item4.SetFloat("_Glossiness", 0.2f);
							item4.SetFloat("_MetalGlossiness", 0f);
						}
					}
					LODGroup val8 = val.AddComponent<LODGroup>();
					Renderer[] componentsInChildren3 = (Renderer[])(object)val.GetComponentsInChildren<SkinnedMeshRenderer>();
					LOD val9 = default(LOD);
					((LOD)(ref val9))..ctor(0.1f, componentsInChildren3);
					if (Settings.ReadBool(text, "EnablePlayerFade", defaultValue: true))
					{
						val8.SetLODs((LOD[])(object)new LOD[1] { val9 });
					}
					val8.RecalculateBounds();
					LODGroup componentInChildren = ((Component)__instance).GetComponentInChildren<LODGroup>();
					val8.fadeMode = componentInChildren.fadeMode;
					val8.animateCrossFading = componentInChildren.animateCrossFading;
					val.SetActive(false);
				}
			}
		}
		if (string.IsNullOrEmpty(text) || !vrmDic.ContainsKey(text))
		{
			return;
		}
		GameObject val10 = Object.Instantiate<GameObject>(vrmDic[text]);
		VRMModels.PlayerToVrmDic[__instance] = val10;
		VRMModels.PlayerToNameDic[__instance] = text;
		val10.SetActive(true);
		val10.transform.SetParent(((Component)((Component)__instance).GetComponentInChildren<Animator>()).transform.parent, false);
		componentsInChildren = ((Character)__instance).GetVisual().GetComponentsInChildren<SkinnedMeshRenderer>();
		foreach (SkinnedMeshRenderer obj in componentsInChildren)
		{
			((Renderer)obj).forceRenderingOff = true;
			obj.updateWhenOffscreen = true;
		}
		Animator val11 = AccessTools.FieldRefAccess<Player, Animator>(__instance, "m_animator");
		val11.keepAnimatorControllerStateOnDisable = true;
		val11.cullingMode = (AnimatorCullingMode)0;
		val10.transform.localPosition = ((Component)val11).transform.localPosition;
		float offset = Settings.ReadFloat(text, "ModelOffsetY");
		if ((Object)(object)val10.GetComponent<VRMAnimationSync>() == (Object)null)
		{
			val10.AddComponent<VRMAnimationSync>().Setup(val11, isRagdoll: false, offset);
		}
		else
		{
			val10.GetComponent<VRMAnimationSync>().Setup(val11, isRagdoll: false, offset);
		}
		if (Settings.ReadBool(text, "FixCameraHeight", defaultValue: true))
		{
			Transform boneTransform = val10.GetComponent<Animator>().GetBoneTransform((HumanBodyBones)21);
			if ((Object)(object)boneTransform == (Object)null)
			{
				boneTransform = val10.GetComponent<Animator>().GetBoneTransform((HumanBodyBones)10);
			}
			if ((Object)(object)boneTransform == (Object)null)
			{
				boneTransform = val10.GetComponent<Animator>().GetBoneTransform((HumanBodyBones)9);
			}
			if ((Object)(object)boneTransform != (Object)null)
			{
				if ((Object)(object)((Component)__instance).gameObject.GetComponent<VRMEyePositionSync>() == (Object)null)
				{
					((Component)__instance).gameObject.AddComponent<VRMEyePositionSync>().Setup(boneTransform);
				}
				else
				{
					((Component)__instance).gameObject.GetComponent<VRMEyePositionSync>().Setup(boneTransform);
				}
			}
		}
		if (Settings.ReadBool(text, "UseMToonShader"))
		{
			if ((Object)(object)val10.GetComponent<MToonColorSync>() == (Object)null)
			{
				val10.AddComponent<MToonColorSync>().Setup(val10);
			}
			else
			{
				val10.GetComponent<MToonColorSync>().Setup(val10);
			}
		}
		float num5 = Settings.ReadFloat(text, "SpringBoneStiffness", 1f);
		float num6 = Settings.ReadFloat(text, "SpringBoneGravityPower", 1f);
		VRMSpringBone[] componentsInChildren4 = val10.GetComponentsInChildren<VRMSpringBone>();
		foreach (VRMSpringBone obj2 in componentsInChildren4)
		{
			obj2.m_stiffnessForce *= num5;
			obj2.m_gravityPower *= num6;
			obj2.m_updateType = (SpringBoneUpdateType)1;
			obj2.m_center = null;
		}
	}

	private static GameObject ImportVRM(string path, float scale)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0018: Expected O, but got Unknown
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		try
		{
			RuntimeGltfInstance obj = ImporterContextExtensions.Load((ImporterContext)new VRMImporterContext(new VRMData(new GlbFileParser(path).Parse()), (IReadOnlyDictionary<SubAssetKey, Object>)null, (ITextureDeserializer)null, (IMaterialDescriptorGenerator)null));
			obj.ShowMeshes();
			Transform transform = obj.Root.transform;
			transform.localScale *= scale;
			Debug.Log((object)"[ValheimVRM] VRM読み込み成功");
			Debug.Log((object)("[ValheimVRM] VRMファイルパス: " + path));
			return obj.Root;
		}
		catch (Exception ex)
		{
			Debug.LogError((object)ex);
		}
		return null;
	}
}
[DefaultExecutionOrder(int.MaxValue)]
public class VRMAnimationSync : MonoBehaviour
{
	private Animator orgAnim;

	private Animator vrmAnim;

	private HumanPoseHandler orgPose;

	private HumanPoseHandler vrmPose;

	private HumanPose hp;

	private bool ragdoll;

	private float offset;

	private static List<int> alreadyHashes = new List<int>();

	private static List<int> adjustHipHashes = new List<int> { -1536343465, 890925016, -1544306596, -1829310159, 337039637, -1603096, -496559199 };

	public void Setup(Animator orgAnim, bool isRagdoll = false, float offset = 0f)
	{
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		ragdoll = isRagdoll;
		this.offset = offset;
		this.orgAnim = orgAnim;
		vrmAnim = ((Component)this).GetComponent<Animator>();
		vrmAnim.applyRootMotion = true;
		vrmAnim.updateMode = orgAnim.updateMode;
		vrmAnim.feetPivotActive = orgAnim.feetPivotActive;
		vrmAnim.layersAffectMassCenter = orgAnim.layersAffectMassCenter;
		vrmAnim.stabilizeFeet = orgAnim.stabilizeFeet;
		PoseHandlerCreate(orgAnim, vrmAnim);
	}

	private void PoseHandlerCreate(Animator org, Animator vrm)
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Expected O, but got Unknown
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Expected O, but got Unknown
		OnDestroy();
		orgPose = new HumanPoseHandler(org.avatar, ((Component)org).transform);
		vrmPose = new HumanPoseHandler(vrm.avatar, ((Component)vrm).transform);
	}

	private void OnDestroy()
	{
		if (orgPose != null)
		{
			orgPose.Dispose();
		}
		if (vrmPose != null)
		{
			vrmPose.Dispose();
		}
	}

	private float CalcFootSub()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_002e: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_0056: Unknown result type (might be due to invalid IL or missing references)
		//IL_0057: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		Vector3 position = orgAnim.GetBoneTransform((HumanBodyBones)6).position;
		Vector3 position2 = orgAnim.GetBoneTransform((HumanBodyBones)5).position;
		Vector3 val = (position + position2) * 0.5f;
		Vector3 position3 = vrmAnim.GetBoneTransform((HumanBodyBones)6).position;
		Vector3 position4 = vrmAnim.GetBoneTransform((HumanBodyBones)5).position;
		Vector3 val2 = (position3 + position4) * 0.5f;
		return (val - val2).y;
	}

	private void Update()
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0079: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		((Component)vrmAnim).transform.localPosition = Vector3.zero;
		if (!ragdoll)
		{
			for (int i = 0; i < 55; i++)
			{
				Transform boneTransform = orgAnim.GetBoneTransform((HumanBodyBones)i);
				Transform boneTransform2 = vrmAnim.GetBoneTransform((HumanBodyBones)i);
				if (i > 0 && (Object)(object)boneTransform != (Object)null && (Object)(object)boneTransform2 != (Object)null)
				{
					if (i == 5 || i == 6)
					{
						boneTransform.position = boneTransform2.position;
					}
					else
					{
						boneTransform.position = boneTransform2.position + Vector3.up * offset;
					}
				}
			}
		}
		Transform transform = ((Component)vrmAnim).transform;
		transform.localPosition += Vector3.up * offset;
	}

	private void LateUpdate()
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0178: Unknown result type (might be due to invalid IL or missing references)
		//IL_017d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0131: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Unknown result type (might be due to invalid IL or missing references)
		//IL_0146: Unknown result type (might be due to invalid IL or missing references)
		((Component)vrmAnim).transform.localPosition = Vector3.zero;
		Vector3 position = orgAnim.GetBoneTransform((HumanBodyBones)0).position;
		orgPose.GetHumanPose(ref hp);
		vrmPose.SetHumanPose(ref hp);
		AnimatorStateInfo currentAnimatorStateInfo = orgAnim.GetCurrentAnimatorStateInfo(0);
		int shortNameHash = ((AnimatorStateInfo)(ref currentAnimatorStateInfo)).shortNameHash;
		bool num = adjustHipHashes.Contains(shortNameHash);
		Transform boneTransform = vrmAnim.GetBoneTransform((HumanBodyBones)0);
		if (num)
		{
			boneTransform.position = position;
		}
		float num2 = 0f;
		if (shortNameHash == 890925016 || shortNameHash == -1544306596 || shortNameHash == -1829310159)
		{
			num2 += 0.1f;
		}
		if (!num)
		{
			num2 = CalcFootSub();
		}
		Vector3 position2 = boneTransform.position;
		position2.y += num2;
		boneTransform.position = position2;
		if (!ragdoll)
		{
			for (int i = 0; i < 55; i++)
			{
				Transform boneTransform2 = orgAnim.GetBoneTransform((HumanBodyBones)i);
				Transform boneTransform3 = vrmAnim.GetBoneTransform((HumanBodyBones)i);
				if (i > 0 && (Object)(object)boneTransform2 != (Object)null && (Object)(object)boneTransform3 != (Object)null)
				{
					if (i == 5 || i == 6)
					{
						boneTransform2.position = boneTransform3.position;
					}
					else
					{
						boneTransform2.position = boneTransform3.position + Vector3.up * offset;
					}
				}
			}
		}
		Transform transform = ((Component)vrmAnim).transform;
		transform.localPosition += Vector3.up * offset;
	}
}
public class VRMEyePositionSync : MonoBehaviour
{
	private Transform vrmEye;

	private Transform orgEye;

	public void Setup(Transform vrmEye)
	{
		this.vrmEye = vrmEye;
		orgEye = ((Character)((Component)this).GetComponent<Player>()).m_eye;
	}

	private void Update()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		Vector3 position = orgEye.position;
		position.y = vrmEye.position.y;
		orgEye.position = position;
	}
}

VRM.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using MToon;
using Microsoft.CodeAnalysis;
using UniGLTF;
using UniGLTF.MeshUtility;
using UniGLTF.ShaderPropExporter;
using UniHumanoid;
using UniJSON;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;
using VRM.FastSpringBones.Blittables;
using VRM.FastSpringBones.Components;
using VRM.FastSpringBones.Registries;
using VRMShaders;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
}
namespace VRM
{
	[CreateAssetMenu(menuName = "VRM/BlendShapeAvatar")]
	public class BlendShapeAvatar : ScriptableObject
	{
		[SerializeField]
		public List<BlendShapeClip> Clips = new List<BlendShapeClip>();

		public void RemoveNullClip()
		{
			if (Clips == null)
			{
				return;
			}
			for (int num = Clips.Count - 1; num >= 0; num--)
			{
				if ((Object)(object)Clips[num] == (Object)null)
				{
					Clips.RemoveAt(num);
				}
			}
		}

		public void CreateDefaultPreset()
		{
			BlendShapePreset[] values = CacheEnum.GetValues<BlendShapePreset>();
			foreach (BlendShapePreset blendShapePreset in values)
			{
				if (blendShapePreset != 0)
				{
					CreateDefaultPreset(blendShapePreset);
				}
			}
		}

		private void CreateDefaultPreset(BlendShapePreset preset)
		{
			BlendShapeClip blendShapeClip = null;
			foreach (BlendShapeClip clip in Clips)
			{
				if (clip.Preset == preset)
				{
					blendShapeClip = clip;
					break;
				}
			}
			if (!((Object)(object)blendShapeClip != (Object)null))
			{
				blendShapeClip = ScriptableObject.CreateInstance<BlendShapeClip>();
				((Object)blendShapeClip).name = preset.ToString();
				blendShapeClip.BlendShapeName = preset.ToString();
				blendShapeClip.Preset = preset;
				Clips.Add(blendShapeClip);
			}
		}

		public void SetClip(BlendShapeKey key, BlendShapeClip clip)
		{
			int num = -1;
			try
			{
				num = Clips.FindIndex((BlendShapeClip x) => key.Match(x));
			}
			catch (Exception)
			{
			}
			if (num == -1)
			{
				Clips.Add(clip);
			}
			else
			{
				Clips[num] = clip;
			}
		}

		public BlendShapeClip GetClip(BlendShapeKey key)
		{
			if (Clips == null)
			{
				return null;
			}
			return Clips.FirstOrDefault((BlendShapeClip x) => key.Match(x));
		}

		public BlendShapeClip GetClip(BlendShapePreset preset)
		{
			return GetClip(BlendShapeKey.CreateFromPreset(preset));
		}

		public BlendShapeClip GetClip(string name)
		{
			return GetClip(BlendShapeKey.CreateUnknown(name));
		}
	}
	internal class BlendShapeBindingMerger
	{
		private class DictionaryKeyBlendShapeBindingComparer : IEqualityComparer<BlendShapeBinding>
		{
			public bool Equals(BlendShapeBinding x, BlendShapeBinding y)
			{
				if (x.RelativePath == y.RelativePath)
				{
					return x.Index == y.Index;
				}
				return false;
			}

			public int GetHashCode(BlendShapeBinding obj)
			{
				return obj.RelativePath.GetHashCode() + obj.Index;
			}
		}

		private static DictionaryKeyBlendShapeBindingComparer comparer = new DictionaryKeyBlendShapeBindingComparer();

		private Dictionary<BlendShapeBinding, float> m_blendShapeValueMap = new Dictionary<BlendShapeBinding, float>(comparer);

		private Dictionary<BlendShapeBinding, Action<float>> m_blendShapeSetterMap = new Dictionary<BlendShapeBinding, Action<float>>(comparer);

		public BlendShapeBindingMerger(Dictionary<BlendShapeKey, BlendShapeClip> clipMap, Transform root)
		{
			foreach (KeyValuePair<BlendShapeKey, BlendShapeClip> item in clipMap)
			{
				BlendShapeBinding[] values = item.Value.Values;
				for (int i = 0; i < values.Length; i++)
				{
					BlendShapeBinding binding = values[i];
					if (m_blendShapeSetterMap.ContainsKey(binding))
					{
						continue;
					}
					Transform val = root.Find(binding.RelativePath);
					SkinnedMeshRenderer target = null;
					if ((Object)(object)val != (Object)null)
					{
						target = ((Component)val).GetComponent<SkinnedMeshRenderer>();
					}
					if ((Object)(object)target != (Object)null)
					{
						if (binding.Index >= 0 && binding.Index < target.sharedMesh.blendShapeCount)
						{
							m_blendShapeSetterMap.Add(binding, delegate(float x)
							{
								target.SetBlendShapeWeight(binding.Index, x);
							});
						}
						else
						{
							Debug.LogWarningFormat("Invalid blendshape binding: {0}: {1}", new object[2]
							{
								((Object)target).name,
								binding
							});
						}
					}
					else
					{
						Debug.LogWarningFormat("SkinnedMeshRenderer: {0} not found", new object[1] { binding.RelativePath });
					}
				}
			}
		}

		public void ImmediatelySetValue(BlendShapeClip clip, float value)
		{
			BlendShapeBinding[] values = clip.Values;
			for (int i = 0; i < values.Length; i++)
			{
				BlendShapeBinding key = values[i];
				if (m_blendShapeSetterMap.TryGetValue(key, out var value2))
				{
					value2(key.Weight * value);
				}
			}
		}

		public void AccumulateValue(BlendShapeClip clip, float value)
		{
			BlendShapeBinding[] values = clip.Values;
			for (int i = 0; i < values.Length; i++)
			{
				BlendShapeBinding key = values[i];
				if (m_blendShapeValueMap.TryGetValue(key, out var value2))
				{
					float num = value2 + key.Weight * value;
					m_blendShapeValueMap[key] = Mathf.Clamp(num, 0f, 100f);
				}
				else
				{
					m_blendShapeValueMap[key] = key.Weight * value;
				}
			}
		}

		public void Apply()
		{
			foreach (KeyValuePair<BlendShapeBinding, float> item in m_blendShapeValueMap)
			{
				if (m_blendShapeSetterMap.TryGetValue(item.Key, out var value))
				{
					value(item.Value);
				}
			}
			m_blendShapeValueMap.Clear();
		}
	}
	[Serializable]
	public struct BlendShapeBinding : IEquatable<BlendShapeBinding>
	{
		public string RelativePath;

		public int Index;

		public float Weight;

		public override string ToString()
		{
			return $"{RelativePath}[{Index}]=>{Weight}";
		}

		public bool Equals(BlendShapeBinding other)
		{
			if (string.Equals(RelativePath, other.RelativePath) && Index == other.Index)
			{
				return Weight.Equals(other.Weight);
			}
			return false;
		}

		public override bool Equals(object obj)
		{
			if (obj == null)
			{
				return false;
			}
			if (obj is BlendShapeBinding)
			{
				return Equals((BlendShapeBinding)obj);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return (((((RelativePath != null) ? RelativePath.GetHashCode() : 0) * 397) ^ Index) * 397) ^ Weight.GetHashCode();
		}
	}
	[Serializable]
	public struct MaterialValueBinding : IEquatable<MaterialValueBinding>
	{
		public string MaterialName;

		public string ValueName;

		public Vector4 TargetValue;

		public Vector4 BaseValue;

		public bool Equals(MaterialValueBinding other)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			if (string.Equals(MaterialName, other.MaterialName) && string.Equals(ValueName, other.ValueName) && ((Vector4)(ref TargetValue)).Equals(other.TargetValue))
			{
				return ((Vector4)(ref BaseValue)).Equals(other.BaseValue);
			}
			return false;
		}

		public override bool Equals(object obj)
		{
			if (obj == null)
			{
				return false;
			}
			if (obj is MaterialValueBinding)
			{
				return Equals((MaterialValueBinding)obj);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return (((((((MaterialName != null) ? MaterialName.GetHashCode() : 0) * 397) ^ ((ValueName != null) ? ValueName.GetHashCode() : 0)) * 397) ^ ((object)(Vector4)(ref TargetValue)).GetHashCode()) * 397) ^ ((object)(Vector4)(ref BaseValue)).GetHashCode();
		}
	}
	[CreateAssetMenu(menuName = "VRM/BlendShapeClip")]
	public class BlendShapeClip : ScriptableObject
	{
		[SerializeField]
		public string BlendShapeName = "";

		[SerializeField]
		public BlendShapePreset Preset;

		[SerializeField]
		public BlendShapeBinding[] Values = new BlendShapeBinding[0];

		[SerializeField]
		public MaterialValueBinding[] MaterialValues = new MaterialValueBinding[0];

		[SerializeField]
		public bool IsBinary;

		public BlendShapeKey Key => BlendShapeKey.CreateFromClip(this);

		public void CopyFrom(BlendShapeClip src)
		{
			IsBinary = src.IsBinary;
			MaterialValues = src.MaterialValues.ToArray();
			Values = src.Values.ToArray();
			Preset = src.Preset;
			((Object)this).name = ((Object)src).name;
		}
	}
	[Obsolete("Use VRMBlendShapeProxy")]
	public class BlendShapeClipHandler
	{
		private BlendShapeClip m_clip;

		private SkinnedMeshRenderer[] m_renderers;

		[Obsolete("Use Clip")]
		public BlendShapeClip Cilp => Clip;

		public BlendShapeClip Clip => m_clip;

		public float LastValue { get; private set; }

		public BlendShapeClipHandler(BlendShapeClip clip, Transform transform)
		{
			m_clip = clip;
			if ((Object)(object)m_clip != (Object)null && m_clip.Values != null && (Object)(object)transform != (Object)null)
			{
				m_renderers = m_clip.Values.Select((BlendShapeBinding x) => ((Component)UnityExtensions.GetFromPath(transform, x.RelativePath)).GetComponent<SkinnedMeshRenderer>()).ToArray();
			}
		}

		public void Apply(float value)
		{
			LastValue = value;
			if ((Object)(object)m_clip == (Object)null || m_renderers == null)
			{
				return;
			}
			for (int i = 0; i < m_clip.Values.Length; i++)
			{
				BlendShapeBinding blendShapeBinding = m_clip.Values[i];
				SkinnedMeshRenderer val = m_renderers[i];
				if (blendShapeBinding.Index >= 0 && blendShapeBinding.Index < val.sharedMesh.blendShapeCount)
				{
					val.SetBlendShapeWeight(blendShapeBinding.Index, blendShapeBinding.Weight * value);
				}
			}
		}
	}
	[Serializable]
	public readonly struct BlendShapeKey : IEquatable<BlendShapeKey>, IComparable<BlendShapeKey>
	{
		private static readonly Dictionary<BlendShapePreset, string> PresetNameCacheDictionary = new Dictionary<BlendShapePreset, string>();

		private static readonly string UnknownPresetPrefix = "Unknown_";

		public readonly BlendShapePreset Preset;

		private readonly string m_id;

		public string Name { get; }

		private BlendShapeKey(string name, BlendShapePreset preset)
		{
			Preset = preset;
			if (Preset != 0)
			{
				if (PresetNameCacheDictionary.TryGetValue(Preset, out var value))
				{
					m_id = (Name = value);
					return;
				}
				m_id = (Name = Preset.ToString());
				PresetNameCacheDictionary.Add(Preset, Name);
			}
			else
			{
				Name = ((!string.IsNullOrEmpty(name)) ? name : "");
				m_id = UnknownPresetPrefix + Name;
			}
		}

		public static BlendShapeKey CreateFromPreset(BlendShapePreset preset)
		{
			return new BlendShapeKey("", preset);
		}

		public static BlendShapeKey CreateFromClip(BlendShapeClip clip)
		{
			if ((Object)(object)clip == (Object)null)
			{
				return default(BlendShapeKey);
			}
			return new BlendShapeKey(clip.BlendShapeName, clip.Preset);
		}

		public static BlendShapeKey CreateUnknown(string name)
		{
			return new BlendShapeKey(name, BlendShapePreset.Unknown);
		}

		public override string ToString()
		{
			return m_id.Replace(UnknownPresetPrefix, "");
		}

		public bool Equals(BlendShapeKey other)
		{
			return m_id == other.m_id;
		}

		public override bool Equals(object obj)
		{
			if (obj is BlendShapeKey)
			{
				return Equals((BlendShapeKey)obj);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return m_id.GetHashCode();
		}

		public bool Match(BlendShapeClip clip)
		{
			return Equals(CreateFromClip(clip));
		}

		public int CompareTo(BlendShapeKey other)
		{
			if (Preset != other.Preset)
			{
				return Preset - other.Preset;
			}
			return 0;
		}
	}
	public class BlendShapeMerger
	{
		private Dictionary<BlendShapeKey, BlendShapeClip> m_clipMap;

		private Dictionary<BlendShapeKey, float> m_valueMap;

		private BlendShapeBindingMerger m_blendShapeBindingMerger;

		private MaterialValueBindingMerger m_materialValueBindingMerger;

		public BlendShapeMerger(IEnumerable<BlendShapeClip> clips, Transform root)
		{
			m_clipMap = clips.ToDictionary((BlendShapeClip x) => BlendShapeKey.CreateFromClip(x), (BlendShapeClip x) => x);
			m_valueMap = new Dictionary<BlendShapeKey, float>();
			m_blendShapeBindingMerger = new BlendShapeBindingMerger(m_clipMap, root);
			m_materialValueBindingMerger = new MaterialValueBindingMerger(m_clipMap, root);
		}

		public void Apply()
		{
			m_blendShapeBindingMerger.Apply();
			m_materialValueBindingMerger.Apply();
		}

		public void SetValues(IEnumerable<KeyValuePair<BlendShapeKey, float>> values)
		{
			foreach (KeyValuePair<BlendShapeKey, float> value in values)
			{
				AccumulateValue(value.Key, value.Value);
			}
			Apply();
		}

		public void AccumulateValue(BlendShapeKey key, float value)
		{
			m_valueMap[key] = value;
			if (m_clipMap.TryGetValue(key, out var value2))
			{
				if (value2.IsBinary)
				{
					value = Mathf.Round(value);
				}
				m_blendShapeBindingMerger.AccumulateValue(value2, value);
				m_materialValueBindingMerger.AccumulateValue(value2, value);
			}
		}

		public void ImmediatelySetValue(BlendShapeKey key, float value)
		{
			m_valueMap[key] = value;
			if (m_clipMap.TryGetValue(key, out var value2))
			{
				if (value2.IsBinary)
				{
					value = Mathf.Round(value);
				}
				m_blendShapeBindingMerger.ImmediatelySetValue(value2, value);
				m_materialValueBindingMerger.ImmediatelySetValue(value2, value);
			}
		}

		public void SetValue(BlendShapeKey key, float value, bool immediately)
		{
			if (immediately)
			{
				ImmediatelySetValue(key, value);
			}
			else
			{
				AccumulateValue(key, value);
			}
		}

		public float GetValue(BlendShapeKey key)
		{
			if (!m_valueMap.TryGetValue(key, out var value))
			{
				return 0f;
			}
			return value;
		}

		public void RestoreMaterialInitialValues(IEnumerable<BlendShapeClip> clips)
		{
			m_materialValueBindingMerger.RestoreMaterialInitialValues(clips);
		}
	}
	public class Blinker : MonoBehaviour
	{
		private VRMBlendShapeProxy m_blendShapes;

		[FormerlySerializedAs("m_interVal")]
		[SerializeField]
		public float Interval = 5f;

		[FormerlySerializedAs("m_closingTime")]
		[SerializeField]
		public float ClosingTime = 0.06f;

		[FormerlySerializedAs("m_openingSeconds")]
		[SerializeField]
		public float OpeningSeconds = 0.03f;

		[FormerlySerializedAs("m_closeSeconds")]
		[SerializeField]
		public float CloseSeconds = 0.1f;

		private Coroutine m_coroutine;

		private float m_nextRequest;

		private bool m_request;

		public bool Request
		{
			get
			{
				return m_request;
			}
			set
			{
				if (!(Time.time < m_nextRequest))
				{
					m_request = value;
					m_nextRequest = Time.time + 1f;
				}
			}
		}

		private IEnumerator BlinkRoutine()
		{
			while (true)
			{
				float waitTime = Time.time + Random.value * Interval;
				while (waitTime > Time.time)
				{
					if (Request)
					{
						m_request = false;
						break;
					}
					yield return null;
				}
				float value2 = 0f;
				float closeSpeed = 1f / CloseSeconds;
				while (true)
				{
					value2 += Time.deltaTime * closeSpeed;
					if (value2 >= 1f)
					{
						break;
					}
					m_blendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), value2);
					yield return null;
				}
				m_blendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), 1f);
				yield return (object)new WaitForSeconds(ClosingTime);
				value2 = 1f;
				float openSpeed = 1f / OpeningSeconds;
				while (true)
				{
					value2 -= Time.deltaTime * openSpeed;
					if (value2 < 0f)
					{
						break;
					}
					m_blendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), value2);
					yield return null;
				}
				m_blendShapes.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(BlendShapePreset.Blink), 0f);
			}
		}

		private void OnEnable()
		{
			m_blendShapes = ((Component)this).GetComponent<VRMBlendShapeProxy>();
			m_coroutine = ((MonoBehaviour)this).StartCoroutine(BlinkRoutine());
		}

		private void OnDisable()
		{
			Debug.Log((object)"StopCoroutine");
			if (m_coroutine != null)
			{
				((MonoBehaviour)this).StopCoroutine(m_coroutine);
				m_coroutine = null;
			}
		}
	}
	internal class MaterialValueBindingMerger
	{
		[StructLayout(LayoutKind.Sequential, Size = 1)]
		private struct DictionaryKeyMaterialValueBindingComparer : IEqualityComparer<MaterialValueBinding>
		{
			public bool Equals(MaterialValueBinding x, MaterialValueBinding y)
			{
				//IL_0001: Unknown result type (might be due to invalid IL or missing references)
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_0014: Unknown result type (might be due to invalid IL or missing references)
				//IL_001a: Unknown result type (might be due to invalid IL or missing references)
				if (x.TargetValue == y.TargetValue && x.BaseValue == y.BaseValue && x.MaterialName == y.MaterialName)
				{
					return x.ValueName == y.ValueName;
				}
				return false;
			}

			public int GetHashCode(MaterialValueBinding obj)
			{
				return obj.GetHashCode();
			}
		}

		private delegate void Setter(float value, bool firstValue);

		private struct MaterialTarget : IEquatable<MaterialTarget>
		{
			public string MaterialName;

			public string ValueName;

			public bool Equals(MaterialTarget other)
			{
				if (MaterialName == other.MaterialName)
				{
					return ValueName == other.ValueName;
				}
				return false;
			}

			public override bool Equals(object obj)
			{
				if (obj is MaterialTarget)
				{
					return Equals((MaterialTarget)obj);
				}
				return false;
			}

			public override int GetHashCode()
			{
				if (MaterialName == null || ValueName == null)
				{
					return 0;
				}
				return MaterialName.GetHashCode() + ValueName.GetHashCode();
			}

			public static MaterialTarget Create(MaterialValueBinding binding)
			{
				MaterialTarget result = default(MaterialTarget);
				result.MaterialName = binding.MaterialName;
				result.ValueName = binding.ValueName;
				return result;
			}
		}

		private static DictionaryKeyMaterialValueBindingComparer comparer;

		private Dictionary<string, Material> m_materialMap = new Dictionary<string, Material>();

		private Dictionary<MaterialValueBinding, float> m_materialValueMap = new Dictionary<MaterialValueBinding, float>(comparer);

		private Dictionary<MaterialValueBinding, Setter> m_materialSetterMap = new Dictionary<MaterialValueBinding, Setter>(comparer);

		private HashSet<MaterialTarget> m_used = new HashSet<MaterialTarget>();

		public MaterialValueBindingMerger(Dictionary<BlendShapeKey, BlendShapeClip> clipMap, Transform root)
		{
			foreach (Transform item in UnityExtensions.Traverse(root))
			{
				Renderer component = ((Component)item).GetComponent<Renderer>();
				if (!((Object)(object)component != (Object)null))
				{
					continue;
				}
				foreach (Material item2 in component.sharedMaterials.Where((Material y) => (Object)(object)y != (Object)null))
				{
					if (!string.IsNullOrEmpty(((Object)item2).name) && !m_materialMap.ContainsKey(((Object)item2).name))
					{
						m_materialMap.Add(((Object)item2).name, item2);
					}
				}
			}
			foreach (KeyValuePair<BlendShapeKey, BlendShapeClip> item3 in clipMap)
			{
				MaterialValueBinding[] materialValues = item3.Value.MaterialValues;
				for (int i = 0; i < materialValues.Length; i++)
				{
					MaterialValueBinding binding = materialValues[i];
					if (m_materialSetterMap.ContainsKey(binding))
					{
						continue;
					}
					if (m_materialMap.TryGetValue(binding.MaterialName, out var target))
					{
						if (binding.ValueName.EndsWith("_ST_S"))
						{
							string valueName2 = binding.ValueName.Substring(0, binding.ValueName.Length - 2);
							Setter value2 = delegate(float value, bool firstValue)
							{
								//IL_0056: Unknown result type (might be due to invalid IL or missing references)
								//IL_0066: Unknown result type (might be due to invalid IL or missing references)
								//IL_0076: Unknown result type (might be due to invalid IL or missing references)
								//IL_007b: Unknown result type (might be due to invalid IL or missing references)
								//IL_0081: Unknown result type (might be due to invalid IL or missing references)
								//IL_0086: Unknown result type (might be due to invalid IL or missing references)
								//IL_0014: Unknown result type (might be due to invalid IL or missing references)
								//IL_0024: Unknown result type (might be due to invalid IL or missing references)
								//IL_0034: Unknown result type (might be due to invalid IL or missing references)
								//IL_0039: Unknown result type (might be due to invalid IL or missing references)
								//IL_003f: Unknown result type (might be due to invalid IL or missing references)
								//IL_0044: Unknown result type (might be due to invalid IL or missing references)
								//IL_008b: Unknown result type (might be due to invalid IL or missing references)
								//IL_009d: Unknown result type (might be due to invalid IL or missing references)
								//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
								//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
								//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
								//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
								Vector4 val3 = (firstValue ? (binding.BaseValue + (binding.TargetValue - binding.BaseValue) * value) : (target.GetVector(valueName2) + (binding.TargetValue - binding.BaseValue) * value));
								Vector4 vector2 = target.GetVector(valueName2);
								vector2.x = val3.x;
								vector2.z = val3.z;
								target.SetVector(valueName2, vector2);
							};
							m_materialSetterMap.Add(binding, value2);
						}
						else if (binding.ValueName.EndsWith("_ST_T"))
						{
							string valueName = binding.ValueName.Substring(0, binding.ValueName.Length - 2);
							Setter value3 = delegate(float value, bool firstValue)
							{
								//IL_0056: Unknown result type (might be due to invalid IL or missing references)
								//IL_0066: Unknown result type (might be due to invalid IL or missing references)
								//IL_0076: Unknown result type (might be due to invalid IL or missing references)
								//IL_007b: Unknown result type (might be due to invalid IL or missing references)
								//IL_0081: Unknown result type (might be due to invalid IL or missing references)
								//IL_0086: Unknown result type (might be due to invalid IL or missing references)
								//IL_0014: Unknown result type (might be due to invalid IL or missing references)
								//IL_0024: Unknown result type (might be due to invalid IL or missing references)
								//IL_0034: Unknown result type (might be due to invalid IL or missing references)
								//IL_0039: Unknown result type (might be due to invalid IL or missing references)
								//IL_003f: Unknown result type (might be due to invalid IL or missing references)
								//IL_0044: Unknown result type (might be due to invalid IL or missing references)
								//IL_008b: Unknown result type (might be due to invalid IL or missing references)
								//IL_009d: Unknown result type (might be due to invalid IL or missing references)
								//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
								//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
								//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
								//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
								Vector4 val2 = (firstValue ? (binding.BaseValue + (binding.TargetValue - binding.BaseValue) * value) : (target.GetVector(valueName) + (binding.TargetValue - binding.BaseValue) * value));
								Vector4 vector = target.GetVector(valueName);
								vector.y = val2.y;
								vector.w = val2.w;
								target.SetVector(valueName, vector);
							};
							m_materialSetterMap.Add(binding, value3);
						}
						else
						{
							Setter value4 = delegate(float value, bool firstValue)
							{
								//IL_0047: Unknown result type (might be due to invalid IL or missing references)
								//IL_0052: Unknown result type (might be due to invalid IL or missing references)
								//IL_005d: Unknown result type (might be due to invalid IL or missing references)
								//IL_0062: Unknown result type (might be due to invalid IL or missing references)
								//IL_0068: Unknown result type (might be due to invalid IL or missing references)
								//IL_006d: Unknown result type (might be due to invalid IL or missing references)
								//IL_0014: Unknown result type (might be due to invalid IL or missing references)
								//IL_001f: Unknown result type (might be due to invalid IL or missing references)
								//IL_002a: Unknown result type (might be due to invalid IL or missing references)
								//IL_002f: Unknown result type (might be due to invalid IL or missing references)
								//IL_0035: Unknown result type (might be due to invalid IL or missing references)
								//IL_003a: Unknown result type (might be due to invalid IL or missing references)
								//IL_0072: Unknown result type (might be due to invalid IL or missing references)
								//IL_0084: Unknown result type (might be due to invalid IL or missing references)
								//IL_0085: Unknown result type (might be due to invalid IL or missing references)
								Vector4 val = (firstValue ? (binding.BaseValue + (binding.TargetValue - binding.BaseValue) * value) : (target.GetVector(binding.ValueName) + (binding.TargetValue - binding.BaseValue) * value));
								target.SetColor(binding.ValueName, Color.op_Implicit(val));
							};
							m_materialSetterMap.Add(binding, value4);
						}
					}
					else
					{
						Debug.LogWarningFormat("material: {0} not found", new object[1] { binding.MaterialName });
					}
				}
			}
		}

		public void RestoreMaterialInitialValues(IEnumerable<BlendShapeClip> clips)
		{
			if (m_materialMap == null)
			{
				return;
			}
			foreach (BlendShapeClip clip in clips)
			{
				MaterialValueBinding[] materialValues = clip.MaterialValues;
				for (int i = 0; i < materialValues.Length; i++)
				{
					MaterialValueBinding materialValueBinding = materialValues[i];
					if (m_materialMap.TryGetValue(materialValueBinding.MaterialName, out var _))
					{
						string valueName = materialValueBinding.ValueName;
						if (valueName.EndsWith("_ST_S") || valueName.EndsWith("_ST_T"))
						{
							valueName = valueName.Substring(0, valueName.Length - 2);
						}
					}
					else
					{
						Debug.LogWarningFormat("{0} not found", new object[1] { materialValueBinding.MaterialName });
					}
				}
			}
		}

		public void ImmediatelySetValue(BlendShapeClip clip, float value)
		{
			MaterialValueBinding[] materialValues = clip.MaterialValues;
			foreach (MaterialValueBinding key in materialValues)
			{
				if (m_materialSetterMap.TryGetValue(key, out var value2))
				{
					value2(value, firstValue: true);
				}
			}
		}

		public void AccumulateValue(BlendShapeClip clip, float value)
		{
			MaterialValueBinding[] materialValues = clip.MaterialValues;
			foreach (MaterialValueBinding key in materialValues)
			{
				if (m_materialValueMap.TryGetValue(key, out var value2))
				{
					m_materialValueMap[key] = value2 + value;
				}
				else
				{
					m_materialValueMap[key] = value;
				}
			}
		}

		public void Apply()
		{
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009a: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
			m_used.Clear();
			foreach (KeyValuePair<MaterialValueBinding, float> item2 in m_materialValueMap)
			{
				MaterialTarget item = MaterialTarget.Create(item2.Key);
				if (!m_used.Contains(item))
				{
					if (m_materialMap.TryGetValue(item.MaterialName, out var value))
					{
						Vector4 baseValue = item2.Key.BaseValue;
						string text = item.ValueName;
						if (text.EndsWith("_ST_S"))
						{
							text = text.Substring(0, text.Length - 2);
							Vector4 vector = value.GetVector(text);
							baseValue.y = vector.y;
							baseValue.w = vector.w;
						}
						else if (text.EndsWith("_ST_T"))
						{
							text = text.Substring(0, text.Length - 2);
							Vector4 vector2 = value.GetVector(text);
							baseValue.x = vector2.x;
							baseValue.z = vector2.z;
						}
						value.SetColor(text, Color.op_Implicit(baseValue));
					}
					m_used.Add(item);
				}
				if (m_materialSetterMap.TryGetValue(item2.Key, out var value2))
				{
					value2(item2.Value, firstValue: false);
				}
			}
			m_materialValueMap.Clear();
		}
	}
	[Serializable]
	public class MaterialItem
	{
		public Material Material { get; private set; }

		public static MaterialItem Create(Material material)
		{
			return new MaterialItem
			{
				Material = material
			};
		}
	}
	[Serializable]
	public class MeshPreviewItem
	{
		private Transform m_transform;

		public string Path { get; private set; }

		public SkinnedMeshRenderer SkinnedMeshRenderer { get; private set; }

		public Mesh Mesh { get; private set; }

		public string[] BlendShapeNames { get; private set; }

		public int BlendShapeCount => BlendShapeNames.Length;

		public Material[] Materials { get; private set; }

		public Vector3 Position => m_transform.position;

		public Quaternion Rotation => m_transform.rotation;

		private MeshPreviewItem(string path, Transform transform, Material[] materials)
		{
			Path = path;
			m_transform = transform;
			Materials = materials;
		}

		public void Bake(IEnumerable<BlendShapeBinding> values, float weight)
		{
			if ((Object)(object)SkinnedMeshRenderer == (Object)null)
			{
				return;
			}
			if (values != null)
			{
				for (int i = 0; i < BlendShapeCount; i++)
				{
					SkinnedMeshRenderer.SetBlendShapeWeight(i, 0f);
				}
				foreach (BlendShapeBinding value in values)
				{
					if (value.RelativePath == Path)
					{
						if (value.Index >= 0 && value.Index < SkinnedMeshRenderer.sharedMesh.blendShapeCount)
						{
							SkinnedMeshRenderer.SetBlendShapeWeight(value.Index, value.Weight * weight);
							continue;
						}
						Debug.LogWarningFormat("Out of range {0}: 0 <= {1} < {2}", new object[3]
						{
							((Object)SkinnedMeshRenderer).name,
							value.Index,
							SkinnedMeshRenderer.sharedMesh.blendShapeCount
						});
					}
				}
			}
			SkinnedMeshRenderer.BakeMesh(Mesh);
		}

		public static MeshPreviewItem Create(Transform t, Transform root, Func<Material, Material> getOrCreateMaterial)
		{
			//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00eb: Expected O, but got Unknown
			MeshFilter component = ((Component)t).GetComponent<MeshFilter>();
			MeshRenderer component2 = ((Component)t).GetComponent<MeshRenderer>();
			SkinnedMeshRenderer component3 = ((Component)t).GetComponent<SkinnedMeshRenderer>();
			if ((Object)(object)component != (Object)null && (Object)(object)component2 != (Object)null)
			{
				((Renderer)component2).sharedMaterials = ((Renderer)component2).sharedMaterials.Select((Material x) => getOrCreateMaterial(x)).ToArray();
				return new MeshPreviewItem(UnityExtensions.RelativePathFrom(t, root), t, ((Renderer)component2).sharedMaterials)
				{
					Mesh = component.sharedMesh
				};
			}
			if ((Object)(object)component3 != (Object)null)
			{
				((Renderer)component3).sharedMaterials = ((Renderer)component3).sharedMaterials.Select((Material x) => getOrCreateMaterial(x)).ToArray();
				if (component3.sharedMesh.blendShapeCount > 0)
				{
					Mesh sharedMesh = component3.sharedMesh;
					return new MeshPreviewItem(UnityExtensions.RelativePathFrom(t, root), t, ((Renderer)component3).sharedMaterials)
					{
						SkinnedMeshRenderer = component3,
						Mesh = new Mesh(),
						BlendShapeNames = (from x in Enumerable.Range(0, sharedMesh.blendShapeCount)
							select sharedMesh.GetBlendShapeName(x)).ToArray()
					};
				}
				return new MeshPreviewItem(UnityExtensions.RelativePathFrom(t, root), t, ((Renderer)component3).sharedMaterials)
				{
					Mesh = component3.sharedMesh
				};
			}
			return null;
		}
	}
	public class PreviewSceneManager : MonoBehaviour
	{
		public GameObject Prefab;

		private MeshPreviewItem[] m_meshes;

		private MeshPreviewItem[] m_blendShapeMeshes;

		private Dictionary<string, MaterialItem> m_materialMap = new Dictionary<string, MaterialItem>();

		private string[] m_rendererPathList;

		private string[] m_skinnedMeshRendererPathList;

		public Transform m_target;

		public IEnumerable<MeshPreviewItem> EnumRenderItems
		{
			get
			{
				if (m_meshes != null)
				{
					MeshPreviewItem[] meshes = m_meshes;
					for (int i = 0; i < meshes.Length; i++)
					{
						yield return meshes[i];
					}
				}
			}
		}

		public string[] MaterialNames { get; private set; }

		public string[] RendererPathList => m_rendererPathList;

		public string[] SkinnedMeshRendererPathList => m_skinnedMeshRendererPathList;

		public Vector3 TargetPosition
		{
			get
			{
				//IL_0029: Unknown result type (might be due to invalid IL or missing references)
				//IL_003d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0042: Unknown result type (might be due to invalid IL or missing references)
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				if ((Object)(object)m_target == (Object)null)
				{
					return new Vector3(0f, 1.4f, 0f);
				}
				return m_target.position + new Vector3(0f, 0.1f, 0f);
			}
		}

		public void Clean()
		{
			foreach (KeyValuePair<string, MaterialItem> item in m_materialMap)
			{
				Object.DestroyImmediate((Object)(object)item.Value.Material);
			}
		}

		private void Initialize(GameObject prefab)
		{
			Prefab = prefab;
			List<string> materialNames = new List<string>();
			Dictionary<Material, Material> map = new Dictionary<Material, Material>();
			Func<Material, Material> getOrCreateMaterial = delegate(Material src)
			{
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				if ((Object)(object)src == (Object)null)
				{
					return null;
				}
				if (string.IsNullOrEmpty(((Object)src).name))
				{
					return null;
				}
				if (!map.TryGetValue(src, out var value))
				{
					value = new Material(src);
					map.Add(src, value);
					materialNames.Add(((Object)src).name);
					m_materialMap.Add(((Object)src).name, MaterialItem.Create(value));
				}
				return value;
			};
			m_meshes = (from x in UnityExtensions.Traverse(((Component)this).transform)
				select MeshPreviewItem.Create(x, ((Component)this).transform, getOrCreateMaterial) into x
				where x != null
				select x).ToArray();
			MaterialNames = materialNames.ToArray();
			m_blendShapeMeshes = m_meshes.Where((MeshPreviewItem x) => (Object)(object)x.SkinnedMeshRenderer != (Object)null && x.SkinnedMeshRenderer.sharedMesh.blendShapeCount > 0).ToArray();
			m_rendererPathList = m_meshes.Select((MeshPreviewItem x) => x.Path).ToArray();
			m_skinnedMeshRendererPathList = (from x in m_meshes
				where (Object)(object)x.SkinnedMeshRenderer != (Object)null
				select x.Path).ToArray();
			Animator component = ((Component)this).GetComponent<Animator>();
			if ((Object)(object)component != (Object)null)
			{
				Transform boneTransform = component.GetBoneTransform((HumanBodyBones)10);
				if ((Object)(object)boneTransform != (Object)null)
				{
					m_target = boneTransform;
				}
			}
		}

		public string[] GetBlendShapeNames(int blendShapeMeshIndex)
		{
			if (blendShapeMeshIndex >= 0 && blendShapeMeshIndex < m_blendShapeMeshes.Length)
			{
				return m_blendShapeMeshes[blendShapeMeshIndex].BlendShapeNames;
			}
			return null;
		}

		public MaterialItem GetMaterialItem(string materialName)
		{
			if (!m_materialMap.TryGetValue(materialName, out var value))
			{
				return null;
			}
			return value;
		}

		public void SetupCamera(Camera camera, Vector3 target, float yaw, float pitch, Vector3 position)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0056: Unknown result type (might be due to invalid IL or missing references)
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0060: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Unknown result type (might be due to invalid IL or missing references)
			//IL_0085: Unknown result type (might be due to invalid IL or missing references)
			camera.backgroundColor = Color.gray;
			camera.clearFlags = (CameraClearFlags)2;
			camera.fieldOfView = 27f;
			camera.nearClipPlane = 0.3f;
			camera.farClipPlane = (0f - position.z) * 2.1f;
			Matrix4x4 val = Matrix4x4.Translate(position);
			Matrix4x4 val2 = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(pitch, yaw, 0f), Vector3.one) * val;
			((Component)camera).transform.position = target + UnityExtensions.ExtractPosition(val2);
			((Component)camera).transform.rotation = UnityExtensions.ExtractRotation(val2);
		}
	}
	[DisallowMultipleComponent]
	public class VRMBlendShapeProxy : MonoBehaviour, IVRMComponent
	{
		[SerializeField]
		public BlendShapeAvatar BlendShapeAvatar;

		private BlendShapeMerger m_merger;

		public void OnImported(VRMImporterContext context)
		{
			throw new NotImplementedException();
		}

		private void OnDestroy()
		{
			if (m_merger != null)
			{
				m_merger.RestoreMaterialInitialValues(BlendShapeAvatar.Clips);
			}
		}

		private void Start()
		{
			if ((Object)(object)BlendShapeAvatar != (Object)null && m_merger == null)
			{
				m_merger = new BlendShapeMerger(BlendShapeAvatar.Clips, ((Component)this).transform);
			}
		}

		public void ImmediatelySetValue(BlendShapeKey key, float value)
		{
			if (m_merger != null)
			{
				m_merger.ImmediatelySetValue(key, value);
			}
		}

		public void AccumulateValue(BlendShapeKey key, float value)
		{
			if (m_merger != null)
			{
				m_merger.AccumulateValue(key, value);
			}
		}

		public float GetValue(BlendShapeKey key)
		{
			if (m_merger == null)
			{
				return 0f;
			}
			return m_merger.GetValue(key);
		}

		public IEnumerable<KeyValuePair<BlendShapeKey, float>> GetValues()
		{
			if (m_merger == null || !((Object)(object)BlendShapeAvatar != (Object)null))
			{
				yield break;
			}
			foreach (BlendShapeClip clip in BlendShapeAvatar.Clips)
			{
				BlendShapeKey key = BlendShapeKey.CreateFromClip(clip);
				yield return new KeyValuePair<BlendShapeKey, float>(key, m_merger.GetValue(key));
			}
		}

		public void SetValues(IEnumerable<KeyValuePair<BlendShapeKey, float>> values)
		{
			if (m_merger != null)
			{
				m_merger.SetValues(values);
			}
		}

		public void Apply()
		{
			if (m_merger != null)
			{
				m_merger.Apply();
			}
		}
	}
	public static class VRMBlendShapeProxyExtensions
	{
		[Obsolete("Use BlendShapeKey.CreateFromPreset")]
		public static float GetValue(this VRMBlendShapeProxy proxy, BlendShapePreset key)
		{
			return proxy.GetValue(BlendShapeKey.CreateFromPreset(key));
		}

		[Obsolete("Use BlendShapeKey.CreateUnknown")]
		public static float GetValue(this VRMBlendShapeProxy proxy, string key)
		{
			return proxy.GetValue(BlendShapeKey.CreateUnknown(key));
		}

		[Obsolete("Use ImmediatelySetValue")]
		public static void SetValue(this VRMBlendShapeProxy proxy, BlendShapePreset key, float value)
		{
			proxy.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(key), value);
		}

		[Obsolete("Use BlendShapeKey.CreateFromPreset")]
		public static void ImmediatelySetValue(this VRMBlendShapeProxy proxy, BlendShapePreset key, float value)
		{
			proxy.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(key), value);
		}

		[Obsolete("Use BlendShapeKey.CreateFromPreset")]
		public static void AccumulateValue(this VRMBlendShapeProxy proxy, BlendShapePreset key, float value)
		{
			proxy.AccumulateValue(BlendShapeKey.CreateFromPreset(key), value);
		}

		[Obsolete("Use ImmediatelySetValue")]
		public static void SetValue(this VRMBlendShapeProxy proxy, string key, float value)
		{
			proxy.ImmediatelySetValue(BlendShapeKey.CreateUnknown(key), value);
		}

		[Obsolete("Use BlendShapeKey.CreateUnknown")]
		public static void ImmediatelySetValue(this VRMBlendShapeProxy proxy, string key, float value)
		{
			proxy.ImmediatelySetValue(BlendShapeKey.CreateUnknown(key), value);
		}

		[Obsolete("Use BlendShapeKey.CreateUnknown")]
		public static void AccumulateValue(this VRMBlendShapeProxy proxy, string key, float value)
		{
			proxy.AccumulateValue(BlendShapeKey.CreateUnknown(key), value);
		}

		[Obsolete("Use ImmediatelySetValue")]
		public static void SetValue(this VRMBlendShapeProxy proxy, BlendShapeKey key, float value)
		{
			proxy.ImmediatelySetValue(key, value);
		}

		[Obsolete("Use ImmediatelySetValue or AccumulateValue")]
		public static void SetValue(this VRMBlendShapeProxy proxy, BlendShapePreset key, float value, bool apply)
		{
			if (apply)
			{
				proxy.ImmediatelySetValue(BlendShapeKey.CreateFromPreset(key), value);
			}
			else
			{
				proxy.AccumulateValue(BlendShapeKey.CreateFromPreset(key), value);
			}
		}

		[Obsolete("Use ImmediatelySetValue or AccumulateValue")]
		public static void SetValue(this VRMBlendShapeProxy proxy, string key, float value, bool apply)
		{
			if (apply)
			{
				proxy.ImmediatelySetValue(BlendShapeKey.CreateUnknown(key), value);
			}
			else
			{
				proxy.AccumulateValue(BlendShapeKey.CreateUnknown(key), value);
			}
		}

		[Obsolete("Use ImmediatelySetValue or AccumulateValue")]
		public static void SetValue(this VRMBlendShapeProxy proxy, BlendShapeKey key, float value, bool apply)
		{
			if (apply)
			{
				proxy.ImmediatelySetValue(key, value);
			}
			else
			{
				proxy.AccumulateValue(key, value);
			}
		}
	}
	public static class EnumUtil
	{
		public static T TryParseOrDefault<T>(string src, T defaultValue = default(T)) where T : struct
		{
			try
			{
				return (T)Enum.Parse(typeof(T), src, ignoreCase: true);
			}
			catch (Exception)
			{
				return defaultValue;
			}
		}
	}
	public static class EnumExtensions
	{
		public static HumanBodyBones ToUnityBone(this VRMBone val)
		{
			return (HumanBodyBones)(val switch
			{
				VRMBone.hips => 0, 
				VRMBone.leftUpperLeg => 1, 
				VRMBone.rightUpperLeg => 2, 
				VRMBone.leftLowerLeg => 3, 
				VRMBone.rightLowerLeg => 4, 
				VRMBone.leftFoot => 5, 
				VRMBone.rightFoot => 6, 
				VRMBone.spine => 7, 
				VRMBone.chest => 8, 
				VRMBone.neck => 9, 
				VRMBone.head => 10, 
				VRMBone.leftShoulder => 11, 
				VRMBone.rightShoulder => 12, 
				VRMBone.leftUpperArm => 13, 
				VRMBone.rightUpperArm => 14, 
				VRMBone.leftLowerArm => 15, 
				VRMBone.rightLowerArm => 16, 
				VRMBone.leftHand => 17, 
				VRMBone.rightHand => 18, 
				VRMBone.leftToes => 19, 
				VRMBone.rightToes => 20, 
				VRMBone.leftEye => 21, 
				VRMBone.rightEye => 22, 
				VRMBone.jaw => 23, 
				VRMBone.leftThumbProximal => 24, 
				VRMBone.leftThumbIntermediate => 25, 
				VRMBone.leftThumbDistal => 26, 
				VRMBone.leftIndexProximal => 27, 
				VRMBone.leftIndexIntermediate => 28, 
				VRMBone.leftIndexDistal => 29, 
				VRMBone.leftMiddleProximal => 30, 
				VRMBone.leftMiddleIntermediate => 31, 
				VRMBone.leftMiddleDistal => 32, 
				VRMBone.leftRingProximal => 33, 
				VRMBone.leftRingIntermediate => 34, 
				VRMBone.leftRingDistal => 35, 
				VRMBone.leftLittleProximal => 36, 
				VRMBone.leftLittleIntermediate => 37, 
				VRMBone.leftLittleDistal => 38, 
				VRMBone.rightThumbProximal => 39, 
				VRMBone.rightThumbIntermediate => 40, 
				VRMBone.rightThumbDistal => 41, 
				VRMBone.rightIndexProximal => 42, 
				VRMBone.rightIndexIntermediate => 43, 
				VRMBone.rightIndexDistal => 44, 
				VRMBone.rightMiddleProximal => 45, 
				VRMBone.rightMiddleIntermediate => 46, 
				VRMBone.rightMiddleDistal => 47, 
				VRMBone.rightRingProximal => 48, 
				VRMBone.rightRingIntermediate => 49, 
				VRMBone.rightRingDistal => 50, 
				VRMBone.rightLittleProximal => 51, 
				VRMBone.rightLittleIntermediate => 52, 
				VRMBone.rightLittleDistal => 53, 
				VRMBone.upperChest => 54, 
				_ => throw new InvalidOperationException(), 
			});
		}

		public static VRMBone ToVrmBone(this HumanBodyBones val)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected I4, but got Unknown
			return (int)val switch
			{
				0 => VRMBone.hips, 
				1 => VRMBone.leftUpperLeg, 
				2 => VRMBone.rightUpperLeg, 
				3 => VRMBone.leftLowerLeg, 
				4 => VRMBone.rightLowerLeg, 
				5 => VRMBone.leftFoot, 
				6 => VRMBone.rightFoot, 
				7 => VRMBone.spine, 
				8 => VRMBone.chest, 
				9 => VRMBone.neck, 
				10 => VRMBone.head, 
				11 => VRMBone.leftShoulder, 
				12 => VRMBone.rightShoulder, 
				13 => VRMBone.leftUpperArm, 
				14 => VRMBone.rightUpperArm, 
				15 => VRMBone.leftLowerArm, 
				16 => VRMBone.rightLowerArm, 
				17 => VRMBone.leftHand, 
				18 => VRMBone.rightHand, 
				19 => VRMBone.leftToes, 
				20 => VRMBone.rightToes, 
				21 => VRMBone.leftEye, 
				22 => VRMBone.rightEye, 
				23 => VRMBone.jaw, 
				24 => VRMBone.leftThumbProximal, 
				25 => VRMBone.leftThumbIntermediate, 
				26 => VRMBone.leftThumbDistal, 
				27 => VRMBone.leftIndexProximal, 
				28 => VRMBone.leftIndexIntermediate, 
				29 => VRMBone.leftIndexDistal, 
				30 => VRMBone.leftMiddleProximal, 
				31 => VRMBone.leftMiddleIntermediate, 
				32 => VRMBone.leftMiddleDistal, 
				33 => VRMBone.leftRingProximal, 
				34 => VRMBone.leftRingIntermediate, 
				35 => VRMBone.leftRingDistal, 
				36 => VRMBone.leftLittleProximal, 
				37 => VRMBone.leftLittleIntermediate, 
				38 => VRMBone.leftLittleDistal, 
				39 => VRMBone.rightThumbProximal, 
				40 => VRMBone.rightThumbIntermediate, 
				41 => VRMBone.rightThumbDistal, 
				42 => VRMBone.rightIndexProximal, 
				43 => VRMBone.rightIndexIntermediate, 
				44 => VRMBone.rightIndexDistal, 
				45 => VRMBone.rightMiddleProximal, 
				46 => VRMBone.rightMiddleIntermediate, 
				47 => VRMBone.rightMiddleDistal, 
				48 => VRMBone.rightRingProximal, 
				49 => VRMBone.rightRingIntermediate, 
				50 => VRMBone.rightRingDistal, 
				51 => VRMBone.rightLittleProximal, 
				52 => VRMBone.rightLittleIntermediate, 
				53 => VRMBone.rightLittleDistal, 
				54 => VRMBone.upperChest, 
				_ => throw new InvalidOperationException(), 
			};
		}
	}
	public static class VRMBoneExtensions
	{
		public static VRMBone FromHumanBodyBone(this HumanBodyBones human)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			return human.ToVrmBone();
		}

		public static HumanBodyBones ToHumanBodyBone(this VRMBone bone)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return bone.ToUnityBone();
		}
	}
	public static class VRMHumanoidExtensions
	{
		public static void SetNodeIndex(this glTF_VRM_Humanoid self, HumanBodyBones _key, int node)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			VRMBone key = _key.FromHumanBodyBone();
			int num = self.humanBones.FindIndex((glTF_VRM_HumanoidBone x) => x.vrmBone == key);
			if (num == -1 || self.humanBones[num] == null)
			{
				self.humanBones.Add(new glTF_VRM_HumanoidBone
				{
					vrmBone = key,
					node = node
				});
			}
			else
			{
				self.humanBones[num].node = node;
			}
		}

		public static void Apply(this glTF_VRM_Humanoid self, AvatarDescription desc, List<Transform> nodes)
		{
			//IL_0077: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0136: Unknown result type (might be due to invalid IL or missing references)
			//IL_0143: Unknown result type (might be due to invalid IL or missing references)
			//IL_0148: Unknown result type (might be due to invalid IL or missing references)
			self.armStretch = desc.armStretch;
			self.legStretch = desc.legStretch;
			self.upperArmTwist = desc.upperArmTwist;
			self.lowerArmTwist = desc.lowerArmTwist;
			self.upperLegTwist = desc.upperLegTwist;
			self.lowerLegTwist = desc.lowerArmTwist;
			self.feetSpacing = desc.feetSpacing;
			self.hasTranslationDoF = desc.hasTranslationDoF;
			BoneLimit[] human = desc.human;
			for (int i = 0; i < human.Length; i++)
			{
				BoneLimit x = human[i];
				VRMBone key = x.humanBone.FromHumanBodyBone();
				glTF_VRM_HumanoidBone glTF_VRM_HumanoidBone2 = self.humanBones.FirstOrDefault((glTF_VRM_HumanoidBone y) => y.vrmBone == key);
				if (glTF_VRM_HumanoidBone2 == null)
				{
					glTF_VRM_HumanoidBone2 = new glTF_VRM_HumanoidBone
					{
						vrmBone = key
					};
					self.humanBones.Add(glTF_VRM_HumanoidBone2);
				}
				glTF_VRM_HumanoidBone2.node = nodes.FindIndex((Transform y) => ((Object)y).name == x.boneName);
				glTF_VRM_HumanoidBone2.useDefaultValues = x.useDefaultValues;
				glTF_VRM_HumanoidBone2.axisLength = x.axisLength;
				glTF_VRM_HumanoidBone2.center = x.center;
				glTF_VRM_HumanoidBone2.max = x.max;
				glTF_VRM_HumanoidBone2.min = x.min;
			}
		}

		public static AvatarDescription ToDescription(this glTF_VRM_Humanoid self, List<Transform> nodes)
		{
			//IL_00aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_011d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0124: Unknown result type (might be due to invalid IL or missing references)
			AvatarDescription val = ScriptableObject.CreateInstance<AvatarDescription>();
			val.upperLegTwist = self.upperLegTwist;
			val.lowerLegTwist = self.lowerLegTwist;
			val.upperArmTwist = self.upperArmTwist;
			val.lowerArmTwist = self.lowerArmTwist;
			val.armStretch = self.armStretch;
			val.legStretch = self.legStretch;
			val.hasTranslationDoF = self.hasTranslationDoF;
			BoneLimit[] array = (BoneLimit[])(object)new BoneLimit[self.humanBones.Count];
			int num = 0;
			foreach (glTF_VRM_HumanoidBone humanBone in self.humanBones)
			{
				if (humanBone.node >= 0 && humanBone.node < nodes.Count)
				{
					array[num] = new BoneLimit
					{
						boneName = ((Object)nodes[humanBone.node]).name,
						useDefaultValues = humanBone.useDefaultValues,
						axisLength = humanBone.axisLength,
						center = humanBone.center,
						min = humanBone.min,
						max = humanBone.max,
						humanBone = humanBone.vrmBone.ToHumanBodyBone()
					};
					num++;
				}
			}
			val.human = array;
			return val;
		}
	}
	public static class glTF_VRMExtensions
	{
		[Obsolete("Use Create(root, meshes, binding)")]
		public static glTF_VRM_BlendShapeBind Cerate(Transform root, BlendShapeBinding binding, gltfExporter exporter)
		{
			return Create(root, binding, exporter);
		}

		public static glTF_VRM_BlendShapeBind Create(Transform root, BlendShapeBinding binding, gltfExporter exporter)
		{
			if ((Object)(object)root == (Object)null || exporter == null)
			{
				return null;
			}
			if (string.IsNullOrEmpty(binding.RelativePath))
			{
				Debug.LogWarning((object)"binding.RelativePath is null");
				return null;
			}
			Transform val = ((Component)root).transform.Find(binding.RelativePath);
			if ((Object)(object)val == (Object)null)
			{
				string name = binding.RelativePath.Split(new char[1] { '/' }).Last();
				val = ((IEnumerable<Transform>)((Component)root).GetComponentsInChildren<Transform>()).FirstOrDefault((Func<Transform, bool>)((Transform x) => ((Object)x).name == name));
				if ((Object)(object)val == (Object)null)
				{
					Debug.LogWarning((object)(binding.RelativePath + " not found"));
					return null;
				}
				Debug.LogWarning((object)("fall back '" + binding.RelativePath + "' => '" + UnityExtensions.RelativePathFrom(val, root) + "'"));
			}
			SkinnedMeshRenderer component = ((Component)val).GetComponent<SkinnedMeshRenderer>();
			if ((Object)(object)component == (Object)null)
			{
				return null;
			}
			if (!((Component)component).gameObject.activeInHierarchy)
			{
				return null;
			}
			Mesh sharedMesh = component.sharedMesh;
			int num = exporter.Meshes.IndexOf(sharedMesh);
			if (num == -1)
			{
				return null;
			}
			if (!exporter.MeshBlendShapeIndexMap.TryGetValue(sharedMesh, out var value))
			{
				return null;
			}
			if (!value.TryGetValue(binding.Index, out var value2))
			{
				return null;
			}
			return new glTF_VRM_BlendShapeBind
			{
				mesh = num,
				index = value2,
				weight = binding.Weight
			};
		}

		public static void Add(this glTF_VRM_BlendShapeMaster master, BlendShapeClip clip, gltfExporter exporter)
		{
			master.blendShapeGroups.Add(clip.Serialize(exporter));
		}

		public static glTF_VRM_BlendShapeGroup Serialize(this BlendShapeClip clip, gltfExporter exporter)
		{
			List<glTF_VRM_BlendShapeBind> list = new List<glTF_VRM_BlendShapeBind>();
			if (clip.Values != null && exporter != null)
			{
				BlendShapeBinding[] values = clip.Values;
				foreach (BlendShapeBinding binding in values)
				{
					glTF_VRM_BlendShapeBind glTF_VRM_BlendShapeBind2 = Create(exporter.Copy.transform, binding, exporter);
					if (glTF_VRM_BlendShapeBind2 != null)
					{
						list.Add(glTF_VRM_BlendShapeBind2);
					}
				}
			}
			List<glTF_VRM_MaterialValueBind> list2 = new List<glTF_VRM_MaterialValueBind>();
			if (clip.MaterialValues != null)
			{
				list2.AddRange(clip.MaterialValues.Select((MaterialValueBinding y) => new glTF_VRM_MaterialValueBind
				{
					materialName = y.MaterialName,
					propertyName = y.ValueName,
					targetValue = UnityExtensions.ToArray(y.TargetValue)
				}));
			}
			return new glTF_VRM_BlendShapeGroup
			{
				name = clip.BlendShapeName,
				presetName = clip.Preset.ToString().ToLowerInvariant(),
				isBinary = clip.IsBinary,
				binds = list,
				materialValues = list2
			};
		}

		public static void Apply(this glTF_VRM_DegreeMap map, CurveMapper mapper)
		{
			map.curve = mapper.Curve.keys.SelectMany((Keyframe x) => new float[4]
			{
				((Keyframe)(ref x)).time,
				((Keyframe)(ref x)).value,
				((Keyframe)(ref x)).inTangent,
				((Keyframe)(ref x)).outTangent
			}).ToArray();
			map.xRange = mapper.CurveXRangeDegree;
			map.yRange = mapper.CurveYRangeDegree;
		}
	}
	public class VRMFirstPerson : MonoBehaviour
	{
		[Serializable]
		public struct RendererFirstPersonFlags
		{
			public Renderer Renderer;

			public FirstPersonFlag FirstPersonFlag;

			public Mesh SharedMesh
			{
				get
				{
					Renderer renderer = Renderer;
					SkinnedMeshRenderer val = (SkinnedMeshRenderer)(object)((renderer is SkinnedMeshRenderer) ? renderer : null);
					if ((Object)(object)val != (Object)null)
					{
						return val.sharedMesh;
					}
					MeshFilter component = ((Component)Renderer).GetComponent<MeshFilter>();
					if ((Object)(object)component != (Object)null)
					{
						return component.sharedMesh;
					}
					return null;
				}
			}
		}

		public delegate void SetVisibilityFunc(Renderer renderer, bool firstPerson, bool thirdPerson);

		[Obsolete("Use SetVisibilityFunc")]
		public delegate void SetVisiblityFunc(Renderer renderer, bool firstPerson, bool thirdPerson);

		public static bool TriedSetupLayer = false;

		public static int FIRSTPERSON_ONLY_LAYER = 9;

		public static int THIRDPERSON_ONLY_LAYER = 10;

		[SerializeField]
		public Transform FirstPersonBone;

		[SerializeField]
		public Vector3 FirstPersonOffset;

		[SerializeField]
		public List<RendererFirstPersonFlags> Renderers = new List<RendererFirstPersonFlags>();

		private bool m_done;

		private List<Mesh> m_headlessMeshes = new List<Mesh>();

		public void CopyTo(GameObject _dst, Dictionary<Transform, Transform> map)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			VRMFirstPerson vRMFirstPerson = _dst.AddComponent<VRMFirstPerson>();
			vRMFirstPerson.FirstPersonBone = map[FirstPersonBone];
			vRMFirstPerson.FirstPersonOffset = FirstPersonOffset;
			vRMFirstPerson.Renderers = Renderers.Select(delegate(RendererFirstPersonFlags x)
			{
				Renderer component = ((Component)map[((Component)x.Renderer).transform]).GetComponent<Renderer>();
				RendererFirstPersonFlags result = default(RendererFirstPersonFlags);
				result.Renderer = component;
				result.FirstPersonFlag = x.FirstPersonFlag;
				return result;
			}).ToList();
		}

		public void SetDefault()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			FirstPersonOffset = new Vector3(0f, 0.06f, 0f);
			Animator component = ((Component)this).GetComponent<Animator>();
			if ((Object)(object)component != (Object)null)
			{
				FirstPersonBone = component.GetBoneTransform((HumanBodyBones)10);
			}
		}

		public void Reset()
		{
			SetDefault();
			TraverseRenderers();
		}

		public void TraverseRenderers(VRMImporterContext context = null)
		{
			Renderers.Clear();
			Renderer[] componentsInChildren = ((Component)((Component)this).transform).GetComponentsInChildren<Renderer>();
			foreach (Renderer val in componentsInChildren)
			{
				RendererFirstPersonFlags rendererFirstPersonFlags = default(RendererFirstPersonFlags);
				rendererFirstPersonFlags.Renderer = val;
				rendererFirstPersonFlags.FirstPersonFlag = ((context != null) ? GetFirstPersonFlag(context, val) : FirstPersonFlag.Auto);
				RendererFirstPersonFlags item = rendererFirstPersonFlags;
				Renderers.Add(item);
			}
		}

		private static FirstPersonFlag GetFirstPersonFlag(VRMImporterContext context, Renderer r)
		{
			Mesh mesh = UnityExtensions.GetSharedMesh(((Component)r).transform);
			if ((Object)(object)mesh == (Object)null)
			{
				return FirstPersonFlag.Auto;
			}
			int num = ((ImporterContext)context).Meshes.FindIndex((MeshWithMaterials x) => (Object)(object)x.Mesh == (Object)(object)mesh);
			if (num == -1)
			{
				return FirstPersonFlag.Auto;
			}
			foreach (glTF_VRM_MeshAnnotation meshAnnotation in context.VRM.firstPerson.meshAnnotations)
			{
				if (meshAnnotation.mesh == num)
				{
					return CacheEnum.TryParseOrDefault<FirstPersonFlag>(meshAnnotation.firstPersonFlag, true, FirstPersonFlag.Auto);
				}
			}
			return FirstPersonFlag.Auto;
		}

		private Mesh CreateHeadlessModel(Renderer _renderer, Transform EraseRoot, SetVisibilityFunc setVisibility)
		{
			SkinnedMeshRenderer val = (SkinnedMeshRenderer)(object)((_renderer is SkinnedMeshRenderer) ? _renderer : null);
			if ((Object)(object)val != (Object)null)
			{
				return CreateHeadlessModelForSkinnedMeshRenderer(val, EraseRoot, setVisibility);
			}
			MeshRenderer val2 = (MeshRenderer)(object)((_renderer is MeshRenderer) ? _renderer : null);
			if ((Object)(object)val2 != (Object)null)
			{
				CreateHeadlessModelForMeshRenderer(val2, EraseRoot, setVisibility);
				return null;
			}
			return null;
		}

		public static void SetupLayers()
		{
			if (!TriedSetupLayer)
			{
				TriedSetupLayer = true;
				int num = LayerMask.NameToLayer("VRMFirstPersonOnly");
				FIRSTPERSON_ONLY_LAYER = ((num == -1) ? FIRSTPERSON_ONLY_LAYER : num);
				num = LayerMask.NameToLayer("VRMThirdPersonOnly");
				THIRDPERSON_ONLY_LAYER = ((num == -1) ? THIRDPERSON_ONLY_LAYER : num);
			}
		}

		private static void CreateHeadlessModelForMeshRenderer(MeshRenderer renderer, Transform eraseRoot, SetVisibilityFunc setVisibility)
		{
			if (UnityExtensions.Ancestors(((Component)renderer).transform).Any((Transform x) => (Object)(object)x == (Object)(object)eraseRoot))
			{
				setVisibility((Renderer)(object)renderer, firstPerson: false, thirdPerson: true);
			}
		}

		private static Mesh CreateHeadlessModelForSkinnedMeshRenderer(SkinnedMeshRenderer renderer, Transform eraseRoot, SetVisibilityFunc setVisibility)
		{
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c1: Unknown result type (might be due to invalid IL or missing references)
			Transform[] bones = renderer.bones;
			int[] array = (from x in bones.Select(delegate(Transform x, int i)
				{
					bool erase = UnityExtensions.Ancestors(x).Any((Transform y) => (Object)(object)y == (Object)(object)eraseRoot);
					return new { i, erase };
				})
				where x.erase
				select x.i).ToArray();
			if (array.Length == 0)
			{
				return null;
			}
			setVisibility((Renderer)(object)renderer, firstPerson: false, thirdPerson: true);
			Mesh val = BoneMeshEraser.CreateErasedMesh(renderer.sharedMesh, array);
			if (val.triangles.Length == 0)
			{
				Object.Destroy((Object)(object)val);
				return null;
			}
			GameObject val2 = new GameObject("_headless_" + ((Object)renderer).name)
			{
				layer = FIRSTPERSON_ONLY_LAYER
			};
			val2.transform.SetParent(((Component)renderer).transform, false);
			SkinnedMeshRenderer obj = val2.AddComponent<SkinnedMeshRenderer>();
			obj.sharedMesh = val;
			((Renderer)obj).sharedMaterials = ((Renderer)renderer).sharedMaterials;
			obj.bones = bones;
			obj.rootBone = renderer.rootBone;
			obj.updateWhenOffscreen = true;
			return val;
		}

		public static void SetVisibility(Renderer renderer, bool firstPerson, bool thirdPerson)
		{
			SetupLayers();
			if (!(firstPerson && thirdPerson))
			{
				if (firstPerson)
				{
					((Component)renderer).gameObject.layer = FIRSTPERSON_ONLY_LAYER;
				}
				else if (thirdPerson)
				{
					((Component)renderer).gameObject.layer = THIRDPERSON_ONLY_LAYER;
				}
				else
				{
					renderer.enabled = false;
				}
			}
		}

		[Obsolete("Use SetVisibility")]
		public static void SetVisiblity(Renderer renderer, bool firstPerson, bool thirdPerson)
		{
			SetVisibility(renderer, firstPerson, thirdPerson);
		}

		public void Setup()
		{
			Setup(isSelf: true, SetVisibility);
		}

		public void Setup(bool isSelf, SetVisibilityFunc setVisibility)
		{
			if (m_done)
			{
				return;
			}
			m_done = true;
			if (isSelf)
			{
				foreach (RendererFirstPersonFlags renderer in Renderers)
				{
					switch (renderer.FirstPersonFlag)
					{
					case FirstPersonFlag.Auto:
					{
						Mesh val = CreateHeadlessModel(renderer.Renderer, FirstPersonBone, setVisibility);
						if ((Object)(object)val != (Object)null)
						{
							m_headlessMeshes.Add(val);
						}
						break;
					}
					case FirstPersonFlag.FirstPersonOnly:
						setVisibility(renderer.Renderer, firstPerson: true, thirdPerson: false);
						break;
					case FirstPersonFlag.ThirdPersonOnly:
						setVisibility(renderer.Renderer, firstPerson: false, thirdPerson: true);
						break;
					case FirstPersonFlag.Both:
						setVisibility(renderer.Renderer, firstPerson: true, thirdPerson: true);
						break;
					}
				}
				return;
			}
			foreach (RendererFirstPersonFlags renderer2 in Renderers)
			{
				switch (renderer2.FirstPersonFlag)
				{
				case FirstPersonFlag.FirstPersonOnly:
					setVisibility(renderer2.Renderer, firstPerson: false, thirdPerson: false);
					break;
				case FirstPersonFlag.Auto:
				case FirstPersonFlag.Both:
				case FirstPersonFlag.ThirdPersonOnly:
					setVisibility(renderer2.Renderer, firstPerson: true, thirdPerson: true);
					break;
				}
			}
		}

		private void OnDestroy()
		{
			foreach (Mesh headlessMesh in m_headlessMeshes)
			{
				if ((Object)(object)headlessMesh != (Object)null)
				{
					Object.Destroy((Object)(object)headlessMesh);
				}
			}
			m_headlessMeshes.Clear();
		}
	}
	public class VRMFirstPersonCameraManager : MonoBehaviour
	{
		[Serializable]
		private class CameraWithRawImage
		{
			public Camera Camera;

			public RenderTexture Texture;

			public RawImage Image;
		}

		[SerializeField]
		private CameraWithRawImage m_topLeft;

		[SerializeField]
		private CameraWithRawImage m_topRight;

		[SerializeField]
		private CameraWithRawImage m_bottomRight;

		[SerializeField]
		[Header("Cameras")]
		private Camera m_firstPersonCamera;

		[SerializeField]
		private Camera[] m_thirdPersonCameras;

		private void Reset()
		{
			Camera[] source = Object.FindObjectsOfType<Camera>();
			m_firstPersonCamera = Camera.main;
			m_thirdPersonCameras = source.Where((Camera x) => (Object)(object)x != (Object)(object)m_firstPersonCamera).ToArray();
		}

		private void Update()
		{
			int w = Screen.width / 2;
			int h = Screen.height / 2;
			SetupRenderTarget(m_topLeft, w, h);
			SetupRenderTarget(m_topRight, w, h);
			SetupRenderTarget(m_bottomRight, w, h);
		}

		private void SetupRenderTarget(CameraWithRawImage cameraWithImage, int w, int h)
		{
			//IL_004c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Expected O, but got Unknown
			if (!((Object)(object)cameraWithImage.Camera == (Object)null) && !((Object)(object)cameraWithImage.Image == (Object)null) && ((Object)(object)cameraWithImage.Texture == (Object)null || ((Texture)cameraWithImage.Texture).width != w || ((Texture)cameraWithImage.Texture).height != h))
			{
				RenderTexture val = (cameraWithImage.Texture = new RenderTexture(w, h, 16));
				cameraWithImage.Camera.targetTexture = val;
				cameraWithImage.Image.texture = (Texture)(object)val;
			}
		}
	}
	public static class VrmDeserializer
	{
		public static glTF_VRM_extensions Deserialize(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_extensions glTF_VRM_extensions2 = new glTF_VRM_extensions();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "exporterVersion":
					glTF_VRM_extensions2.exporterVersion = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "specVersion":
					glTF_VRM_extensions2.specVersion = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "meta":
					glTF_VRM_extensions2.meta = Deserialize_vrm_meta(item.Value);
					break;
				case "humanoid":
					glTF_VRM_extensions2.humanoid = Deserialize_vrm_humanoid(item.Value);
					break;
				case "firstPerson":
					glTF_VRM_extensions2.firstPerson = Deserialize_vrm_firstPerson(item.Value);
					break;
				case "blendShapeMaster":
					glTF_VRM_extensions2.blendShapeMaster = Deserialize_vrm_blendShapeMaster(item.Value);
					break;
				case "secondaryAnimation":
					glTF_VRM_extensions2.secondaryAnimation = Deserialize_vrm_secondaryAnimation(item.Value);
					break;
				case "materialProperties":
					glTF_VRM_extensions2.materialProperties = Deserialize_vrm_materialProperties(item.Value);
					break;
				}
			}
			return glTF_VRM_extensions2;
		}

		public static glTF_VRM_Meta Deserialize_vrm_meta(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e2: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_Meta glTF_VRM_Meta2 = new glTF_VRM_Meta();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "title":
					glTF_VRM_Meta2.title = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "version":
					glTF_VRM_Meta2.version = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "author":
					glTF_VRM_Meta2.author = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "contactInformation":
					glTF_VRM_Meta2.contactInformation = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "reference":
					glTF_VRM_Meta2.reference = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "texture":
					glTF_VRM_Meta2.texture = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "allowedUserName":
					glTF_VRM_Meta2.allowedUserName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "violentUssageName":
					glTF_VRM_Meta2.violentUssageName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "sexualUssageName":
					glTF_VRM_Meta2.sexualUssageName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "commercialUssageName":
					glTF_VRM_Meta2.commercialUssageName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "otherPermissionUrl":
					glTF_VRM_Meta2.otherPermissionUrl = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "licenseName":
					glTF_VRM_Meta2.licenseName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "otherLicenseUrl":
					glTF_VRM_Meta2.otherLicenseUrl = ListTreeNodeExtensions.GetString(item.Value);
					break;
				}
			}
			return glTF_VRM_Meta2;
		}

		public static glTF_VRM_Humanoid Deserialize_vrm_humanoid(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0131: Unknown result type (might be due to invalid IL or missing references)
			//IL_0152: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_Humanoid glTF_VRM_Humanoid2 = new glTF_VRM_Humanoid();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "humanBones":
					glTF_VRM_Humanoid2.humanBones = Deserialize_vrm_humanoid_humanBones(item.Value);
					break;
				case "armStretch":
					glTF_VRM_Humanoid2.armStretch = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "legStretch":
					glTF_VRM_Humanoid2.legStretch = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "upperArmTwist":
					glTF_VRM_Humanoid2.upperArmTwist = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "lowerArmTwist":
					glTF_VRM_Humanoid2.lowerArmTwist = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "upperLegTwist":
					glTF_VRM_Humanoid2.upperLegTwist = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "lowerLegTwist":
					glTF_VRM_Humanoid2.lowerLegTwist = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "feetSpacing":
					glTF_VRM_Humanoid2.feetSpacing = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "hasTranslationDoF":
					glTF_VRM_Humanoid2.hasTranslationDoF = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				}
			}
			return glTF_VRM_Humanoid2;
		}

		public static List<glTF_VRM_HumanoidBone> Deserialize_vrm_humanoid_humanBones(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<glTF_VRM_HumanoidBone> list = new List<glTF_VRM_HumanoidBone>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(Deserialize_vrm_humanoid_humanBones_LIST(item));
			}
			return list;
		}

		public static glTF_VRM_HumanoidBone Deserialize_vrm_humanoid_humanBones_LIST(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_HumanoidBone glTF_VRM_HumanoidBone2 = new glTF_VRM_HumanoidBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "bone":
					glTF_VRM_HumanoidBone2.bone = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "node":
					glTF_VRM_HumanoidBone2.node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "useDefaultValues":
					glTF_VRM_HumanoidBone2.useDefaultValues = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				case "min":
					glTF_VRM_HumanoidBone2.min = Deserialize_vrm_humanoid_humanBones__min(item.Value);
					break;
				case "max":
					glTF_VRM_HumanoidBone2.max = Deserialize_vrm_humanoid_humanBones__max(item.Value);
					break;
				case "center":
					glTF_VRM_HumanoidBone2.center = Deserialize_vrm_humanoid_humanBones__center(item.Value);
					break;
				case "axisLength":
					glTF_VRM_HumanoidBone2.axisLength = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return glTF_VRM_HumanoidBone2;
		}

		public static Vector3 Deserialize_vrm_humanoid_humanBones__min(JsonNode parsed)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 result = default(Vector3);
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "x":
					result.x = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "y":
					result.y = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "z":
					result.z = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return result;
		}

		public static Vector3 Deserialize_vrm_humanoid_humanBones__max(JsonNode parsed)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 result = default(Vector3);
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "x":
					result.x = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "y":
					result.y = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "z":
					result.z = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return result;
		}

		public static Vector3 Deserialize_vrm_humanoid_humanBones__center(JsonNode parsed)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 result = default(Vector3);
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "x":
					result.x = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "y":
					result.y = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "z":
					result.z = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return result;
		}

		public static glTF_VRM_Firstperson Deserialize_vrm_firstPerson(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_0069: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_Firstperson glTF_VRM_Firstperson2 = new glTF_VRM_Firstperson();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "firstPersonBone":
					glTF_VRM_Firstperson2.firstPersonBone = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "firstPersonBoneOffset":
					glTF_VRM_Firstperson2.firstPersonBoneOffset = Deserialize_vrm_firstPerson_firstPersonBoneOffset(item.Value);
					break;
				case "meshAnnotations":
					glTF_VRM_Firstperson2.meshAnnotations = Deserialize_vrm_firstPerson_meshAnnotations(item.Value);
					break;
				case "lookAtTypeName":
					glTF_VRM_Firstperson2.lookAtTypeName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "lookAtHorizontalInner":
					glTF_VRM_Firstperson2.lookAtHorizontalInner = Deserialize_vrm_firstPerson_lookAtHorizontalInner(item.Value);
					break;
				case "lookAtHorizontalOuter":
					glTF_VRM_Firstperson2.lookAtHorizontalOuter = Deserialize_vrm_firstPerson_lookAtHorizontalOuter(item.Value);
					break;
				case "lookAtVerticalDown":
					glTF_VRM_Firstperson2.lookAtVerticalDown = Deserialize_vrm_firstPerson_lookAtVerticalDown(item.Value);
					break;
				case "lookAtVerticalUp":
					glTF_VRM_Firstperson2.lookAtVerticalUp = Deserialize_vrm_firstPerson_lookAtVerticalUp(item.Value);
					break;
				}
			}
			return glTF_VRM_Firstperson2;
		}

		public static Vector3 Deserialize_vrm_firstPerson_firstPersonBoneOffset(JsonNode parsed)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007f: Unknown result type (might be due to invalid IL or missing references)
			Vector3 result = default(Vector3);
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "x":
					result.x = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "y":
					result.y = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "z":
					result.z = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return result;
		}

		public static List<glTF_VRM_MeshAnnotation> Deserialize_vrm_firstPerson_meshAnnotations(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<glTF_VRM_MeshAnnotation> list = new List<glTF_VRM_MeshAnnotation>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(Deserialize_vrm_firstPerson_meshAnnotations_LIST(item));
			}
			return list;
		}

		public static glTF_VRM_MeshAnnotation Deserialize_vrm_firstPerson_meshAnnotations_LIST(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_MeshAnnotation glTF_VRM_MeshAnnotation2 = new glTF_VRM_MeshAnnotation();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				string @string = ListTreeNodeExtensions.GetString(item.Key);
				if (@string == "mesh")
				{
					glTF_VRM_MeshAnnotation2.mesh = ListTreeNodeExtensions.GetInt32(item.Value);
				}
				else if (@string == "firstPersonFlag")
				{
					glTF_VRM_MeshAnnotation2.firstPersonFlag = ListTreeNodeExtensions.GetString(item.Value);
				}
			}
			return glTF_VRM_MeshAnnotation2;
		}

		public static glTF_VRM_DegreeMap Deserialize_vrm_firstPerson_lookAtHorizontalInner(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_DegreeMap glTF_VRM_DegreeMap2 = new glTF_VRM_DegreeMap();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "curve":
					glTF_VRM_DegreeMap2.curve = Deserialize_vrm_firstPerson_lookAtHorizontalInner_curve(item.Value);
					break;
				case "xRange":
					glTF_VRM_DegreeMap2.xRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "yRange":
					glTF_VRM_DegreeMap2.yRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return glTF_VRM_DegreeMap2;
		}

		public static float[] Deserialize_vrm_firstPerson_lookAtHorizontalInner_curve(JsonNode parsed)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			float[] array = new float[ListTreeNodeArrayExtensions.GetArrayCount(parsed)];
			int num = 0;
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				array[num++] = ListTreeNodeExtensions.GetSingle(item);
			}
			return array;
		}

		public static glTF_VRM_DegreeMap Deserialize_vrm_firstPerson_lookAtHorizontalOuter(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_DegreeMap glTF_VRM_DegreeMap2 = new glTF_VRM_DegreeMap();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "curve":
					glTF_VRM_DegreeMap2.curve = Deserialize_vrm_firstPerson_lookAtHorizontalOuter_curve(item.Value);
					break;
				case "xRange":
					glTF_VRM_DegreeMap2.xRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "yRange":
					glTF_VRM_DegreeMap2.yRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return glTF_VRM_DegreeMap2;
		}

		public static float[] Deserialize_vrm_firstPerson_lookAtHorizontalOuter_curve(JsonNode parsed)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			float[] array = new float[ListTreeNodeArrayExtensions.GetArrayCount(parsed)];
			int num = 0;
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				array[num++] = ListTreeNodeExtensions.GetSingle(item);
			}
			return array;
		}

		public static glTF_VRM_DegreeMap Deserialize_vrm_firstPerson_lookAtVerticalDown(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_DegreeMap glTF_VRM_DegreeMap2 = new glTF_VRM_DegreeMap();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "curve":
					glTF_VRM_DegreeMap2.curve = Deserialize_vrm_firstPerson_lookAtVerticalDown_curve(item.Value);
					break;
				case "xRange":
					glTF_VRM_DegreeMap2.xRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "yRange":
					glTF_VRM_DegreeMap2.yRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return glTF_VRM_DegreeMap2;
		}

		public static float[] Deserialize_vrm_firstPerson_lookAtVerticalDown_curve(JsonNode parsed)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			float[] array = new float[ListTreeNodeArrayExtensions.GetArrayCount(parsed)];
			int num = 0;
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				array[num++] = ListTreeNodeExtensions.GetSingle(item);
			}
			return array;
		}

		public static glTF_VRM_DegreeMap Deserialize_vrm_firstPerson_lookAtVerticalUp(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_DegreeMap glTF_VRM_DegreeMap2 = new glTF_VRM_DegreeMap();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "curve":
					glTF_VRM_DegreeMap2.curve = Deserialize_vrm_firstPerson_lookAtVerticalUp_curve(item.Value);
					break;
				case "xRange":
					glTF_VRM_DegreeMap2.xRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				case "yRange":
					glTF_VRM_DegreeMap2.yRange = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return glTF_VRM_DegreeMap2;
		}

		public static float[] Deserialize_vrm_firstPerson_lookAtVerticalUp_curve(JsonNode parsed)
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			float[] array = new float[ListTreeNodeArrayExtensions.GetArrayCount(parsed)];
			int num = 0;
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				array[num++] = ListTreeNodeExtensions.GetSingle(item);
			}
			return array;
		}

		public static glTF_VRM_BlendShapeMaster Deserialize_vrm_blendShapeMaster(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_BlendShapeMaster glTF_VRM_BlendShapeMaster2 = new glTF_VRM_BlendShapeMaster();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				if (ListTreeNodeExtensions.GetString(item.Key) == "blendShapeGroups")
				{
					glTF_VRM_BlendShapeMaster2.blendShapeGroups = Deserialize_vrm_blendShapeMaster_blendShapeGroups(item.Value);
				}
			}
			return glTF_VRM_BlendShapeMaster2;
		}

		public static List<glTF_VRM_BlendShapeGroup> Deserialize_vrm_blendShapeMaster_blendShapeGroups(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<glTF_VRM_BlendShapeGroup> list = new List<glTF_VRM_BlendShapeGroup>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(Deserialize_vrm_blendShapeMaster_blendShapeGroups_LIST(item));
			}
			return list;
		}

		public static glTF_VRM_BlendShapeGroup Deserialize_vrm_blendShapeMaster_blendShapeGroups_LIST(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_BlendShapeGroup glTF_VRM_BlendShapeGroup2 = new glTF_VRM_BlendShapeGroup();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "name":
					glTF_VRM_BlendShapeGroup2.name = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "presetName":
					glTF_VRM_BlendShapeGroup2.presetName = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "binds":
					glTF_VRM_BlendShapeGroup2.binds = Deserialize_vrm_blendShapeMaster_blendShapeGroups__binds(item.Value);
					break;
				case "materialValues":
					glTF_VRM_BlendShapeGroup2.materialValues = Deserialize_vrm_blendShapeMaster_blendShapeGroups__materialValues(item.Value);
					break;
				case "isBinary":
					glTF_VRM_BlendShapeGroup2.isBinary = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				}
			}
			return glTF_VRM_BlendShapeGroup2;
		}

		public static List<glTF_VRM_BlendShapeBind> Deserialize_vrm_blendShapeMaster_blendShapeGroups__binds(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<glTF_VRM_BlendShapeBind> list = new List<glTF_VRM_BlendShapeBind>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(Deserialize_vrm_blendShapeMaster_blendShapeGroups__binds_LIST(item));
			}
			return list;
		}

		public static glTF_VRM_BlendShapeBind Deserialize_vrm_blendShapeMaster_blendShapeGroups__binds_LIST(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			glTF_VRM_BlendShapeBind glTF_VRM_BlendShapeBind2 = new glTF_VRM_BlendShapeBind();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "mesh":
					glTF_VRM_BlendShapeBind2.mesh = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "index":
					glTF_VRM_BlendShapeBind2.index = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "weight":
					glTF_VRM_BlendShapeBind2.weight = ListTreeNodeExtensions.GetSingle(item.Value);
					break;
				}
			}
			return glTF_VRM_BlendShapeBind2;
		}

		public static List<glTF_VRM_MaterialValueBind> Deserialize_vrm_blendShapeMaster_blendShapeGroups__materialValues(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing refe

VRM10.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using MToon;
using Microsoft.CodeAnalysis;
using UniGLTF;
using UniGLTF.Extensions.VRMC_materials_mtoon;
using UniGLTF.Extensions.VRMC_node_constraint;
using UniGLTF.Extensions.VRMC_springBone;
using UniGLTF.Extensions.VRMC_vrm;
using UniGLTF.MeshUtility;
using UniHumanoid;
using UniJSON;
using UniVRM10.FastSpringBones.Blittables;
using UniVRM10.FastSpringBones.System;
using UniVRM10.Migration;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.Rendering;
using VRMShaders;
using VRMShaders.VRM10.MToon10.Runtime;
using VrmLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
}
namespace UniGLTF.Extensions.VRMC_vrm
{
	public static class GltfDeserializer
	{
		public static readonly Utf8String ExtensionNameUtf8 = Utf8String.From("VRMC_vrm");

		public static bool TryGet(glTFExtension src, out VRMC_vrm extension)
		{
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			glTFExtensionImport val = (glTFExtensionImport)(object)((src is glTFExtensionImport) ? src : null);
			if (val != null)
			{
				foreach (KeyValuePair<JsonNode, JsonNode> item in val.ObjectItems())
				{
					if (ListTreeNodeExtensions.GetUtf8String(item.Key) == ExtensionNameUtf8)
					{
						extension = Deserialize(item.Value);
						return true;
					}
				}
			}
			extension = null;
			return false;
		}

		public static VRMC_vrm Deserialize(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_010d: Unknown result type (might be due to invalid IL or missing references)
			//IL_012e: Unknown result type (might be due to invalid IL or missing references)
			VRMC_vrm vRMC_vrm = new VRMC_vrm();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					vRMC_vrm.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					vRMC_vrm.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "specVersion":
					vRMC_vrm.SpecVersion = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "meta":
					vRMC_vrm.Meta = Deserialize_Meta(item.Value);
					break;
				case "humanoid":
					vRMC_vrm.Humanoid = Deserialize_Humanoid(item.Value);
					break;
				case "firstPerson":
					vRMC_vrm.FirstPerson = Deserialize_FirstPerson(item.Value);
					break;
				case "lookAt":
					vRMC_vrm.LookAt = Deserialize_LookAt(item.Value);
					break;
				case "expressions":
					vRMC_vrm.Expressions = Deserialize_Expressions(item.Value);
					break;
				}
			}
			return vRMC_vrm;
		}

		public static Meta Deserialize_Meta(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
			//IL_0205: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0290: Unknown result type (might be due to invalid IL or missing references)
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ec: Unknown result type (might be due to invalid IL or missing references)
			//IL_0318: Unknown result type (might be due to invalid IL or missing references)
			//IL_0348: Unknown result type (might be due to invalid IL or missing references)
			//IL_0374: Unknown result type (might be due to invalid IL or missing references)
			Meta meta = new Meta();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					meta.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					meta.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "name":
					meta.Name = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "version":
					meta.Version = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "authors":
					meta.Authors = __meta_Deserialize_Authors(item.Value);
					break;
				case "copyrightInformation":
					meta.CopyrightInformation = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "contactInformation":
					meta.ContactInformation = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "references":
					meta.References = __meta_Deserialize_References(item.Value);
					break;
				case "thirdPartyLicenses":
					meta.ThirdPartyLicenses = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "thumbnailImage":
					meta.ThumbnailImage = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "licenseUrl":
					meta.LicenseUrl = ListTreeNodeExtensions.GetString(item.Value);
					break;
				case "avatarPermission":
					meta.AvatarPermission = (AvatarPermissionType)Enum.Parse(typeof(AvatarPermissionType), ListTreeNodeExtensions.GetString(item.Value), ignoreCase: true);
					break;
				case "allowExcessivelyViolentUsage":
					meta.AllowExcessivelyViolentUsage = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				case "allowExcessivelySexualUsage":
					meta.AllowExcessivelySexualUsage = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				case "commercialUsage":
					meta.CommercialUsage = (CommercialUsageType)Enum.Parse(typeof(CommercialUsageType), ListTreeNodeExtensions.GetString(item.Value), ignoreCase: true);
					break;
				case "allowPoliticalOrReligiousUsage":
					meta.AllowPoliticalOrReligiousUsage = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				case "allowAntisocialOrHateUsage":
					meta.AllowAntisocialOrHateUsage = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				case "creditNotation":
					meta.CreditNotation = (CreditNotationType)Enum.Parse(typeof(CreditNotationType), ListTreeNodeExtensions.GetString(item.Value), ignoreCase: true);
					break;
				case "allowRedistribution":
					meta.AllowRedistribution = ListTreeNodeExtensions.GetBoolean(item.Value);
					break;
				case "modification":
					meta.Modification = (ModificationType)Enum.Parse(typeof(ModificationType), ListTreeNodeExtensions.GetString(item.Value), ignoreCase: true);
					break;
				case "otherLicenseUrl":
					meta.OtherLicenseUrl = ListTreeNodeExtensions.GetString(item.Value);
					break;
				}
			}
			return meta;
		}

		public static List<string> __meta_Deserialize_Authors(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<string> list = new List<string>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(ListTreeNodeExtensions.GetString(item));
			}
			return list;
		}

		public static List<string> __meta_Deserialize_References(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<string> list = new List<string>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(ListTreeNodeExtensions.GetString(item));
			}
			return list;
		}

		public static Humanoid Deserialize_Humanoid(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			Humanoid humanoid = new Humanoid();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanoid.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanoid.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "humanBones":
					humanoid.HumanBones = __humanoid_Deserialize_HumanBones(item.Value);
					break;
				}
			}
			return humanoid;
		}

		public static HumanBones __humanoid_Deserialize_HumanBones(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Unknown result type (might be due to invalid IL or missing references)
			//IL_0137: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Unknown result type (might be due to invalid IL or missing references)
			//IL_017f: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_020f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0233: Unknown result type (might be due to invalid IL or missing references)
			//IL_0257: Unknown result type (might be due to invalid IL or missing references)
			//IL_027b: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
			//IL_030b: Unknown result type (might be due to invalid IL or missing references)
			//IL_032f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0353: Unknown result type (might be due to invalid IL or missing references)
			//IL_0377: Unknown result type (might be due to invalid IL or missing references)
			//IL_039b: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_0407: Unknown result type (might be due to invalid IL or missing references)
			//IL_042b: Unknown result type (might be due to invalid IL or missing references)
			//IL_044f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0473: Unknown result type (might be due to invalid IL or missing references)
			//IL_0497: Unknown result type (might be due to invalid IL or missing references)
			//IL_04bb: Unknown result type (might be due to invalid IL or missing references)
			//IL_04df: Unknown result type (might be due to invalid IL or missing references)
			//IL_0503: Unknown result type (might be due to invalid IL or missing references)
			//IL_0527: Unknown result type (might be due to invalid IL or missing references)
			//IL_054b: Unknown result type (might be due to invalid IL or missing references)
			//IL_056f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0593: Unknown result type (might be due to invalid IL or missing references)
			//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
			//IL_05db: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0623: Unknown result type (might be due to invalid IL or missing references)
			//IL_0647: Unknown result type (might be due to invalid IL or missing references)
			//IL_066b: Unknown result type (might be due to invalid IL or missing references)
			//IL_068f: Unknown result type (might be due to invalid IL or missing references)
			//IL_06b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_06d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_06fb: Unknown result type (might be due to invalid IL or missing references)
			//IL_071f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0743: Unknown result type (might be due to invalid IL or missing references)
			//IL_0767: Unknown result type (might be due to invalid IL or missing references)
			//IL_0788: Unknown result type (might be due to invalid IL or missing references)
			//IL_07a9: Unknown result type (might be due to invalid IL or missing references)
			//IL_07ca: Unknown result type (might be due to invalid IL or missing references)
			HumanBones humanBones = new HumanBones();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "hips":
					humanBones.Hips = __humanoid__humanBones_Deserialize_Hips(item.Value);
					break;
				case "spine":
					humanBones.Spine = __humanoid__humanBones_Deserialize_Spine(item.Value);
					break;
				case "chest":
					humanBones.Chest = __humanoid__humanBones_Deserialize_Chest(item.Value);
					break;
				case "upperChest":
					humanBones.UpperChest = __humanoid__humanBones_Deserialize_UpperChest(item.Value);
					break;
				case "neck":
					humanBones.Neck = __humanoid__humanBones_Deserialize_Neck(item.Value);
					break;
				case "head":
					humanBones.Head = __humanoid__humanBones_Deserialize_Head(item.Value);
					break;
				case "leftEye":
					humanBones.LeftEye = __humanoid__humanBones_Deserialize_LeftEye(item.Value);
					break;
				case "rightEye":
					humanBones.RightEye = __humanoid__humanBones_Deserialize_RightEye(item.Value);
					break;
				case "jaw":
					humanBones.Jaw = __humanoid__humanBones_Deserialize_Jaw(item.Value);
					break;
				case "leftUpperLeg":
					humanBones.LeftUpperLeg = __humanoid__humanBones_Deserialize_LeftUpperLeg(item.Value);
					break;
				case "leftLowerLeg":
					humanBones.LeftLowerLeg = __humanoid__humanBones_Deserialize_LeftLowerLeg(item.Value);
					break;
				case "leftFoot":
					humanBones.LeftFoot = __humanoid__humanBones_Deserialize_LeftFoot(item.Value);
					break;
				case "leftToes":
					humanBones.LeftToes = __humanoid__humanBones_Deserialize_LeftToes(item.Value);
					break;
				case "rightUpperLeg":
					humanBones.RightUpperLeg = __humanoid__humanBones_Deserialize_RightUpperLeg(item.Value);
					break;
				case "rightLowerLeg":
					humanBones.RightLowerLeg = __humanoid__humanBones_Deserialize_RightLowerLeg(item.Value);
					break;
				case "rightFoot":
					humanBones.RightFoot = __humanoid__humanBones_Deserialize_RightFoot(item.Value);
					break;
				case "rightToes":
					humanBones.RightToes = __humanoid__humanBones_Deserialize_RightToes(item.Value);
					break;
				case "leftShoulder":
					humanBones.LeftShoulder = __humanoid__humanBones_Deserialize_LeftShoulder(item.Value);
					break;
				case "leftUpperArm":
					humanBones.LeftUpperArm = __humanoid__humanBones_Deserialize_LeftUpperArm(item.Value);
					break;
				case "leftLowerArm":
					humanBones.LeftLowerArm = __humanoid__humanBones_Deserialize_LeftLowerArm(item.Value);
					break;
				case "leftHand":
					humanBones.LeftHand = __humanoid__humanBones_Deserialize_LeftHand(item.Value);
					break;
				case "rightShoulder":
					humanBones.RightShoulder = __humanoid__humanBones_Deserialize_RightShoulder(item.Value);
					break;
				case "rightUpperArm":
					humanBones.RightUpperArm = __humanoid__humanBones_Deserialize_RightUpperArm(item.Value);
					break;
				case "rightLowerArm":
					humanBones.RightLowerArm = __humanoid__humanBones_Deserialize_RightLowerArm(item.Value);
					break;
				case "rightHand":
					humanBones.RightHand = __humanoid__humanBones_Deserialize_RightHand(item.Value);
					break;
				case "leftThumbProximal":
					humanBones.LeftThumbProximal = __humanoid__humanBones_Deserialize_LeftThumbProximal(item.Value);
					break;
				case "leftThumbIntermediate":
					humanBones.LeftThumbIntermediate = __humanoid__humanBones_Deserialize_LeftThumbIntermediate(item.Value);
					break;
				case "leftThumbDistal":
					humanBones.LeftThumbDistal = __humanoid__humanBones_Deserialize_LeftThumbDistal(item.Value);
					break;
				case "leftIndexProximal":
					humanBones.LeftIndexProximal = __humanoid__humanBones_Deserialize_LeftIndexProximal(item.Value);
					break;
				case "leftIndexIntermediate":
					humanBones.LeftIndexIntermediate = __humanoid__humanBones_Deserialize_LeftIndexIntermediate(item.Value);
					break;
				case "leftIndexDistal":
					humanBones.LeftIndexDistal = __humanoid__humanBones_Deserialize_LeftIndexDistal(item.Value);
					break;
				case "leftMiddleProximal":
					humanBones.LeftMiddleProximal = __humanoid__humanBones_Deserialize_LeftMiddleProximal(item.Value);
					break;
				case "leftMiddleIntermediate":
					humanBones.LeftMiddleIntermediate = __humanoid__humanBones_Deserialize_LeftMiddleIntermediate(item.Value);
					break;
				case "leftMiddleDistal":
					humanBones.LeftMiddleDistal = __humanoid__humanBones_Deserialize_LeftMiddleDistal(item.Value);
					break;
				case "leftRingProximal":
					humanBones.LeftRingProximal = __humanoid__humanBones_Deserialize_LeftRingProximal(item.Value);
					break;
				case "leftRingIntermediate":
					humanBones.LeftRingIntermediate = __humanoid__humanBones_Deserialize_LeftRingIntermediate(item.Value);
					break;
				case "leftRingDistal":
					humanBones.LeftRingDistal = __humanoid__humanBones_Deserialize_LeftRingDistal(item.Value);
					break;
				case "leftLittleProximal":
					humanBones.LeftLittleProximal = __humanoid__humanBones_Deserialize_LeftLittleProximal(item.Value);
					break;
				case "leftLittleIntermediate":
					humanBones.LeftLittleIntermediate = __humanoid__humanBones_Deserialize_LeftLittleIntermediate(item.Value);
					break;
				case "leftLittleDistal":
					humanBones.LeftLittleDistal = __humanoid__humanBones_Deserialize_LeftLittleDistal(item.Value);
					break;
				case "rightThumbProximal":
					humanBones.RightThumbProximal = __humanoid__humanBones_Deserialize_RightThumbProximal(item.Value);
					break;
				case "rightThumbIntermediate":
					humanBones.RightThumbIntermediate = __humanoid__humanBones_Deserialize_RightThumbIntermediate(item.Value);
					break;
				case "rightThumbDistal":
					humanBones.RightThumbDistal = __humanoid__humanBones_Deserialize_RightThumbDistal(item.Value);
					break;
				case "rightIndexProximal":
					humanBones.RightIndexProximal = __humanoid__humanBones_Deserialize_RightIndexProximal(item.Value);
					break;
				case "rightIndexIntermediate":
					humanBones.RightIndexIntermediate = __humanoid__humanBones_Deserialize_RightIndexIntermediate(item.Value);
					break;
				case "rightIndexDistal":
					humanBones.RightIndexDistal = __humanoid__humanBones_Deserialize_RightIndexDistal(item.Value);
					break;
				case "rightMiddleProximal":
					humanBones.RightMiddleProximal = __humanoid__humanBones_Deserialize_RightMiddleProximal(item.Value);
					break;
				case "rightMiddleIntermediate":
					humanBones.RightMiddleIntermediate = __humanoid__humanBones_Deserialize_RightMiddleIntermediate(item.Value);
					break;
				case "rightMiddleDistal":
					humanBones.RightMiddleDistal = __humanoid__humanBones_Deserialize_RightMiddleDistal(item.Value);
					break;
				case "rightRingProximal":
					humanBones.RightRingProximal = __humanoid__humanBones_Deserialize_RightRingProximal(item.Value);
					break;
				case "rightRingIntermediate":
					humanBones.RightRingIntermediate = __humanoid__humanBones_Deserialize_RightRingIntermediate(item.Value);
					break;
				case "rightRingDistal":
					humanBones.RightRingDistal = __humanoid__humanBones_Deserialize_RightRingDistal(item.Value);
					break;
				case "rightLittleProximal":
					humanBones.RightLittleProximal = __humanoid__humanBones_Deserialize_RightLittleProximal(item.Value);
					break;
				case "rightLittleIntermediate":
					humanBones.RightLittleIntermediate = __humanoid__humanBones_Deserialize_RightLittleIntermediate(item.Value);
					break;
				case "rightLittleDistal":
					humanBones.RightLittleDistal = __humanoid__humanBones_Deserialize_RightLittleDistal(item.Value);
					break;
				}
			}
			return humanBones;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_Hips(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_Spine(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_Chest(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_UpperChest(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_Neck(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_Head(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftEye(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightEye(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_Jaw(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftUpperLeg(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftLowerLeg(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftFoot(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftToes(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightUpperLeg(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightLowerLeg(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightFoot(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightToes(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftShoulder(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftUpperArm(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftLowerArm(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftHand(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightShoulder(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightUpperArm(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightLowerArm(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightHand(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftThumbDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftIndexProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftIndexIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftIndexDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftMiddleProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftMiddleIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftMiddleDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftRingProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftRingIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftRingDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftLittleProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftLittleIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_LeftLittleDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightThumbProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightThumbIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightThumbDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightIndexProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightIndexIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightIndexDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightMiddleProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightMiddleIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightMiddleDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightRingProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightRingIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightRingDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightLittleProximal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightLittleIntermediate(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static HumanBone __humanoid__humanBones_Deserialize_RightLittleDistal(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			HumanBone humanBone = new HumanBone();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					humanBone.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					humanBone.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					humanBone.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				}
			}
			return humanBone;
		}

		public static FirstPerson Deserialize_FirstPerson(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Expected O, but got Unknown
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			FirstPerson firstPerson = new FirstPerson();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					firstPerson.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					firstPerson.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "meshAnnotations":
					firstPerson.MeshAnnotations = __firstPerson_Deserialize_MeshAnnotations(item.Value);
					break;
				}
			}
			return firstPerson;
		}

		public static List<MeshAnnotation> __firstPerson_Deserialize_MeshAnnotations(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			List<MeshAnnotation> list = new List<MeshAnnotation>();
			foreach (JsonNode item in ListTreeNodeArrayExtensions.ArrayItems(parsed))
			{
				list.Add(__firstPerson_Deserialize_MeshAnnotations_ITEM(item));
			}
			return list;
		}

		public static MeshAnnotation __firstPerson_Deserialize_MeshAnnotations_ITEM(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			//IL_006b: Expected O, but got Unknown
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			MeshAnnotation meshAnnotation = new MeshAnnotation();
			foreach (KeyValuePair<JsonNode, JsonNode> item in IValueNodeObjectExtensions.ObjectItems(parsed))
			{
				switch (ListTreeNodeExtensions.GetString(item.Key))
				{
				case "extensions":
					meshAnnotation.Extensions = (object)new glTFExtensionImport(item.Value);
					break;
				case "extras":
					meshAnnotation.Extras = (object)new glTFExtensionImport(item.Value);
					break;
				case "node":
					meshAnnotation.Node = ListTreeNodeExtensions.GetInt32(item.Value);
					break;
				case "type":
					meshAnnotation.Type = (FirstPersonType)Enum.Parse(typeof(FirstPersonType), ListTreeNodeExtensions.GetString(item.Value), ignoreCase: true);
					break;
				}
			}
			return meshAnnotation;
		}

		public static LookAt Deserialize_LookAt(JsonNode parsed)
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Expected O, but got Unknown
			//IL_0083: Unknown result type (mi

VrmLib.dll

Decompiled 5 months ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Text;
using UniGLTF;
using Unity.Collections;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[module: UnverifiableCode]
namespace VrmLib;

public enum GeometryCoordinates
{
	Unknown,
	XYZ_RightUpBack_RH,
	XYZ_RightUpForward_RH,
	XYZ_RightUpForward_LH
}
public enum TextureOrigin
{
	Unknown,
	LeftTop,
	LeftBottom
}
public struct Coordinates
{
	public GeometryCoordinates Geometry;

	public TextureOrigin Texture;

	public static Coordinates Vrm0
	{
		get
		{
			Coordinates result = default(Coordinates);
			result.Geometry = GeometryCoordinates.XYZ_RightUpBack_RH;
			result.Texture = TextureOrigin.LeftTop;
			return result;
		}
	}

	public bool IsVrm0 => Equals(Vrm0);

	public static Coordinates Vrm1
	{
		get
		{
			Coordinates result = default(Coordinates);
			result.Geometry = GeometryCoordinates.XYZ_RightUpForward_RH;
			result.Texture = TextureOrigin.LeftTop;
			return result;
		}
	}

	public bool IsVrm1 => Equals(Vrm1);

	public static Coordinates Unity
	{
		get
		{
			Coordinates result = default(Coordinates);
			result.Geometry = GeometryCoordinates.XYZ_RightUpForward_LH;
			result.Texture = TextureOrigin.LeftBottom;
			return result;
		}
	}

	public bool IsUnity => Equals(Unity);
}
public static class EnumUtil
{
	private class GenericCache<T> where T : Enum
	{
		public static T[] Values = GetValues().ToArray();

		private static IEnumerable<T> GetValues()
		{
			foreach (object value in Enum.GetValues(typeof(T)))
			{
				yield return (T)value;
			}
		}
	}

	public static T Parse<T>(string src, bool ignoreCase = true) where T : struct
	{
		if (string.IsNullOrEmpty(src))
		{
			return default(T);
		}
		return (T)Enum.Parse(typeof(T), src, ignoreCase);
	}

	public static T TryParseOrDefault<T>(string src, T defaultValue = default(T)) where T : struct
	{
		try
		{
			return (T)Enum.Parse(typeof(T), src, ignoreCase: true);
		}
		catch (Exception)
		{
			return defaultValue;
		}
	}

	public static T Cast<T>(object src, bool ignoreCase = true) where T : struct
	{
		if (src == null)
		{
			throw new ArgumentNullException();
		}
		return (T)Enum.Parse(typeof(T), src.ToString(), ignoreCase);
	}

	public static T[] Values<T>() where T : Enum
	{
		return GenericCache<T>.Values;
	}
}
[Serializable]
public struct ExportArgs
{
	private bool? m_sparse;

	private bool? m_remove_morph_normal;

	private bool? m_remove_tangent;

	public bool sparse
	{
		get
		{
			if (!m_sparse.HasValue)
			{
				m_sparse = true;
			}
			return m_sparse.Value;
		}
		set
		{
			m_sparse = value;
		}
	}

	public bool removeMorphNormal
	{
		get
		{
			if (!m_remove_morph_normal.HasValue)
			{
				m_remove_morph_normal = false;
			}
			return m_remove_morph_normal.Value;
		}
		set
		{
			m_remove_morph_normal = value;
		}
	}

	public bool removeTangent
	{
		get
		{
			if (!m_remove_tangent.HasValue)
			{
				m_remove_tangent = true;
			}
			return m_remove_tangent.Value;
		}
		set
		{
			m_remove_tangent = value;
		}
	}
}
public static class ListExtensions
{
	public static int IndexOfThrow<T>(this List<T> list, T target)
	{
		int num = list.IndexOf(target);
		if (num == -1)
		{
			throw new KeyNotFoundException();
		}
		return num;
	}

	public static int? IndexOfNullable<T>(this List<T> list, T target)
	{
		int num = list.IndexOf(target);
		if (num == -1)
		{
			return null;
		}
		return num;
	}
}
public class GltfId
{
	public int? GltfIndex;

	public int SortOrder => GltfIndex.GetValueOrDefault(int.MaxValue);
}
public struct HumanoidHead
{
	public Node Head;

	public Node Jaw;

	public Node LeftEye;

	public Node RightEye;

	public bool HasRequiredBones => Head != null;
}
public struct HumanoidArm
{
	public Node Shoulder;

	public Node Upper;

	public Node Lower;

	public Node Hand;

	public bool HasRequiredBones
	{
		get
		{
			if (Upper != null && Lower != null)
			{
				return Hand != null;
			}
			return false;
		}
	}

	public Vector3 Direction
	{
		get
		{
			//IL_002f: Unknown result type (might be due to invalid IL or missing references)
			//IL_003a: Unknown result type (might be due to invalid IL or missing references)
			//IL_003f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0019: Unknown result type (might be due to invalid IL or missing references)
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			if (Shoulder != null)
			{
				return Vector3.Normalize(Hand.Translation - Shoulder.Translation);
			}
			return Vector3.Normalize(Hand.Translation - Upper.Translation);
		}
	}

	public void DirectTo(Vector3 dir)
	{
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_006d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		if (Shoulder != null)
		{
			Shoulder.RotateFromTo(Upper.Translation - Shoulder.Translation, dir);
		}
		Upper.RotateFromTo(Lower.Translation - Upper.Translation, dir);
		Lower.RotateFromTo(Hand.Translation - Lower.Translation, dir);
	}
}
public struct HumanoidLeg
{
	public Node Upper;

	public Node Lower;

	public Node Foot;

	public Node Toe;
}
internal struct HumanoidFinger
{
	public Node Proximal;

	public Node Intermediate;

	public Node Distal;
}
internal struct HumanoidFingers
{
	public HumanoidFinger Thumb;

	public HumanoidFinger Index;

	public HumanoidFinger Middle;

	public HumanoidFinger Ring;

	public HumanoidFinger Little;
}
public class Humanoid : IDictionary<HumanoidBones, Node>, ICollection<KeyValuePair<HumanoidBones, Node>>, IEnumerable<KeyValuePair<HumanoidBones, Node>>, IEnumerable
{
	public Node Hips;

	public Node Spine;

	public Node Chest;

	public Node UpperChest;

	public Node Neck;

	private HumanoidHead Head;

	private HumanoidArm LeftArm;

	private HumanoidFingers LeftFingers;

	private HumanoidArm RightArm;

	private HumanoidFingers RightFingers;

	private HumanoidLeg LeftLeg;

	private HumanoidLeg RightLeg;

	public bool HasRequiredBones
	{
		get
		{
			if (Hips == null)
			{
				return false;
			}
			if (Spine == null)
			{
				return false;
			}
			if (!Head.HasRequiredBones)
			{
				return false;
			}
			if (!LeftArm.HasRequiredBones)
			{
				return false;
			}
			if (!RightArm.HasRequiredBones)
			{
				return false;
			}
			return true;
		}
	}

	ICollection<HumanoidBones> IDictionary<HumanoidBones, Node>.Keys
	{
		get
		{
			throw new NotImplementedException();
		}
	}

	ICollection<Node> IDictionary<HumanoidBones, Node>.Values
	{
		get
		{
			throw new NotImplementedException();
		}
	}

	int ICollection<KeyValuePair<HumanoidBones, Node>>.Count => this.Select((KeyValuePair<HumanoidBones, Node> _) => _).Count();

	bool ICollection<KeyValuePair<HumanoidBones, Node>>.IsReadOnly
	{
		get
		{
			throw new NotImplementedException();
		}
	}

	Node IDictionary<HumanoidBones, Node>.this[HumanoidBones key]
	{
		get
		{
			throw new NotImplementedException();
		}
		set
		{
			throw new NotImplementedException();
		}
	}

	public Node this[HumanoidBones key]
	{
		get
		{
			if (TryGetValue(key, out var value))
			{
				return value;
			}
			throw new KeyNotFoundException();
		}
	}

	public Node this[Node node]
	{
		get
		{
			if (node.HumanoidBone.HasValue && node.HumanoidBone.Value != 0)
			{
				return this[node.HumanoidBone.Value];
			}
			return Hips.Traverse().First((Node x) => x.Name == node.Name);
		}
	}

	public Humanoid()
	{
	}

	public Humanoid(Node root)
	{
		Assign(root);
	}

	public void Assign(Node root)
	{
		foreach (Node item in root.Traverse())
		{
			if (item.HumanoidBone.HasValue)
			{
				Add(item.HumanoidBone.Value, item);
			}
		}
	}

	private void CopyTraverse(Node src, Node dst)
	{
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		dst.HumanoidBone = src.HumanoidBone;
		dst.LocalScaling = src.LocalScaling;
		dst.LocalRotation = src.LocalRotation;
		dst.LocalTranslation = src.LocalTranslation;
		foreach (Node child in src.Children)
		{
			Node node = new Node(child.Name);
			dst.Add(node);
			CopyTraverse(child, node);
		}
	}

	public Humanoid CopyNodes()
	{
		Node node = new Node(Hips.Name);
		CopyTraverse(Hips, node);
		return new Humanoid(node);
	}

	public (bool, string) Y180()
	{
		//IL_001b: Unknown result type (might be due to invalid IL or missing references)
		StringBuilder stringBuilder = new StringBuilder();
		Hips.LocalRotation = Quaternion.Euler(0f, MathFWrap.PI, 0f);
		Hips.CalcWorldMatrix();
		return (true, stringBuilder.ToString());
	}

	public (bool, string) MakeTPose()
	{
		//IL_0013: Unknown result type (might be due to invalid IL or missing references)
		//IL_0023: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_003c: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007c: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
		StringBuilder stringBuilder = new StringBuilder();
		bool item = false;
		Vector3 val = Vector3.Cross(Vector3.Normalize(LeftLeg.Upper.Translation - RightLeg.Upper.Translation), Vector3.up);
		if (Vector3.Dot(val, -Vector3.forward) < 0.9f)
		{
			Hips.RotateFromTo(val, -Vector3.forward);
			item = true;
		}
		if (Vector3.Dot(LeftArm.Direction, -Vector3.right) < 0.9f)
		{
			LeftArm.DirectTo(-Vector3.right);
			stringBuilder.Append("(fix left arm)");
			item = true;
		}
		if (Vector3.Dot(RightArm.Direction, Vector3.right) < 0.9f)
		{
			RightArm.DirectTo(Vector3.right);
			stringBuilder.Append("(fix right arm)");
			item = true;
		}
		Hips.CalcWorldMatrix();
		return (item, stringBuilder.ToString());
	}

	public void RetargetTo(Humanoid srcTPose, Humanoid dst)
	{
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		using (IEnumerator<KeyValuePair<HumanoidBones, Node>> enumerator = GetEnumerator())
		{
			while (enumerator.MoveNext())
			{
				KeyValuePair<HumanoidBones, Node> current = enumerator.Current;
				Node node = srcTPose[current.Key];
				if (dst.TryGetValue(current.Key, out var value))
				{
					Quaternion rotation = node.Rotation;
					value.Rotation = current.Value.Rotation * Quaternion.Inverse(rotation);
				}
				else
				{
					Console.WriteLine($"{current.Key} not found");
				}
			}
		}
		dst.Hips.CalcWorldMatrix();
	}

	public void Add(KeyValuePair<HumanoidBones, Node> item)
	{
		Add(item.Key, item.Value);
	}

	public void Add(HumanoidBones key, Node node)
	{
		if (key == HumanoidBones.unknown)
		{
			throw new ArgumentException();
		}
		node.HumanoidBone = key;
		switch (node.HumanoidBone.Value)
		{
		case HumanoidBones.hips:
			Hips = node;
			break;
		case HumanoidBones.spine:
			Spine = node;
			break;
		case HumanoidBones.chest:
			Chest = node;
			break;
		case HumanoidBones.upperChest:
			UpperChest = node;
			break;
		case HumanoidBones.neck:
			Neck = node;
			break;
		case HumanoidBones.head:
			Head.Head = node;
			break;
		case HumanoidBones.jaw:
			Head.Jaw = node;
			break;
		case HumanoidBones.leftEye:
			Head.LeftEye = node;
			break;
		case HumanoidBones.rightEye:
			Head.RightEye = node;
			break;
		case HumanoidBones.leftShoulder:
			LeftArm.Shoulder = node;
			break;
		case HumanoidBones.leftUpperArm:
			LeftArm.Upper = node;
			break;
		case HumanoidBones.leftLowerArm:
			LeftArm.Lower = node;
			break;
		case HumanoidBones.leftHand:
			LeftArm.Hand = node;
			break;
		case HumanoidBones.rightShoulder:
			RightArm.Shoulder = node;
			break;
		case HumanoidBones.rightUpperArm:
			RightArm.Upper = node;
			break;
		case HumanoidBones.rightLowerArm:
			RightArm.Lower = node;
			break;
		case HumanoidBones.rightHand:
			RightArm.Hand = node;
			break;
		case HumanoidBones.leftUpperLeg:
			LeftLeg.Upper = node;
			break;
		case HumanoidBones.leftLowerLeg:
			LeftLeg.Lower = node;
			break;
		case HumanoidBones.leftFoot:
			LeftLeg.Foot = node;
			break;
		case HumanoidBones.leftToes:
			LeftLeg.Toe = node;
			break;
		case HumanoidBones.rightUpperLeg:
			RightLeg.Upper = node;
			break;
		case HumanoidBones.rightLowerLeg:
			RightLeg.Lower = node;
			break;
		case HumanoidBones.rightFoot:
			RightLeg.Foot = node;
			break;
		case HumanoidBones.rightToes:
			RightLeg.Toe = node;
			break;
		case HumanoidBones.leftThumbProximal:
			LeftFingers.Thumb.Proximal = node;
			break;
		case HumanoidBones.leftThumbIntermediate:
			LeftFingers.Thumb.Intermediate = node;
			break;
		case HumanoidBones.leftThumbDistal:
			LeftFingers.Thumb.Distal = node;
			break;
		case HumanoidBones.leftIndexProximal:
			LeftFingers.Index.Proximal = node;
			break;
		case HumanoidBones.leftIndexIntermediate:
			LeftFingers.Index.Intermediate = node;
			break;
		case HumanoidBones.leftIndexDistal:
			LeftFingers.Index.Distal = node;
			break;
		case HumanoidBones.leftMiddleProximal:
			LeftFingers.Middle.Proximal = node;
			break;
		case HumanoidBones.leftMiddleIntermediate:
			LeftFingers.Middle.Intermediate = node;
			break;
		case HumanoidBones.leftMiddleDistal:
			LeftFingers.Middle.Distal = node;
			break;
		case HumanoidBones.leftRingProximal:
			LeftFingers.Ring.Proximal = node;
			break;
		case HumanoidBones.leftRingIntermediate:
			LeftFingers.Ring.Intermediate = node;
			break;
		case HumanoidBones.leftRingDistal:
			LeftFingers.Ring.Distal = node;
			break;
		case HumanoidBones.leftLittleProximal:
			LeftFingers.Little.Proximal = node;
			break;
		case HumanoidBones.leftLittleIntermediate:
			LeftFingers.Little.Intermediate = node;
			break;
		case HumanoidBones.leftLittleDistal:
			LeftFingers.Little.Distal = node;
			break;
		case HumanoidBones.rightThumbProximal:
			RightFingers.Thumb.Proximal = node;
			break;
		case HumanoidBones.rightThumbIntermediate:
			RightFingers.Thumb.Intermediate = node;
			break;
		case HumanoidBones.rightThumbDistal:
			RightFingers.Thumb.Distal = node;
			break;
		case HumanoidBones.rightIndexProximal:
			RightFingers.Index.Proximal = node;
			break;
		case HumanoidBones.rightIndexIntermediate:
			RightFingers.Index.Intermediate = node;
			break;
		case HumanoidBones.rightIndexDistal:
			RightFingers.Index.Distal = node;
			break;
		case HumanoidBones.rightMiddleProximal:
			RightFingers.Middle.Proximal = node;
			break;
		case HumanoidBones.rightMiddleIntermediate:
			RightFingers.Middle.Intermediate = node;
			break;
		case HumanoidBones.rightMiddleDistal:
			RightFingers.Middle.Distal = node;
			break;
		case HumanoidBones.rightRingProximal:
			RightFingers.Ring.Proximal = node;
			break;
		case HumanoidBones.rightRingIntermediate:
			RightFingers.Ring.Intermediate = node;
			break;
		case HumanoidBones.rightRingDistal:
			RightFingers.Ring.Distal = node;
			break;
		case HumanoidBones.rightLittleProximal:
			RightFingers.Little.Proximal = node;
			break;
		case HumanoidBones.rightLittleIntermediate:
			RightFingers.Little.Intermediate = node;
			break;
		case HumanoidBones.rightLittleDistal:
			RightFingers.Little.Distal = node;
			break;
		default:
			throw new NotImplementedException();
		}
	}

	public bool ContainsKey(HumanoidBones key)
	{
		Node value;
		return TryGetValue(key, out value);
	}

	public bool Remove(HumanoidBones key)
	{
		if (!ContainsKey(key))
		{
			return false;
		}
		Add(key, null);
		return true;
	}

	public bool TryGetValue(HumanoidBones key, out Node value)
	{
		switch (key)
		{
		case HumanoidBones.hips:
			value = Hips;
			return true;
		case HumanoidBones.spine:
			value = Spine;
			return true;
		case HumanoidBones.chest:
			value = Chest;
			return true;
		case HumanoidBones.upperChest:
			value = UpperChest;
			return true;
		case HumanoidBones.neck:
			value = Neck;
			return true;
		case HumanoidBones.head:
			value = Head.Head;
			return true;
		case HumanoidBones.jaw:
			value = Head.Jaw;
			return true;
		case HumanoidBones.leftEye:
			value = Head.LeftEye;
			return true;
		case HumanoidBones.rightEye:
			value = Head.RightEye;
			return true;
		case HumanoidBones.leftShoulder:
			value = LeftArm.Shoulder;
			return true;
		case HumanoidBones.leftUpperArm:
			value = LeftArm.Upper;
			return true;
		case HumanoidBones.leftLowerArm:
			value = LeftArm.Lower;
			return true;
		case HumanoidBones.leftHand:
			value = LeftArm.Hand;
			return true;
		case HumanoidBones.rightShoulder:
			value = RightArm.Shoulder;
			return true;
		case HumanoidBones.rightUpperArm:
			value = RightArm.Upper;
			return true;
		case HumanoidBones.rightLowerArm:
			value = RightArm.Lower;
			return true;
		case HumanoidBones.rightHand:
			value = RightArm.Hand;
			return true;
		case HumanoidBones.leftUpperLeg:
			value = LeftLeg.Upper;
			return true;
		case HumanoidBones.leftLowerLeg:
			value = LeftLeg.Lower;
			return true;
		case HumanoidBones.leftFoot:
			value = LeftLeg.Foot;
			return true;
		case HumanoidBones.leftToes:
			value = LeftLeg.Toe;
			return true;
		case HumanoidBones.rightUpperLeg:
			value = RightLeg.Upper;
			return true;
		case HumanoidBones.rightLowerLeg:
			value = RightLeg.Lower;
			return true;
		case HumanoidBones.rightFoot:
			value = RightLeg.Foot;
			return true;
		case HumanoidBones.rightToes:
			value = RightLeg.Toe;
			return true;
		case HumanoidBones.leftThumbProximal:
			value = LeftFingers.Thumb.Proximal;
			return true;
		case HumanoidBones.leftThumbIntermediate:
			value = LeftFingers.Thumb.Intermediate;
			return true;
		case HumanoidBones.leftThumbDistal:
			value = LeftFingers.Thumb.Distal;
			return true;
		case HumanoidBones.leftIndexProximal:
			value = LeftFingers.Index.Proximal;
			return true;
		case HumanoidBones.leftIndexIntermediate:
			value = LeftFingers.Index.Intermediate;
			return true;
		case HumanoidBones.leftIndexDistal:
			value = LeftFingers.Index.Distal;
			return true;
		case HumanoidBones.leftMiddleProximal:
			value = LeftFingers.Middle.Proximal;
			return true;
		case HumanoidBones.leftMiddleIntermediate:
			value = LeftFingers.Middle.Intermediate;
			return true;
		case HumanoidBones.leftMiddleDistal:
			value = LeftFingers.Middle.Distal;
			return true;
		case HumanoidBones.leftRingProximal:
			value = LeftFingers.Ring.Proximal;
			return true;
		case HumanoidBones.leftRingIntermediate:
			value = LeftFingers.Ring.Intermediate;
			return true;
		case HumanoidBones.leftRingDistal:
			value = LeftFingers.Ring.Distal;
			return true;
		case HumanoidBones.leftLittleProximal:
			value = LeftFingers.Little.Proximal;
			return true;
		case HumanoidBones.leftLittleIntermediate:
			value = LeftFingers.Little.Intermediate;
			return true;
		case HumanoidBones.leftLittleDistal:
			value = LeftFingers.Little.Distal;
			return true;
		case HumanoidBones.rightThumbProximal:
			value = LeftFingers.Thumb.Proximal;
			return true;
		case HumanoidBones.rightThumbIntermediate:
			value = LeftFingers.Thumb.Intermediate;
			return true;
		case HumanoidBones.rightThumbDistal:
			value = LeftFingers.Thumb.Distal;
			return true;
		case HumanoidBones.rightIndexProximal:
			value = LeftFingers.Index.Proximal;
			return true;
		case HumanoidBones.rightIndexIntermediate:
			value = LeftFingers.Index.Intermediate;
			return true;
		case HumanoidBones.rightIndexDistal:
			value = LeftFingers.Index.Distal;
			return true;
		case HumanoidBones.rightMiddleProximal:
			value = LeftFingers.Middle.Proximal;
			return true;
		case HumanoidBones.rightMiddleIntermediate:
			value = LeftFingers.Middle.Intermediate;
			return true;
		case HumanoidBones.rightMiddleDistal:
			value = LeftFingers.Middle.Distal;
			return true;
		case HumanoidBones.rightRingProximal:
			value = LeftFingers.Ring.Proximal;
			return true;
		case HumanoidBones.rightRingIntermediate:
			value = LeftFingers.Ring.Intermediate;
			return true;
		case HumanoidBones.rightRingDistal:
			value = LeftFingers.Ring.Distal;
			return true;
		case HumanoidBones.rightLittleProximal:
			value = LeftFingers.Little.Proximal;
			return true;
		case HumanoidBones.rightLittleIntermediate:
			value = LeftFingers.Little.Intermediate;
			return true;
		case HumanoidBones.rightLittleDistal:
			value = LeftFingers.Little.Distal;
			return true;
		default:
			value = null;
			return false;
		}
	}

	public void Clear()
	{
		foreach (HumanoidBones value in Enum.GetValues(typeof(HumanoidBones)))
		{
			Add(value, null);
		}
	}

	public IEnumerator<KeyValuePair<HumanoidBones, Node>> GetEnumerator()
	{
		if (Hips != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.hips, Hips);
		}
		if (Spine != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.spine, Spine);
		}
		if (Chest != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.chest, Chest);
		}
		if (UpperChest != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.upperChest, UpperChest);
		}
		if (Neck != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.neck, Neck);
		}
		if (Head.Head != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.head, Head.Head);
		}
		if (LeftArm.Shoulder != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftShoulder, LeftArm.Shoulder);
		}
		if (LeftArm.Upper != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftUpperArm, LeftArm.Upper);
		}
		if (LeftArm.Lower != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftLowerArm, LeftArm.Lower);
		}
		if (LeftArm.Hand != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftHand, LeftArm.Hand);
		}
		if (RightArm.Shoulder != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightShoulder, RightArm.Shoulder);
		}
		if (RightArm.Upper != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightUpperArm, RightArm.Upper);
		}
		if (RightArm.Lower != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightLowerArm, RightArm.Lower);
		}
		if (RightArm.Hand != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightHand, RightArm.Hand);
		}
		if (LeftLeg.Upper != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftUpperLeg, LeftLeg.Upper);
		}
		if (LeftLeg.Lower != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftLowerLeg, LeftLeg.Lower);
		}
		if (LeftLeg.Foot != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.leftFoot, LeftLeg.Foot);
		}
		if (RightLeg.Upper != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightUpperLeg, RightLeg.Upper);
		}
		if (RightLeg.Lower != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightLowerLeg, RightLeg.Lower);
		}
		if (RightLeg.Foot != null)
		{
			yield return new KeyValuePair<HumanoidBones, Node>(HumanoidBones.rightFoot, RightLeg.Foot);
		}
	}

	IEnumerator IEnumerable.GetEnumerator()
	{
		return GetEnumerator();
	}

	bool ICollection<KeyValuePair<HumanoidBones, Node>>.Contains(KeyValuePair<HumanoidBones, Node> item)
	{
		throw new NotImplementedException();
	}

	void ICollection<KeyValuePair<HumanoidBones, Node>>.CopyTo(KeyValuePair<HumanoidBones, Node>[] array, int arrayIndex)
	{
		throw new NotImplementedException();
	}

	bool ICollection<KeyValuePair<HumanoidBones, Node>>.Remove(KeyValuePair<HumanoidBones, Node> item)
	{
		throw new NotImplementedException();
	}
}
public class BoneRequiredAttribute : Attribute
{
}
public enum HumanoidBones
{
	unknown,
	[BoneRequired]
	hips,
	[BoneRequired]
	leftUpperLeg,
	[BoneRequired]
	rightUpperLeg,
	[BoneRequired]
	leftLowerLeg,
	[BoneRequired]
	rightLowerLeg,
	[BoneRequired]
	leftFoot,
	[BoneRequired]
	rightFoot,
	[BoneRequired]
	spine,
	chest,
	neck,
	[BoneRequired]
	head,
	leftShoulder,
	rightShoulder,
	[BoneRequired]
	leftUpperArm,
	[BoneRequired]
	rightUpperArm,
	[BoneRequired]
	leftLowerArm,
	[BoneRequired]
	rightLowerArm,
	[BoneRequired]
	leftHand,
	[BoneRequired]
	rightHand,
	leftToes,
	rightToes,
	leftEye,
	rightEye,
	jaw,
	leftThumbProximal,
	leftThumbIntermediate,
	leftThumbDistal,
	leftIndexProximal,
	leftIndexIntermediate,
	leftIndexDistal,
	leftMiddleProximal,
	leftMiddleIntermediate,
	leftMiddleDistal,
	leftRingProximal,
	leftRingIntermediate,
	leftRingDistal,
	leftLittleProximal,
	leftLittleIntermediate,
	leftLittleDistal,
	rightThumbProximal,
	rightThumbIntermediate,
	rightThumbDistal,
	rightIndexProximal,
	rightIndexIntermediate,
	rightIndexDistal,
	rightMiddleProximal,
	rightMiddleIntermediate,
	rightMiddleDistal,
	rightRingProximal,
	rightRingIntermediate,
	rightRingDistal,
	rightLittleProximal,
	rightLittleIntermediate,
	rightLittleDistal,
	upperChest
}
public static class SkeletonEstimator
{
	private struct Arm
	{
		public Node Shoulder;

		public Node UpperArm;

		public Node LowerArm;

		public Node Hand;
	}

	private struct Leg
	{
		public Node UpperLeg;

		public Node LowerLeg;

		public Node Foot;

		public Node Toes;
	}

	private static Dictionary<string, HumanoidBones> s_nameBoneMap = new Dictionary<string, HumanoidBones>
	{
		{
			"Spine1",
			HumanoidBones.chest
		},
		{
			"Spine2",
			HumanoidBones.upperChest
		},
		{
			"LeftShoulder",
			HumanoidBones.leftShoulder
		},
		{
			"LeftArm",
			HumanoidBones.leftUpperArm
		},
		{
			"LeftForeArm",
			HumanoidBones.leftLowerArm
		},
		{
			"RightShoulder",
			HumanoidBones.rightShoulder
		},
		{
			"RightArm",
			HumanoidBones.rightUpperArm
		},
		{
			"RightForeArm",
			HumanoidBones.rightLowerArm
		},
		{
			"LeftUpLeg",
			HumanoidBones.leftUpperLeg
		},
		{
			"LeftLeg",
			HumanoidBones.leftLowerLeg
		},
		{
			"LeftToeBase",
			HumanoidBones.leftToes
		},
		{
			"RightUpLeg",
			HumanoidBones.rightUpperLeg
		},
		{
			"RightLeg",
			HumanoidBones.rightLowerLeg
		},
		{
			"RightToeBase",
			HumanoidBones.rightToes
		}
	};

	private static Dictionary<string, HumanoidBones> s_nameBoneMapLA = new Dictionary<string, HumanoidBones>
	{
		{
			"Chest",
			HumanoidBones.spine
		},
		{
			"Chest2",
			HumanoidBones.chest
		},
		{
			"LeftCollar",
			HumanoidBones.leftShoulder
		},
		{
			"LeftShoulder",
			HumanoidBones.leftUpperArm
		},
		{
			"LeftElbow",
			HumanoidBones.leftLowerArm
		},
		{
			"LeftWrist",
			HumanoidBones.leftHand
		},
		{
			"RightCollar",
			HumanoidBones.rightShoulder
		},
		{
			"RightShoulder",
			HumanoidBones.rightUpperArm
		},
		{
			"RightElbow",
			HumanoidBones.rightLowerArm
		},
		{
			"RightWrist",
			HumanoidBones.rightHand
		},
		{
			"LeftHip",
			HumanoidBones.leftUpperLeg
		},
		{
			"LeftKnee",
			HumanoidBones.leftLowerLeg
		},
		{
			"LeftAnkle",
			HumanoidBones.leftFoot
		},
		{
			"RightHip",
			HumanoidBones.rightUpperLeg
		},
		{
			"RightKnee",
			HumanoidBones.rightLowerLeg
		},
		{
			"RightAnkle",
			HumanoidBones.rightFoot
		}
	};

	private static Dictionary<string, HumanoidBones> s_nameBoneMapAccad = new Dictionary<string, HumanoidBones>
	{
		{
			"root",
			HumanoidBones.hips
		},
		{
			"lowerback",
			HumanoidBones.spine
		},
		{
			"upperback",
			HumanoidBones.chest
		},
		{
			"thorax",
			HumanoidBones.upperChest
		},
		{
			"neck",
			HumanoidBones.neck
		},
		{
			"head",
			HumanoidBones.head
		},
		{
			"lshoulderjoint",
			HumanoidBones.leftShoulder
		},
		{
			"lhumerus",
			HumanoidBones.leftUpperArm
		},
		{
			"lradius",
			HumanoidBones.leftLowerArm
		},
		{
			"lhand",
			HumanoidBones.leftHand
		},
		{
			"rshoulderjoint",
			HumanoidBones.rightShoulder
		},
		{
			"rhumerus",
			HumanoidBones.rightUpperArm
		},
		{
			"rradius",
			HumanoidBones.rightLowerArm
		},
		{
			"rhand",
			HumanoidBones.rightHand
		},
		{
			"rfemur",
			HumanoidBones.rightUpperLeg
		},
		{
			"rtibia",
			HumanoidBones.rightLowerLeg
		},
		{
			"rfoot",
			HumanoidBones.rightFoot
		},
		{
			"rtoes",
			HumanoidBones.rightToes
		},
		{
			"lfemur",
			HumanoidBones.leftUpperLeg
		},
		{
			"ltibia",
			HumanoidBones.leftLowerLeg
		},
		{
			"lfoot",
			HumanoidBones.leftFoot
		},
		{
			"ltoes",
			HumanoidBones.leftToes
		}
	};

	private static HumanoidBones[] RequiredBones = new HumanoidBones[15]
	{
		HumanoidBones.hips,
		HumanoidBones.spine,
		HumanoidBones.head,
		HumanoidBones.leftUpperArm,
		HumanoidBones.leftLowerArm,
		HumanoidBones.leftHand,
		HumanoidBones.leftUpperLeg,
		HumanoidBones.leftLowerLeg,
		HumanoidBones.leftFoot,
		HumanoidBones.rightUpperArm,
		HumanoidBones.rightLowerArm,
		HumanoidBones.rightHand,
		HumanoidBones.rightUpperLeg,
		HumanoidBones.rightLowerLeg,
		HumanoidBones.rightFoot
	};

	private static Node GetRoot(IReadOnlyList<Node> bones)
	{
		Node[] array = bones.Where((Node x) => x.Parent == null).ToArray();
		if (array.Length != 1)
		{
			throw new Exception("Require unique root");
		}
		return array[0];
	}

	private static Node SelectBone(Func<Node, Node, bool> pred, Node parent)
	{
		IReadOnlyList<Node> children = parent.Children;
		if (children == null || children.Count == 0)
		{
			throw new Exception("no bones");
		}
		foreach (Node item in children)
		{
			if (pred(item, parent))
			{
				return item;
			}
		}
		throw new Exception("not found");
	}

	private static void GetSpineAndHips(Node hips, out Node spine, out Node leg_L, out Node leg_R)
	{
		if (hips.Children.Count != 3)
		{
			throw new Exception("Hips require 3 children");
		}
		spine = SelectBone((Node l, Node r) => l.CenterOfDescendant().y > r.SkeletonLocalPosition.y, hips);
		Node s = spine;
		try
		{
			leg_L = SelectBone((Node l, Node r) => !l.Equals(s) && l.CenterOfDescendant().x < r.SkeletonLocalPosition.x, hips);
			leg_R = SelectBone((Node l, Node r) => !l.Equals(s) && l.CenterOfDescendant().x > r.SkeletonLocalPosition.x, hips);
		}
		catch (Exception)
		{
			leg_L = SelectBone((Node l, Node r) => !l.Equals(s) && l.CenterOfDescendant().z < r.SkeletonLocalPosition.z, hips);
			leg_R = SelectBone((Node l, Node r) => !l.Equals(s) && l.CenterOfDescendant().z > r.SkeletonLocalPosition.z, hips);
		}
	}

	private static void GetNeckAndArms(Node chest, out Node neck, out Node arm_L, out Node arm_R, Func<Vector3, Vector3, bool> isLeft)
	{
		if (chest.Children.Count != 3)
		{
			throw new Exception("Chest require 3 children");
		}
		neck = SelectBone((Node l, Node r) => l.CenterOfDescendant().y > r.SkeletonLocalPosition.y, chest);
		Node i = neck;
		arm_L = SelectBone((Node l, Node r) => !l.Equals(i) && isLeft(l.CenterOfDescendant(), r.SkeletonLocalPosition), chest);
		arm_R = SelectBone((Node l, Node r) => !l.Equals(i) && !isLeft(l.CenterOfDescendant(), r.SkeletonLocalPosition), chest);
	}

	private static Arm GetArm(Node shoulder)
	{
		Node[] array = shoulder.Traverse().ToArray();
		switch (array.Length)
		{
		case 0:
		case 1:
		case 2:
			throw new NotImplementedException();
		case 3:
		{
			Arm result = default(Arm);
			result.UpperArm = array[0];
			result.LowerArm = array[1];
			result.Hand = array[2];
			return result;
		}
		default:
		{
			Arm result = default(Arm);
			result.Shoulder = array[0];
			result.UpperArm = array[1];
			result.LowerArm = array[2];
			result.Hand = array[3];
			return result;
		}
		}
	}

	private static Leg GetLeg(Node leg)
	{
		Node[] array = (from x in leg.Traverse()
			where string.IsNullOrEmpty(x.Name) || !x.Name.ToLower().Contains("buttock")
			select x).ToArray();
		switch (array.Length)
		{
		case 0:
		case 1:
		case 2:
			throw new NotImplementedException();
		case 3:
		{
			Leg result = default(Leg);
			result.UpperLeg = array[0];
			result.LowerLeg = array[1];
			result.Foot = array[2];
			return result;
		}
		default:
		{
			Leg result = default(Leg);
			result.UpperLeg = array[^4];
			result.LowerLeg = array[^3];
			result.Foot = array[^2];
			result.Toes = array[^1];
			return result;
		}
		}
	}

	public static Dictionary<HumanoidBones, Node> DetectByName(Node root, Dictionary<string, HumanoidBones> map)
	{
		Dictionary<HumanoidBones, Node> dictionary = new Dictionary<HumanoidBones, Node>();
		foreach (Node item in root.Traverse())
		{
			HumanoidBones result;
			if (map.TryGetValue(item.Name, out var value))
			{
				if (value != 0)
				{
					dictionary.Add(value, item);
				}
			}
			else if (Enum.TryParse<HumanoidBones>(item.Name, ignoreCase: true, out result))
			{
				value = result;
				dictionary.Add(value, item);
			}
		}
		return dictionary;
	}

	public static Dictionary<HumanoidBones, Node> DetectByPosition(Node root)
	{
		//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		Node node = root.Traverse().First((Node x) => x.Children.Where((Node y) => y.Traverse().Count() >= 3).Count() >= 3);
		GetSpineAndHips(node, out var spine, out var leg_L, out var leg_R);
		if (leg_L.Equals(leg_R))
		{
			throw new Exception();
		}
		Leg leg = GetLeg(leg_L);
		Leg leg2 = GetLeg(leg_R);
		List<Node> list = new List<Node>();
		foreach (Node item in spine.Traverse())
		{
			list.Add(item);
			if (item.Children.Count == 3)
			{
				break;
			}
		}
		Func<Vector3, Vector3, bool> func = null;
		GetNeckAndArms(isLeft: (leg.UpperLeg.SkeletonLocalPosition.z != leg2.UpperLeg.SkeletonLocalPosition.z) ? ((Func<Vector3, Vector3, bool>)((Vector3 l, Vector3 r) => l.z < r.z)) : ((Func<Vector3, Vector3, bool>)((Vector3 l, Vector3 r) => l.x < r.x)), chest: list.Last(), neck: out var neck, arm_L: out var arm_L, arm_R: out var arm_R);
		Arm arm = GetArm(arm_L);
		Arm arm2 = GetArm(arm_R);
		Node[] array = neck.Traverse().ToArray();
		Dictionary<HumanoidBones, Node> skeleton = new Dictionary<HumanoidBones, Node>();
		Action<HumanoidBones, Node> action = delegate(HumanoidBones b, Node t)
		{
			if (t != null)
			{
				t.HumanoidBone = b;
				skeleton[b] = t;
			}
		};
		action(HumanoidBones.hips, node);
		switch (list.Count)
		{
		case 0:
			throw new Exception();
		case 1:
			action(HumanoidBones.spine, list[0]);
			break;
		case 2:
			action(HumanoidBones.spine, list[0]);
			action(HumanoidBones.chest, list[1]);
			break;
		case 3:
			action(HumanoidBones.spine, list[0]);
			action(HumanoidBones.chest, list[1]);
			action(HumanoidBones.upperChest, list[2]);
			break;
		default:
			action(HumanoidBones.spine, list[0]);
			action(HumanoidBones.chest, list[1]);
			action(HumanoidBones.upperChest, list.Last());
			break;
		}
		switch (array.Length)
		{
		case 0:
			throw new Exception();
		case 1:
			action(HumanoidBones.head, array[0]);
			break;
		case 2:
			action(HumanoidBones.neck, array[0]);
			action(HumanoidBones.head, array[1]);
			break;
		default:
			action(HumanoidBones.neck, array[0]);
			action(HumanoidBones.head, array.Where((Node x) => x.Parent.Children.Count == 1).Last());
			break;
		}
		action(HumanoidBones.leftUpperLeg, leg.UpperLeg);
		action(HumanoidBones.leftLowerLeg, leg.LowerLeg);
		action(HumanoidBones.leftFoot, leg.Foot);
		action(HumanoidBones.leftToes, leg.Toes);
		action(HumanoidBones.rightUpperLeg, leg2.UpperLeg);
		action(HumanoidBones.rightLowerLeg, leg2.LowerLeg);
		action(HumanoidBones.rightFoot, leg2.Foot);
		action(HumanoidBones.rightToes, leg2.Toes);
		action(HumanoidBones.leftShoulder, arm.Shoulder);
		action(HumanoidBones.leftUpperArm, arm.UpperArm);
		action(HumanoidBones.leftLowerArm, arm.LowerArm);
		action(HumanoidBones.leftHand, arm.Hand);
		action(HumanoidBones.rightShoulder, arm2.Shoulder);
		action(HumanoidBones.rightUpperArm, arm2.UpperArm);
		action(HumanoidBones.rightLowerArm, arm2.LowerArm);
		action(HumanoidBones.rightHand, arm2.Hand);
		return skeleton;
	}

	private static bool HasAllHumanRequiredBone(Dictionary<HumanoidBones, Node> dict)
	{
		HumanoidBones[] requiredBones = RequiredBones;
		foreach (HumanoidBones key in requiredBones)
		{
			if (!dict.ContainsKey(key))
			{
				return false;
			}
		}
		return true;
	}

	private static Dictionary<HumanoidBones, Node> _Detect(Node root)
	{
		List<Dictionary<HumanoidBones, Node>> list = new List<Dictionary<HumanoidBones, Node>>();
		Dictionary<string, HumanoidBones>[] array = new Dictionary<string, HumanoidBones>[3] { s_nameBoneMap, s_nameBoneMapLA, s_nameBoneMapAccad };
		foreach (Dictionary<string, HumanoidBones> map in array)
		{
			try
			{
				Dictionary<HumanoidBones, Node> dictionary = DetectByName(root, map);
				if (dictionary != null)
				{
					list.Add(dictionary);
				}
			}
			catch (Exception)
			{
			}
		}
		foreach (Dictionary<HumanoidBones, Node> item in list.OrderByDescending((Dictionary<HumanoidBones, Node> x) => x.Count))
		{
			if (HasAllHumanRequiredBone(item))
			{
				return item;
			}
		}
		return DetectByPosition(root);
	}

	public static Dictionary<HumanoidBones, Node> Detect(Node root)
	{
		try
		{
			Dictionary<HumanoidBones, Node> dictionary = _Detect(root);
			foreach (KeyValuePair<HumanoidBones, Node> item in dictionary)
			{
				item.Value.HumanoidBone = item.Key;
			}
			return dictionary;
		}
		catch
		{
			return null;
		}
	}
}
internal struct BoneWeight
{
	public int boneIndex0;

	public int boneIndex1;

	public int boneIndex2;

	public int boneIndex3;

	public float weight0;

	public float weight1;

	public float weight2;

	public float weight3;
}
internal class MeshBuilder
{
	public static BoneHeadTail[] Bones = new BoneHeadTail[21]
	{
		new BoneHeadTail(HumanoidBones.hips, HumanoidBones.spine, 0.1f, 0.06f),
		new BoneHeadTail(HumanoidBones.spine, HumanoidBones.chest),
		new BoneHeadTail(HumanoidBones.chest, HumanoidBones.neck, 0.1f, 0.06f),
		new BoneHeadTail(HumanoidBones.neck, HumanoidBones.head, 0.03f, 0.03f),
		new BoneHeadTail(HumanoidBones.head, new Vector3(0f, 0.1f, 0f), 0.1f, 0.1f),
		new BoneHeadTail(HumanoidBones.leftShoulder, HumanoidBones.leftUpperArm),
		new BoneHeadTail(HumanoidBones.leftUpperArm, HumanoidBones.leftLowerArm),
		new BoneHeadTail(HumanoidBones.leftLowerArm, HumanoidBones.leftHand),
		new BoneHeadTail(HumanoidBones.leftHand, new Vector3(-0.1f, 0f, 0f)),
		new BoneHeadTail(HumanoidBones.leftUpperLeg, HumanoidBones.leftLowerLeg),
		new BoneHeadTail(HumanoidBones.leftLowerLeg, HumanoidBones.leftFoot),
		new BoneHeadTail(HumanoidBones.leftFoot, HumanoidBones.leftToes),
		new BoneHeadTail(HumanoidBones.leftToes, new Vector3(0f, 0f, 0.1f)),
		new BoneHeadTail(HumanoidBones.rightShoulder, HumanoidBones.rightUpperArm),
		new BoneHeadTail(HumanoidBones.rightUpperArm, HumanoidBones.rightLowerArm),
		new BoneHeadTail(HumanoidBones.rightLowerArm, HumanoidBones.rightHand),
		new BoneHeadTail(HumanoidBones.rightHand, new Vector3(0.1f, 0f, 0f)),
		new BoneHeadTail(HumanoidBones.rightUpperLeg, HumanoidBones.rightLowerLeg),
		new BoneHeadTail(HumanoidBones.rightLowerLeg, HumanoidBones.rightFoot),
		new BoneHeadTail(HumanoidBones.rightFoot, HumanoidBones.rightToes),
		new BoneHeadTail(HumanoidBones.rightToes, new Vector3(0f, 0f, 0.1f))
	};

	private List<Vector3> m_positioins = new List<Vector3>();

	private List<int> m_indices = new List<int>();

	private List<BoneWeight> m_boneWeights = new List<BoneWeight>();

	public void Build(List<Node> bones)
	{
		//IL_0099: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_006a: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		BoneHeadTail[] bones2 = Bones;
		for (int i = 0; i < bones2.Length; i++)
		{
			BoneHeadTail headTail = bones2[i];
			Node node = bones.FirstOrDefault((Node x) => x.HumanoidBone == headTail.Head);
			if (node != null)
			{
				Node node2 = null;
				if (headTail.Tail != 0)
				{
					node2 = bones.FirstOrDefault((Node x) => x.HumanoidBone == headTail.Tail);
				}
				if (node2 != null)
				{
					AddBone(node.SkeletonLocalPosition, node2.SkeletonLocalPosition, bones.IndexOf(node), headTail.XWidth, headTail.ZWidth);
				}
				else if (headTail.TailOffset != Vector3.zero)
				{
					AddBone(node.SkeletonLocalPosition, node.SkeletonLocalPosition + headTail.TailOffset, bones.IndexOf(node), headTail.XWidth, headTail.ZWidth);
				}
			}
			else
			{
				Console.Error.WriteLine($"{headTail.Head} not found");
			}
		}
	}

	private void AddBone(Vector3 head, Vector3 tail, int boneIndex, float xWidth, float zWidth)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000a: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		//IL_0028: Unknown result type (might be due to invalid IL or missing references)
		//IL_002d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		//IL_004d: Unknown result type (might be due to invalid IL or missing references)
		//IL_004e: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0059: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_0072: Unknown result type (might be due to invalid IL or missing references)
		//IL_0077: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = tail - head;
		Vector3 normalized = ((Vector3)(ref val)).normalized;
		Vector3 val2;
		Vector3 val3;
		if (Vector3.Dot(normalized, Vector3.forward) >= 1f)
		{
			val2 = Vector3.right;
			val3 = -Vector3.up;
		}
		else
		{
			val2 = Vector3.Normalize(Vector3.Cross(normalized, Vector3.forward));
			val3 = Vector3.forward;
		}
		AddBox((head + tail) * 0.5f, val2 * xWidth, (tail - head) * 0.5f, val3 * zWidth, boneIndex);
	}

	private void AddBox(Vector3 center, Vector3 xaxis, Vector3 yaxis, Vector3 zaxis, int boneIndex)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown result type (might be due to invalid IL or missing references)
		//IL_0029: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_003e: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0044: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_004c: Unknown result type (might be due to invalid IL or missing references)
		//IL_005a: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Unknown result type (might be due to invalid IL or missing references)
		//IL_005c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0062: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_0069: Unknown result type (might be due to invalid IL or missing references)
		//IL_006e: Unknown result type (might be due to invalid IL or missing references)
		//IL_006f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0070: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0082: Unknown result type (might be due to invalid IL or missing references)
		//IL_0083: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_008a: Unknown result type (might be due to invalid IL or missing references)
		//IL_008f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0091: Unknown result type (might be due to invalid IL or missing references)
		//IL_0096: Unknown result type (might be due to invalid IL or missing references)
		//IL_0097: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_009d: Unknown result type (might be due to invalid IL or missing references)
		//IL_009e: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
		//IL_00bb: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
		//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00db: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f0: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f6: Unknown result type (might be due to invalid IL or missing references)
		//IL_00f7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fc: Unknown result type (might be due to invalid IL or missing references)
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_010c: Unknown result type (might be due to invalid IL or missing references)
		//IL_010d: Unknown result type (might be due to invalid IL or missing references)
		//IL_010e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0113: Unknown result type (might be due to invalid IL or missing references)
		//IL_0114: Unknown result type (might be due to invalid IL or missing references)
		//IL_0119: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0120: Unknown result type (might be due to invalid IL or missing references)
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0122: Unknown result type (might be due to invalid IL or missing references)
		//IL_0127: Unknown result type (might be due to invalid IL or missing references)
		//IL_0128: Unknown result type (might be due to invalid IL or missing references)
		//IL_012d: Unknown result type (might be due to invalid IL or missing references)
		//IL_012f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0134: Unknown result type (might be due to invalid IL or missing references)
		//IL_0135: Unknown result type (might be due to invalid IL or missing references)
		//IL_0136: Unknown result type (might be due to invalid IL or missing references)
		//IL_013b: Unknown result type (might be due to invalid IL or missing references)
		//IL_013c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0141: Unknown result type (might be due to invalid IL or missing references)
		//IL_0143: Unknown result type (might be due to invalid IL or missing references)
		//IL_0148: Unknown result type (might be due to invalid IL or missing references)
		//IL_0149: Unknown result type (might be due to invalid IL or missing references)
		//IL_014a: Unknown result type (might be due to invalid IL or missing references)
		//IL_014f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0150: Unknown result type (might be due to invalid IL or missing references)
		//IL_0155: Unknown result type (might be due to invalid IL or missing references)
		//IL_0157: Unknown result type (might be due to invalid IL or missing references)
		//IL_0165: Unknown result type (might be due to invalid IL or missing references)
		//IL_0166: Unknown result type (might be due to invalid IL or missing references)
		//IL_0168: Unknown result type (might be due to invalid IL or missing references)
		//IL_016d: Unknown result type (might be due to invalid IL or missing references)
		//IL_016e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0173: Unknown result type (might be due to invalid IL or missing references)
		//IL_0174: Unknown result type (might be due to invalid IL or missing references)
		//IL_0179: Unknown result type (might be due to invalid IL or missing references)
		//IL_017a: Unknown result type (might be due to invalid IL or missing references)
		//IL_017c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0181: Unknown result type (might be due to invalid IL or missing references)
		//IL_0182: Unknown result type (might be due to invalid IL or missing references)
		//IL_0187: Unknown result type (might be due to invalid IL or missing references)
		//IL_0188: Unknown result type (might be due to invalid IL or missing references)
		//IL_018d: Unknown result type (might be due to invalid IL or missing references)
		//IL_018e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0190: Unknown result type (might be due to invalid IL or missing references)
		//IL_0195: Unknown result type (might be due to invalid IL or missing references)
		//IL_0196: Unknown result type (might be due to invalid IL or missing references)
		//IL_019b: Unknown result type (might be due to invalid IL or missing references)
		//IL_019c: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01a9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01aa: Unknown result type (might be due to invalid IL or missing references)
		//IL_01af: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01be: Unknown result type (might be due to invalid IL or missing references)
		//IL_01bf: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cc: Unknown result type (might be due to invalid IL or missing references)
		//IL_01cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d2: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01d5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01da: Unknown result type (might be due to invalid IL or missing references)
		//IL_01db: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e7: Unknown result type (might be due to invalid IL or missing references)
		//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ee: Unknown result type (might be due to invalid IL or missing references)
		//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
		//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
		//IL_01fd: Unknown result type (might be due to invalid IL or missing references)
		//IL_0202: Unknown result type (might be due to invalid IL or missing references)
		//IL_0203: Unknown result type (might be due to invalid IL or missing references)
		//IL_0208: Unknown result type (might be due to invalid IL or missing references)
		//IL_0209: Unknown result type (might be due to invalid IL or missing references)
		AddQuad(center - yaxis - xaxis - zaxis, center - yaxis + xaxis - zaxis, center - yaxis + xaxis + zaxis, center - yaxis - xaxis + zaxis, boneIndex);
		AddQuad(center + yaxis - xaxis - zaxis, center + yaxis + xaxis - zaxis, center + yaxis + xaxis + zaxis, center + yaxis - xaxis + zaxis, boneIndex, reverse: true);
		AddQuad(center - xaxis - yaxis - zaxis, center - xaxis + yaxis - zaxis, center - xaxis + yaxis + zaxis, center - xaxis - yaxis + zaxis, boneIndex, reverse: true);
		AddQuad(center + xaxis - yaxis - zaxis, center + xaxis + yaxis - zaxis, center + xaxis + yaxis + zaxis, center + xaxis - yaxis + zaxis, boneIndex);
		AddQuad(center - zaxis - xaxis - yaxis, center - zaxis + xaxis - yaxis, center - zaxis + xaxis + yaxis, center - zaxis - xaxis + yaxis, boneIndex, reverse: true);
		AddQuad(center + zaxis - xaxis - yaxis, center + zaxis + xaxis - yaxis, center + zaxis + xaxis + yaxis, center + zaxis - xaxis + yaxis, boneIndex);
	}

	private void AddQuad(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 v3, int boneIndex, bool reverse = false)
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_003f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_0052: Unknown result type (might be due to invalid IL or missing references)
		//IL_005f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_008b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0098: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
		int count = m_positioins.Count;
		if (float.IsNaN(v0.x) || float.IsNaN(v0.y) || float.IsNaN(v0.z))
		{
			throw new Exception();
		}
		m_positioins.Add(v0);
		if (float.IsNaN(v1.x) || float.IsNaN(v1.y) || float.IsNaN(v1.z))
		{
			throw new Exception();
		}
		m_positioins.Add(v1);
		if (float.IsNaN(v2.x) || float.IsNaN(v2.y) || float.IsNaN(v2.z))
		{
			throw new Exception();
		}
		m_positioins.Add(v2);
		if (float.IsNaN(v3.x) || float.IsNaN(v3.y) || float.IsNaN(v3.z))
		{
			throw new Exception();
		}
		m_positioins.Add(v3);
		BoneWeight boneWeight = default(BoneWeight);
		boneWeight.boneIndex0 = boneIndex;
		boneWeight.weight0 = 1f;
		BoneWeight item = boneWeight;
		m_boneWeights.Add(item);
		m_boneWeights.Add(item);
		m_boneWeights.Add(item);
		m_boneWeights.Add(item);
		if (reverse)
		{
			m_indices.Add(count + 3);
			m_indices.Add(count + 2);
			m_indices.Add(count + 1);
			m_indices.Add(count + 1);
			m_indices.Add(count);
			m_indices.Add(count + 3);
		}
		else
		{
			m_indices.Add(count);
			m_indices.Add(count + 1);
			m_indices.Add(count + 2);
			m_indices.Add(count + 2);
			m_indices.Add(count + 3);
			m_indices.Add(count);
		}
	}
}
internal struct BoneHeadTail
{
	public HumanoidBones Head;

	public HumanoidBones Tail;

	public Vector3 TailOffset;

	public float XWidth;

	public float ZWidth;

	public BoneHeadTail(HumanoidBones head, HumanoidBones tail, float xWidth = 0.05f, float zWidth = 0.05f)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		Head = head;
		Tail = tail;
		TailOffset = Vector3.zero;
		XWidth = xWidth;
		ZWidth = zWidth;
	}

	public BoneHeadTail(HumanoidBones head, Vector3 tailOffset, float xWidth = 0.05f, float zWidth = 0.05f)
	{
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0010: Unknown result type (might be due to invalid IL or missing references)
		Head = head;
		Tail = HumanoidBones.unknown;
		TailOffset = tailOffset;
		XWidth = xWidth;
		ZWidth = zWidth;
	}
}
public static class MathFWrap
{
	public static readonly float PI = MathF.PI;

	public static float Clamp(float src, float min, float max)
	{
		return Math.Max(Math.Min(src, min), max);
	}

	public static int Clamp(int src, int min, int max)
	{
		return Math.Max(Math.Min(src, min), max);
	}
}
public enum TopologyType
{
	Points,
	Lines,
	LineLoop,
	LineStrip,
	Triangles,
	TriangleStrip,
	TriangleFan
}
public struct Triangle
{
	public int Vertex0;

	public int Vertex1;

	public int Vertex2;

	public Triangle(int v0, int v1, int v2)
	{
		Vertex0 = v0;
		Vertex1 = v1;
		Vertex2 = v2;
	}
}
public class Submesh
{
	public int Offset;

	public int DrawCount;

	public int Material;

	public override string ToString()
	{
		return $"{Material}({DrawCount})";
	}

	public Submesh(int material)
		: this(0, 0, material)
	{
	}

	public Submesh(int offset, int drawCount, int material)
	{
		Offset = offset;
		DrawCount = drawCount;
		Material = material;
	}
}
public class Mesh
{
	public VertexBuffer VertexBuffer;

	public BufferAccessor IndexBuffer;

	public TopologyType Topology = TopologyType.Triangles;

	public List<MorphTarget> MorphTargets = new List<MorphTarget>();

	public List<Submesh> Submeshes { get; private set; } = new List<Submesh>();


	public override string ToString()
	{
		StringBuilder stringBuilder = new StringBuilder();
		foreach (string item in VertexBuffer.Select((KeyValuePair<string, BufferAccessor> x) => x.Key))
		{
			stringBuilder.Append("[" + item + "]");
		}
		if (IndexBuffer != null)
		{
			if (Topology == TopologyType.Triangles)
			{
				stringBuilder.Append($" {IndexBuffer.Count / 3} tris");
			}
			else
			{
				stringBuilder.Append($" topology: {Topology}");
			}
		}
		if (MorphTargets.Any())
		{
			stringBuilder.Append($", {MorphTargets.Count} morphs");
			foreach (KeyValuePair<string, BufferAccessor> item2 in MorphTargets[0].VertexBuffer)
			{
				stringBuilder.Append("[" + item2.Key + "]");
			}
		}
		int num = VertexBuffer.ByteLength + IndexBuffer.ByteLength + MorphTargets.Sum((MorphTarget x) => x.VertexBuffer.ByteLength);
		stringBuilder.Append($": expected {num / 1000 / 1000} MB");
		return stringBuilder.ToString();
	}

	public Mesh(TopologyType topology = TopologyType.Triangles)
	{
		Topology = topology;
	}

	public void ApplyRotationAndScaling(Matrix4x4 m)
	{
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		//IL_003a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0046: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_004f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0054: Unknown result type (might be due to invalid IL or missing references)
		//IL_0061: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Unknown result type (might be due to invalid IL or missing references)
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		((Matrix4x4)(ref m)).SetColumn(3, new Vector4(0f, 0f, 0f, 1f));
		NativeArray<Vector3> val = VertexBuffer.Positions.Bytes.Reinterpret<Vector3>(1);
		NativeArray<Vector3> val2 = VertexBuffer.Normals.Bytes.Reinterpret<Vector3>(1);
		for (int i = 0; i < val.Length; i++)
		{
			val[i] = ((Matrix4x4)(ref m)).MultiplyPoint(val[i]);
			val2[i] = ((Matrix4x4)(ref m)).MultiplyVector(val2[i]);
		}
	}
}
public class MeshGroup : GltfId
{
	public readonly string Name;

	public readonly List<Mesh> Meshes = new List<Mesh>();

	public Skin Skin;

	public override string ToString()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append(Name);
		if (Skin != null)
		{
			stringBuilder.Append("(skinned)");
		}
		bool flag = true;
		foreach (Mesh mesh in Meshes)
		{
			if (flag)
			{
				flag = false;
			}
			else
			{
				stringBuilder.Append(", ");
			}
			stringBuilder.Append(mesh);
		}
		return stringBuilder.ToString();
	}

	public MeshGroup(string name)
	{
		Name = name;
	}
}
public class Model
{
	private struct Reverser
	{
		public Action<BufferAccessor> ReverseBuffer;

		public Func<Vector3, Vector3> ReverseVector3;

		public Func<Matrix4x4, Matrix4x4> ReverseMatrix;
	}

	public Coordinates Coordinates;

	public string AssetVersion = "2.0";

	public string AssetGenerator;

	public string AssetCopyright;

	public string AssetMinVersion;

	public readonly List<object> Materials = new List<object>();

	public readonly List<Skin> Skins = new List<Skin>();

	public readonly List<MeshGroup> MeshGroups = new List<MeshGroup>();

	private Node m_root = new Node("__root__");

	public List<Node> Nodes = new List<Node>();

	public Node Root
	{
		get
		{
			return m_root;
		}
		private set
		{
		}
	}

	private static Reverser ZReverser
	{
		get
		{
			Reverser result = default(Reverser);
			result.ReverseBuffer = ReverseZ;
			result.ReverseVector3 = (Vector3 v) => UnityExtensions.ReverseZ(v);
			result.ReverseMatrix = (Matrix4x4 m) => UnityExtensions.ReverseZ(m);
			return result;
		}
	}

	private static Reverser XReverser
	{
		get
		{
			Reverser result = default(Reverser);
			result.ReverseBuffer = ReverseX;
			result.ReverseVector3 = (Vector3 v) => UnityExtensions.ReverseX(v);
			result.ReverseMatrix = (Matrix4x4 m) => UnityExtensions.ReverseX(m);
			return result;
		}
	}

	public Model(Coordinates coordinates)
	{
		Coordinates = coordinates;
	}

	public void SetRoot(Node root)
	{
		m_root = root;
		Nodes.Clear();
		Nodes.AddRange(root.Traverse().Skip(1));
	}

	public Dictionary<HumanoidBones, Node> GetBoneMap()
	{
		return (from x in Root.Traverse()
			where x.HumanoidBone.HasValue
			select x).ToDictionary((Node x) => x.HumanoidBone.Value, (Node x) => x);
	}

	public override string ToString()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append("[GLTF] generator: " + AssetGenerator + "\n");
		for (int i = 0; i < Materials.Count; i++)
		{
			object arg = Materials[i];
			stringBuilder.Append($"[Material#{i:00}] {arg}\n");
		}
		for (int j = 0; j < MeshGroups.Count; j++)
		{
			MeshGroup arg2 = MeshGroups[j];
			stringBuilder.Append($"[Mesh#{j:00}] {arg2}\n");
		}
		stringBuilder.Append($"[Node] {Nodes.Count} nodes\n");
		foreach (Skin skin in Skins)
		{
			stringBuilder.Append($"[Skin] {skin}\n");
		}
		return stringBuilder.ToString();
	}

	public bool CheckVrmHumanoid()
	{
		HashSet<HumanoidBones> hashSet = new HashSet<HumanoidBones>();
		foreach (Node node in Nodes)
		{
			if (node.HumanoidBone.HasValue)
			{
				if (hashSet.Contains(node.HumanoidBone.Value))
				{
					return false;
				}
				hashSet.Add(node.HumanoidBone.Value);
			}
		}
		IEnumerable<BoneRequiredAttribute[]> source = from HumanoidBones bone in Enum.GetValues(typeof(HumanoidBones))
			select bone.GetType().GetField(bone.ToString()) into info
			select info.GetCustomAttributes(typeof(BoneRequiredAttribute), inherit: false) as BoneRequiredAttribute[] into attributes
			where attributes.Length != 0
			select attributes;
		if ((from humanoid in hashSet
			select humanoid.GetType().GetField(humanoid.ToString()) into info
			select info.GetCustomAttributes(typeof(BoneRequiredAttribute), inherit: false) as BoneRequiredAttribute[] into attributes
			where attributes.Length != 0
			select attributes).Count() != source.Count())
		{
			return false;
		}
		return true;
	}

	public static Node GetNode(Node root, string path)
	{
		string[] source = path.Split(new char[1] { '/' });
		IEnumerator<string> it = source.Select((string x) => x).GetEnumerator();
		Node node = root;
		while (it.MoveNext())
		{
			node = node.Children.First((Node x) => x.Name == it.Current);
		}
		return node;
	}

	public void ApplyRotationAndScale()
	{
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Unknown result type (might be due to invalid IL or missing references)
		//IL_007b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		Dictionary<Node, Vector3> dictionary = Nodes.ToDictionary((Node x) => x, (Node x) => x.Translation);
		foreach (Node item in Root.Traverse().Skip(1))
		{
			if (dictionary.TryGetValue(item, out var value))
			{
				Matrix4x4 m = Matrix4x4.Translate(value);
				item.SetMatrix(m, calcWorldMatrix: false);
			}
		}
	}

	public void NodeAdd(Node node, Node parent = null)
	{
		if (parent == null)
		{
			parent = Root;
		}
		parent.Add(node);
		if (Nodes.Contains(node))
		{
			throw new ArgumentException($"Nodes contain {node}");
		}
		Nodes.Add(node);
	}

	public void NodeRemove(Node remove)
	{
		foreach (Node node in Nodes)
		{
			if (node.Parent == remove)
			{
				remove.Remove(node);
			}
			if (remove.Parent == node)
			{
				node.Remove(remove);
			}
		}
		if (Root.Children.Contains(remove))
		{
			Root.Remove(remove);
		}
		Nodes.Remove(remove);
	}

	public string SkinningBake(INativeArrayManager arrayManager)
	{
		//IL_00a1: Unknown result type (might be due to invalid IL or missing references)
		foreach (Node node in Nodes)
		{
			MeshGroup meshGroup = node.MeshGroup;
			if (meshGroup == null)
			{
				continue;
			}
			if (meshGroup.Skin != null)
			{
				foreach (Mesh mesh in meshGroup.Meshes)
				{
					meshGroup.Skin.Skinning(arrayManager, mesh.VertexBuffer);
				}
				meshGroup.Skin.Root = null;
				meshGroup.Skin.InverseMatrices = null;
				continue;
			}
			foreach (Mesh mesh2 in meshGroup.Meshes)
			{
				mesh2.ApplyRotationAndScaling(node.Matrix);
			}
		}
		ApplyRotationAndScale();
		foreach (Node node2 in Nodes)
		{
			MeshGroup meshGroup2 = node2.MeshGroup;
			if (meshGroup2 == null)
			{
				continue;
			}
			foreach (Mesh mesh3 in meshGroup2.Meshes)
			{
				_ = mesh3;
				if (meshGroup2.Skin != null)
				{
					meshGroup2.Skin.CalcInverseMatrices(arrayManager);
				}
			}
		}
		return "SkinningBake";
	}

	private static void ReverseX(BufferAccessor ba)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Invalid comparison between Unknown and I4
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Invalid comparison between Unknown and I4
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Invalid comparison between Unknown and I4
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		if ((int)ba.ComponentType != 5126)
		{
			throw new Exception();
		}
		if ((int)ba.AccessorType == 2)
		{
			NativeArray<Vector3> val = ba.Bytes.Reinterpret<Vector3>(1);
			for (int i = 0; i < val.Length; i++)
			{
				val[i] = UnityExtensions.ReverseX(val[i]);
			}
			return;
		}
		if ((int)ba.AccessorType == 6)
		{
			NativeArray<Matrix4x4> val2 = ba.Bytes.Reinterpret<Matrix4x4>(1);
			for (int j = 0; j < val2.Length; j++)
			{
				val2[j] = UnityExtensions.ReverseX(val2[j]);
			}
			return;
		}
		throw new NotImplementedException();
	}

	private static void ReverseZ(BufferAccessor ba)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_000b: Invalid comparison between Unknown and I4
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Invalid comparison between Unknown and I4
		//IL_0055: Unknown result type (might be due to invalid IL or missing references)
		//IL_005b: Invalid comparison between Unknown and I4
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_002b: Unknown result type (might be due to invalid IL or missing references)
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0067: Unknown result type (might be due to invalid IL or missing references)
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0036: Unknown result type (might be due to invalid IL or missing references)
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		if ((int)ba.ComponentType != 5126)
		{
			throw new Exception();
		}
		if ((int)ba.AccessorType == 2)
		{
			NativeArray<Vector3> val = ba.Bytes.Reinterpret<Vector3>(1);
			for (int i = 0; i < val.Length; i++)
			{
				val[i] = UnityExtensions.ReverseZ(val[i]);
			}
			return;
		}
		if ((int)ba.AccessorType == 6)
		{
			NativeArray<Matrix4x4> val2 = ba.Bytes.Reinterpret<Matrix4x4>(1);
			for (int j = 0; j < val2.Length; j++)
			{
				val2[j] = UnityExtensions.ReverseZ(val2[j]);
			}
			return;
		}
		throw new NotImplementedException();
	}

	public void ConvertCoordinate(Coordinates coordinates, bool ignoreVrm = false)
	{
		if (Coordinates.Equals(coordinates))
		{
			return;
		}
		if (Coordinates.IsVrm0 && coordinates.IsUnity)
		{
			ReverseAxisAndFlipTriangle(ZReverser, ignoreVrm);
			UVVerticalFlip();
			Coordinates = coordinates;
			return;
		}
		if (Coordinates.IsUnity && coordinates.IsVrm0)
		{
			ReverseAxisAndFlipTriangle(ZReverser, ignoreVrm);
			UVVerticalFlip();
			Coordinates = coordinates;
			return;
		}
		if (Coordinates.IsVrm1 && coordinates.IsUnity)
		{
			ReverseAxisAndFlipTriangle(XReverser, ignoreVrm);
			UVVerticalFlip();
			Coordinates = coordinates;
			return;
		}
		if (Coordinates.IsUnity && coordinates.IsVrm1)
		{
			ReverseAxisAndFlipTriangle(XReverser, ignoreVrm);
			UVVerticalFlip();
			Coordinates = coordinates;
			return;
		}
		throw new NotImplementedException();
	}

	private void UVVerticalFlip()
	{
		//IL_003b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0040: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		//IL_004a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0058: Unknown result type (might be due to invalid IL or missing references)
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		foreach (MeshGroup meshGroup in MeshGroups)
		{
			foreach (Mesh mesh in meshGroup.Meshes)
			{
				BufferAccessor texCoords = mesh.VertexBuffer.TexCoords;
				if (texCoords != null)
				{
					NativeArray<Vector2> val = texCoords.Bytes.Reinterpret<Vector2>(1);
					for (int i = 0; i < val.Length; i++)
					{
						val[i] = UnityExtensions.UVVerticalFlip(val[i]);
					}
				}
			}
		}
	}

	private void ReverseAxisAndFlipTriangle(Reverser reverser, bool ignoreVrm)
	{
		//IL_0273: Unknown result type (might be due to invalid IL or missing references)
		//IL_0278: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
		//IL_00da: Unknown result type (might be due to invalid IL or missing references)
		//IL_00df: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
		//IL_0102: Expected I4, but got Unknown
		//IL_010a: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0121: Unknown result type (might be due to invalid IL or missing references)
		//IL_0126: Unknown result type (might be due to invalid IL or missing references)
		//IL_0138: Unknown result type (might be due to invalid IL or missing references)
		//IL_013d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0142: Unknown result type (might be due to invalid IL or missing references)
		//IL_02c3: Unknown result type (might be due to invalid IL or missing references)
		//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
		HashSet<NativeArray<byte>> hashSet = new HashSet<NativeArray<byte>>();
		foreach (MeshGroup meshGroup in MeshGroups)
		{
			foreach (Mesh mesh in meshGroup.Meshes)
			{
				foreach (KeyValuePair<string, BufferAccessor> item in mesh.VertexBuffer)
				{
					string key = item.Key;
					BufferAccessor value = item.Value;
					if (key == "POSITION" || key == "NORMAL")
					{
						if (hashSet.Add(value.Bytes))
						{
							reverser.ReverseBuffer(value);
						}
					}
					else
					{
						_ = key == "TANGENT";
					}
				}
				if (hashSet.Add(mesh.IndexBuffer.Bytes))
				{
					AccessorValueType componentType = mesh.IndexBuffer.ComponentType;
					switch (componentType - 5121)
					{
					case 0:
						FlipTriangle(mesh.IndexBuffer.Bytes);
						break;
					case 2:
						FlipTriangle(mesh.IndexBuffer.Bytes.Reinterpret<ushort>(1));
						break;
					case 4:
						FlipTriangle(mesh.IndexBuffer.Bytes.Reinterpret<uint>(1));
						break;
					default:
						throw new NotImplementedException();
					}
				}
				foreach (MorphTarget morphTarget in mesh.MorphTargets)
				{
					foreach (KeyValuePair<string, BufferAccessor> item2 in morphTarget.VertexBuffer)
					{
						string key2 = item2.Key;
						BufferAccessor value2 = item2.Value;
						if ((key2 == "POSITION" || key2 == "NORMAL") && hashSet.Add(value2.Bytes))
						{
							reverser.ReverseBuffer(value2);
						}
						_ = key2 == "TANGENT";
					}
				}
			}
		}
		foreach (Node item3 in Root.Traverse().Skip(1))
		{
			item3.SetMatrix(reverser.ReverseMatrix(item3.Matrix), calcWorldMatrix: false);
		}
		foreach (Skin skin in Skins)
		{
			if (skin.InverseMatrices != null && hashSet.Add(skin.InverseMatrices.Bytes))
			{
				reverser.ReverseBuffer(skin.InverseMatrices);
			}
		}
	}

	private static void FlipTriangle(NativeArray<byte> indices)
	{
		for (int i = 0; i < indices.Length; i += 3)
		{
			byte b = indices[i + 2];
			indices[i + 2] = indices[i];
			indices[i] = b;
		}
	}

	private static void FlipTriangle(NativeArray<ushort> indices)
	{
		for (int i = 0; i < indices.Length; i += 3)
		{
			ushort num = indices[i + 2];
			indices[i + 2] = indices[i];
			indices[i] = num;
		}
	}

	private static void FlipTriangle(NativeArray<uint> indices)
	{
		for (int i = 0; i < indices.Length; i += 3)
		{
			uint num = indices[i + 2];
			indices[i + 2] = indices[i];
			indices[i] = num;
		}
	}
}
public class MorphTarget
{
	public readonly string Name;

	public VertexBuffer VertexBuffer;

	public override string ToString()
	{
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.Append(Name);
		foreach (KeyValuePair<string, BufferAccessor> item in VertexBuffer)
		{
			stringBuilder.Append("[" + item.Key + "]");
		}
		return stringBuilder.ToString();
	}

	public MorphTarget(string name)
	{
		Name = name;
	}
}
public enum ChildMatrixMode
{
	KeepLocal,
	KeepWorld
}
public class Node : GltfId, IEnumerable<Node>, IEnumerable
{
	private static int s_nextUniqueId = 1;

	public readonly int UniqueID;

	public Vector3 LocalTranslationWithoutUpdate = Vector3.zero;

	public Quaternion LocalRotationWithoutUpdate = Quaternion.identity;

	public Vector3 LocalScalingWithoutUpdate = Vector3.one;

	private Matrix4x4 m_matrix = Matrix4x4.identity;

	private readonly List<Node> m_children = new List<Node>();

	public MeshGroup MeshGroup;

	private HumanoidBones? m_bone;

	public string Name { get; set; }

	public Vector3 LocalTranslation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return LocalTranslationWithoutUpdate;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (!(LocalTranslationWithoutUpdate == value))
			{
				LocalTranslationWithoutUpdate = value;
				CalcWorldMatrix((Parent != null) ? Parent.Matrix : Matrix4x4.identity);
			}
		}
	}

	public Quaternion LocalRotation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return LocalRotationWithoutUpdate;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (!(LocalRotationWithoutUpdate == value))
			{
				LocalRotationWithoutUpdate = value;
				CalcWorldMatrix((Parent != null) ? Parent.Matrix : Matrix4x4.identity);
			}
		}
	}

	public Vector3 LocalScaling
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return LocalScalingWithoutUpdate;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			if (!(LocalScalingWithoutUpdate == value))
			{
				LocalScalingWithoutUpdate = value;
				CalcWorldMatrix((Parent != null) ? Parent.Matrix : Matrix4x4.identity);
			}
		}
	}

	public Matrix4x4 LocalMatrix => Matrix4x4.Translate(LocalTranslation) * Matrix4x4.Rotate(LocalRotation) * Matrix4x4.Scale(LocalScaling);

	public Matrix4x4 Matrix => m_matrix;

	public Quaternion Rotation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			Matrix4x4 matrix = Matrix;
			return ((Matrix4x4)(ref matrix)).rotation;
		}
		set
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0021: Unknown result type (might be due to invalid IL or missing references)
			//IL_0022: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			if (Parent == null)
			{
				LocalRotation = value;
			}
			else
			{
				LocalRotation = Quaternion.Inverse(Parent.Rotation) * value;
			}
		}
	}

	public Matrix4x4 InverseMatrix
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			Matrix4x4 matrix = Matrix;
			return ((Matrix4x4)(ref matrix)).inverse;
		}
	}

	public Vector3 Translation
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			Matrix4x4 matrix = Matrix;
			return Vector4.op_Implicit(((Matrix4x4)(ref matrix)).GetColumn(3));
		}
		set
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			if (Parent == null)
			{
				LocalTranslation = value;
				return;
			}
			Matrix4x4 inverseMatrix = Parent.InverseMatrix;
			LocalTranslation = ((Matrix4x4)(ref inverseMatrix)).MultiplyPoint(value);
		}
	}

	public Vector3 SkeletonLocalPosition
	{
		get
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			return Translation;
		}
		set
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			Translation = value;
		}
	}

	public Node Parent { get; private set; }

	public Mesh Mesh => MeshGroup?.Meshes?[0];

	public HumanoidBones? HumanoidBone
	{
		get
		{
			return m_bone;
		}
		set
		{
			if (m_bone != value && value != HumanoidBones.unknown)
			{
				m_bone = value;
			}
		}
	}

	public IReadOnlyList<Node> Children => m_children;

	public event Action<Matrix4x4> MatrixUpdated;

	public Node(string name)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0011: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_0027: Unknown result type (might be due to invalid IL or missing references)
		UniqueID = s_nextUniqueId++;
		Name = name;
	}

	public void SetLocalMatrix(Matrix4x4 value, bool calcWorldMatrix)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		//IL_001a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0021: Unknown result type (might be due to invalid IL or missing references)
		//IL_0026: Unknown result type (might be due to invalid IL or missing references)
		//IL_0041: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Unknown result type (might be due to invalid IL or missing references)
		(LocalTranslationWithoutUpdate, LocalRotationWithoutUpdate, LocalScalingWithoutUpdate) = UnityExtensions.Decompose(value);
		CalcWorldMatrix((Parent != null) ? Parent.Matrix : Matrix4x4.identity, calcWorldMatrix);
	}

	public void SetMatrix(Matrix4x4 m, bool calcWorldMatrix)
	{
		//IL_0022: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0014: Unknown result type (might be due to invalid IL or missing references)
		//IL_0015: Unknown result type (might be due to invalid IL or missing references)
		if (Parent != null)
		{
			SetLocalMatrix(Parent.InverseMatrix * m, calcWorldMatrix);
		}
		else
		{
			SetLocalMatrix(m, calcWorldMatrix);
		}
	}

	public void CalcWorldMatrix(bool calcChildren = true)
	{
		//IL_001c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0009: Unknown result type (might be due to invalid IL or missing references)
		if (Parent == null)
		{
			CalcWorldMatrix(Matrix4x4.identity, calcChildren);
		}
		else
		{
			CalcWorldMatrix(Parent.Matrix, calcChildren);
		}
	}

	public void CalcWorldMatrix(Matrix4x4 parent, bool calcChildren = true)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0002: Unknown result type (might be due to invalid IL or missing references)
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		//IL_000e: Unknown result type (might be due to invalid IL or missing references)
		//IL_000f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Unknown result type (might be due to invalid IL or missing references)
		Matrix4x4 matrix = parent * LocalMatrix;
		m_matrix = matrix;
		RaiseMatrixUpdated();
		if (!calcChildren)
		{
			return;
		}
		foreach (Node child in Children)
		{
			child.CalcWorldMatrix(m_matrix, calcChildren);
		}
	}

	private void RaiseMatrixUpdated()
	{
		//IL_000c: Unknown result type (might be due to invalid IL or missing references)
		this.MatrixUpdated?.Invoke(Matrix);
	}

	public IEnumerable<Node> Ancestors()
	{
		if (Parent == null)
		{
			yield break;
		}
		yield return Parent;
		foreach (Node item in Parent.Ancestors())
		{
			yield return item;
		}
	}

	public void Add(Node child, ChildMatrixMode mode = ChildMatrixMode.KeepLocal)
	{
		//IL_0037: Unknown result type (might be due to invalid IL or missing references)
		//IL_0045: Unknown result type (might be due to invalid IL or missing references)
		if (child.Parent != null)
		{
			child.Parent.m_children.Remove(child);
		}
		m_children.Add(child);
		child.Parent = this;
		switch (mode)
		{
		case ChildMatrixMode.KeepLocal:
			child.CalcWorldMatrix(Matrix);
			break;
		case ChildMatrixMode.KeepWorld:
			child.SetMatrix(child.Matrix, calcWorldMatrix: true);
			break;
		}
	}

	public void Remove(Node child)
	{
		child.Parent = null;
		m_children.Remove(child);
	}

	public IEnumerable<Node> Traverse()
	{
		yield return this;
		foreach (Node child in Children)
		{
			foreach (Node item in child.Traverse())
			{
				yield return item;
			}
		}
	}

	public IEnumerator<Node> GetEnumerator()
	{
		return Children.GetEnumerator();
	}

	IEnumerator IEnumerable.GetEnumerator()
	{
		return Children.GetEnumerator();
	}

	public Node FindBone(HumanoidBones bone)
	{
		return Traverse().FirstOrDefault((Node x) => x.HumanoidBone == bone);
	}

	public void RotateFromTo(Vector3 worldSrc, Vector3 worldDst)
	{
		//IL_0001: Unknown result type (might be due to invalid IL or missing references)
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0012: Unknown result type (might be due to invalid IL or missing references)
		//IL_0017: Unknown result type (might be due to invalid IL or missing references)
		//IL_0019: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_002f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0031: Unknown result type (might be due to invalid IL or missing references)
		//IL_004b: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Unknown result type (might be due to invalid IL or missing references)
		//IL_007f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0084: Unknown result type (might be due to invalid IL or missing references)
		//IL_0089: Unknown result type (might be due to invalid IL or missing references)
		//IL_0093: Unknown result type (might be due to invalid IL or missing references)
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0075: Unknown result type (might be due to invalid IL or missing references)
		//IL_007a: Unknown result type (might be due to invalid IL or missing references)
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		Vector3 val = Quaternion.Inverse(Rotation) * ((Vector3)(ref worldSrc)).normalized;
		Vector3 val2 = Quaternion.Inverse(Rotation) * ((Vector3)(ref worldDst)).normalized;
		float num = Vector3.Dot(val, val2);
		Quaternion localRotation;
		if (Math.Abs(1f - num) < float.Epsilon)
		{
			localRotation = Quaternion.identity;
		}
		else if (Math.Abs(-1f - num) < float.Epsilon)
		{
			localRotation = Quaternion.Euler(0f, MathFWrap.PI, 0f);
		}
		else
		{
			Vector3 val3 = Vector3.Normalize(Vector3.Cross(val, val2));
			localRotation = Quaternion.AngleAxis((float)Math.Acos(num), val3);
		}
		LocalRotation = localRotation;
	}

	public override string ToString()
	{
		//IL_0090: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
		//IL_003d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0050: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		if (HumanoidBone.HasValue)
		{
			return $"{Name}[{HumanoidBone.Value}]: {LocalTranslation.x:0.00}, {LocalTranslation.y:0.00}, {LocalTranslation.z:0.00}";
		}
		return $"{Name}: {LocalTranslation.x:0.00}, {LocalTranslation.y:0.00}, {LocalTranslation.z:0.00}";
	}
}
public static class NodeExtensions
{
	public static IEnumerable<Node> Traverse(this Node self)
	{
		yield return self;
		foreach (Node child in self.Children)
		{
			foreach (Node item in child.Traverse())
			{
				yield return item;
			}
		}
	}

	public static Vector3 CenterOfDescendant(this Node self)
	{
		//IL_0000: Unknown result type (might be due to invalid IL or missing references)
		//IL_0005: Unknown result type (might be due to invalid IL or missing references)
		//IL_001d: Unknown result type (might be due to invalid IL or missing references)
		//IL_001f: Unknown result type (might be due to invalid IL or missing references)
		//IL_0024: Unknown re

VRMShaders.GLTF.IO.Runtime.dll

Decompiled 5 months ago
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class IsReadOnlyAttribute : Attribute
	{
	}
}
namespace VRMShaders
{
	public class AnimationClipFactory : IResponsibilityForDestroyObjects, IDisposable
	{
		private readonly IReadOnlyDictionary<SubAssetKey, AnimationClip> _externalClips;

		private readonly Dictionary<SubAssetKey, AnimationClip> _runtimeClips = new Dictionary<SubAssetKey, AnimationClip>();

		private readonly List<SubAssetKey> _loadedClipKeys = new List<SubAssetKey>();

		public IReadOnlyDictionary<SubAssetKey, AnimationClip> ExternalClips => _externalClips;

		public IReadOnlyDictionary<SubAssetKey, AnimationClip> RuntimeGeneratedClips => _runtimeClips;

		public IReadOnlyList<SubAssetKey> LoadedClipKeys => _loadedClipKeys;

		public AnimationClipFactory(IReadOnlyDictionary<SubAssetKey, AnimationClip> externalClips)
		{
			_externalClips = externalClips;
		}

		public void Dispose()
		{
			foreach (KeyValuePair<SubAssetKey, AnimationClip> runtimeClip in _runtimeClips)
			{
				UnityObjectDestoyer.DestroyRuntimeOrEditor((Object)(object)runtimeClip.Value);
			}
			_runtimeClips.Clear();
		}

		public void TransferOwnership(TakeResponsibilityForDestroyObjectFunc take)
		{
			KeyValuePair<SubAssetKey, AnimationClip>[] array = _runtimeClips.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				var (key, obj) = array[i];
				take(key, (Object)(object)obj);
				_runtimeClips.Remove(key);
			}
		}

		public AnimationClip GetAnimationClip(SubAssetKey key)
		{
			if (_externalClips.TryGetValue(key, out var value))
			{
				return value;
			}
			if (_runtimeClips.TryGetValue(key, out value))
			{
				return value;
			}
			return null;
		}

		public async Task<AnimationClip> LoadAnimationClipAsync(SubAssetKey key, Func<Task<AnimationClip>> loadAnimationClip)
		{
			if (!_loadedClipKeys.Contains(key))
			{
				_loadedClipKeys.Add(key);
			}
			AnimationClip animationClip = GetAnimationClip(key);
			if ((Object)(object)animationClip != (Object)null)
			{
				return animationClip;
			}
			animationClip = await loadAnimationClip();
			_runtimeClips.Add(key, animationClip);
			return animationClip;
		}
	}
	public interface IAwaitCaller
	{
		Task NextFrame();

		Task Run(Action action);

		Task<T> Run<T>(Func<T> action);
	}
	public sealed class ImmediateCaller : IAwaitCaller
	{
		public Task NextFrame()
		{
			return Task.FromResult<object>(null);
		}

		public Task Run(Action action)
		{
			action();
			return Task.FromResult<object>(null);
		}

		public Task<T> Run<T>(Func<T> action)
		{
			return Task.FromResult(action());
		}
	}
	internal sealed class NextFrameTaskScheduler
	{
		private sealed class UnityLoopTaskScheduler : MonoBehaviour
		{
			private static UnityLoopTaskScheduler _instance;

			public static UnityLoopTaskScheduler Instance
			{
				get
				{
					//IL_0012: Unknown result type (might be due to invalid IL or missing references)
					//IL_0017: Unknown result type (might be due to invalid IL or missing references)
					//IL_001d: Expected O, but got Unknown
					if ((Object)(object)_instance == (Object)null)
					{
						GameObject val = new GameObject("UniGLTF UnityThreadScheduler");
						Object.DontDestroyOnLoad((Object)val);
						_instance = val.AddComponent<UnityLoopTaskScheduler>();
					}
					return _instance;
				}
			}

			public TinyManagedTaskScheduler Scheduler { get; } = new TinyManagedTaskScheduler();


			private void Update()
			{
				Scheduler.ManagedUpdate();
			}
		}

		public bool IsSupported => Application.isPlaying;

		public NextFrameTaskScheduler()
		{
			if (!IsSupported)
			{
				throw new NotSupportedException("NextFrameTaskScheduler is supported at runtime only.");
			}
		}

		public bool Enqueue(Action action)
		{
			int currentFrame = Time.frameCount;
			UnityLoopTaskScheduler.Instance.Scheduler.Enqueue(action, () => Time.frameCount != currentFrame);
			return true;
		}
	}
	public sealed class RuntimeOnlyAwaitCaller : IAwaitCaller
	{
		private readonly NextFrameTaskScheduler _scheduler;

		public RuntimeOnlyAwaitCaller()
		{
			_scheduler = new NextFrameTaskScheduler();
		}

		public Task NextFrame()
		{
			TaskCompletionSource<object> tcs = new TaskCompletionSource<object>();
			_scheduler.Enqueue(delegate
			{
				tcs.SetResult(null);
			});
			return tcs.Task;
		}

		public Task Run(Action action)
		{
			return Task.Run(action);
		}

		public Task<T> Run<T>(Func<T> action)
		{
			return Task.Run(action);
		}
	}
	internal sealed class TinyManagedTaskScheduler
	{
		private readonly ConcurrentQueue<(Action, Func<bool>)> _continuationQueue = new ConcurrentQueue<(Action, Func<bool>)>();

		private readonly ConcurrentQueue<(Action, Func<bool>)> _temporaryQueue = new ConcurrentQueue<(Action, Func<bool>)>();

		public void ManagedUpdate()
		{
			(Action, Func<bool>) result;
			while (_continuationQueue.TryDequeue(out result))
			{
				(Action, Func<bool>) tuple = result;
				var (action, _) = tuple;
				if (tuple.Item2())
				{
					action();
				}
				else
				{
					_temporaryQueue.Enqueue(result);
				}
			}
			(Action, Func<bool>) result2;
			while (_temporaryQueue.TryDequeue(out result2))
			{
				_continuationQueue.Enqueue(result2);
			}
		}

		public void Enqueue(Action continuation, Func<bool> canExecute)
		{
			_continuationQueue.Enqueue((continuation, canExecute));
		}
	}
	public enum ColorSpace
	{
		sRGB,
		Linear
	}
	public delegate void TakeResponsibilityForDestroyObjectFunc(SubAssetKey key, Object obj);
	public interface IResponsibilityForDestroyObjects : IDisposable
	{
		void TransferOwnership(TakeResponsibilityForDestroyObjectFunc take);
	}
	public readonly struct MaterialDescriptor : IEquatable<MaterialDescriptor>
	{
		public readonly string Name;

		public readonly string ShaderName;

		public readonly int? RenderQueue;

		public readonly IReadOnlyDictionary<string, TextureDescriptor> TextureSlots;

		public readonly IReadOnlyDictionary<string, float> FloatValues;

		public readonly IReadOnlyDictionary<string, Color> Colors;

		public readonly IReadOnlyDictionary<string, Vector4> Vectors;

		public readonly IReadOnlyList<Action<Material>> Actions;

		public static readonly MaterialDescriptor Default = new MaterialDescriptor("__default__", "Standard", null, new Dictionary<string, TextureDescriptor>(), new Dictionary<string, float>(), new Dictionary<string, Color>(), new Dictionary<string, Vector4>(), new List<Action<Material>>());

		public SubAssetKey SubAssetKey => new SubAssetKey(SubAssetKey.MaterialType, Name);

		public MaterialDescriptor(string name, string shaderName, int? renderQueue, IReadOnlyDictionary<string, TextureDescriptor> textureSlots, IReadOnlyDictionary<string, float> floatValues, IReadOnlyDictionary<string, Color> colors, IReadOnlyDictionary<string, Vector4> vectors, IReadOnlyList<Action<Material>> actions)
		{
			Name = name;
			ShaderName = shaderName;
			RenderQueue = renderQueue;
			TextureSlots = textureSlots;
			FloatValues = floatValues;
			Colors = colors;
			Vectors = vectors;
			Actions = actions;
		}

		public bool Equals(MaterialDescriptor other)
		{
			if (Name == other.Name && ShaderName == other.ShaderName && RenderQueue == other.RenderQueue && object.Equals(TextureSlots, other.TextureSlots) && object.Equals(FloatValues, other.FloatValues) && object.Equals(Colors, other.Colors) && object.Equals(Vectors, other.Vectors))
			{
				return object.Equals(Actions, other.Actions);
			}
			return false;
		}

		public override bool Equals(object obj)
		{
			if (obj is MaterialDescriptor other)
			{
				return Equals(other);
			}
			return false;
		}

		public override int GetHashCode()
		{
			return (((((((((((((((Name != null) ? Name.GetHashCode() : 0) * 397) ^ ((ShaderName != null) ? ShaderName.GetHashCode() : 0)) * 397) ^ RenderQueue.GetHashCode()) * 397) ^ ((TextureSlots != null) ? TextureSlots.GetHashCode() : 0)) * 397) ^ ((FloatValues != null) ? FloatValues.GetHashCode() : 0)) * 397) ^ ((Colors != null) ? Colors.GetHashCode() : 0)) * 397) ^ ((Vectors != null) ? Vectors.GetHashCode() : 0)) * 397) ^ ((Actions != null) ? Actions.GetHashCode() : 0);
		}
	}
	public delegate Task<Texture> GetTextureAsyncFunc(TextureDescriptor texDesc, IAwaitCaller awaitCaller);
	public class MaterialFactory : IResponsibilityForDestroyObjects, IDisposable
	{
		public struct MaterialLoadInfo
		{
			public SubAssetKey Key;

			public readonly Material Asset;

			public readonly bool UseExternal;

			public bool IsSubAsset => !UseExternal;

			public MaterialLoadInfo(SubAssetKey key, Material asset, bool useExternal)
			{
				Key = key;
				Asset = asset;
				UseExternal = useExternal;
			}
		}

		private readonly IReadOnlyDictionary<SubAssetKey, Material> m_externalMap;

		private readonly IReadOnlyDictionary<string, string> m_fallbackShaders;

		private List<MaterialLoadInfo> m_materials = new List<MaterialLoadInfo>();

		public IReadOnlyList<MaterialLoadInfo> Materials => m_materials;

		public MaterialFactory(IReadOnlyDictionary<SubAssetKey, Material> externalMaterialMap, IReadOnlyDictionary<string, string> fallbackShaders)
		{
			m_externalMap = externalMaterialMap;
			m_fallbackShaders = fallbackShaders;
		}

		private void Remove(Material material)
		{
			int num = m_materials.FindIndex((MaterialLoadInfo x) => (Object)(object)x.Asset == (Object)(object)material);
			if (num >= 0)
			{
				m_materials.RemoveAt(num);
			}
		}

		public void Dispose()
		{
			foreach (MaterialLoadInfo material in m_materials)
			{
				if (!material.UseExternal)
				{
					UnityObjectDestoyer.DestroyRuntimeOrEditor((Object)(object)material.Asset);
				}
			}
		}

		public void TransferOwnership(TakeResponsibilityForDestroyObjectFunc take)
		{
			MaterialLoadInfo[] array = m_materials.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				MaterialLoadInfo item = array[i];
				if (!item.UseExternal)
				{
					take(item.Key, (Object)(object)item.Asset);
					m_materials.Remove(item);
				}
			}
		}

		public Material GetMaterial(int index)
		{
			if (index < 0)
			{
				return null;
			}
			if (index >= m_materials.Count)
			{
				return null;
			}
			return m_materials[index].Asset;
		}

		public async Task<Material> LoadAsync(MaterialDescriptor matDesc, GetTextureAsyncFunc getTexture, IAwaitCaller awaitCaller)
		{
			if (m_externalMap.TryGetValue(matDesc.SubAssetKey, out var material2))
			{
				m_materials.Add(new MaterialLoadInfo(matDesc.SubAssetKey, material2, useExternal: true));
				return material2;
			}
			if (getTexture == null)
			{
				getTexture = (TextureDescriptor x, IAwaitCaller y) => Task.FromResult<Texture>(null);
			}
			string text = matDesc.ShaderName;
			if (string.IsNullOrEmpty(text))
			{
				throw new Exception("no shader name");
			}
			if (m_fallbackShaders.TryGetValue(text, out var value))
			{
				Debug.LogWarning((object)("fallback: " + text + " => " + value));
				text = value;
			}
			Shader val = Shader.Find(text);
			if ((Object)(object)val == (Object)null)
			{
				throw new Exception("shader: " + text + " not found");
			}
			material2 = new Material(val);
			((Object)material2).name = matDesc.SubAssetKey.Name;
			foreach (KeyValuePair<string, TextureDescriptor> kv in matDesc.TextureSlots)
			{
				Texture val2 = await getTexture(kv.Value, awaitCaller);
				if ((Object)(object)val2 != (Object)null)
				{
					material2.SetTexture(kv.Key, val2);
					SetTextureOffsetAndScale(material2, kv.Key, kv.Value.Offset, kv.Value.Scale);
				}
			}
			foreach (KeyValuePair<string, Color> color in matDesc.Colors)
			{
				material2.SetColor(color.Key, color.Value);
			}
			foreach (KeyValuePair<string, Vector4> vector in matDesc.Vectors)
			{
				material2.SetVector(vector.Key, vector.Value);
			}
			foreach (KeyValuePair<string, float> floatValue in matDesc.FloatValues)
			{
				material2.SetFloat(floatValue.Key, floatValue.Value);
			}
			if (matDesc.RenderQueue.HasValue)
			{
				material2.renderQueue = matDesc.RenderQueue.Value;
			}
			foreach (Action<Material> action in matDesc.Actions)
			{
				action(material2);
			}
			m_materials.Add(new MaterialLoadInfo(matDesc.SubAssetKey, material2, useExternal: false));
			return material2;
		}

		public static void SetTextureOffsetAndScale(Material material, string propertyName, Vector2 offset, Vector2 scale)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			material.SetTextureOffset(propertyName, offset);
			material.SetTextureScale(propertyName, scale);
		}
	}
	public readonly struct SubAssetKey : IEquatable<SubAssetKey>
	{
		public static readonly Type TextureType = typeof(Texture);

		public static readonly Type MaterialType = typeof(Material);

		public readonly Type Type;

		public readonly string Name;

		public SubAssetKey(Texture obj)
		{
			if ((Object)(object)obj == (Object)null || string.IsNullOrEmpty(((Object)obj).name))
			{
				throw new ArgumentNullException();
			}
			Type = TextureType;
			Name = ((Object)obj).name;
		}

		public SubAssetKey(Material obj)
		{
			if ((Object)(object)obj == (Object)null || string.IsNullOrEmpty(((Object)obj).name))
			{
				throw new ArgumentNullException();
			}
			Type = MaterialType;
			Name = ((Object)obj).name;
		}

		public static SubAssetKey Create<T>(T obj) where T : Object
		{
			return new SubAssetKey(typeof(T), ((Object)obj).name);
		}

		public SubAssetKey(Type type, string name)
		{
			if (type == null || string.IsNullOrEmpty(name))
			{
				throw new ArgumentNullException();
			}
			if (!type.IsSubclassOf(typeof(Object)))
			{
				throw new ArgumentException($"{type}:{name}");
			}
			if (type.IsSubclassOf(TextureType))
			{
				type = TextureType;
			}
			Type = type;
			Name = name;
		}

		public override string ToString()
		{
			return $"{Type}:{Name}";
		}

		public override bool Equals(object obj)
		{
			if (obj is SubAssetKey subAssetKey)
			{
				return this == subAssetKey;
			}
			return true;
		}

		public bool Equals(SubAssetKey other)
		{
			if (Type == other.Type)
			{
				return Name == other.Name;
			}
			return false;
		}

		public static bool operator ==(SubAssetKey l, SubAssetKey r)
		{
			return l.Equals(r);
		}

		public static bool operator !=(SubAssetKey l, SubAssetKey r)
		{
			return !(l == r);
		}

		public override int GetHashCode()
		{
			return Name.GetHashCode();
		}
	}
	public static class NormalConverter
	{
		private static Material _exporter;

		private static Material Exporter
		{
			get
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Expected O, but got Unknown
				if ((Object)(object)_exporter == (Object)null)
				{
					_exporter = new Material(Shader.Find("Hidden/UniGLTF/NormalMapExporter"));
				}
				return _exporter;
			}
		}

		public static Texture2D Export(Texture texture)
		{
			return TextureConverter.CopyTexture(texture, ColorSpace.Linear, dstNeedsAlpha: false, Exporter);
		}
	}
	public static class OcclusionMetallicRoughnessConverter
	{
		private static Material _importer;

		private static Material _exporter;

		private static Material Importer
		{
			get
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Expected O, but got Unknown
				if ((Object)(object)_importer == (Object)null)
				{
					_importer = new Material(Shader.Find("Hidden/UniGLTF/StandardMapImporter"));
				}
				return _importer;
			}
		}

		private static Material Exporter
		{
			get
			{
				//IL_0017: Unknown result type (might be due to invalid IL or missing references)
				//IL_0021: Expected O, but got Unknown
				if ((Object)(object)_exporter == (Object)null)
				{
					_exporter = new Material(Shader.Find("Hidden/UniGLTF/StandardMapExporter"));
				}
				return _exporter;
			}
		}

		public static Texture2D Import(Texture2D metallicRoughnessTexture, float metallicFactor, float roughnessFactor, Texture2D occlusionTexture, bool isLegacySquaredRoughness)
		{
			if ((Object)(object)metallicRoughnessTexture == (Object)null && (Object)(object)occlusionTexture == (Object)null)
			{
				throw new ArgumentNullException("no texture");
			}
			Texture2D val = (((Object)(object)metallicRoughnessTexture != (Object)null) ? metallicRoughnessTexture : occlusionTexture);
			Importer.mainTexture = (Texture)(object)val;
			Importer.SetTexture("_GltfMetallicRoughnessTexture", (Texture)(object)metallicRoughnessTexture);
			Importer.SetTexture("_GltfOcclusionTexture", (Texture)(object)occlusionTexture);
			Importer.SetFloat("_GltfMetallicFactor", metallicFactor);
			Importer.SetFloat("_GltfRoughnessFactor", roughnessFactor);
			Importer.SetFloat("_IsLegacySquaredRoughness", (float)(isLegacySquaredRoughness ? 1 : 0));
			Texture2D result = TextureConverter.CopyTexture((Texture)(object)val, ColorSpace.Linear, dstNeedsAlpha: true, Importer);
			Importer.mainTexture = null;
			Importer.SetTexture("_GltfMetallicRoughnessTexture", (Texture)null);
			Importer.SetTexture("_GltfOcclusionTexture", (Texture)null);
			Importer.SetFloat("_GltfMetallicFactor", 0f);
			Importer.SetFloat("_GltfRoughnessFactor", 0f);
			Importer.SetFloat("_IsLegacySquaredRoughness", 0f);
			return result;
		}

		public static Texture2D Export(Texture metallicSmoothTexture, float smoothness, Texture occlusionTexture)
		{
			if ((Object)(object)metallicSmoothTexture == (Object)null && (Object)(object)occlusionTexture == (Object)null)
			{
				throw new ArgumentNullException("no texture");
			}
			Texture val = (((Object)(object)metallicSmoothTexture != (Object)null) ? metallicSmoothTexture : occlusionTexture);
			Exporter.mainTexture = val;
			Exporter.SetTexture("_UnityMetallicSmoothTexture", metallicSmoothTexture);
			Exporter.SetTexture("_UnityOcclusionTexture", occlusionTexture);
			Exporter.SetFloat("_UnitySmoothness", smoothness);
			Texture2D result = TextureConverter.CopyTexture(val, ColorSpace.Linear, dstNeedsAlpha: true, Exporter);
			Exporter.mainTexture = null;
			Exporter.SetTexture("_UnityMetallicSmoothTexture", (Texture)null);
			Exporter.SetTexture("_UnityOcclusionTexture", (Texture)null);
			Exporter.SetFloat("_UnitySmoothness", 0f);
			return result;
		}

		public static Color32 ExportPixel(Color32 metallicSmooth, float smoothness, Color32 occlusion)
		{
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			Color32 result = default(Color32);
			result.r = occlusion.g;
			result.g = (byte)(255f - (float)(int)metallicSmooth.a * smoothness);
			result.b = metallicSmooth.r;
			result.a = byte.MaxValue;
			return result;
		}

		private static void DestroyTexture(Texture obj)
		{
			if (Application.isPlaying)
			{
				Object.Destroy((Object)(object)obj);
			}
			else
			{
				Object.DestroyImmediate((Object)(object)obj);
			}
		}
	}
	public static class TextureConverter
	{
		public static readonly TextureFormat WithAlphaFormat = (TextureFormat)5;

		public static readonly TextureFormat WithoutAlphaFormat = (TextureFormat)3;

		public static Texture2D CreateEmptyTextureWithSettings(Texture src, ColorSpace dstColorSpace, bool dstNeedsAlpha)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0003: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_0044: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0050: Unknown result type (might be due to invalid IL or missing references)
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0076: Unknown result type (might be due to invalid IL or missing references)
			//IL_0080: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008d: Expected O, but got Unknown
			TextureFormat val = (dstNeedsAlpha ? WithAlphaFormat : WithoutAlphaFormat);
			return new Texture2D(src.width, src.height, val, src.HasMipMap(), dstColorSpace == ColorSpace.Linear)
			{
				name = ((Object)src).name,
				anisoLevel = src.anisoLevel,
				filterMode = src.filterMode,
				mipMapBias = src.mipMapBias,
				wrapMode = src.wrapMode,
				wrapModeU = src.wrapModeU,
				wrapModeV = src.wrapModeV,
				wrapModeW = src.wrapModeW
			};
		}

		public static Texture2D CopyTexture(Texture src, ColorSpace dstColorSpace, bool dstNeedsAlpha, Material material)
		{
			//IL_000a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0031: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Expected O, but got Unknown
			//IL_000e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			RenderTextureReadWrite val = (RenderTextureReadWrite)(dstColorSpace switch
			{
				ColorSpace.sRGB => 2, 
				ColorSpace.Linear => 1, 
				_ => throw new ArgumentOutOfRangeException("dstColorSpace", dstColorSpace, null), 
			});
			RenderTexture val2 = new RenderTexture(src.width, src.height, 0, (RenderTextureFormat)0, val);
			if ((Object)(object)material != (Object)null)
			{
				Graphics.Blit(src, val2, material);
			}
			else
			{
				Graphics.Blit(src, val2);
			}
			Texture2D obj = CreateEmptyTextureWithSettings(src, dstColorSpace, dstNeedsAlpha);
			obj.ReadPixels(new Rect(0f, 0f, (float)src.width, (float)src.height), 0, 0);
			obj.Apply();
			RenderTexture.active = null;
			if (Application.isEditor)
			{
				Object.DestroyImmediate((Object)(object)val2);
				return obj;
			}
			Object.Destroy((Object)(object)val2);
			return obj;
		}
	}
	public interface ITextureExporter
	{
		int RegisterExportingAsSRgb(Texture src, bool needsAlpha);

		int RegisterExportingAsLinear(Texture src, bool needsAlpha);

		int RegisterExportingAsCombinedGltfPbrParameterTextureFromUnityStandardTextures(Texture metallicSmoothTexture, float smoothness, Texture occlusionTexture);

		int RegisterExportingAsNormal(Texture src);
	}
	public interface ITextureSerializer
	{
		bool CanExportAsEditorAssetFile(Texture texture, ColorSpace exportColorSpace);

		(byte[] bytes, string mime) ExportBytesWithMime(Texture2D texture, ColorSpace exportColorSpace);

		void ModifyTextureAssetBeforeExporting(Texture texture);
	}
	public sealed class RuntimeTextureSerializer : ITextureSerializer
	{
		public bool CanExportAsEditorAssetFile(Texture texture, ColorSpace exportColorSpace)
		{
			return false;
		}

		public (byte[] bytes, string mime) ExportBytesWithMime(Texture2D texture, ColorSpace exportColorSpace)
		{
			try
			{
				byte[] array = ImageConversion.EncodeToPNG(texture);
				if (array != null)
				{
					return (array, "image/png");
				}
				return CopyTextureAndGetBytesWithMime(texture, exportColorSpace);
			}
			catch (ArgumentException ex)
			{
				Debug.LogWarning((object)ex);
				return CopyTextureAndGetBytesWithMime(texture, exportColorSpace);
			}
		}

		public void ModifyTextureAssetBeforeExporting(Texture texture)
		{
		}

		private static (byte[] bytes, string mime) CopyTextureAndGetBytesWithMime(Texture2D texture, ColorSpace colorSpace)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Invalid comparison between Unknown and I4
			bool dstNeedsAlpha = (int)texture.format != 3;
			Texture2D val = TextureConverter.CopyTexture((Texture)(object)texture, colorSpace, dstNeedsAlpha, null);
			byte[] item = ImageConversion.EncodeToPNG(val);
			if (Application.isPlaying)
			{
				Object.Destroy((Object)(object)val);
			}
			else
			{
				Object.DestroyImmediate((Object)(object)val);
			}
			return (item, "image/png");
		}
	}
	internal sealed class TextureExportParam
	{
		public TextureExportTypes ExportType { get; }

		public ColorSpace ExportColorSpace { get; }

		public Texture PrimaryTexture { get; }

		public Texture SecondaryTexture { get; }

		public float OptionFactor { get; }

		public bool NeedsAlpha { get; set; }

		public Func<Texture2D> Creator { get; set; }

		public TextureExportParam(TextureExportTypes exportType, ColorSpace exportColorSpace, Texture primaryTexture, Texture secondaryTexture, float optionFactor, bool needsAlpha, Func<Texture2D> creator)
		{
			ExportType = exportType;
			ExportColorSpace = exportColorSpace;
			PrimaryTexture = primaryTexture;
			SecondaryTexture = secondaryTexture;
			OptionFactor = optionFactor;
			NeedsAlpha = needsAlpha;
			Creator = creator;
		}

		public bool EqualsAsKey(TextureExportParam other)
		{
			if (ExportType != other.ExportType)
			{
				return false;
			}
			switch (ExportType)
			{
			case TextureExportTypes.Srgb:
			case TextureExportTypes.Linear:
			case TextureExportTypes.Normal:
				return (Object)(object)PrimaryTexture == (Object)(object)other.PrimaryTexture;
			case TextureExportTypes.OcclusionMetallicRoughness:
				if ((Object)(object)PrimaryTexture == (Object)(object)other.PrimaryTexture)
				{
					return (Object)(object)SecondaryTexture == (Object)(object)other.SecondaryTexture;
				}
				return false;
			default:
				throw new ArgumentOutOfRangeException();
			}
		}
	}
	internal enum TextureExportTypes
	{
		Srgb,
		Linear,
		OcclusionMetallicRoughness,
		Normal
	}
	public sealed class TextureExporter : IDisposable, ITextureExporter
	{
		private readonly ITextureSerializer _textureSerializer;

		private readonly List<TextureExportParam> _exportingList = new List<TextureExportParam>();

		public TextureExporter(ITextureSerializer textureSerializer)
		{
			_textureSerializer = textureSerializer;
		}

		public void Dispose()
		{
		}

		public List<(Texture2D, ColorSpace)> Export()
		{
			List<(Texture2D, ColorSpace)> list = new List<(Texture2D, ColorSpace)>();
			for (int i = 0; i < _exportingList.Count; i++)
			{
				TextureExportParam textureExportParam = _exportingList[i];
				Texture2D item = textureExportParam.Creator();
				list.Add((item, textureExportParam.ExportColorSpace));
			}
			return list;
		}

		public int RegisterExportingAsSRgb(Texture src, bool needsAlpha)
		{
			return RegisterExportingSimple(src, needsAlpha, isLinear: false);
		}

		public int RegisterExportingAsLinear(Texture src, bool needsAlpha)
		{
			return RegisterExportingSimple(src, needsAlpha, isLinear: true);
		}

		private int RegisterExportingSimple(Texture src, bool needsAlpha, bool isLinear)
		{
			if ((Object)(object)src == (Object)null)
			{
				return -1;
			}
			int exportType = (isLinear ? 1 : 0);
			ColorSpace colorSpace = (isLinear ? ColorSpace.Linear : ColorSpace.sRGB);
			TextureExportParam textureExportParam = new TextureExportParam((TextureExportTypes)exportType, colorSpace, src, null, 0f, needsAlpha, () => ConvertTextureSimple(src, needsAlpha, colorSpace));
			if (TryGetExistsParam(textureExportParam, out var existsIdx))
			{
				TextureExportParam textureExportParam2 = _exportingList[existsIdx];
				if (needsAlpha && !textureExportParam2.NeedsAlpha)
				{
					_exportingList[existsIdx] = textureExportParam;
					return existsIdx;
				}
				return existsIdx;
			}
			_exportingList.Add(textureExportParam);
			return _exportingList.Count - 1;
		}

		public int RegisterExportingAsCombinedGltfPbrParameterTextureFromUnityStandardTextures(Texture metallicSmoothTexture, float smoothness, Texture occlusionTexture)
		{
			if ((Object)(object)metallicSmoothTexture == (Object)null && (Object)(object)occlusionTexture == (Object)null)
			{
				return -1;
			}
			TextureExportParam textureExportParam = new TextureExportParam(TextureExportTypes.OcclusionMetallicRoughness, ColorSpace.Linear, metallicSmoothTexture, occlusionTexture, smoothness, needsAlpha: false, delegate
			{
				_textureSerializer.ModifyTextureAssetBeforeExporting(metallicSmoothTexture);
				_textureSerializer.ModifyTextureAssetBeforeExporting(occlusionTexture);
				return OcclusionMetallicRoughnessConverter.Export(metallicSmoothTexture, smoothness, occlusionTexture);
			});
			if (TryGetExistsParam(textureExportParam, out var existsIdx))
			{
				return existsIdx;
			}
			_exportingList.Add(textureExportParam);
			return _exportingList.Count - 1;
		}

		public int RegisterExportingAsNormal(Texture src)
		{
			if ((Object)(object)src == (Object)null)
			{
				return -1;
			}
			TextureExportParam textureExportParam = new TextureExportParam(TextureExportTypes.Normal, ColorSpace.Linear, src, null, 0f, needsAlpha: false, delegate
			{
				_textureSerializer.ModifyTextureAssetBeforeExporting(src);
				return NormalConverter.Export(src);
			});
			if (TryGetExistsParam(textureExportParam, out var existsIdx))
			{
				return existsIdx;
			}
			_exportingList.Add(textureExportParam);
			return _exportingList.Count - 1;
		}

		private Texture2D ConvertTextureSimple(Texture src, bool needsAlpha, ColorSpace exportColorSpace)
		{
			Texture2D val = (Texture2D)(object)((src is Texture2D) ? src : null);
			if (_textureSerializer.CanExportAsEditorAssetFile((Texture)(object)val, exportColorSpace))
			{
				_textureSerializer.ModifyTextureAssetBeforeExporting(src);
			}
			else
			{
				_textureSerializer.ModifyTextureAssetBeforeExporting(src);
				val = TextureConverter.CopyTexture(src, exportColorSpace, needsAlpha, null);
			}
			return val;
		}

		private bool TryGetExistsParam(TextureExportParam param, out int existsIdx)
		{
			existsIdx = _exportingList.FindIndex(param.EqualsAsKey);
			return existsIdx != -1;
		}
	}
	public sealed class DeserializingTextureInfo
	{
		public byte[] ImageData { get; }

		public string DataMimeType { get; }

		public ColorSpace ColorSpace { get; }

		public bool UseMipmap { get; }

		public FilterMode FilterMode { get; }

		public TextureWrapMode WrapModeU { get; }

		public TextureWrapMode WrapModeV { get; }

		public DeserializingTextureInfo(byte[] imageData, string dataMimeType, ColorSpace colorSpace, bool useMipmap, FilterMode filterMode, TextureWrapMode wrapModeU, TextureWrapMode wrapModeV)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_0026: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0034: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			ImageData = imageData;
			DataMimeType = dataMimeType;
			ColorSpace = colorSpace;
			UseMipmap = useMipmap;
			FilterMode = filterMode;
			WrapModeU = wrapModeU;
			WrapModeV = wrapModeV;
		}

		public DeserializingTextureInfo(byte[] imageData, string dataMimeType, ColorSpace colorSpace, SamplerParam samplerParam)
		{
			//IL_002b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0030: Unknown result type (might be due to invalid IL or missing references)
			//IL_0038: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0045: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Unknown result type (might be due to invalid IL or missing references)
			ImageData = imageData;
			DataMimeType = dataMimeType;
			ColorSpace = colorSpace;
			UseMipmap = samplerParam.EnableMipMap;
			FilterMode = samplerParam.FilterMode;
			WrapModeU = samplerParam.WrapModesU;
			WrapModeV = samplerParam.WrapModesV;
		}
	}
	public interface ITextureDeserializer
	{
		Task<Texture2D> LoadTextureAsync(DeserializingTextureInfo textureInfo, IAwaitCaller awaitCaller);
	}
	public readonly struct SamplerParam
	{
		public TextureWrapMode WrapModesU { get; }

		public TextureWrapMode WrapModesV { get; }

		public FilterMode FilterMode { get; }

		public bool EnableMipMap { get; }

		public static SamplerParam Default => new SamplerParam((TextureWrapMode)0, (TextureWrapMode)0, (FilterMode)1, enableMipMap: true);

		public SamplerParam(TextureWrapMode wrapModesU, TextureWrapMode wrapModesV, FilterMode filterMode, bool enableMipMap)
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0002: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			WrapModesU = wrapModesU;
			WrapModesV = wrapModesV;
			FilterMode = filterMode;
			EnableMipMap = enableMipMap;
		}
	}
	public delegate Task<(byte[] binary, string mimeType)?> GetTextureBytesAsync();
	public readonly struct TextureDescriptor
	{
		public readonly string UnityObjectName;

		public readonly Vector2 Offset;

		public readonly Vector2 Scale;

		public readonly SamplerParam Sampler;

		public readonly TextureImportTypes TextureType;

		public readonly float MetallicFactor;

		public readonly float RoughnessFactor;

		public readonly GetTextureBytesAsync Index0;

		public readonly GetTextureBytesAsync Index1;

		public readonly GetTextureBytesAsync Index2;

		public readonly GetTextureBytesAsync Index3;

		public readonly GetTextureBytesAsync Index4;

		public readonly GetTextureBytesAsync Index5;

		public SubAssetKey SubAssetKey => new SubAssetKey(SubAssetKey.TextureType, UnityObjectName);

		public TextureDescriptor(string name, Vector2 offset, Vector2 scale, SamplerParam sampler, TextureImportTypes textureType, float metallicFactor, float roughnessFactor, GetTextureBytesAsync i0, GetTextureBytesAsync i1, GetTextureBytesAsync i2, GetTextureBytesAsync i3, GetTextureBytesAsync i4, GetTextureBytesAsync i5)
		{
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			//IL_0009: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			UnityObjectName = name;
			Offset = offset;
			Scale = scale;
			Sampler = sampler;
			TextureType = textureType;
			MetallicFactor = metallicFactor;
			RoughnessFactor = roughnessFactor;
			Index0 = i0;
			Index1 = i1;
			Index2 = i2;
			Index3 = i3;
			Index4 = i4;
			Index5 = i5;
		}
	}
	public sealed class TextureDescriptorSet
	{
		private readonly Dictionary<SubAssetKey, TextureDescriptor> _texDescDict = new Dictionary<SubAssetKey, TextureDescriptor>();

		public void Add(TextureDescriptor texDesc)
		{
			if (!_texDescDict.ContainsKey(texDesc.SubAssetKey))
			{
				_texDescDict.Add(texDesc.SubAssetKey, texDesc);
			}
		}

		public IEnumerable<TextureDescriptor> GetEnumerable()
		{
			foreach (KeyValuePair<SubAssetKey, TextureDescriptor> item in _texDescDict)
			{
				yield return item.Value;
			}
		}
	}
	public class TextureFactory : IResponsibilityForDestroyObjects, IDisposable
	{
		private readonly IReadOnlyDictionary<SubAssetKey, Texture> _externalMap;

		private readonly bool _isLegacySquaredRoughness;

		private readonly Dictionary<SubAssetKey, Texture> _textureCache = new Dictionary<SubAssetKey, Texture>();

		public ITextureDeserializer TextureDeserializer { get; }

		public IReadOnlyDictionary<SubAssetKey, Texture> ConvertedTextures => _textureCache;

		public IReadOnlyDictionary<SubAssetKey, Texture> ExternalTextures => _externalMap;

		public TextureFactory(ITextureDeserializer textureDeserializer, IReadOnlyDictionary<SubAssetKey, Texture> externalTextures, bool isLegacySquaredRoughness)
		{
			TextureDeserializer = textureDeserializer;
			_externalMap = externalTextures;
			_isLegacySquaredRoughness = isLegacySquaredRoughness;
		}

		public void Dispose()
		{
			_textureCache.Clear();
		}

		public void TransferOwnership(TakeResponsibilityForDestroyObjectFunc take)
		{
			KeyValuePair<SubAssetKey, Texture>[] array = _textureCache.ToArray();
			for (int i = 0; i < array.Length; i++)
			{
				var (key, obj) = array[i];
				take(key, (Object)(object)obj);
				_textureCache.Remove(key);
			}
		}

		public async Task<Texture> GetTextureAsync(TextureDescriptor texDesc, IAwaitCaller awaitCaller)
		{
			SubAssetKey subAssetKey = texDesc.SubAssetKey;
			if (_externalMap != null && _externalMap.TryGetValue(subAssetKey, out var value))
			{
				return value;
			}
			if (_textureCache.TryGetValue(subAssetKey, out var value2))
			{
				return value2;
			}
			switch (texDesc.TextureType)
			{
			case TextureImportTypes.NormalMap:
			{
				(byte[], string)? tuple2 = await texDesc.Index0();
				Texture2D val2 = await TextureDeserializer.LoadTextureAsync(new DeserializingTextureInfo(tuple2?.Item1, tuple2?.Item2, ColorSpace.Linear, texDesc.Sampler), awaitCaller);
				((Object)val2).name = subAssetKey.Name;
				_textureCache.Add(subAssetKey, (Texture)(object)val2);
				return (Texture)(object)val2;
			}
			case TextureImportTypes.StandardMap:
			{
				Texture2D metallicRoughnessTexture = null;
				Texture2D occlusionTexture = null;
				if (texDesc.Index0 != null)
				{
					(byte[], string)? tuple4 = await texDesc.Index0();
					metallicRoughnessTexture = await TextureDeserializer.LoadTextureAsync(new DeserializingTextureInfo(tuple4?.Item1, tuple4?.Item2, ColorSpace.Linear, texDesc.Sampler), awaitCaller);
				}
				if (texDesc.Index1 != null)
				{
					(byte[], string)? tuple5 = await texDesc.Index1();
					occlusionTexture = await TextureDeserializer.LoadTextureAsync(new DeserializingTextureInfo(tuple5?.Item1, tuple5?.Item2, ColorSpace.Linear, texDesc.Sampler), awaitCaller);
				}
				Texture2D val4 = OcclusionMetallicRoughnessConverter.Import(metallicRoughnessTexture, texDesc.MetallicFactor, texDesc.RoughnessFactor, occlusionTexture, _isLegacySquaredRoughness);
				((Object)val4).name = subAssetKey.Name;
				val4.SetSampler(in texDesc.Sampler);
				_textureCache.Add(subAssetKey, (Texture)(object)val4);
				UnityObjectDestoyer.DestroyRuntimeOrEditor((Object)(object)metallicRoughnessTexture);
				UnityObjectDestoyer.DestroyRuntimeOrEditor((Object)(object)occlusionTexture);
				return (Texture)(object)val4;
			}
			case TextureImportTypes.sRGB:
			{
				(byte[], string)? tuple3 = await texDesc.Index0();
				Texture2D val3 = await TextureDeserializer.LoadTextureAsync(new DeserializingTextureInfo(tuple3?.Item1, tuple3?.Item2, ColorSpace.sRGB, texDesc.Sampler), awaitCaller);
				((Object)val3).name = subAssetKey.Name;
				_textureCache.Add(subAssetKey, (Texture)(object)val3);
				return (Texture)(object)val3;
			}
			case TextureImportTypes.Linear:
			{
				(byte[], string)? tuple = await texDesc.Index0();
				Texture2D val = await TextureDeserializer.LoadTextureAsync(new DeserializingTextureInfo(tuple?.Item1, tuple?.Item2, ColorSpace.Linear, texDesc.Sampler), awaitCaller);
				((Object)val).name = subAssetKey.Name;
				_textureCache.Add(subAssetKey, (Texture)(object)val);
				return (Texture)(object)val;
			}
			default:
				throw new ArgumentOutOfRangeException();
			}
		}
	}
	public static class TextureImportName
	{
		private const string NORMAL_SUFFIX = ".normal";

		private const string STANDARD_SUFFIX = ".standard";

		private const string LINEAR_SUFFIX = ".linear";

		public static string GetUnityObjectName(TextureImportTypes type, string gltfName, string uri)
		{
			switch (type)
			{
			case TextureImportTypes.StandardMap:
				return gltfName + ".standard";
			case TextureImportTypes.NormalMap:
				return gltfName + ".normal";
			case TextureImportTypes.Linear:
				return gltfName + ".linear";
			default:
				if (!string.IsNullOrEmpty(uri) && !uri.StartsWith("data:", StringComparison.Ordinal))
				{
					return Path.GetFileNameWithoutExtension(uri);
				}
				return gltfName;
			}
		}

		public static string RemoveSuffix(string src)
		{
			if (src.EndsWith(".normal"))
			{
				return src.Substring(0, src.Length - ".normal".Length);
			}
			if (src.EndsWith(".standard"))
			{
				return src.Substring(0, src.Length - ".standard".Length);
			}
			if (src.EndsWith(".linear"))
			{
				return src.Substring(0, src.Length - ".linear".Length);
			}
			return src;
		}
	}
	public enum TextureImportTypes
	{
		sRGB,
		NormalMap,
		StandardMap,
		Linear
	}
	public sealed class UnityTextureDeserializer : ITextureDeserializer
	{
		public async Task<Texture2D> LoadTextureAsync(DeserializingTextureInfo textureInfo, IAwaitCaller awaitCaller)
		{
			switch (textureInfo.DataMimeType)
			{
			default:
				Debug.LogWarning((object)("Texture image MIME type `" + textureInfo.DataMimeType + "` is not supported."));
				break;
			case "image/png":
			case "image/jpeg":
				break;
			}
			Texture2D texture = new Texture2D(2, 2, (TextureFormat)5, textureInfo.UseMipmap, textureInfo.ColorSpace == ColorSpace.Linear);
			if (textureInfo.ImageData != null)
			{
				ImageConversion.LoadImage(texture, textureInfo.ImageData);
				((Texture)texture).wrapModeU = textureInfo.WrapModeU;
				((Texture)texture).wrapModeV = textureInfo.WrapModeV;
				((Texture)texture).filterMode = textureInfo.FilterMode;
				await awaitCaller.NextFrame();
			}
			return texture;
		}
	}
	internal static class TextureExtensions
	{
		public static bool HasMipMap(this Texture texture)
		{
			Texture2D val = (Texture2D)(object)((texture is Texture2D) ? texture : null);
			if (val != null)
			{
				return ((Texture)val).mipmapCount > 1;
			}
			RenderTexture val2 = (RenderTexture)(object)((texture is RenderTexture) ? texture : null);
			if (val2 != null)
			{
				return val2.useMipMap;
			}
			return false;
		}

		public static void SetSampler(this Texture2D texture, in SamplerParam param)
		{
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0018: Unknown result type (might be due to invalid IL or missing references)
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			if (!((Object)(object)texture == (Object)null))
			{
				((Texture)texture).wrapModeU = param.WrapModesU;
				((Texture)texture).wrapModeV = param.WrapModesV;
				((Texture)texture).filterMode = param.FilterMode;
			}
		}
	}
	public static class KeyValuePariExtensions
	{
		public static void Deconstruct<T, U>(this KeyValuePair<T, U> pair, out T key, out U value)
		{
			key = pair.Key;
			value = pair.Value;
		}
	}
	public static class Symbols
	{
		public static bool VRM_DEVELOP => false;
	}
	public static class UnityObjectDestoyer
	{
		public static void DestroyRuntimeOrEditor(Object o)
		{
			if (Application.isPlaying)
			{
				Object.Destroy(o);
			}
			else
			{
				Object.DestroyImmediate(o);
			}
		}
	}
}

VRMShaders.GLTF.UniUnlit.Runtime.dll

Decompiled 5 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UniGLTF.UniUnlit;

public enum UniUnlitRenderMode
{
	Opaque,
	Cutout,
	Transparent
}
public enum UniUnlitCullMode
{
	Off = 0,
	Back = 2
}
public enum UniUnlitVertexColorBlendOp
{
	None,
	Multiply
}
public static class UniUnlitUtil
{
	public const string ShaderName = "UniGLTF/UniUnlit";

	public const string PropNameMainTex = "_MainTex";

	public const string PropNameColor = "_Color";

	public const string PropNameCutoff = "_Cutoff";

	public const string PropNameBlendMode = "_BlendMode";

	public const string PropNameCullMode = "_CullMode";

	[Obsolete("Use PropNameVColBlendMode")]
	public const string PropeNameVColBlendMode = "_VColBlendMode";

	public const string PropNameVColBlendMode = "_VColBlendMode";

	public const string PropNameSrcBlend = "_SrcBlend";

	public const string PropNameDstBlend = "_DstBlend";

	public const string PropNameZWrite = "_ZWrite";

	public const string PropNameStandardShadersRenderMode = "_Mode";

	public const string KeywordAlphaTestOn = "_ALPHATEST_ON";

	public const string KeywordAlphaBlendOn = "_ALPHABLEND_ON";

	public const string KeywordVertexColMul = "_VERTEXCOL_MUL";

	public const string TagRenderTypeKey = "RenderType";

	public const string TagRenderTypeValueOpaque = "Opaque";

	public const string TagRenderTypeValueTransparentCutout = "TransparentCutout";

	public const string TagRenderTypeValueTransparent = "Transparent";

	public static void SetRenderMode(Material material, UniUnlitRenderMode mode)
	{
		material.SetInt("_BlendMode", (int)mode);
	}

	public static void SetCullMode(Material material, UniUnlitCullMode mode)
	{
		material.SetInt("_CullMode", (int)mode);
	}

	public static void SetVColBlendMode(Material material, UniUnlitVertexColorBlendOp mode)
	{
		material.SetInt("_VColBlendMode", (int)mode);
	}

	public static UniUnlitRenderMode GetRenderMode(Material material)
	{
		return (UniUnlitRenderMode)material.GetInt("_BlendMode");
	}

	public static UniUnlitCullMode GetCullMode(Material material)
	{
		return (UniUnlitCullMode)material.GetInt("_CullMode");
	}

	public static UniUnlitVertexColorBlendOp GetVColBlendMode(Material material)
	{
		return (UniUnlitVertexColorBlendOp)material.GetInt("_VColBlendMode");
	}

	public static void ValidateProperties(Material material, bool isRenderModeChangedByUser = false)
	{
		SetupBlendMode(material, (UniUnlitRenderMode)material.GetFloat("_BlendMode"), isRenderModeChangedByUser);
		SetupVertexColorBlendOp(material, (UniUnlitVertexColorBlendOp)material.GetFloat("_VColBlendMode"));
	}

	private static void SetupBlendMode(Material material, UniUnlitRenderMode renderMode, bool isRenderModeChangedByUser = false)
	{
		switch (renderMode)
		{
		case UniUnlitRenderMode.Opaque:
			material.SetOverrideTag("RenderType", "Opaque");
			material.SetInt("_SrcBlend", 1);
			material.SetInt("_DstBlend", 0);
			material.SetInt("_ZWrite", 1);
			SetKeyword(material, "_ALPHATEST_ON", required: false);
			SetKeyword(material, "_ALPHABLEND_ON", required: false);
			if (isRenderModeChangedByUser)
			{
				material.renderQueue = -1;
			}
			break;
		case UniUnlitRenderMode.Cutout:
			material.SetOverrideTag("RenderType", "TransparentCutout");
			material.SetInt("_SrcBlend", 1);
			material.SetInt("_DstBlend", 0);
			material.SetInt("_ZWrite", 1);
			SetKeyword(material, "_ALPHATEST_ON", required: true);
			SetKeyword(material, "_ALPHABLEND_ON", required: false);
			if (isRenderModeChangedByUser)
			{
				material.renderQueue = 2450;
			}
			break;
		case UniUnlitRenderMode.Transparent:
			material.SetOverrideTag("RenderType", "Transparent");
			material.SetInt("_SrcBlend", 5);
			material.SetInt("_DstBlend", 10);
			material.SetInt("_ZWrite", 0);
			SetKeyword(material, "_ALPHATEST_ON", required: false);
			SetKeyword(material, "_ALPHABLEND_ON", required: true);
			if (isRenderModeChangedByUser)
			{
				material.renderQueue = 3000;
			}
			break;
		}
	}

	private static void SetupVertexColorBlendOp(Material material, UniUnlitVertexColorBlendOp vColBlendOp)
	{
		switch (vColBlendOp)
		{
		case UniUnlitVertexColorBlendOp.None:
			SetKeyword(material, "_VERTEXCOL_MUL", required: false);
			break;
		case UniUnlitVertexColorBlendOp.Multiply:
			SetKeyword(material, "_VERTEXCOL_MUL", required: true);
			break;
		}
	}

	private static void SetKeyword(Material mat, string keyword, bool required)
	{
		if (required)
		{
			mat.EnableKeyword(keyword);
		}
		else
		{
			mat.DisableKeyword(keyword);
		}
	}
}

VRMShaders.VRM.IO.Runtime.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UniGLTF.ShaderPropExporter;

public static class PreShaderPropExporter
{
	private const string ShaderName = "VRM/MToon";

	private static ShaderProps VRM_MToon = new ShaderProps
	{
		Properties = new ShaderProperty[42]
		{
			new ShaderProperty("_Cutoff", ShaderPropertyType.Range),
			new ShaderProperty("_Color", ShaderPropertyType.Color),
			new ShaderProperty("_ShadeColor", ShaderPropertyType.Color),
			new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv),
			new ShaderProperty("_ShadeTexture", ShaderPropertyType.TexEnv),
			new ShaderProperty("_BumpScale", ShaderPropertyType.Float),
			new ShaderProperty("_BumpMap", ShaderPropertyType.TexEnv),
			new ShaderProperty("_ReceiveShadowRate", ShaderPropertyType.Range),
			new ShaderProperty("_ReceiveShadowTexture", ShaderPropertyType.TexEnv),
			new ShaderProperty("_ShadingGradeRate", ShaderPropertyType.Range),
			new ShaderProperty("_ShadingGradeTexture", ShaderPropertyType.TexEnv),
			new ShaderProperty("_ShadeShift", ShaderPropertyType.Range),
			new ShaderProperty("_ShadeToony", ShaderPropertyType.Range),
			new ShaderProperty("_LightColorAttenuation", ShaderPropertyType.Range),
			new ShaderProperty("_IndirectLightIntensity", ShaderPropertyType.Range),
			new ShaderProperty("_RimColor", ShaderPropertyType.Color),
			new ShaderProperty("_RimTexture", ShaderPropertyType.TexEnv),
			new ShaderProperty("_RimLightingMix", ShaderPropertyType.Range),
			new ShaderProperty("_RimFresnelPower", ShaderPropertyType.Range),
			new ShaderProperty("_RimLift", ShaderPropertyType.Range),
			new ShaderProperty("_SphereAdd", ShaderPropertyType.TexEnv),
			new ShaderProperty("_EmissionColor", ShaderPropertyType.Color),
			new ShaderProperty("_EmissionMap", ShaderPropertyType.TexEnv),
			new ShaderProperty("_OutlineWidthTexture", ShaderPropertyType.TexEnv),
			new ShaderProperty("_OutlineWidth", ShaderPropertyType.Range),
			new ShaderProperty("_OutlineScaledMaxDistance", ShaderPropertyType.Range),
			new ShaderProperty("_OutlineColor", ShaderPropertyType.Color),
			new ShaderProperty("_OutlineLightingMix", ShaderPropertyType.Range),
			new ShaderProperty("_UvAnimMaskTexture", ShaderPropertyType.TexEnv),
			new ShaderProperty("_UvAnimScrollX", ShaderPropertyType.Float),
			new ShaderProperty("_UvAnimScrollY", ShaderPropertyType.Float),
			new ShaderProperty("_UvAnimRotation", ShaderPropertyType.Float),
			new ShaderProperty("_MToonVersion", ShaderPropertyType.Float),
			new ShaderProperty("_DebugMode", ShaderPropertyType.Float),
			new ShaderProperty("_BlendMode", ShaderPropertyType.Float),
			new ShaderProperty("_OutlineWidthMode", ShaderPropertyType.Float),
			new ShaderProperty("_OutlineColorMode", ShaderPropertyType.Float),
			new ShaderProperty("_CullMode", ShaderPropertyType.Float),
			new ShaderProperty("_OutlineCullMode", ShaderPropertyType.Float),
			new ShaderProperty("_SrcBlend", ShaderPropertyType.Float),
			new ShaderProperty("_DstBlend", ShaderPropertyType.Float),
			new ShaderProperty("_ZWrite", ShaderPropertyType.Float)
		}
	};

	public static ShaderProps GetPropsForMToon()
	{
		return VRM_MToon;
	}
}
public enum ShaderPropertyType
{
	TexEnv,
	Color,
	Range,
	Float,
	Vector
}
public struct ShaderProperty
{
	public string Key;

	public ShaderPropertyType ShaderPropertyType;

	public ShaderProperty(string key, ShaderPropertyType propType)
	{
		Key = key;
		ShaderPropertyType = propType;
	}
}
public class ShaderProps
{
	public ShaderProperty[] Properties;
}

VRMShaders.VRM10.Format.Runtime.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace UniGLTF.Extensions.VRMC_materials_mtoon;

public class TextureInfo
{
	public object Extensions;

	public object Extras;

	public int? Index;

	public int? TexCoord;
}
public class ShadingShiftTextureInfo
{
	public object Extensions;

	public object Extras;

	public int? Index;

	public int? TexCoord;

	public float? Scale;
}
public enum OutlineWidthMode
{
	none,
	worldCoordinates,
	screenCoordinates
}
public class VRMC_materials_mtoon
{
	public const string ExtensionName = "VRMC_materials_mtoon";

	public object Extensions;

	public object Extras;

	public string SpecVersion;

	public bool? TransparentWithZWrite;

	public int? RenderQueueOffsetNumber;

	public float[] ShadeColorFactor;

	public TextureInfo ShadeMultiplyTexture;

	public float? ShadingShiftFactor;

	public ShadingShiftTextureInfo ShadingShiftTexture;

	public float? ShadingToonyFactor;

	public float? GiEqualizationFactor;

	public float[] MatcapFactor;

	public TextureInfo MatcapTexture;

	public float[] ParametricRimColorFactor;

	public TextureInfo RimMultiplyTexture;

	public float? RimLightingMixFactor;

	public float? ParametricRimFresnelPowerFactor;

	public float? ParametricRimLiftFactor;

	public OutlineWidthMode OutlineWidthMode;

	public float? OutlineWidthFactor;

	public TextureInfo OutlineWidthMultiplyTexture;

	public float[] OutlineColorFactor;

	public float? OutlineLightingMixFactor;

	public TextureInfo UvAnimationMaskTexture;

	public float? UvAnimationScrollXSpeedFactor;

	public float? UvAnimationScrollYSpeedFactor;

	public float? UvAnimationRotationSpeedFactor;
}

VRMShaders.VRM10.MToon10.Runtime.dll

Decompiled 5 months ago
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyVersion("0.0.0.0")]
namespace VRMShaders.VRM10.MToon10.Runtime;

public static class MaterialExtensions
{
	public static void SetKeyword(this Material mat, string keyword, bool isEnabled)
	{
		if (isEnabled)
		{
			mat.EnableKeyword(keyword);
		}
		else
		{
			mat.DisableKeyword(keyword);
		}
	}

	public static int GetInt(this Material mat, MToon10Prop prop)
	{
		return mat.GetInt(prop.ToUnityShaderLabName());
	}

	public static void SetInt(this Material mat, MToon10Prop prop, int val)
	{
		mat.SetInt(prop.ToUnityShaderLabName(), val);
	}

	public static Texture GetTexture(this Material mat, MToon10Prop prop)
	{
		return mat.GetTexture(prop.ToUnityShaderLabName());
	}

	public static Vector2 GetTextureScale(this Material mat, MToon10Prop prop)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return mat.GetTextureScale(prop.ToUnityShaderLabName());
	}

	public static Vector2 GetTextureOffset(this Material mat, MToon10Prop prop)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return mat.GetTextureOffset(prop.ToUnityShaderLabName());
	}

	public static float GetFloat(this Material mat, MToon10Prop prop)
	{
		return mat.GetFloat(prop.ToUnityShaderLabName());
	}

	public static Color GetColor(this Material mat, MToon10Prop prop)
	{
		//IL_0007: Unknown result type (might be due to invalid IL or missing references)
		return mat.GetColor(prop.ToUnityShaderLabName());
	}
}
public sealed class MToon10Context
{
	private readonly Material _material;

	public MToon10AlphaMode AlphaMode => (MToon10AlphaMode)_material.GetInt(MToon10Prop.AlphaMode);

	public MToon10TransparentWithZWriteMode TransparentWithZWriteMode => (MToon10TransparentWithZWriteMode)_material.GetInt(MToon10Prop.TransparentWithZWrite);

	public float AlphaCutoff => _material.GetFloat(MToon10Prop.AlphaCutoff);

	public int RenderQueueOffsetNumber => _material.GetInt(MToon10Prop.RenderQueueOffsetNumber);

	public MToon10DoubleSidedMode DoubleSidedMode => (MToon10DoubleSidedMode)_material.GetInt(MToon10Prop.DoubleSided);

	public Color BaseColorFactorSrgb => _material.GetColor(MToon10Prop.BaseColorFactor);

	public Texture BaseColorTexture => _material.GetTexture(MToon10Prop.BaseColorTexture);

	public Color ShadeColorFactorSrgb => _material.GetColor(MToon10Prop.ShadeColorFactor);

	public Texture ShadeColorTexture => _material.GetTexture(MToon10Prop.ShadeColorTexture);

	public Texture NormalTexture => _material.GetTexture(MToon10Prop.NormalTexture);

	public float NormalTextureScale => _material.GetFloat(MToon10Prop.NormalTextureScale);

	public float ShadingShiftFactor => _material.GetFloat(MToon10Prop.ShadingShiftFactor);

	public Texture ShadingShiftTexture => _material.GetTexture(MToon10Prop.ShadingShiftTexture);

	public float ShadingShiftTextureScale => _material.GetFloat(MToon10Prop.ShadingShiftTextureScale);

	public float ShadingToonyFactor => _material.GetFloat(MToon10Prop.ShadingToonyFactor);

	public float GiEqualizationFactor => _material.GetFloat(MToon10Prop.GiEqualizationFactor);

	public Color EmissiveFactorLinear => _material.GetColor(MToon10Prop.EmissiveFactor);

	public Texture EmissiveTexture => _material.GetTexture(MToon10Prop.EmissiveTexture);

	public Texture MatcapTexture => _material.GetTexture(MToon10Prop.MatcapTexture);

	public Color ParametricRimColorFactorSrgb => _material.GetColor(MToon10Prop.ParametricRimColorFactor);

	public float ParametricRimFresnelPowerFactor => _material.GetFloat(MToon10Prop.ParametricRimFresnelPowerFactor);

	public float ParametricRimLiftFactor => _material.GetFloat(MToon10Prop.ParametricRimLiftFactor);

	public Texture RimMultiplyTexture => _material.GetTexture(MToon10Prop.RimMultiplyTexture);

	public float RimLightingMixFactor => _material.GetFloat(MToon10Prop.RimLightingMixFactor);

	public MToon10OutlineMode OutlineWidthMode => (MToon10OutlineMode)_material.GetInt(MToon10Prop.OutlineWidthMode);

	public float OutlineWidthFactor => _material.GetFloat(MToon10Prop.OutlineWidthFactor);

	public Texture OutlineWidthMultiplyTexture => _material.GetTexture(MToon10Prop.OutlineWidthMultiplyTexture);

	public Color OutlineColorFactorSrgb => _material.GetColor(MToon10Prop.OutlineColorFactor);

	public float OutlineLightingMixFactor => _material.GetFloat(MToon10Prop.OutlineLightingMixFactor);

	public Texture UvAnimationMaskTexture => _material.GetTexture(MToon10Prop.UvAnimationMaskTexture);

	public float UvAnimationScrollXSpeedFactor => _material.GetFloat(MToon10Prop.UvAnimationScrollXSpeedFactor);

	public float UvAnimationScrollYSpeedFactor => _material.GetFloat(MToon10Prop.UvAnimationScrollYSpeedFactor);

	public float UvAnimationRotationSpeedFactor => _material.GetFloat(MToon10Prop.UvAnimationRotationSpeedFactor);

	public Vector2 TextureScale => _material.GetTextureScale(MToon10Prop.BaseColorTexture);

	public Vector2 TextureOffset => _material.GetTextureOffset(MToon10Prop.BaseColorTexture);

	public MToon10Context(Material material)
	{
		_material = material;
	}

	public void Validate()
	{
		new MToonValidator(_material).Validate();
	}
}
public static class MToon10Migrator
{
	public static float MigrateToShadingToony(float shadingToony0X, float shadingShift0X)
	{
		var (num, num2) = GetShadingRange0X(shadingToony0X, shadingShift0X);
		return Mathf.Clamp((2f - (num2 - num)) * 0.5f, 0f, 1f);
	}

	public static float MigrateToShadingShift(float shadingToony0X, float shadingShift0X)
	{
		(float min, float max) shadingRange0X = GetShadingRange0X(shadingToony0X, shadingShift0X);
		var (num, _) = shadingRange0X;
		return Mathf.Clamp((shadingRange0X.max + num) * 0.5f * -1f, -1f, 1f);
	}

	public static float MigrateToGiEqualization(float giIntensity0X)
	{
		return Mathf.Clamp01(1f - giIntensity0X);
	}

	private static (float min, float max) GetShadingRange0X(float shadingToony0X, float shadingShift0X)
	{
		float item = Mathf.Lerp(1f, shadingShift0X, shadingToony0X);
		return (shadingShift0X, item);
	}
}
public sealed class MToonValidator
{
	private readonly Material _material;

	public MToonValidator(Material material)
	{
		_material = material;
	}

	public void Validate()
	{
		MToon10AlphaMode @int = (MToon10AlphaMode)_material.GetInt(MToon10Prop.AlphaMode);
		MToon10TransparentWithZWriteMode int2 = (MToon10TransparentWithZWriteMode)_material.GetInt(MToon10Prop.TransparentWithZWrite);
		int int3 = _material.GetInt(MToon10Prop.RenderQueueOffsetNumber);
		MToon10DoubleSidedMode int4 = (MToon10DoubleSidedMode)_material.GetInt(MToon10Prop.DoubleSided);
		SetUnityShaderPassSettings(_material, @int, int2, int3, int4);
		SetUnityShaderVariants(_material);
	}

	private static void SetUnityShaderPassSettings(Material material, MToon10AlphaMode alphaMode, MToon10TransparentWithZWriteMode zWriteMode, int renderQueueOffset, MToon10DoubleSidedMode doubleSidedMode)
	{
		material.SetInt(MToon10Prop.AlphaMode, (int)alphaMode);
		material.SetInt(MToon10Prop.TransparentWithZWrite, (int)zWriteMode);
		material.SetInt(MToon10Prop.DoubleSided, (int)doubleSidedMode);
		switch (alphaMode)
		{
		case MToon10AlphaMode.Opaque:
			material.SetOverrideTag("RenderType", "Opaque");
			material.SetInt(MToon10Prop.UnitySrcBlend, 1);
			material.SetInt(MToon10Prop.UnityDstBlend, 0);
			material.SetInt(MToon10Prop.UnityZWrite, 1);
			material.SetInt(MToon10Prop.UnityAlphaToMask, 0);
			renderQueueOffset = 0;
			material.renderQueue = 2000;
			break;
		case MToon10AlphaMode.Cutout:
			material.SetOverrideTag("RenderType", "TransparentCutout");
			material.SetInt(MToon10Prop.UnitySrcBlend, 1);
			material.SetInt(MToon10Prop.UnityDstBlend, 0);
			material.SetInt(MToon10Prop.UnityZWrite, 1);
			material.SetInt(MToon10Prop.UnityAlphaToMask, 1);
			renderQueueOffset = 0;
			material.renderQueue = 2450;
			break;
		case MToon10AlphaMode.Transparent:
			if (zWriteMode == MToon10TransparentWithZWriteMode.Off)
			{
				material.SetOverrideTag("RenderType", "Transparent");
				material.SetInt(MToon10Prop.UnitySrcBlend, 5);
				material.SetInt(MToon10Prop.UnityDstBlend, 10);
				material.SetInt(MToon10Prop.UnityZWrite, 0);
				material.SetInt(MToon10Prop.UnityAlphaToMask, 0);
				renderQueueOffset = Mathf.Clamp(renderQueueOffset, -9, 0);
				material.renderQueue = 3000 + renderQueueOffset;
				break;
			}
			if (zWriteMode == MToon10TransparentWithZWriteMode.On)
			{
				material.SetOverrideTag("RenderType", "Transparent");
				material.SetInt(MToon10Prop.UnitySrcBlend, 5);
				material.SetInt(MToon10Prop.UnityDstBlend, 10);
				material.SetInt(MToon10Prop.UnityZWrite, 1);
				material.SetInt(MToon10Prop.UnityAlphaToMask, 0);
				renderQueueOffset = Mathf.Clamp(renderQueueOffset, 0, 9);
				material.renderQueue = 2501 + renderQueueOffset;
				break;
			}
			goto default;
		default:
			throw new ArgumentOutOfRangeException("alphaMode", alphaMode, null);
		}
		switch (doubleSidedMode)
		{
		case MToon10DoubleSidedMode.Off:
			material.SetInt(MToon10Prop.UnityCullMode, 2);
			break;
		case MToon10DoubleSidedMode.On:
			material.SetInt(MToon10Prop.UnityCullMode, 0);
			break;
		default:
			throw new ArgumentOutOfRangeException("doubleSidedMode", doubleSidedMode, null);
		}
		material.SetInt(MToon10Prop.RenderQueueOffsetNumber, renderQueueOffset);
	}

	private static void SetUnityCullingSettings(Material material, MToon10DoubleSidedMode doubleSidedMode)
	{
	}

	private static void SetUnityShaderVariants(Material material)
	{
		material.SetKeyword("_ALPHATEST_ON", material.GetInt(MToon10Prop.AlphaMode) == 1);
		material.SetKeyword("_ALPHABLEND_ON", material.GetInt(MToon10Prop.AlphaMode) == 2);
		material.SetKeyword("_ALPHAPREMULTIPLY_ON", isEnabled: false);
		material.SetKeyword("_NORMALMAP", (Object)(object)material.GetTexture(MToon10Prop.NormalTexture) != (Object)null);
		material.SetKeyword("_MTOON_EMISSIVEMAP", (Object)(object)material.GetTexture(MToon10Prop.EmissiveTexture) != (Object)null);
		material.SetKeyword("_MTOON_RIMMAP", (Object)(object)material.GetTexture(MToon10Prop.MatcapTexture) != (Object)null || (Object)(object)material.GetTexture(MToon10Prop.RimMultiplyTexture) != (Object)null);
		material.SetKeyword("_MTOON_PARAMETERMAP", (Object)(object)material.GetTexture(MToon10Prop.ShadingShiftTexture) != (Object)null || (Object)(object)material.GetTexture(MToon10Prop.OutlineWidthMultiplyTexture) != (Object)null || (Object)(object)material.GetTexture(MToon10Prop.UvAnimationMaskTexture) != (Object)null);
		material.SetKeyword("_MTOON_OUTLINE_WORLD", material.GetInt(MToon10Prop.OutlineWidthMode) == 1);
		material.SetKeyword("_MTOON_OUTLINE_SCREEN", material.GetInt(MToon10Prop.OutlineWidthMode) == 2);
	}
}
public enum MToon10AlphaMode
{
	Opaque,
	Cutout,
	Transparent
}
public enum MToon10DoubleSidedMode
{
	Off,
	On
}
public static class MToon10EmissiveMapKeyword
{
	public const string On = "_MTOON_EMISSIVEMAP";
}
public static class MToon10NormalMapKeyword
{
	public const string On = "_NORMALMAP";
}
public enum MToon10OutlineMode
{
	None,
	World,
	Screen
}
public static class MToon10OutlineModeKeyword
{
	public const string World = "_MTOON_OUTLINE_WORLD";

	public const string Screen = "_MTOON_OUTLINE_SCREEN";
}
public static class MToon10ParameterMapKeyword
{
	public const string On = "_MTOON_PARAMETERMAP";
}
public static class MToon10RimMapKeyword
{
	public const string On = "_MTOON_RIMMAP";
}
public enum MToon10TransparentWithZWriteMode
{
	Off,
	On
}
public static class MToon10Meta
{
	public static readonly string UnityShaderName = "VRM10/MToon10";
}
public enum MToon10Prop
{
	AlphaMode,
	TransparentWithZWrite,
	AlphaCutoff,
	RenderQueueOffsetNumber,
	DoubleSided,
	BaseColorFactor,
	BaseColorTexture,
	ShadeColorFactor,
	ShadeColorTexture,
	NormalTexture,
	NormalTextureScale,
	ShadingShiftFactor,
	ShadingShiftTexture,
	ShadingShiftTextureScale,
	ShadingToonyFactor,
	GiEqualizationFactor,
	EmissiveFactor,
	EmissiveTexture,
	MatcapTexture,
	ParametricRimColorFactor,
	ParametricRimFresnelPowerFactor,
	ParametricRimLiftFactor,
	RimMultiplyTexture,
	RimLightingMixFactor,
	OutlineWidthMode,
	OutlineWidthFactor,
	OutlineWidthMultiplyTexture,
	OutlineColorFactor,
	OutlineLightingMixFactor,
	UvAnimationMaskTexture,
	UvAnimationScrollXSpeedFactor,
	UvAnimationScrollYSpeedFactor,
	UvAnimationRotationSpeedFactor,
	UnityCullMode,
	UnitySrcBlend,
	UnityDstBlend,
	UnityZWrite,
	UnityAlphaToMask,
	EditorEditMode
}
public static class MToon10Properties
{
	private static readonly Dictionary<MToon10Prop, string> _unityShaderLabNames = new Dictionary<MToon10Prop, string>
	{
		[MToon10Prop.AlphaMode] = "_AlphaMode",
		[MToon10Prop.TransparentWithZWrite] = "_TransparentWithZWrite",
		[MToon10Prop.AlphaCutoff] = "_Cutoff",
		[MToon10Prop.RenderQueueOffsetNumber] = "_RenderQueueOffset",
		[MToon10Prop.DoubleSided] = "_DoubleSided",
		[MToon10Prop.BaseColorFactor] = "_Color",
		[MToon10Prop.BaseColorTexture] = "_MainTex",
		[MToon10Prop.ShadeColorFactor] = "_ShadeColor",
		[MToon10Prop.ShadeColorTexture] = "_ShadeTex",
		[MToon10Prop.NormalTexture] = "_BumpMap",
		[MToon10Prop.NormalTextureScale] = "_BumpScale",
		[MToon10Prop.ShadingShiftFactor] = "_ShadingShiftFactor",
		[MToon10Prop.ShadingShiftTexture] = "_ShadingShiftTex",
		[MToon10Prop.ShadingShiftTextureScale] = "_ShadingShiftTexScale",
		[MToon10Prop.ShadingToonyFactor] = "_ShadingToonyFactor",
		[MToon10Prop.GiEqualizationFactor] = "_GiEqualization",
		[MToon10Prop.EmissiveFactor] = "_EmissionColor",
		[MToon10Prop.EmissiveTexture] = "_EmissionMap",
		[MToon10Prop.MatcapTexture] = "_MatcapTex",
		[MToon10Prop.ParametricRimColorFactor] = "_RimColor",
		[MToon10Prop.ParametricRimFresnelPowerFactor] = "_RimFresnelPower",
		[MToon10Prop.ParametricRimLiftFactor] = "_RimLift",
		[MToon10Prop.RimMultiplyTexture] = "_RimTex",
		[MToon10Prop.RimLightingMixFactor] = "_RimLightingMix",
		[MToon10Prop.OutlineWidthMode] = "_OutlineWidthMode",
		[MToon10Prop.OutlineWidthFactor] = "_OutlineWidth",
		[MToon10Prop.OutlineWidthMultiplyTexture] = "_OutlineWidthTex",
		[MToon10Prop.OutlineColorFactor] = "_OutlineColor",
		[MToon10Prop.OutlineLightingMixFactor] = "_OutlineLightingMix",
		[MToon10Prop.UvAnimationMaskTexture] = "_UvAnimMaskTex",
		[MToon10Prop.UvAnimationScrollXSpeedFactor] = "_UvAnimScrollXSpeed",
		[MToon10Prop.UvAnimationScrollYSpeedFactor] = "_UvAnimScrollYSpeed",
		[MToon10Prop.UvAnimationRotationSpeedFactor] = "_UvAnimRotationSpeed",
		[MToon10Prop.UnityCullMode] = "_M_CullMode",
		[MToon10Prop.UnitySrcBlend] = "_M_SrcBlend",
		[MToon10Prop.UnityDstBlend] = "_M_DstBlend",
		[MToon10Prop.UnityZWrite] = "_M_ZWrite",
		[MToon10Prop.UnityAlphaToMask] = "_M_AlphaToMask",
		[MToon10Prop.EditorEditMode] = "_M_EditMode"
	};

	public static IReadOnlyDictionary<MToon10Prop, string> UnityShaderLabNames => _unityShaderLabNames;

	public static string ToUnityShaderLabName(this MToon10Prop prop)
	{
		return UnityShaderLabNames[prop];
	}
}
public static class UnityAlphaModeKeyword
{
	public const string AlphaTest = "_ALPHATEST_ON";

	public const string AlphaBlend = "_ALPHABLEND_ON";

	public const string AlphaPremultiply = "_ALPHAPREMULTIPLY_ON";
}
public enum UnityAlphaToMaskMode
{
	Off,
	On
}
public enum UnityCullMode
{
	Off = 0,
	Back = 2
}
public static class UnityRenderTag
{
	public const string Key = "RenderType";

	public const string OpaqueValue = "Opaque";

	public const string TransparentCutoutValue = "TransparentCutout";

	public const string TransparentValue = "Transparent";
}
public enum UnityZWriteMode
{
	Off,
	On
}