This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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; | |
public class AimhelperTarget : MonoBehaviour | |
{ | |
// @kurtdekker - nothing to see here; just put this | |
// on target GameObjects you want to assist-aim to. | |
// | |
// All the magic happen over in BasicAimHelper.cs | |
} |
This file contains hidden or 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
// @kurtdekker | |
// | |
// An ultra-basic bare-bones singleton: "There can only be one." | |
// - Simply access it via .Instance static property. | |
// - You cannot new another one up. You can't even new this one up. | |
// | |
// WARNING: be VERY careful about lifecycle of something like this | |
// in Unity! Unity runs Object constructors NOT on the main thread! | |
// | |
// For somewhat more useful constructs for a Unity context, check out these: |
This file contains hidden or 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; | |
// @kurtdekker - easy cheesy add sphere colliders in a circle (for a torus) | |
// see notes below for how to make it go around a different axis | |
public class AddRingOfSphereColliders : EditorWindow | |
{ | |
int count = 24; | |
float largeRadius = 2.0f; |
This file contains hidden or 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; | |
//Original version of the ConditionalHideAttribute created by Brecht Lecluyse (www.brechtos.com) | |
//Modified by: - | |
[ AttributeUsage( AttributeTargets.Field ) ] | |
public class ConditionalHideAttribute : PropertyAttribute | |
{ | |
public readonly string ConditionalSourceField; |
This file contains hidden or 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 | |
// | |
// ultra-simple core of "shuffle and pick" | |
// | |
// drop this on a blank GameObject and run | |
public class ShuffleAndPick : MonoBehaviour | |
{ |
This file contains hidden or 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-simple XP to Level lookup table | |
// drop it on a blank GameObject to test it, look in the console | |
public class SearchXPTable : MonoBehaviour | |
{ | |
// CAUTION: This is subject to all of Unity3D's serialization rules!!! |