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 UnityEditor; | |
using UnityEditor.EditorTools; | |
using UnityEditor.Experimental.SceneManagement; | |
using UnityEngine; | |
[EditorTool("Custom Snap Move", typeof(CustomSnap))] | |
public class CustomSnappingTool : EditorTool |
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
Shader "Name" { | |
Properties { | |
_Name ("display name", Range (min, max)) = number | |
_Name ("display name", Float) = number | |
_Name ("display name", Int) = number | |
_Name ("display name", Color) = (number,number,number,number) | |
_Name ("display name", Vector) = (number,number,number,number) |
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 UnityEditor.Build; | |
using UnityEngine; | |
#if UNITY_EDITOR_OSX | |
/// <summary> | |
/// Unity clears Android Keystore and Key Alias passwords when it exits, |
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 UnityEngine; | |
public class Colors | |
{ | |
// NOTE: The follwing color names come from the CSS3 specification, Section 4.3 Extended Color Keywords | |
// http://www.w3.org/TR/css3-color/#svg-color | |
public static readonly Color AliceBlue = new Color32(240,248,255,255); | |
public static readonly Color AntiqueWhite = new Color32(250,235,215,255); | |
public static readonly Color Aqua= new Color32(0,255,255,255); |
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
// An outline shader made for Unity with the help of @OverlandGame by @miichidk | |
// It adjusts the size of the outline to automatically accomodate screen width and camera distance. | |
// See how it looks here: https://twitter.com/OverlandGame/status/791035637583388672 | |
// How to use: Create a material which uses this shader, and apply this material to any meshrenderer as second material. | |
Shader "OutlineShader" | |
{ | |
Properties | |
{ | |
_Width ("Width", Float ) = 1 | |
_Color ("Color", Color) = (1,1,1,1) |
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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
public static class PivotUtilities | |
{ | |
[MenuItem("GameObject/Pivot/Create Pivot", false, 0)] | |
static void CreatePivotObject() | |
{ |
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 Utility | |
{ | |
public static float CalculateAngle(Vector3 from, Vector3 to) | |
{ | |
return Quaternion.FromToRotation(Vector3.up, to - from).eulerAngles.z; | |
} | |
} |