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.Generic; | |
using UnityEngine; | |
public static class BetterWaitForSeconds | |
{ | |
private class WaitForSeconds : CustomYieldInstruction | |
{ | |
private float waitUntil; | |
public override bool keepWaiting | |
{ |
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
#define ENABLE_LOGGING // Logs the folder objects that were flattened to the console | |
//#define SIMULATE_BUILD_BEHAVIOUR_ON_PLAY_MODE // Simulates Execution.AtBuildTime when entering Play Mode in the Editor, as well | |
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditor.Callbacks; | |
using UnityEngine.SceneManagement; | |
using System.Collections.Generic; | |
using System.Reflection; | |
#endif |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using Object = UnityEngine.Object; | |
public class SingleColorTextureDetector : EditorWindow, IHasCustomMenu | |
{ |
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.Generic; | |
using UnityEngine; | |
using UnityEngine.Sprites; | |
using UnityEngine.UI; | |
#if UNITY_2017_4 || UNITY_2018_2_OR_NEWER | |
using UnityEngine.U2D; | |
#endif | |
#if UNITY_EDITOR | |
using UnityEditor; |
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 UnityEditor; | |
using UnityEngine; | |
public class CustomMaxSizeSetter : EditorWindow | |
{ | |
private const int MINIMUM_MAX_SIZE = 32; | |
private const int MAXIMUM_MAX_SIZE = 2048; | |
private int initialMaxSize = -1; | |
private int currentMaxSize = -1; |
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
//#define TMP_ROUND_DECIMALS // When defined, float and double values are rounded using Math.round | |
using TMPro; | |
public static class TMP_IntegerText | |
{ | |
private static readonly char[] arr = new char[64]; // prefix + number + postfix can't exceed this capacity! | |
private static int charIndex = 0; | |
public static void SetText( this TMP_Text text, sbyte number ) |
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.Generic; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
public class CustomRectHandles : ScriptableObject | |
{ | |
public class Rect3D | |
{ |
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.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
public static class EmptyParentCreator | |
{ | |
[MenuItem( "GameObject/Create Empty Parent", priority = 0 )] | |
private static void CreateEmptyParent( MenuCommand command ) | |
{ | |
// This happens when this button is clicked via hierarchy's right click context menu |
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; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Net; | |
using System.Text; | |
/* EXAMPLE USAGE | |
FileDownloader fileDownloader = new FileDownloader(); |
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 UnityEditor; | |
using UnityEngine; | |
public class BenchmarkEnterPlayMode | |
{ | |
[InitializeOnLoadMethod] | |
private static void Initialize() | |
{ | |
void OnPlayModeStateChanged( PlayModeStateChange state ) | |
{ |