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.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
using UnityEditor; | |
using UnityEngine; | |
using Debug = UnityEngine.Debug; |
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; | |
using UnityEngine; | |
public struct ScreenNeverSleepScope : IDisposable | |
{ | |
public ScreenNeverSleepScope(bool neverSleep) | |
{ | |
if (neverSleep) | |
Screen.sleepTimeout = SleepTimeout.NeverSleep; |
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; | |
using UnityEngine; | |
public interface ICoroutineRunner : IDisposable | |
{ | |
/// <summary> | |
/// The MonoBehaviour running the coroutine | |
/// </summary> | |
MonoBehaviour Runner { get; } |
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; | |
using System.Collections.Generic; | |
using System.Threading; | |
using UnityEngine; | |
/// <summary> | |
/// Example implementation of the dictionary class | |
/// Unfortunately, Unity doesn't support serializing generic classes | |
/// </summary> |
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 UnityEngine; | |
using Object = UnityEngine.Object; | |
/// <summary> | |
/// A strongly typed pool of objects. When the pool is empty, new instances will be created when requested | |
/// </summary> | |
/// <typeparam name="T">The type of elements in the pool</typeparam> | |
public abstract class Pool<T> |
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 | |
/// After creating this script, I discovered Addressables. Which does a similar thing, but has many more features! | |
/// Check them out here: https://forum.unity.com/threads/addressables-are-here.536304/ | |
//#define USE_BUNDLES | |
using System.Collections; | |
using UnityEngine; | |
#if UNITY_EDITOR && !USE_BUNDLES | |
using UnityEditor; | |
using System.IO; |
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
#!/bin/sh | |
owner_name="appcenter-username" | |
app_name="App-Name" | |
token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
build_path="Unity-iPhone.ipa" | |
destination_name="Collaborators" | |
release_notes="Release notes go here" | |
# Step 1: Create an upload resource and get an upload_url (good for 24 hours) | |
request_url="https://api.appcenter.ms/v0.1/apps/${owner_name}/${app_name}/release_uploads" |
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; | |
/// <summary> | |
/// Use enum values as labels on an array | |
/// </summary> | |
/// <remarks>Should not be placed in an Editor folder</remarks> | |
public class LabelledEnumArrayAttribute : PropertyAttribute | |
{ | |
public readonly Type EnumType; |
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 UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
[InitializeOnLoad] | |
internal static class SceneAutoLoader | |
{ | |
private const string MenuFolder = "Edit/Scene Auto Load/"; |
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.Generic; | |
using System.IO; | |
using System.Text; | |
using UnityEditor; | |
using UnityEngine; | |
/// <summary> | |
/// Tool for copying Unity meta data directly from one file to another | |
/// </summary> | |
public class MetaCopier : EditorWindow |
NewerOlder