#pragma warning disable CS0162
using System;
using System.Linq;
using System.Collections.Generic;
using Ingvar.LiveWatch;
using Object = UnityEngine.Object;
using UnityEngine;

namespace Ingvar.LiveWatch
{
	// It's completely generated class, avoid modifying!
	public static  class WatchUnity
	{
		private static string _tempStr;
		private static HashSet<string> _tempStrSet = new();
		private static Dictionary<object, HashSet<string>> _tempSetDict = new();
		private static WatchReferenceCreator RC = WatchServices.ReferenceCreator;
		private static WatchCachedNamesBuilder NB = WatchServices.NameBuilder;

		#region Vector2

		public static WatchReference<Vector2> GetOrAdd(string path, Func<Vector2> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector2>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector2>();
#endif
		}

		public static WatchReference<Vector2> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Vector2> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector2, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector2>();
#endif
		}

		public static WatchReference<Vector2> Setup(WatchReference<Vector2> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Vector2> Push(WatchReference<Vector2> wr, Vector2 value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			Watch.Push(RC.GetOrAdd<Single, Vector2>(wr, nameof(Vector2.x)), value.x, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Vector2>(wr, nameof(Vector2.y)), value.y, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Vector2> Push(string path, Vector2 value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Vector2>(path), value, depth);
		}

		#endregion

		#region Vector3

		public static WatchReference<Vector3> GetOrAdd(string path, Func<Vector3> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector3>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector3>();
#endif
		}

		public static WatchReference<Vector3> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Vector3> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector3, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector3>();
#endif
		}

		public static WatchReference<Vector3> Setup(WatchReference<Vector3> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Vector3> Push(WatchReference<Vector3> wr, Vector3 value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			Watch.Push(RC.GetOrAdd<Single, Vector3>(wr, nameof(Vector3.x)), value.x, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Vector3>(wr, nameof(Vector3.y)), value.y, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Vector3>(wr, nameof(Vector3.z)), value.z, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Vector3> Push(string path, Vector3 value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Vector3>(path), value, depth);
		}

		#endregion

		#region Vector4

		public static WatchReference<Vector4> GetOrAdd(string path, Func<Vector4> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector4>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector4>();
#endif
		}

		public static WatchReference<Vector4> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Vector4> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector4, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector4>();
#endif
		}

		public static WatchReference<Vector4> Setup(WatchReference<Vector4> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Vector4> Push(WatchReference<Vector4> wr, Vector4 value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			Watch.Push(RC.GetOrAdd<Single, Vector4>(wr, nameof(Vector4.w)), value.w, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Vector4>(wr, nameof(Vector4.x)), value.x, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Vector4>(wr, nameof(Vector4.y)), value.y, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Vector4>(wr, nameof(Vector4.z)), value.z, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Vector4> Push(string path, Vector4 value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Vector4>(path), value, depth);
		}

		#endregion

		#region Vector2Int

		public static WatchReference<Vector2Int> GetOrAdd(string path, Func<Vector2Int> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector2Int>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector2Int>();
#endif
		}

		public static WatchReference<Vector2Int> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Vector2Int> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector2Int, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector2Int>();
#endif
		}

		public static WatchReference<Vector2Int> Setup(WatchReference<Vector2Int> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Vector2Int> Push(WatchReference<Vector2Int> wr, Vector2Int value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			Watch.Push(RC.GetOrAdd<Int32, Vector2Int>(wr, nameof(Vector2Int.x)), value.x, depth - 1);
			Watch.Push(RC.GetOrAdd<Int32, Vector2Int>(wr, nameof(Vector2Int.y)), value.y, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Vector2Int> Push(string path, Vector2Int value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Vector2Int>(path), value, depth);
		}

		#endregion

		#region Vector3Int

		public static WatchReference<Vector3Int> GetOrAdd(string path, Func<Vector3Int> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector3Int>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector3Int>();
#endif
		}

		public static WatchReference<Vector3Int> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Vector3Int> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Vector3Int, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Vector3Int>();
#endif
		}

		public static WatchReference<Vector3Int> Setup(WatchReference<Vector3Int> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Vector3Int> Push(WatchReference<Vector3Int> wr, Vector3Int value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			Watch.Push(RC.GetOrAdd<Int32, Vector3Int>(wr, nameof(Vector3Int.x)), value.x, depth - 1);
			Watch.Push(RC.GetOrAdd<Int32, Vector3Int>(wr, nameof(Vector3Int.y)), value.y, depth - 1);
			Watch.Push(RC.GetOrAdd<Int32, Vector3Int>(wr, nameof(Vector3Int.z)), value.z, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Vector3Int> Push(string path, Vector3Int value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Vector3Int>(path), value, depth);
		}

		#endregion

		#region Rect

		public static WatchReference<Rect> GetOrAdd(string path, Func<Rect> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Rect>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Rect>();
#endif
		}

		public static WatchReference<Rect> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Rect> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Rect, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Rect>();
#endif
		}

		public static WatchReference<Rect> Setup(WatchReference<Rect> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Rect> Push(WatchReference<Rect> wr, Rect value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			Watch.Push(RC.GetOrAdd<Single, Rect>(wr, nameof(Rect.height)), value.height, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rect>(wr, nameof(Rect.width)), value.width, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rect>(wr, nameof(Rect.x)), value.x, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rect>(wr, nameof(Rect.y)), value.y, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Rect> Push(string path, Rect value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Rect>(path), value, depth);
		}

		#endregion

		#region Transform

		public static WatchReference<Transform> GetOrAdd(string path, Func<Transform> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Transform>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Transform>();
#endif
		}

		public static WatchReference<Transform> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Transform> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Transform, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Transform>();
#endif
		}

		public static WatchReference<Transform> Setup(WatchReference<Transform> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Transform> Push(WatchReference<Transform> wr, Transform value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Push(RC.GetOrAdd<Vector3, Transform>(wr, nameof(Transform.localPosition)), value.localPosition, depth - 1);
			Push(RC.GetOrAdd<Vector3, Transform>(wr, "localRotation"), value.localEulerAngles, depth - 1);
			Push(RC.GetOrAdd<Vector3, Transform>(wr, nameof(Transform.localScale)), value.localScale, depth - 1);
			Push(RC.GetOrAdd<Vector3, Transform>(wr, nameof(Transform.position)), value.position, depth - 1);
			Push(RC.GetOrAdd<Vector3, Transform>(wr, "rotation"), value.eulerAngles, depth - 1);
			Push(RC.GetOrAdd<Vector3, Transform>(wr, "scale"), value.lossyScale, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Transform> Push(string path, Transform value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Transform>(path), value, depth);
		}

		#endregion

		#region Rigidbody

		public static WatchReference<Rigidbody> GetOrAdd(string path, Func<Rigidbody> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Rigidbody>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Rigidbody>();
#endif
		}

		public static WatchReference<Rigidbody> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Rigidbody> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Rigidbody, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Rigidbody>();
#endif
		}

		public static WatchReference<Rigidbody> Setup(WatchReference<Rigidbody> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Rigidbody> Push(WatchReference<Rigidbody> wr, Rigidbody value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Watch.Push(RC.GetOrAdd<Single, Rigidbody>(wr, nameof(Rigidbody.angularDamping)), value.angularDamping, depth - 1);
			Push(RC.GetOrAdd<Vector3, Rigidbody>(wr, nameof(Rigidbody.angularVelocity)), value.angularVelocity, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rigidbody>(wr, nameof(Rigidbody.linearDamping)), value.linearDamping, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, Rigidbody>(wr, nameof(Rigidbody.isKinematic)), value.isKinematic, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rigidbody>(wr, nameof(Rigidbody.mass)), value.mass, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, Rigidbody>(wr, nameof(Rigidbody.useGravity)), value.useGravity, depth - 1);
			Push(RC.GetOrAdd<Vector3, Rigidbody>(wr, nameof(Rigidbody.linearVelocity)), value.linearVelocity, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Rigidbody> Push(string path, Rigidbody value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Rigidbody>(path), value, depth);
		}

		#endregion

		#region Rigidbody2D

		public static WatchReference<Rigidbody2D> GetOrAdd(string path, Func<Rigidbody2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Rigidbody2D>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Rigidbody2D>();
#endif
		}

		public static WatchReference<Rigidbody2D> GetOrAdd<T>(WatchReference<T> parent, string path, Func<Rigidbody2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<Rigidbody2D, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<Rigidbody2D>();
#endif
		}

		public static WatchReference<Rigidbody2D> Setup(WatchReference<Rigidbody2D> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<Rigidbody2D> Push(WatchReference<Rigidbody2D> wr, Rigidbody2D value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Watch.Push(RC.GetOrAdd<Single, Rigidbody2D>(wr, nameof(Rigidbody2D.angularDamping)), value.angularDamping, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rigidbody2D>(wr, nameof(Rigidbody2D.angularVelocity)), value.angularVelocity, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rigidbody2D>(wr, nameof(Rigidbody2D.linearDamping)), value.linearDamping, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rigidbody2D>(wr, nameof(Rigidbody2D.gravityScale)), value.gravityScale, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, Rigidbody2D>(wr, nameof(Rigidbody2D.isKinematic)), value.isKinematic, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, Rigidbody2D>(wr, nameof(Rigidbody2D.mass)), value.mass, depth - 1);
			Push(RC.GetOrAdd<Vector2, Rigidbody2D>(wr, nameof(Rigidbody2D.linearVelocity)), value.linearVelocity, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<Rigidbody2D> Push(string path, Rigidbody2D value, int depth = 10)
		{
			return Push(RC.GetOrAdd<Rigidbody2D>(path), value, depth);
		}

		#endregion

		#region BoxCollider2D

		public static WatchReference<BoxCollider2D> GetOrAdd(string path, Func<BoxCollider2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<BoxCollider2D>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<BoxCollider2D>();
#endif
		}

		public static WatchReference<BoxCollider2D> GetOrAdd<T>(WatchReference<T> parent, string path, Func<BoxCollider2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<BoxCollider2D, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<BoxCollider2D>();
#endif
		}

		public static WatchReference<BoxCollider2D> Setup(WatchReference<BoxCollider2D> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<BoxCollider2D> Push(WatchReference<BoxCollider2D> wr, BoxCollider2D value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Watch.Push(RC.GetOrAdd<Single, BoxCollider2D>(wr, nameof(BoxCollider2D.edgeRadius)), value.edgeRadius, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, BoxCollider2D>(wr, nameof(BoxCollider2D.isTrigger)), value.isTrigger, depth - 1);
			Push(RC.GetOrAdd<Vector2, BoxCollider2D>(wr, nameof(BoxCollider2D.offset)), value.offset, depth - 1);
			Push(RC.GetOrAdd<Vector2, BoxCollider2D>(wr, nameof(BoxCollider2D.size)), value.size, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<BoxCollider2D> Push(string path, BoxCollider2D value, int depth = 10)
		{
			return Push(RC.GetOrAdd<BoxCollider2D>(path), value, depth);
		}

		#endregion

		#region CircleCollider2D

		public static WatchReference<CircleCollider2D> GetOrAdd(string path, Func<CircleCollider2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<CircleCollider2D>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<CircleCollider2D>();
#endif
		}

		public static WatchReference<CircleCollider2D> GetOrAdd<T>(WatchReference<T> parent, string path, Func<CircleCollider2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<CircleCollider2D, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<CircleCollider2D>();
#endif
		}

		public static WatchReference<CircleCollider2D> Setup(WatchReference<CircleCollider2D> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<CircleCollider2D> Push(WatchReference<CircleCollider2D> wr, CircleCollider2D value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Watch.Push(RC.GetOrAdd<Boolean, CircleCollider2D>(wr, nameof(CircleCollider2D.isTrigger)), value.isTrigger, depth - 1);
			Push(RC.GetOrAdd<Vector2, CircleCollider2D>(wr, nameof(CircleCollider2D.offset)), value.offset, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, CircleCollider2D>(wr, nameof(CircleCollider2D.radius)), value.radius, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<CircleCollider2D> Push(string path, CircleCollider2D value, int depth = 10)
		{
			return Push(RC.GetOrAdd<CircleCollider2D>(path), value, depth);
		}

		#endregion

		#region CapsuleCollider2D

		public static WatchReference<CapsuleCollider2D> GetOrAdd(string path, Func<CapsuleCollider2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<CapsuleCollider2D>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<CapsuleCollider2D>();
#endif
		}

		public static WatchReference<CapsuleCollider2D> GetOrAdd<T>(WatchReference<T> parent, string path, Func<CapsuleCollider2D> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<CapsuleCollider2D, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<CapsuleCollider2D>();
#endif
		}

		public static WatchReference<CapsuleCollider2D> Setup(WatchReference<CapsuleCollider2D> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<CapsuleCollider2D> Push(WatchReference<CapsuleCollider2D> wr, CapsuleCollider2D value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Watch.Push(RC.GetOrAdd<Boolean, CapsuleCollider2D>(wr, nameof(CapsuleCollider2D.isTrigger)), value.isTrigger, depth - 1);
			Push(RC.GetOrAdd<Vector2, CapsuleCollider2D>(wr, nameof(CapsuleCollider2D.offset)), value.offset, depth - 1);
			Push(RC.GetOrAdd<Vector2, CapsuleCollider2D>(wr, nameof(CapsuleCollider2D.size)), value.size, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<CapsuleCollider2D> Push(string path, CapsuleCollider2D value, int depth = 10)
		{
			return Push(RC.GetOrAdd<CapsuleCollider2D>(path), value, depth);
		}

		#endregion

		#region BoxCollider

		public static WatchReference<BoxCollider> GetOrAdd(string path, Func<BoxCollider> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<BoxCollider>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<BoxCollider>();
#endif
		}

		public static WatchReference<BoxCollider> GetOrAdd<T>(WatchReference<T> parent, string path, Func<BoxCollider> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<BoxCollider, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<BoxCollider>();
#endif
		}

		public static WatchReference<BoxCollider> Setup(WatchReference<BoxCollider> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<BoxCollider> Push(WatchReference<BoxCollider> wr, BoxCollider value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Push(RC.GetOrAdd<Vector3, BoxCollider>(wr, nameof(BoxCollider.center)), value.center, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, BoxCollider>(wr, nameof(BoxCollider.isTrigger)), value.isTrigger, depth - 1);
			Push(RC.GetOrAdd<Vector3, BoxCollider>(wr, nameof(BoxCollider.size)), value.size, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<BoxCollider> Push(string path, BoxCollider value, int depth = 10)
		{
			return Push(RC.GetOrAdd<BoxCollider>(path), value, depth);
		}

		#endregion

		#region SphereCollider

		public static WatchReference<SphereCollider> GetOrAdd(string path, Func<SphereCollider> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<SphereCollider>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<SphereCollider>();
#endif
		}

		public static WatchReference<SphereCollider> GetOrAdd<T>(WatchReference<T> parent, string path, Func<SphereCollider> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<SphereCollider, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<SphereCollider>();
#endif
		}

		public static WatchReference<SphereCollider> Setup(WatchReference<SphereCollider> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<SphereCollider> Push(WatchReference<SphereCollider> wr, SphereCollider value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Push(RC.GetOrAdd<Vector3, SphereCollider>(wr, nameof(SphereCollider.center)), value.center, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, SphereCollider>(wr, nameof(SphereCollider.isTrigger)), value.isTrigger, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, SphereCollider>(wr, nameof(SphereCollider.radius)), value.radius, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<SphereCollider> Push(string path, SphereCollider value, int depth = 10)
		{
			return Push(RC.GetOrAdd<SphereCollider>(path), value, depth);
		}

		#endregion

		#region CapsuleCollider

		public static WatchReference<CapsuleCollider> GetOrAdd(string path, Func<CapsuleCollider> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<CapsuleCollider>(path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<CapsuleCollider>();
#endif
		}

		public static WatchReference<CapsuleCollider> GetOrAdd<T>(WatchReference<T> parent, string path, Func<CapsuleCollider> valueGetter)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			var wr = Setup(RC.GetOrAdd<CapsuleCollider, T>(parent, path));

			RC.SetUpdateCall(wr, () =>
			{
				var value = valueGetter();
				Push(wr, value);
			});

			return wr;
#else
			return RC.Empty<CapsuleCollider>();
#endif
		}

		public static WatchReference<CapsuleCollider> Setup(WatchReference<CapsuleCollider> wr)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			return RC.TrySetupAs(wr, WatchValueType.String);
#endif
			return wr;
		}

		public static WatchReference<CapsuleCollider> Push(WatchReference<CapsuleCollider> wr, CapsuleCollider value, int depth = 10)
		{
#if UNITY_EDITOR || LIVE_WATCH_BUILD
			if (depth <= 0 || !Watch.IsLive || RC.IsInvalidType(wr))
				return wr;

			Setup(wr);
			if (value == null)
				return RC.PushNull(wr, depth - 1);

			Push(RC.GetOrAdd<Vector3, CapsuleCollider>(wr, nameof(CapsuleCollider.center)), value.center, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, CapsuleCollider>(wr, nameof(CapsuleCollider.height)), value.height, depth - 1);
			Watch.Push(RC.GetOrAdd<Boolean, CapsuleCollider>(wr, nameof(CapsuleCollider.isTrigger)), value.isTrigger, depth - 1);
			Watch.Push(RC.GetOrAdd<Single, CapsuleCollider>(wr, nameof(CapsuleCollider.radius)), value.radius, depth - 1);

			RC.PushNonBasic(wr, value);
#endif
			return wr;
		}

		public static WatchReference<CapsuleCollider> Push(string path, CapsuleCollider value, int depth = 10)
		{
			return Push(RC.GetOrAdd<CapsuleCollider>(path), value, depth);
		}

		#endregion
	}
}