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 System; | |
using System.Collections; | |
using System.Collections.Generic; | |
/// <summary> | |
/// An event that can run coroutines. | |
/// Invoking it returns an IEnumerator that can be waited for in another coroutine. | |
/// The Invocation waits until all registered coroutines are finished. | |
/// </summary> |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
[System.Serializable] | |
public struct RuntimeSceneReference : ISerializationCallbackReceiver | |
{ |
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; | |
using UnityEditorInternal; | |
using System.Collections.Generic; | |
/// <summary> | |
/// An editor window that lets you store assets and GameObjects in it for quickly finding them again. | |
/// </summary> | |
public class FavoritesWindow : 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 UnityEngine; | |
using System; | |
/// <summary> | |
/// Temporarily set a color to be used for Gizmos. | |
/// <example> | |
/// <code> | |
/// using (new GizmosColor(Color.red)) | |
/// { |
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; | |
/// <summary> | |
/// Use this attribute in combination with a [SerializeField] attribute on top of a property to display the property name. Example: | |
/// [field: SerializeField, UsePropertyName] | |
/// public int number { get; private set; } | |
/// </summary> | |
public class UsePropertyNameAttribute : PropertyAttribute | |
{ | |
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; | |
/// <summary> | |
/// Extension methods to create simple code around working with WeakReferences referencing UnityEngine.Objects. | |
/// </summary> | |
public static class WeakReferenceExtensions | |
{ | |
/// <summary> | |
/// Destroys the referenced object if it still exists. | |
/// Does nothing if no object is referenced or the referenced object is already destroyed. |
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; | |
public static class HideFlagsUtility | |
{ | |
[MenuItem("Help/Hide Flags/Show All Objects")] | |
private static void ShowAll() | |
{ | |
var allGameObjects = Object.FindObjectsOfType<GameObject>(true); | |
foreach (var go in allGameObjects) |
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; | |
public class EventOrderTest : MonoBehaviour | |
{ | |
private bool firstUpdate = true; | |
private void Awake() | |
{ | |
Log("Awake"); | |
} |
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
using UnityEngine; | |
public class CorouTweenTest : MonoBehaviour | |
{ | |
[SerializeField] | |
private Vector3 targetPosition; | |
[SerializeField] | |
private float duration = 1; | |
private void Start() |
NewerOlder