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
# This .gitignore file should be placed at the root of your Unity project directory | |
# | |
# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore | |
# | |
/[Ll]ibrary/ | |
/[Tt]emp/ | |
/[Oo]bj/ | |
/[Bb]uild/ | |
/[Bb]uilds/ | |
/[Ll]ogs/ |
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
/// | |
/// Simple pooling for Unity. | |
/// Author: Martin "quill18" Glaude ([email protected]) | |
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267 | |
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
/// UPDATES: | |
/// 2015-04-16: Changed Pool to use a Stack generic. | |
/// | |
/// Usage: | |
/// |
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 System; | |
using System.Reflection; | |
using System.Collections; | |
using System.Collections.Generic; | |
namespace UnityCache { | |
public static class PreCacheEditor { | |
public static bool WriteToLog = true; |
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
public abstract class Singleton<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
public static T Instance { get; private set; } | |
protected void Awake() | |
{ | |
if (Instance == null) | |
{ | |
Instance = this as T; | |
DontDestroyOnLoad(gameObject); |
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
namespace SampleNS | |
{ | |
public static class CommonUtil | |
{ | |
public static string ListToString(this IList list) | |
{ | |
StringBuilder result = new StringBuilder(""); | |
if (list.Count > 0) | |
{ |
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
class Foo : IDisposable | |
{ | |
private bool _disposed; | |
~Foo() | |
{ | |
Dispose(false); | |
} | |
public void Dispose() |
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
{ | |
"Base": { | |
"HealthMax": 2222, | |
"ColliderRadius": 1.35, | |
"ProduceUnitInterval": 3.0, | |
"SpawnUnitPrefabName": "Drone" | |
} | |
} |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class Customizer : MonoBehaviour | |
{ | |
public GameObject Panel; | |
public GameObject Button; |