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 | |
// | |
// Ultra simple script to give you the "live edges" of your screen. | |
// This updates for any screen orientation, dimensions or camera. | |
// | |
// Presumes: | |
// - orthographic Camera pointed +Z | |
// - returns values in the Z == 0 plane. |
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 - for the purists who don't want ANY scenes in project | |
// | |
// All other Unity asset inclusion rules are still in effect, so no | |
// assets will make it into your project unless they are: | |
// | |
// - correctly in a Resources/ folder | |
// - referenced by something in the above | |
// - correctly in the Streaming Assets folder / system. |
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
// | |
// @kurtdekker | |
// | |
// Purpose: to be able to track arbitrary moving surfaces | |
// you want to hop on and ride around (platforms, etc.) | |
// | |
// Requires you to know if you are grounded or not. | |
// | |
// 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; | |
using UnityEngine.UI; | |
// @kurtdekker - to help fitting portrait / landscape UI stuff together | |
// | |
// Put this where the CanvasScaler is. | |
// | |
// You should set CanvasScaler to: |
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 - lane-based mover | |
// | |
// To use: | |
// Drop this on your player object | |
// Move your camera to see it go into the distance (see note about 2D below) | |
// press PLAY | |
// use A and D to change lanes |
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; | |
// @kurdekker - reports mouse speed in screen pixels per second. | |
// | |
// To use: | |
// - drop on an empty GameObject | |
// - make sure the console will be visible | |
// - press PLAY | |
// - wiggle your mouse | |
// - watch your console |
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 - used to LateUpdate()-chase another | |
// Transform, position and rotation only. | |
// | |
// To use, call the Attach() factory, tell it: | |
// - who you are that want to chase | |
// - the target you want to chase |
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 - making a structural grid in Unity3D | |
// to use: drop this in a blank scene and watch! | |
// | |
// NOTE: this makes a web with a central link. | |
// you could do other connectivity strategies obviously. |
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 - example of an ultra-simple music manager. | |
// | |
// How to use: | |
// MusicManager.Instance.PlayMusic( Audioclip clip); | |
// | |
// Call the above with null to stop music. |
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.Callbacks; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
// @kurtdekker - 8:01 AM 12/29/2022 | |
public class PerformChangeOnAllScenes | |
{ | |
[MenuItem( itemName: "Assets/Perform Change On ALL Scenes")] |