< Summary

Class:DCL.Helpers.Utils
Assembly:Utils
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/Utils/Utils.cs
Covered lines:135
Uncovered lines:74
Coverable lines:209
Total lines:578
Line coverage:64.5% (135 of 209)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
EnsureResourcesMaterial(...)0%440100%
CleanMaterials(...)0%440100%
FloatArrayToV2List(...)0%220100%
ResetLocalTRS(...)0%110100%
SetToMaxStretch(...)0%110100%
SetToCentered(...)0%2100%
SetToBottomLeft(...)0%2100%
ForceUpdateLayout(...)0%440100%
ForceRebuildLayoutImmediate(...)0%660100%
ForceUpdateLayoutRoutine()0%440100%
InverseTransformChildTraversal[TComponent](...)0%550100%
ForwardTransformChildTraversal[TComponent](...)0%30500%
GetOrCreateComponent[T](...)0%220100%
FetchAudioClip(...)0%110100%
FetchTexture(...)0%110100%
GetAudioTypeFromUrlName(...)0%10.56050%
SafeFromJsonOverwrite(...)0%2100%
FromJsonWithNulls[T](...)0%110100%
SafeFromJson[T](...)0%4.434070%
AttachPlaceholderRendererGameObject(...)0%110100%
SafeDestroy(...)0%2.52050%
GridToWorldPosition(...)0%110100%
WorldToGridPosition(...)0%110100%
WorldToGridPositionUnclamped(...)0%110100%
AproxComparison(...)0%440100%
ParseJsonArray[T](...)0%110100%
Utils()0%110100%
LockedThisFrame()0%2100%
LockCursor()0%220100%
UnlockCursor()0%220100%
BrowserSetCursorState(...)0%12300%
DestroyAllChild(...)0%330100%
GetBottomLeftZoneArray(...)0%12300%
GetCenteredZoneArray(...)0%12300%
DrawRectGizmo(...)0%2100%
ToUpperFirst(...)0%6200%
Sanitize(...)0%770100%
CompareFloats(...)0%2100%
Deconstruct[T1, T2](...)0%110100%
SetLayerRecursively(...)0%330100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Helpers/Utils/Utils.cs

