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.Generic; | |
public class MultiBehaviour<T> : MonoBehaviour where T : MonoBehaviour { | |
private static List<T> _instances; | |
public static List<T> Instances { | |
get { | |
if(_instances == null) | |
_instances = new List<T>(); |
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; | |
public class SingleBehaviour<T> : MonoBehaviour where T : MonoBehaviour { | |
private static T _instance; | |
public static T Instance { | |
get { | |
return _instance; | |
} |
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 UnityEditor; | |
public class ReplaceMaterials : EditorWindow { | |
static int goCount = 0, replaceCount = 0; | |
private Material currentMaterial = null; | |
private Material replaceMaterial = null; | |
[MenuItem("Stuff/Replace Materials")] | |
public static void ShowWindow() { | |
EditorWindow.GetWindow(typeof(ReplaceMaterials)); |
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 "Custom/Frost" { | |
Properties { | |
_MainTex ("Frost Map (RGB)", 2D) = "white" {} | |
_FrostColor ("Frost Color", Color) = (1.0, 1.0, 1.0, 1.0) | |
_Mask ("Mask", Vector) = (1.0, 1.0, 1.0, 1.0) | |
} | |
SubShader { | |
Tags { "Queue"="Transparent" "RenderType"="Transparent" } | |
LOD 100 | |
Pass { |
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 "Custom/FrostGL" { | |
Properties { | |
_MainTex ("Frost Map (RGB)", 2D) = "white" {} | |
_FrostColor ("Frost Color", Color) = (1.0, 1.0, 1.0, 1.0) | |
_Mask ("Mask", Vector) = (1.0, 1.0, 1.0, 1.0) | |
} | |
SubShader { | |
Tags { "Queue"="Transparent" "RenderType"="Transparent" } | |
LOD 100 | |
Pass { |