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
// NOTE DONT put in an editor folder | |
using UnityEngine; | |
public class HighlightAttribute : PropertyAttribute | |
{ | |
public HighlightColor Color; | |
public string ValidateMethod; | |
public object Value; |
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
// Put this in an editor folder | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Experimental.LowLevel; | |
using UnityEngine.Profiling; |
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 class Flicker : MonoBehaviour | |
{ | |
public string LightStyle = "mmamammmmammamamaaamammma"; | |
private Light light; | |
public float loopTime = 2f; | |
[SerializeField] | |
private int currentIndex = 0; |
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 Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Mathematics; | |
using UnityEngine; | |
public class NativeMeshTest : MonoBehaviour | |
{ | |
private NativeArray<float3> vertexBuffer; | |
private Vector3[] vertexArray; |
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 System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using UnityEditor; | |
using UnityEngine; | |
public static class EditorDispatcher | |
{ | |
private static readonly Queue<Action> dispatchQueue = new Queue<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
using UnityEngine; | |
public class Colors | |
{ | |
// NOTE: The follwing color names come from the CSS3 specification, Section 4.3 Extended Color Keywords | |
// http://www.w3.org/TR/css3-color/#svg-color | |
public static readonly Color AliceBlue = new Color32(240,248,255,255); | |
public static readonly Color AntiqueWhite = new Color32(250,235,215,255); | |
public static readonly Color Aqua= new Color32(0,255,255,255); |
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
// Non Editor code | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public abstract class TrafficLightAttribute : PropertyAttribute | |
{ | |
public bool DrawLabel = true; | |
public string CustomLabel; | |
public bool AlsoDrawDefault; |
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
// NOTE DONT put in an editor folder! | |
using UnityEngine; | |
public class AutohookAttribute : PropertyAttribute | |
{ | |
} |
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
// put me in an Editor folder | |
using System.IO; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
public static class LayoutUtils | |
{ | |
// unity stores layouts in a path referenced in WindowLayout.LayoutsPreferencesPath. | |
// Unfortunately, thats internal - well just creat the path in the same way they do! |
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 UnityEditor; | |
using UnityEditor.EditorTools; | |
using UnityEngine; | |
[EditorTool("LookAt Tool")] | |
public class LookatTool : EditorTool | |
{ | |
GUIContent cachedIcon; | |
// NOTE: as were caching this, unity will serialize it between compiles! so if we want to test out new looks, |
NewerOlder