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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class RefactorTemplate : MonoBehaviour | |
{ | |
[MenuItem("Refactor/Refactor")] | |
static void Refactor() | |
{ |
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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public static class InterfaceExtensions | |
{ | |
#region GameObject methods | |
public static T GetInterface<T>(this GameObject gameObject) where T : class | |
{ |
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 UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class FindDependentAssets | |
{ | |
[MenuItem("Assets/Find Dependent Assets")] | |
public static void FindAssets() |
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 UnityEngine; | |
using System.Collections; | |
[System.Serializable] | |
public class CoroutineTimer | |
{ | |
//public fields | |
public float TimerDuration, TimerRandomScaleFactor, TimerStartDelay; | |
public bool Repeats; |
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 UnityEngine; | |
using System.Collections; | |
public class TimeScaleIndependentParticleSystem : TimeScaleIndependentUpdate | |
{ | |
protected override void Update() | |
{ | |
base.Update(); | |
particleSystem.Simulate(deltaTime, true, false); |
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 UnityEngine; | |
using System.Collections; | |
public class TimeScaleIndependentAnimation : TimeScaleIndependentUpdate | |
{ | |
//inspector fields | |
public bool playOnStart; | |
public string playOnStartStateName; | |
//private fields |
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 UnityEngine; | |
using System.Collections; | |
public class TimeScaleIndependentUpdate : MonoBehaviour | |
{ | |
//inspector fields | |
public bool pauseWhenGameIsPaused = true; | |
//private fields | |
float previousTimeSinceStartup; |