using System.Collections; using System.Collections.Generic; using UnityEngine; namespace VketCloudGUITools.Utilities { public static class ArrayExtentions { public static T SafeGetAt(this T[] array, int index, ref bool fallbacked, T fallbackValue = default(T)) { if (array != null && 0 <= index && index < array.Length) { return array[index]; } fallbacked = true; return fallbackValue; } } }