Skip to content

Instantly share code, notes, and snippets.

View DataGreed's full-sized avatar
👾
practicing magic

Alexey Strelkov DataGreed

👾
practicing magic
View GitHub Profile
// The MIT License (MIT) - https://gist.github.com/bcatcho/1926794b7fd6491159e7
// Copyright (c) 2015 Brandon Catcho
using System;
// Place this file in any folder that is or is a descendant of a folder named "Scripts"
namespace CatchCo
{
// Restrict to methods only
[AttributeUsage(AttributeTargets.Method)]
public class ExposeMethodInEditorAttribute : Attribute
@DataGreed
DataGreed / TextRevealer.cs
Created February 28, 2020 00:47 — forked from miguelSantirso/TextRevealer.cs
Letter by letter reveal a paragraph of text in a smooth way
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
public class TextRevealer : MonoBehaviour
{
[UnityEngine.Header("Configuration")]
public int numCharactersFade = 3;
@DataGreed
DataGreed / CustomPrefabImporterEditor.cs
Created June 5, 2019 18:08 — forked from TJHeuvel/CustomPrefabImporterEditor.cs
Custom inspector window for Unity prefabs that allows you to (multi) edit them.
using UnityEditor;
using UnityEditor.Experimental.AssetImporters;
using UnityEngine;
using System.Reflection;
using System;
using System.Collections;
using System.Linq;
using Object = UnityEngine.Object;
using System.Collections.Generic;
@DataGreed
DataGreed / UnityStencilledObject.shader
Created May 14, 2019 19:10 — forked from ewandennis/UnityStencilledObject.shader
A simple surface shader for Unity which honours a specific stencil buffer value
Shader "Custom/Stencilled" {
Properties {
_StencilMask("Stencil mask", Int) = 0
_Color ("Color", Color) = (1,1,1,1)
_MainTex ("Albedo (RGB)", 2D) = "white" {}
_Glossiness ("Smoothness", Range(0,1)) = 0.5
_Metallic ("Metallic", Range(0,1)) = 0.0
}
SubShader {
Tags { "RenderType"="Opaque" }
@DataGreed
DataGreed / UnityStencilMask.shader
Created May 14, 2019 19:10 — forked from ewandennis/UnityStencilMask.shader
A simple stencil buffer masking shader for Unity
Shader "Custom/StencilMask" {
Properties {
_StencilMask("Stencil mask", Int) = 0
}
SubShader {
Tags {
"RenderType" = "Opaque"
"Queue" = "Geometry-100"
}
#!/bin/env sh
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"
lines=$1