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; | |
using System; | |
using System.Runtime.InteropServices; | |
/// <summary> | |
/// Use with "[GradientTexture]" before a texture shader property. | |
/// Gives a gradient editor instead of a texture selector when viewing | |
/// in the editor. Meaning you don't have to open any paint programs | |
/// to make gradient textures. |
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
//EDITOR SCRIPT | |
//Put in an Editor folder | |
using UnityEngine; | |
using UnityEditor; | |
public static class MiscEditorTools { | |
//Useful to revert changes to all selected prefab instances in the scene editor | |
[MenuItem("CustTools/Group Prefab Revert")] | |
public static void RevertGroup () { |
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; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
public static class SunVoxWrapper { | |
private const string libPath = "sunvox"; | |
static SunVoxWrapper () { |
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 SmoothLookAt : MonoBehaviour { | |
public Transform target; | |
public float distance = 10.0f; | |
public float height = 5.0f; | |
//Animation curves to adjust the smoothing of | |
//the transform's overall movement |
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
__author__='@pyredrid' | |
#Takes an angle from 0.0 to 1.0 (exclusive) and returns the | |
#corresponding color in ARGB from a color wheel with full alpha | |
def colorFromWheel(angle): | |
#Ensure that angle is positive | |
angle = abs(angle) | |
#Ensure that angle is between 0.0 and 1.0(exclusive) | |
#Uses repeating instead of clamping to | |
#allow time.time() rainbow tomfoolery |