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 GameStateUtility { | |
public static bool isQuitting { get; private set; } | |
[RuntimeInitializeOnLoadMethod( RuntimeInitializeLoadType.SubsystemRegistration )] | |
static void Init () { | |
isQuitting = false; | |
Application.quitting += () => { | |
isQuitting = true; | |
}; |
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
local spr = app.activeSprite | |
if not spr then return app.alert "No active sprite" end | |
local function color_byte_to_string( col ) | |
local hex = '' | |
while(col > 0)do | |
local index = math.fmod(col, 16) + 1 | |
col = math.floor(col / 16) | |
hex = string.sub('0123456789abcdef', index, index) .. hex |
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/WorldSpaceClip" { | |
Properties { | |
_Color ("Color", Color) = (1,1,1,1) | |
_InteriorColor( "Interior 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 | |
_ClipOffset ( "Clip Height", Float) = 10.0 | |
} |
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
/* | |
* Simple Attribute Randomizer | |
* Access via Tools/Randomizer | |
* @madgvox | |
*/ | |
using UnityEditor; | |
using UnityEditor.AnimatedValues; | |
using UnityEngine; |
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; | |
using System; | |
[ExecuteInEditMode] | |
[RequireComponent( typeof( MeshFilter ), typeof( MeshRenderer ) )] | |
public class StrandRenderer : MonoBehaviour { | |
public StrandRenderer child; | |
[HideInInspector] | |
public MeshFilter filter; |