This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Traverse(GameObject gameObject, Action<GameObject> action) | |
{ | |
if (gameObject == null) | |
{ | |
throw new ArgumentNullException("gameObject"); | |
} | |
if (action == null) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sirenix.OdinInspector.Editor; | |
using Sirenix.Utilities; | |
using Sirenix.Utilities.Editor; | |
using UnityEditor; | |
public class DbBrowser : OdinMenuEditorWindow | |
{ | |
[MenuItem("Db/Browser")] | |
public static void Open() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
[ExecuteInEditMode] | |
public class RectTransformExplained : MonoBehaviour | |
{ | |
RectTransform rt; | |
[Header("Anchored position")] | |
[SerializeField] Vector2 anchorePosition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace SlugLib | |
{ | |
public class StringCacher | |
{ | |
public delegate string StringConstructor(int index); | |
private string[] strings; | |
private StringConstructor stringConstructor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine; | |
public class MonoBehaviourCachedRectTransform : MonoBehaviour | |
{ | |
[HideInInspector, NonSerialized] | |
private RectTransform rectTransform; | |
public RectTransform RectTransform | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
public class VerySimpleObjectPool : MonoBehaviour | |
{ | |
[SerializeField] private GameObject pooledObject = null; | |
[SerializeField] private int pooledAmount = 2; | |
[SerializeField] private bool canGrow = true; | |
[SerializeField] bool asyncInstantiate = false; |