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; | |
// @kurtdekker - Attach this script to GameObjects you | |
// want to have in your scene for alignment and design, | |
// but you want to be destroyed during real gameplay. | |
public class DestroyOnAwake : MonoBehaviour | |
{ | |
void Awake() | |
{ |
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; | |
// @kurtdekker - simple runtime geometry double-siding mechanism. | |
// | |
// Place or add this Component to things with at | |
// least a MeshFilter on them. | |
// | |
// Presently only for single-submesh geometry. | |
// | |
// Copies vertex position and uv, then recalculates |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// @kurtdekker | |
// | |
// Purpose: | |
// - to inhibit processing of input whenever a popup is enabled | |
// | |
// To use: |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// @kurtdekker - synthesizes a cheesy machinegun sound | |
// | |
// DO NOT PUT THIS IN ANY SCENE!!!! | |
// | |
// Instead, simply use it by calling: | |
// |
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; | |
// @kurtdekker | |
// | |
// Place on a MeshFilter / MeshRenderer GameObject. | |
// | |
// This will: | |
// - duplicate the entire GameObject via Instantiate | |
// (and obviously its children; those are ignored!) | |
// - parent it to the same place the original was |
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; | |
// @kurtdekker - quick double-siding mechanism. | |
// | |
// Place or add this Component to things with at | |
// least a MeshFilter on them. | |
// | |
// Presently only for single-submesh geometry. | |
[RequireComponent( typeof( MeshFilter))] |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// @kurtdekker - this is part of Jetpack Kurt | |
// | |
// Spawns different items during certain seasons, in this case Christmas. | |
// | |
// To use: | |
// - place on empty active GameObject in your prefab or scene |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// @kurtdekker - head nod yes sensor | |
// | |
// To use: | |
// Put this on a mouse-controlled FPS camera and it can detect: | |
// - up/down "head nods yes." | |
// Optionally give it an audio to play |
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; | |
// @kurtdekker - drop this script on on any GameObject (as many | |
// times as you like) and fill out the Text field. | |
public class Comments : MonoBehaviour | |
{ | |
[Multiline] | |
public string Text = "< fill me out! >"; | |
} |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// @kurtdekker | |
// | |
// ultra dead-simple Conways Game Of Life (GOL) implementation in Unity | |
// | |
// To use: | |
// Make the default blank scene with a Camera / Light |