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.IO; | |
using UnityEngine; | |
public sealed class UnsafeStringBuilder | |
{ | |
public int Capacity => _buffer.Length; | |
public int Length { get; private set; } | |
private string _buffer; |
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 UnityEditor; | |
using UnityEngine; | |
[CustomPropertyDrawer(typeof(Matrix4x4))] | |
public sealed class Matrix4x4Drawer : PropertyDrawer | |
{ | |
public override float GetPropertyHeight(SerializedProperty property, GUIContent label) | |
{ | |
return (EditorGUIUtility.singleLineHeight + 2) * 4 - 2; |
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 GUI2 | |
{ | |
#if UNITY_EDITOR | |
private static readonly MethodInfo _internalRepaintEditorWindow = typeof(GUI).GetMethod( | |
"InternalRepaintEditorWindow", BindingFlags.Static | BindingFlags.NonPublic); | |
#endif |
OlderNewer