#LineLine coverage
 1#if UNITY_WEBGL && !UNITY_EDITOR
 2#define WEB_PLATFORM
 3#endif
 4
 5using System;
 6using System.Collections;
 7using System.Collections.Generic;
 8using System.Linq;
 9using DCL.Configuration;
 10using TMPro;
 11using UnityEngine;
 12using UnityEngine.Assertions;
 13using UnityEngine.EventSystems;
 14using UnityEngine.Networking;
 15using UnityEngine.UI;
 16
 17namespace DCL.Helpers
 18{
 19    public static class Utils
 20    {
 21        public static Dictionary<string, Material> staticMaterials;
 22
 23        public static Material EnsureResourcesMaterial(string path)
 24        {
 73025            if (staticMaterials == null)
 26            {
 127                staticMaterials = new Dictionary<string, Material>();
 28            }
 29
 73030            if (!staticMaterials.ContainsKey(path))
 31            {
 432                Material material = Resources.Load(path) as Material;
 33
 434                if (material != null)
 35                {
 436                    staticMaterials.Add(path, material);
 37                }
 38
 439                return material;
 40            }
 41
 72642            return staticMaterials[path];
 43        }
 44
 45        public static void CleanMaterials(Renderer r)
 46        {
 12147            if (r != null)
 48            {
 48449                foreach (Material m in r.materials)
 50                {
 12151                    if (m != null)
 52                    {
 12153                        Material.Destroy(m);
 54                    }
 55                }
 56            }
 12157        }
 58
 59        public static Vector2[] FloatArrayToV2List(float[] uvs)
 60        {
 461            Vector2[] uvsResult = new Vector2[uvs.Length / 2];
 462            int uvsResultIndex = 0;
 63
 7264            for (int i = 0; i < uvs.Length;)
 65            {
 6466                Vector2 tmpUv = Vector2.zero;
 6467                tmpUv.x = uvs[i++];
 6468                tmpUv.y = uvs[i++];
 69
 6470                uvsResult[uvsResultIndex++] = tmpUv;
 71            }
 72
 473            return uvsResult;
 74        }
 75
 76        public static void ResetLocalTRS(this Transform t)
 77        {
 122578            t.localPosition = Vector3.zero;
 122579            t.localRotation = Quaternion.identity;
 122580            t.localScale = Vector3.one;
 122581        }
 82
 83        public static void SetToMaxStretch(this RectTransform t)
 84        {
 26685            t.anchorMin = Vector2.zero;
 26686            t.offsetMin = Vector2.zero;
 26687            t.anchorMax = Vector2.one;
 26688            t.offsetMax = Vector2.one;
 26689            t.sizeDelta = Vector2.zero;
 26690            t.anchoredPosition = Vector2.zero;
 26691        }
 92
 93        public static void SetToCentered(this RectTransform t)
 94        {
 095            t.anchorMin = Vector2.one * 0.5f;
 096            t.offsetMin = Vector2.one * 0.5f;
 097            t.anchorMax = Vector2.one * 0.5f;
 098            t.offsetMax = Vector2.one * 0.5f;
 099            t.sizeDelta = Vector2.one * 100;
 0100        }
 101
 102        public static void SetToBottomLeft(this RectTransform t)
 103        {
 0104            t.anchorMin = Vector2.zero;
 0105            t.offsetMin = Vector2.zero;
 0106            t.anchorMax = Vector2.zero;
 0107            t.offsetMax = Vector2.zero;
 0108            t.sizeDelta = Vector2.one * 100;
 0109        }
 110
 111        public static void ForceUpdateLayout(this RectTransform rt, bool delayed = true)
 112        {
 163113            if (!rt.gameObject.activeInHierarchy)
 12114                return;
 115
 151116            if (delayed)
 123117                CoroutineStarter.Start(ForceUpdateLayoutRoutine(rt));
 118            else
 119            {
 28120                Utils.InverseTransformChildTraversal<RectTransform>(
 4784121                    (x) => { Utils.ForceRebuildLayoutImmediate(x); },
 122                    rt);
 123            }
 28124        }
 125
 126        /// <summary>
 127        /// Reimplementation of the LayoutRebuilder.ForceRebuildLayoutImmediate() function (Unity UI API) for make it mo
 128        /// </summary>
 129        /// <param name="rectTransformRoot">Root from which to rebuild.</param>
 130        public static void ForceRebuildLayoutImmediate(RectTransform rectTransformRoot)
 131        {
 6227132            if (rectTransformRoot == null)
 3133                return;
 134
 135            // NOTE(Santi): It seems to be very much cheaper to execute the next instructions manually than execute dire
 136            //              'LayoutRebuilder.ForceRebuildLayoutImmediate()', that theorically already contains these ins
 6224137            var layoutElements = rectTransformRoot.GetComponentsInChildren(typeof(ILayoutElement), true).ToList();
 42205138            layoutElements.RemoveAll(e => (e is Behaviour && !((Behaviour) e).isActiveAndEnabled) || e is TextMeshProUGU
 32880139            foreach (var layoutElem in layoutElements)
 140            {
 10216141                (layoutElem as ILayoutElement).CalculateLayoutInputHorizontal();
 10216142                (layoutElem as ILayoutElement).CalculateLayoutInputVertical();
 143            }
 144
 6224145            var layoutControllers = rectTransformRoot.GetComponentsInChildren(typeof(ILayoutController), true).ToList();
 14840146            layoutControllers.RemoveAll(e => e is Behaviour && !((Behaviour) e).isActiveAndEnabled);
 22998147            foreach (var layoutCtrl in layoutControllers)
 148            {
 5275149                (layoutCtrl as ILayoutController).SetLayoutHorizontal();
 5275150                (layoutCtrl as ILayoutController).SetLayoutVertical();
 151            }
 6224152        }
 153
 154        private static IEnumerator ForceUpdateLayoutRoutine(RectTransform rt)
 155        {
 123156            yield return null;
 157
 123158            Utils.InverseTransformChildTraversal<RectTransform>(
 5866159                (x) => { Utils.ForceRebuildLayoutImmediate(x); },
 160                rt);
 123161        }
 162
 163        public static void InverseTransformChildTraversal<TComponent>(Action<TComponent> action, Transform startTransfor
 164            where TComponent : Component
 165        {
 10488166            if (startTransform == null)
 75167                return;
 168
 40580169            foreach (Transform t in startTransform)
 170            {
 9877171                InverseTransformChildTraversal(action, t);
 172            }
 173
 10413174            var component = startTransform.GetComponent<TComponent>();
 175
 10413176            if (component != null)
 177            {
 6575178                action.Invoke(component);
 179            }
 10413180        }
 181
 182        public static void ForwardTransformChildTraversal<TComponent>(Func<TComponent, bool> action, Transform startTran
 183            where TComponent : Component
 184        {
 0185            Assert.IsTrue(startTransform != null, "startTransform must not be null");
 186
 0187            var component = startTransform.GetComponent<TComponent>();
 188
 0189            if (component != null)
 190            {
 0191                if (!action.Invoke(component))
 0192                    return;
 193            }
 194
 0195            foreach (Transform t in startTransform)
 196            {
 0197                ForwardTransformChildTraversal(action, t);
 198            }
 0199        }
 200
 201        public static T GetOrCreateComponent<T>(this GameObject gameObject) where T : UnityEngine.Component
 202        {
 63203            T component = gameObject.GetComponent<T>();
 204
 63205            if (!component)
 206            {
 50207                return gameObject.AddComponent<T>();
 208            }
 209
 13210            return component;
 211        }
 212
 213        public static WebRequestAsyncOperation FetchAudioClip(string url, AudioType audioType, Action<AudioClip> OnSucce
 214        {
 215            //NOTE(Brian): This closure is called when the download is a success.
 14216            Action<UnityWebRequest> OnSuccessInternal =
 217                (request) =>
 218                {
 13219                    if (OnSuccess != null)
 220                    {
 221                        bool supported = true;
 222#if UNITY_EDITOR
 13223                        supported = audioType != AudioType.MPEG;
 224#endif
 13225                        AudioClip ac = null;
 226
 13227                        if (supported)
 13228                            ac = DownloadHandlerAudioClip.GetContent(request);
 229
 13230                        OnSuccess.Invoke(ac);
 231                    }
 13232                };
 233
 14234            Action<UnityWebRequest> OnFailInternal =
 235                (request) =>
 236                {
 0237                    if (OnFail != null)
 238                    {
 0239                        OnFail.Invoke(request.error);
 240                    }
 0241                };
 242
 14243            return DCL.Environment.i.platform.webRequest.GetAudioClip(
 244                url: url,
 245                audioType: audioType,
 246                OnSuccess: OnSuccessInternal,
 247                OnFail: OnFailInternal);
 248        }
 249
 250        public static WebRequestAsyncOperation FetchTexture(string textureURL, Action<Texture2D> OnSuccess, Action<Unity
 251        {
 252            //NOTE(Brian): This closure is called when the download is a success.
 253            void SuccessInternal(UnityWebRequest request)
 254            {
 0255                var texture = DownloadHandlerTexture.GetContent(request);
 0256                OnSuccess?.Invoke(texture);
 0257            }
 258
 49259            return DCL.Environment.i.platform.webRequest.GetTexture(
 260                url: textureURL,
 261                OnSuccess: SuccessInternal,
 262                OnFail: OnFail);
 263        }
 264
 265        public static AudioType GetAudioTypeFromUrlName(string url)
 266        {
 14267            if (string.IsNullOrEmpty(url))
 268            {
 0269                Debug.LogError("GetAudioTypeFromUrlName >>> Null url!");
 0270                return AudioType.UNKNOWN;
 271            }
 272
 14273            string ext = url.Substring(url.Length - 3).ToLower();
 274
 275            switch (ext)
 276            {
 277                case "mp3":
 0278                    return AudioType.MPEG;
 279                case "wav":
 9280                    return AudioType.WAV;
 281                case "ogg":
 5282                    return AudioType.OGGVORBIS;
 283                default:
 0284                    return AudioType.UNKNOWN;
 285            }
 286        }
 287
 288        public static bool SafeFromJsonOverwrite(string json, object objectToOverwrite)
 289        {
 290            try
 291            {
 0292                JsonUtility.FromJsonOverwrite(json, objectToOverwrite);
 0293            }
 0294            catch (System.ArgumentException e)
 295            {
 0296                Debug.LogError("ArgumentException Fail!... Json = " + json + " " + e.ToString());
 0297                return false;
 298            }
 299
 0300            return true;
 0301        }
 302
 45303        public static T FromJsonWithNulls<T>(string json) { return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(json
 304
 305        public static T SafeFromJson<T>(string json)
 306        {
 673307            ProfilingEvents.OnMessageDecodeStart?.Invoke("Misc");
 308
 673309            T returningValue = default(T);
 310
 673311            if (!string.IsNullOrEmpty(json))
 312            {
 313                try
 314                {
 672315                    returningValue = JsonUtility.FromJson<T>(json);
 672316                }
 0317                catch (System.ArgumentException e)
 318                {
 0319                    Debug.LogError("ArgumentException Fail!... Json = " + json + " " + e.ToString());
 0320                }
 321            }
 322
 673323            ProfilingEvents.OnMessageDecodeEnds?.Invoke("Misc");
 324
 673325            return returningValue;
 326        }
 327
 328        public static GameObject AttachPlaceholderRendererGameObject(UnityEngine.Transform targetTransform)
 329        {
 1330            var placeholderRenderer = GameObject.CreatePrimitive(PrimitiveType.Cube).GetComponent<MeshRenderer>();
 331
 1332            placeholderRenderer.material = Resources.Load<Material>("Materials/AssetLoading");
 1333            placeholderRenderer.transform.SetParent(targetTransform);
 1334            placeholderRenderer.transform.localPosition = Vector3.zero;
 1335            placeholderRenderer.name = "PlaceholderRenderer";
 336
 1337            return placeholderRenderer.gameObject;
 338        }
 339
 340        public static void SafeDestroy(UnityEngine.Object obj)
 341        {
 342#if UNITY_EDITOR
 599343            if (Application.isPlaying)
 599344                UnityEngine.Object.Destroy(obj);
 345            else
 0346                UnityEngine.Object.DestroyImmediate(obj, false);
 347#else
 348                UnityEngine.Object.Destroy(obj);
 349#endif
 0350        }
 351
 352        /**
 353         * Transforms a grid position into a world-relative 3d position
 354         */
 355        public static Vector3 GridToWorldPosition(float xGridPosition, float yGridPosition)
 356        {
 1253357            return new Vector3(
 358                x: xGridPosition * ParcelSettings.PARCEL_SIZE,
 359                y: 0f,
 360                z: yGridPosition * ParcelSettings.PARCEL_SIZE
 361            );
 362        }
 363
 364        /**
 365         * Transforms a world position into a grid position
 366         */
 367        public static Vector2Int WorldToGridPosition(Vector3 worldPosition)
 368        {
 14618369            return new Vector2Int(
 370                (int) Mathf.Floor(worldPosition.x / ParcelSettings.PARCEL_SIZE),
 371                (int) Mathf.Floor(worldPosition.z / ParcelSettings.PARCEL_SIZE)
 372            );
 373        }
 374
 375        public static Vector2 WorldToGridPositionUnclamped(Vector3 worldPosition)
 376        {
 284377            return new Vector2(
 378                worldPosition.x / ParcelSettings.PARCEL_SIZE,
 379                worldPosition.z / ParcelSettings.PARCEL_SIZE
 380            );
 381        }
 382
 383        public static bool AproxComparison(this Color color1, Color color2, float tolerance = 0.01f) // tolerance of rou
 384        {
 2987385            if (Mathf.Abs(color1.r - color2.r) < tolerance
 386                && Mathf.Abs(color1.g - color2.g) < tolerance
 387                && Mathf.Abs(color1.b - color2.b) < tolerance)
 388            {
 292389                return true;
 390            }
 391
 2695392            return false;
 393        }
 394
 4395        public static T ParseJsonArray<T>(string jsonArray) where T : IEnumerable => DummyJsonUtilityFromArray<T>.GetFro
 396
 397        [Serializable]
 398        private class DummyJsonUtilityFromArray<T> where T : IEnumerable //UnityEngine.JsonUtility is really fast but ca
 399        {
 400            [SerializeField]
 401            private T value;
 402
 403            public static T GetFromJsonArray(string jsonArray)
 404            {
 405                string newJson = $"{{ \"value\": {jsonArray}}}";
 406                return JsonUtility.FromJson<Utils.DummyJsonUtilityFromArray<T>>(newJson).value;
 407            }
 408        }
 409
 1410        private static int lockedInFrame = -1;
 0411        public static bool LockedThisFrame() => lockedInFrame == Time.frameCount;
 412
 413        //NOTE(Brian): Made as an independent flag because the CI doesn't work well with the Cursor.lockState check.
 1414        public static bool isCursorLocked { get; private set; } = false;
 415
 416        public static void LockCursor()
 417        {
 418#if WEB_PLATFORM
 419            //TODO(Brian): Encapsulate all this mechanism to a new MouseLockController and branch
 420            //             behaviour using strategy pattern instead of this.
 421            if (isCursorLocked)
 422            {
 423                return;
 424            }
 425            if (requestedUnlock || requestedLock)
 426            {
 427                return;
 428            }
 429            requestedLock = true;
 430#else
 16431            isCursorLocked = true;
 16432            Cursor.visible = false;
 433#endif
 16434            Cursor.lockState = CursorLockMode.Locked;
 16435            lockedInFrame = Time.frameCount;
 436
 16437            EventSystem.current?.SetSelectedGameObject(null);
 16438        }
 439
 440        public static void UnlockCursor()
 441        {
 442#if WEB_PLATFORM
 443            //TODO(Brian): Encapsulate all this mechanism to a new MouseLockController and branch
 444            //             behaviour using strategy pattern instead of this.
 445            if (!isCursorLocked)
 446            {
 447                return;
 448            }
 449            if (requestedUnlock || requestedLock)
 450            {
 451                return;
 452            }
 453            requestedUnlock = true;
 454#else
 73455            isCursorLocked = false;
 73456            Cursor.visible = true;
 457#endif
 73458            Cursor.lockState = CursorLockMode.None;
 459
 73460            EventSystem.current?.SetSelectedGameObject(null);
 73461        }
 462
 463        #region BROWSER_ONLY
 464
 465        //TODO(Brian): Encapsulate all this mechanism to a new MouseLockController and branch
 466        //             behaviour using strategy pattern instead of this.
 1467        private static bool requestedUnlock = false;
 1468        private static bool requestedLock = false;
 469
 470        // NOTE: This should come from browser's pointerlockchange callback
 471        public static void BrowserSetCursorState(bool locked)
 472        {
 0473            if (!locked && !requestedUnlock)
 474            {
 0475                Cursor.lockState = CursorLockMode.None;
 476            }
 477
 0478            isCursorLocked = locked;
 0479            Cursor.visible = !locked;
 0480            requestedUnlock = false;
 0481            requestedLock = false;
 0482        }
 483
 484        #endregion
 485
 486        public static void DestroyAllChild(this Transform transform)
 487        {
 82488            foreach (Transform child in transform)
 489            {
 3490                UnityEngine.Object.Destroy(child.gameObject);
 491            }
 38492        }
 493
 494        public static List<Vector2Int> GetBottomLeftZoneArray(Vector2Int bottomLeftAnchor, Vector2Int size)
 495        {
 0496            List<Vector2Int> coords = new List<Vector2Int>();
 497
 0498            for (int x = bottomLeftAnchor.x; x < bottomLeftAnchor.x + size.x; x++)
 499            {
 0500                for (int y = bottomLeftAnchor.y; y < bottomLeftAnchor.y + size.y; y++)
 501                {
 0502                    coords.Add(new Vector2Int(x, y));
 503                }
 504            }
 505
 0506            return coords;
 507        }
 508
 509        public static List<Vector2Int> GetCenteredZoneArray(Vector2Int center, Vector2Int size)
 510        {
 0511            List<Vector2Int> coords = new List<Vector2Int>();
 512
 0513            for (int x = center.x - size.x; x < center.x + size.x; x++)
 514            {
 0515                for (int y = center.y - size.y; y < center.y + size.y; y++)
 516                {
 0517                    coords.Add(new Vector2Int(x, y));
 518                }
 519            }
 520
 0521            return coords;
 522        }
 523
 524        public static void DrawRectGizmo(Rect rect, Color color, float duration)
 525        {
 0526            Vector3 tl2 = new Vector3(rect.xMin, rect.yMax, 0);
 0527            Vector3 bl2 = new Vector3(rect.xMin, rect.yMin, 0);
 0528            Vector3 tr2 = new Vector3(rect.xMax, rect.yMax, 0);
 0529            Vector3 br2 = new Vector3(rect.xMax, rect.yMin, 0);
 530
 0531            Debug.DrawLine(tl2, bl2, color, duration);
 0532            Debug.DrawLine(tl2, tr2, color, duration);
 0533            Debug.DrawLine(bl2, br2, color, duration);
 0534            Debug.DrawLine(tr2, br2, color, duration);
 0535        }
 536
 537        public static string ToUpperFirst(this string value)
 538        {
 0539            if (!string.IsNullOrEmpty(value))
 540            {
 0541                var capital = char.ToUpper(value[0]);
 0542                value = capital + value.Substring(1);
 543            }
 544
 0545            return value;
 546        }
 547
 548        public static Vector3 Sanitize(Vector3 value)
 549        {
 334550            float x = float.IsInfinity(value.x) ? 0 : value.x;
 334551            float y = float.IsInfinity(value.y) ? 0 : value.y;
 334552            float z = float.IsInfinity(value.z) ? 0 : value.z;
 553
 334554            return new Vector3(x, y, z);
 555        }
 556
 0557        public static bool CompareFloats( float a, float b, float precision = 0.1f ) { return Mathf.Abs(a - b) < precisi
 558
 559        public static void Deconstruct<T1, T2>(this KeyValuePair<T1, T2> tuple, out T1 key, out T2 value)
 560        {
 15561            key = tuple.Key;
 15562            value = tuple.Value;
 15563        }
 564
 565        /// <summary>
 566        /// Set a layer to the given transform and its child
 567        /// </summary>
 568        /// <param name="transform"></param>
 569        public static void SetLayerRecursively(Transform transform, int layer)
 570        {
 268571            transform.gameObject.layer = layer;
 1056572            foreach (Transform child in transform)
 573            {
 260574                SetLayerRecursively(child, layer);
 575            }
 268576        }
 577    }
 578}

Methods/Properties

EnsureResourcesMaterial(System.String)
CleanMaterials(UnityEngine.Renderer)
FloatArrayToV2List(System.Single[])
ResetLocalTRS(UnityEngine.Transform)
SetToMaxStretch(UnityEngine.RectTransform)
SetToCentered(UnityEngine.RectTransform)
SetToBottomLeft(UnityEngine.RectTransform)
ForceUpdateLayout(UnityEngine.RectTransform, System.Boolean)
ForceRebuildLayoutImmediate(UnityEngine.RectTransform)
ForceUpdateLayoutRoutine()
InverseTransformChildTraversal[TComponent](System.Action[TComponent], UnityEngine.Transform)
ForwardTransformChildTraversal[TComponent](System.Func[TComponent,Boolean], UnityEngine.Transform)
GetOrCreateComponent[T](UnityEngine.GameObject)
FetchAudioClip(System.String, UnityEngine.AudioType, System.Action[AudioClip], System.Action[String])
FetchTexture(System.String, System.Action[Texture2D], System.Action[UnityWebRequest])
GetAudioTypeFromUrlName(System.String)
SafeFromJsonOverwrite(System.String, System.Object)
FromJsonWithNulls[T](System.String)
SafeFromJson[T](System.String)
AttachPlaceholderRendererGameObject(UnityEngine.Transform)
SafeDestroy(UnityEngine.Object)
GridToWorldPosition(System.Single, System.Single)
WorldToGridPosition(UnityEngine.Vector3)
WorldToGridPositionUnclamped(UnityEngine.Vector3)
AproxComparison(UnityEngine.Color, UnityEngine.Color, System.Single)
ParseJsonArray[T](System.String)
Utils()
LockedThisFrame()
isCursorLocked()
isCursorLocked(System.Boolean)
LockCursor()
UnlockCursor()
BrowserSetCursorState(System.Boolean)
DestroyAllChild(UnityEngine.Transform)
GetBottomLeftZoneArray(UnityEngine.Vector2Int, UnityEngine.Vector2Int)
GetCenteredZoneArray(UnityEngine.Vector2Int, UnityEngine.Vector2Int)
DrawRectGizmo(UnityEngine.Rect, UnityEngine.Color, System.Single)
ToUpperFirst(System.String)
Sanitize(UnityEngine.Vector3)
CompareFloats(System.Single, System.Single, System.Single)
Deconstruct[T1, T2](System.Collections.Generic.KeyValuePair[T1,T2], , )
SetLayerRecursively(UnityEngine.Transform, System.Int32)