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 System.Collections; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using UnityEditor; | |
using UnityEngine; | |
public static class EditorDispatcher | |
{ | |
private static readonly Queue<Action> dispatchQueue = new Queue<Action>(); |
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 UnityEditor.SceneManagement; | |
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser). | |
// This opens an empty scene with your prefab where you can edit it. | |
// Put this script in your project as Assets/Editor/EditPrefab.cs | |
public class EditPrefab { | |
static Object getPrefab(Object selection) { |
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 UnityEditor.Callbacks; | |
using System; | |
using System.IO; | |
public static class CopyFilesBuildPostProcessor | |
{ | |
private const string PathToCopy = "PathToFiles"; |
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
Shader "KumoKairo/Gradient Moon Skybox" | |
{ | |
Properties | |
{ | |
_SkyTint("Sky Tint", Color) = (.5, .5, .5, 1) | |
_GroundColor("Ground", Color) = (.369, .349, .341, 1) | |
_Exponent("Exponent", Range(0, 15)) = 1.0 | |
_SunPosition("Sun Position", Vector) = (0.0, 0.0, 1.0) | |
_SunColor("Sun Color", Color) = (1.0, 1.0, 1.0, 1.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
// Non Editor code | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public abstract class TrafficLightAttribute : PropertyAttribute | |
{ | |
public bool DrawLabel = true; | |
public string CustomLabel; | |
public bool AlsoDrawDefault; |
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 sealed class BTSystem: IExecuteSystem | |
{ | |
IBehaviorNode rootNode; | |
public BTSystem(IBehaviorNode rootNode) | |
{ | |
this.rootNode = rootNode; | |
} | |
void Execute() | |
{ |
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 System.Collections.Generic; | |
namespace Entitas | |
{ | |
public abstract class AbstractEventLogger : IEventLogger | |
{ | |
private readonly Dictionary<Pool, byte> poolIdmap = new Dictionary<Pool, byte>(); | |
private readonly Dictionary<Entity, byte> poolIdmapForEntity = new Dictionary<Entity, byte>(); | |
protected string[] poolNames; |
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; | |
public class CoroutineRunner : MonoBehaviour | |
{ | |
public static void RunCoroutine(IEnumerator coroutine) | |
{ | |
var go = new GameObject("runner"); | |
DontDestroyOnLoad(go); |
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
[PostProcessBuild] | |
public static void OnPostProcessBuild(BuildTarget buildTarget, string pathToBuildProject) | |
{ | |
if (buildTarget != BuildTarget.iOS) | |
return; | |
StripMethods(pathToBuiltProject); | |
} | |
private static string[] s_stripList = |
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 Entitas; | |
using UnityEngine; | |
public class TimerSystem : IExecuteSystem, ICleanupSystem | |
{ | |
readonly IGroup<GameEntity> _timers; | |
readonly IGroup<GameEntity> _timerCompletes; | |
readonly GameContext _context; | |
public TimerSystem(Contexts contexts) |