Skip to content

Instantly share code, notes, and snippets.

View SiarheiPilat's full-sized avatar
🍌
Working from home

spilat12 SiarheiPilat

🍌
Working from home
View GitHub Profile
@Geri-Borbas
Geri-Borbas / SaveEditorDefaultResources.cs
Last active March 23, 2020 09:46
Snippet to export Unity Editor Assets for inspection. Read more at http://eppz.eu/blog/unity-editor-icon-assets/
//
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP)
//
// http://www.twitter.com/_eppz
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
// Launch Arc Renderer for Unity 3D from this Tutorial (with minor fixes):
// https://www.youtube.com/watch?v=iLlWirdxass
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent (typeof(LineRenderer))]
public class LaunchArcRenderer : MonoBehaviour {
using UnityEditor;
using UnityEngine;
// <summary>
/// Hierarchy Window Layer Info
/// http://diegogiacomelli.com.br/unitytips-hierarchy-window-layer-info/
/// </summary>
[InitializeOnLoad]
public static class HierarchyWindowLayerInfo
{
using System;
using System.IO;
using System.Runtime.CompilerServices;
using UnityEditor;
using UnityEngine;
using UnityEngine.Events;
/// <summary>
/// Hierarchy Window Group Header
/// http://diegogiacomelli.com.br/unitytips-changing-the-style-of-the-hierarchy-window-group-header/
using UnityEditor;
using UnityEngine;
public static class TransformContextMenu
{
[MenuItem("CONTEXT/Transform/Make a circle")]
public static void MakeCircle()
{
var length = Selection.gameObjects.Length;
var radius = 5;
@fishtopher
fishtopher / ShortcutCollisionChecker.cs
Created December 5, 2017 11:21
A little Unity utility to check for shortcut key collisions because it's hard to know if you're duplicating one from anywhere else.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text.RegularExpressions;
// Little utility to check for shortcut key collisions because it's hard to
// know if you're duplicating one from anywhere else.
using UnityEditor;
using UnityEngine;
/// <summary>
/// Folder organizer editor window.
/// http://diegogiacomelli.com.br/using-an-assetpostprocessor-editorwindow-to-keep-assets-organized-on-unity-projects
/// </summary>
public class FolderOrganizerEditorWindow : EditorWindow
{
FolderOrganizerSettings _settings;
using UnityEngine;
using UnityEditor;
/// <summary>
/// Scene preview data.
/// http://diegogiacomelli.com.br/unitytips-scene-preview-window
/// </summary>
public class ScenePreviewData
{
Texture2D _texture;
@Syy9
Syy9 / GetUnityTypes.cs
Last active November 4, 2022 13:02
How to get all EditorWindow types in Unity
using System;
using System.Collections.Generic;
using System.Reflection;
using UnityEditor;
public static class GetUnityTypes
{
public static List<Type> GetEditorWindowTypes()
{
var result = GetSubClassTypes<EditorWindow>();
@Lazersquid
Lazersquid / Reference.cs
Last active January 30, 2023 19:44
Unity generic scriptable object variable reference pattern
using System;
/// <summary>
/// Reference Class.
/// </summary>
[Serializable]
public abstract class Reference
{
}