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
rm -Force ./.git/index.lock | |
taskkill /F /IM git.exe |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
public static class EditorUtils | |
{ | |
static void FindMissingScriptsInGO(GameObject go) | |
{ |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
[RequireComponent(typeof(Light))] | |
public class Flicker : MonoBehaviour | |
{ | |
Light _light; | |
private float _intensity; |
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; | |
using UnityEngine.UI; | |
using UnityEngine.Events; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public static class MonoBehaviourExtensions | |
{ | |
public static Coroutine DelayedAction(this MonoBehaviour m, float delay, System.Action action) |
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 class UIExtensions | |
{ | |
public static bool HideIfClickedOutside(this GameObject panel) { | |
if (Input.GetMouseButton(0) && panel.activeSelf && | |
!RectTransformUtility.RectangleContainsScreenPoint( | |
panel.GetComponent<RectTransform>(), | |
Input.mousePosition, | |
null)) { | |
panel.SetActive(false); | |
return false; |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class TriggerEventDispatcher : MonoBehaviour | |
{ | |
public delegate void OnTriggerEnterEvent(Collider other); | |
public event OnTriggerEnterEvent TriggerEnter; | |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using TMPro; | |
[RequireComponent(typeof(TextMesh))] | |
[ExecuteInEditMode] | |
public class SetTextFromFile : MonoBehaviour | |
{ | |
public TextAsset textFile; |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using UnityEngine; | |
public enum LabelMode | |
{ | |
GameObjectName = 0, | |
ReferenceName = 1, | |
Custom = 2 |
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; | |
public static class TransformExtensions | |
{ | |
public static void DestroyChildren(this Transform t) | |
{ | |
foreach (Transform child in t) | |
{ | |
GameObject.Destroy(child.gameObject); | |
} |