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
public class AssemblyUtility | |
{ | |
/// <summary> | |
/// Forces Unity to recompile all scripts and then refresh. | |
/// </summary> | |
public static void DirtyAllScripts() | |
{ | |
// Grab the UnityEditor assembly | |
Assembly editorAssembly = typeof(UnityEditor.Editor).Assembly; | |
// Find the type that contains the method we want |
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.Collections.Generic; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
using UnityEngine.Events; | |
[CustomPropertyDrawer(typeof(UnityEvent))] | |
public class CollapsableEventDrawer : UnityEventDrawer | |
{ |
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 Mono.Cecil; | |
using UnityEngine; | |
using Mono.Cecil.Cil; | |
namespace Weaver | |
{ | |
// Inherit WeaverComponent to get callbacks and to show up as a componet in our ScriptableObject settings. | |
public class ServerCommandComponent : WeaverComponent | |
{ |
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; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public delegate void VistedDelegate<T>(T instance); |
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.Reflection; | |
using UnityEngine; | |
public static class DelayCall | |
{ | |
public delegate void DelayedDelegate(); | |
public delegate void DelayedDelegate<T>(T parameter); | |
private static int DEFAULT_POOL_SIZE = 5; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Mono.Cecil; | |
using UnityEditor; | |
using UnityEditorInternal; | |
public class TheSolution | |
{ | |
[MenuItem("The Solution/Do It...")] |
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 UnityEditor; | |
[CustomEditor(typeof(DefaultAsset), editorForChildClasses: true, isFallback = false)] | |
public class FolderInspector : Editor | |
{ | |
private int m_ContentCount; | |
private GUIStyle m_TitleStyle; | |
private GUIStyle m_ListStyle; |
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; | |
// This is not need but I just wanted to make the point clear. | |
public class AnimatedComponent : MonoBehaviour | |
{ | |
} |
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 UnityEditor.AnimatedValues; | |
using UnityEngine.Events; | |
public class GUICarousel | |
{ | |
// Delegates | |
public delegate void OnDrawElementCallbackDelegate(Rect rect, SerializedProperty element, bool isSelected); | |
public delegate void OnDrawToolbarCallbackDelegate(Rect rect); |
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; | |
[Serializable] | |
public struct Point | |
{ | |
[SerializeField] | |
public int x; | |
[SerializeField] | |
public int y; |
NewerOlder