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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Reflection; | |
| using UnityEditor; | |
| using UnityEngine; | |
| public class MarkUnused | |
| { | |
| private const string UnusedLabel = "Unused"; // All unused assets will be tagged with this label |
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
| /******************************************************************************* | |
| * Don't Be a Jerk: The Open Source Software License. | |
| * Adapted from: https://github.com/evantahler/Dont-be-a-Jerk | |
| ******************************************************************************* | |
| * _I_ am the software author - JohannesMP on Github. | |
| * _You_ are the user of this software. You might be a _we_, and that's OK! | |
| * | |
| * This is free, open source software. I will never charge you to use, | |
| * license, or obtain this software. Doing so would make me a jerk. | |
| * |
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
| void DrawBounds(Bounds b, float delay=0) | |
| { | |
| // bottom | |
| var p1 = new Vector3(b.min.x, b.min.y, b.min.z); | |
| var p2 = new Vector3(b.max.x, b.min.y, b.min.z); | |
| var p3 = new Vector3(b.max.x, b.min.y, b.max.z); | |
| var p4 = new Vector3(b.min.x, b.min.y, b.max.z); | |
| Debug.DrawLine(p1, p2, Color.blue, delay); | |
| Debug.DrawLine(p2, p3, Color.red, delay); |
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; | |
| using UnityEngine; | |
| [Serializable] | |
| public struct MinMax | |
| { | |
| [SerializeField] | |
| private float min; | |
| [SerializeField] |
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; | |
| public class MathParabola | |
| { | |
| public static Vector3 Parabola(Vector3 start, Vector3 end, float height, float t) | |
| { | |
| Func<float, float> f = x => -4 * height * x * x + 4 * height * x; |
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
| // Put this in an editor folder | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using UnityEngine.Experimental.LowLevel; | |
| using UnityEngine.Profiling; |
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
| // NOTE DONT put in an editor folder | |
| using UnityEngine; | |
| public class MinMaxAttribute : PropertyAttribute | |
| { | |
| public float MinLimit = 0; | |
| public float MaxLimit = 1; | |
| public bool ShowEditRange; | |
| public bool ShowDebugValues; |
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; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| #endif | |
| [System.Serializable] | |
| public class SceneObject | |
| { | |
| [SerializeField] | |
| private string m_SceneName; |
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
| //Latest version is here: https://gist.github.com/affc23dd89950e67ece9ca3b19b9508a.git | |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| namespace PriorityQueueUtils | |
| { | |
| /// <summary> | |
| /// Queue contract |
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.IO; | |
| using UnityEngine; | |
| public class AsyncBundleLoader : MonoBehaviour | |
| { | |
| // Used for visual debugging as to not generate unnecessary allocations | |
| public GameObject worldLight; | |
| // Private fields to keep track of loaded objects |