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; | |
public class DisplayBone : MonoBehaviour { | |
public bool DisplayAxes = true; | |
public bool DisplayNames = true; | |
void DrawBones( Transform t ) { |
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 UnityEditor; | |
using UnityEditorInternal; | |
[CustomEditor( typeof( Sample ) )] | |
public class SampleEditor : Editor { | |
private ReorderableList reorderableList; |
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; | |
[System.AttributeUsage( System.AttributeTargets.Field )] | |
public sealed class BitFlagsAttribute : 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
public static void DrawGizmoArc( Vector3 p, Vector3 up, Vector3 forward, float angle, float radius ) { | |
#if UNITY_EDITOR | |
var oldColor = UnityEditor.Handles.color; | |
UnityEditor.Handles.color = Color.red; | |
UnityEditor.Handles.DrawWireArc( p, up, Quaternion.AngleAxis( -angle * 0.5f, up ) * forward, angle, radius ); | |
UnityEditor.Handles.DrawLine( p, p + Quaternion.AngleAxis( -angle * 0.5f, up ) * forward * radius ); | |
UnityEditor.Handles.DrawLine( p, p + Quaternion.AngleAxis( angle * 0.5f, up ) * forward * radius ); | |
UnityEditor.Handles.color = oldColor; |
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
var type = System.Reflection.Assembly.Load( "UnityEditor.dll" ).GetType( "UnityEditor.GridPaletteUtility" ); | |
var method_info = type.GetMethods (System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public ); | |
System.Reflection.MethodInfo find_method = null; | |
foreach (var method in method_info) { | |
if ( ( method.Name == "CreateNewPalette" ) && ( method.GetParameters().Length == 2 ) ) { | |
find_method = method; | |
break; | |
} | |
} |
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.Tilemaps; | |
public class ScrollTilemap : MonoBehaviour { | |
[SerializeField] | |
private Tilemap tileMap; |