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
/** | |
* GradientHDRAttribute created by Chance Millar at Two Tails Games on 2018/05/08 | |
* Use freely. That's a license, right? | |
* | |
* Attach attribute like so: | |
* | |
* [GradientHDR] | |
* public Gradient _HDRGradient; | |
* | |
* Make sure this is placed in a non-Editor folder inside Assets. |
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
/** | |
* PreferenceWindow helper created by Chance Millar at Two Tails Games on 2018/07/24 | |
* Use freely. That's a license, right? | |
* | |
* Be sure to place in an Editor folder inside Assets. | |
*/ | |
using System; | |
using System.Collections; | |
using System.Reflection; |
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
/// BoolPool by Chance Millar 18/11/18 | |
using UnityEngine; | |
/// Class is used to create a pool of bits to be used as bools. | |
/// Bools typically take up 1 byte (8bits), which is a collosal waste of space. | |
/// This class is overall slower than just an array of bools, however the memory footprint is significantly smaller. (655464 bools array is around 512kb, however using ints will reduce it to around 17kb) | |
/// This class converts integer types into a collection of boots. An int is 4 bytes / 32 bits, so that's 32 bools to be used. | |
/// If you need a smaller footprint, converting the ints into bytes as appropriate works too, but you'll need to do some casting depending on the C# version you're on. | |
[System.Serializable] |
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
/// Debug Toggle by Chance Millar 18/11/18 | |
using System; | |
using System.Reflection; | |
using UnityEditor; | |
// Used to provide a shortcut for toggling Unity's Debug/Normal mode on the inspector. | |
// Place inside a folder named "Editor" for Unity to compile correctly. | |
// Will only work on a single inspector window, not all of them. | |
// Use Ctrl/Cmd+G to activate. Refer to the Shortcut manager to change the shortcut. |