GUIStyle mystyle = new GUIStyle("some string from the list below");
- "CN Box"
- "Button"
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditorInternal; | |
#endif |
using UnityEngine; | |
using UnityEditor; | |
using System.Text; | |
[InitializeOnLoad] | |
public class CustomHierarchyView { | |
private static StringBuilder sb = new StringBuilder (); | |
static CustomHierarchyView() { |
/// <summary> | |
/// Retrieves selected folder on Project view. | |
/// </summary> | |
/// <returns></returns> | |
public static string GetSelectedPathOrFallback() | |
{ | |
string path = "Assets"; | |
foreach (UnityEngine.Object obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets)) | |
{ |
/// <summary> | |
/// Used to get assets of a certain type and file extension from entire project | |
/// Usage: | |
/// UnityEngine.Object[] pagePrefabs = GetAssetsOfType("Resources/Prefabs/PAGE", typeof(GameObject), ".prefab"); | |
/// </summary> | |
/// <param name="type">The type to retrieve. eg typeof(GameObject).</param> | |
/// <param name="fileExtension">The file extention the type uses eg ".prefab".</param> | |
/// <returns>An Object array of assets.</returns> | |
public static UnityEngine.Object[] GetAssetsOfType(string path, System.Type type, string fileExtension) | |
{ |
#if UNITY_EDITOR | |
using System; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
public static class Docker | |
{ | |
#region Reflection Types |
using System; | |
using UnityEngine; | |
using UnityEditor; | |
public class SelectObjWithGID : EditorWindow | |
{ | |
string myString = ""; | |
bool groupEnabled; | |
bool myBool = true; | |
float myFloat = 1.23f; |
#if UNITY_EDITOR | |
using System.Reflection; | |
using UnityEngine; | |
using UnityEditor; | |
public class FontSwitcher : EditorWindow | |
{ | |
[MenuItem("Font/Show Window")] | |
public static void ShowFontWindow() | |
{ |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
public class GraphEditorWindow : EditorWindow | |
{ | |
Rect windowRect = new Rect(200f, 200f, 200f, 300f); | |
Rect windowRect2 = new Rect(100f, 100f, 200f, 300f); |
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt) | |
Shader "Hidden/Internal-GUITextureClipText" | |
{ | |
Properties { _MainTex ("Texture", 2D) = "white" {} } | |
CGINCLUDE | |
#pragma vertex vert | |
#pragma fragment frag |