This file contains hidden or 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
[user] | |
email = [email protected] | |
name = Your Name | |
[alias] | |
co = checkout | |
ct = commit | |
ci = commit | |
st = status -sb | |
br = branch |
This file contains hidden or 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 System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
public abstract class Mediator<T> : MonoBehaviour where T : Component, IVisitable { | |
readonly List<T> entities = new List<T>(); | |
public void Register(T entity) { | |
if (!entities.Contains(entity)) { |
This file contains hidden or 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 System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.LowLevel; | |
using UnityEngine.PlayerLoop; | |
namespace ImprovedTimers { | |
public static class TimerManager { | |
static readonly List<Timer> timers = new(); |
This file contains hidden or 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
// D* Lite is an incremental heuristic search algorithm that finds the shortest path in a graph | |
// from a goal node to a start node. It is designed to be efficient in terms of memory and computation | |
// while updating the graph in real-time. | |
// Koenig and Likhachev - http://idm-lab.org/bib/abstracts/papers/aaai02b.pdf | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; |
This file contains hidden or 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 System.Collections.Generic; | |
using UnityUtils; | |
public class PriorityQueue<T> { | |
class KeyNodeComparer : IComparer<(Key, T)> { | |
public int Compare((Key, T) x, (Key, T) y) { | |
return x.Item1 < y.Item1 ? -1 : x.Item1 > y.Item1 ? 1 : 0; | |
} | |
} |
This file contains hidden or 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 UnityEditorInternal; | |
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections.Generic; | |
/// <summary> | |
/// A Unity editor extension for copying and pasting all components between GameObjects. | |
/// The tool supports handling multiple components of the same type and correctly restores |
This file contains hidden or 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 System.IO; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Profiling; | |
using Unity.Profiling.Memory; | |
using UnityEngine; | |
public class MemorySnapshotter { | |
const string capturesFolder = "MemoryCaptures"; |
This file contains hidden or 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 UnityEditor; | |
using UnityEditor.Animations; | |
public static class AnimatorControllerCloneTool { | |
[MenuItem("Assets/Clone Animator Controller", true)] | |
static bool CanCloneAnimatorController() { | |
return Selection.activeObject is AnimatorController; | |
} | |
[MenuItem("Assets/Clone Animator Controller")] |
This file contains hidden or 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 System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Animations; | |
using UnityEngine.Playables; | |
using MEC; // Uses More Effective Coroutines from the Unity Asset Store | |
public class AnimationSystem { | |
PlayableGraph playableGraph; | |
readonly AnimationMixerPlayable topLevelMixer; |
This file contains hidden or 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.Animations; | |
using UnityEngine.Playables; | |
using UnityEngine; | |
[Serializable] | |
public class AnimationConfig { | |
public Animator animator; | |
public AnimationClip idleClip; | |
public AnimationClip walkClip; |