Skip to content

Instantly share code, notes, and snippets.

View IvanMurzak's full-sized avatar
🇺🇦
Stand with Ukraine

Ivan Murzak IvanMurzak

🇺🇦
Stand with Ukraine
View GitHub Profile
@IvanMurzak
IvanMurzak / MultipleInspectors.cs
Created August 29, 2018 17:45
Creating second Inspector window in Unity for selected object in project or scene.
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class MultipleInspectors
{
[MenuItem("Tools/Window/Inspector For Selected")]
static void InspectorForSelected()
{
var target = Selection.activeObject;
@IvanMurzak
IvanMurzak / ColorByScroll.cs
Last active April 3, 2018 17:38
ColorByScroll.cs --- Coloring NGUI Sprite by ScrollView percent, using gradient. ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ExtentionsUIScrollView.cs --- NGUI - UIScrollView extention. It helps getting horizontal, vertical percent from UIScrollView. Ju…
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ColorByScroll : MonoBehaviour
{
public UIScrollView scrollView;
public Gradient gradient;
private UI2DSprite ui2DSprite;
@IvanMurzak
IvanMurzak / ExposeMethodInUnityEditorAttribute.cs
Last active October 2, 2017 07:14
Files in "Editor" directory: - MonoBehaviourCustomEditor.cs
using System;
[AttributeUsage(AttributeTargets.Method)]
public class ExposeMethodInUnityEditorAttribute : Attribute
{
}
@IvanMurzak
IvanMurzak / ExposeMethodInUnityEditorAttribute.cs
Created October 2, 2017 07:04
Files in "Editor" directory:MonoBehaviourCustomEditor.cs
using System;
[AttributeUsage(AttributeTargets.Method)]
public class ExposeMethodInUnityEditorAttribute : Attribute
{
}