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.Reflection; | |
using UnityEngine; | |
public static class GUI2 | |
{ | |
#if UNITY_EDITOR | |
private static readonly MethodInfo _internalRepaintEditorWindow = typeof(GUI).GetMethod( | |
"InternalRepaintEditorWindow", BindingFlags.Static | BindingFlags.NonPublic); | |
#endif |
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 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 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 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.IO; | |
using UnityEditor; | |
using UnityEngine; | |
public static class PathGUI | |
{ | |
public static void OpenFileField(string label, ref string path) | |
{ | |
string directory = path; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"/> | |
<title>%UNITY_WEB_NAME%</title> | |
<style> | |
body { | |
margin: 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
// The commented out parts are for Unity 2018.4 | |
//using System.Reflection; | |
//using UnityEditor.Experimental.UIElements.GraphView; | |
//using UnityEngine.Experimental.UIElements; | |
//using UnityEngine.Experimental.UIElements.StyleEnums; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEditor; | |
using UnityEditor.Experimental.GraphView; | |
using UnityEngine; |
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.Linq; | |
using UnityEditor; | |
using Object = UnityEngine.Object; | |
public static class DependencyTracker | |
{ | |
private static Dictionary<string, List<string>> dependantCache; |
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 UnityEngine; | |
public sealed class AssetBundleLoader : ScriptableWizard | |
{ | |
public string sourcePath; | |
[MenuItem("Wizard/Load Asset Bundle")] | |
private static void CreateWizard() | |
{ |
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 class ArrayPool<T> | |
{ | |
private static readonly List<T[]> pool = new List<T[]>(); | |
public static Item Get(int length) | |
{ | |
for (int i = pool.Count - 1; i >= 0; i--) | |
{ | |
var array = pool[i]; | |
if (array.Length >= length) |
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 Microsoft.CSharp; | |
using System; | |
using System.CodeDom.Compiler; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using UnityEditor; |
NewerOlder