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 UnityEngine; | |
#if UNITY_2020_1_OR_NEWER | |
// good to go | |
#else | |
#error "Optional<T> plugin requires Unity 2020.1 or above for it to work. On below versions serializing fields of generic types was not possible." | |
#endif | |
[Serializable] |
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; | |
[AttributeUsage(AttributeTargets.Method)] | |
public class ConsoleAccessAttribute : Attribute | |
{ | |
} |
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
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); |