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; | |
public interface IMessage { } | |
public static class MessageHub | |
{ | |
public delegate void MessageSubscription<in T>(T message) where T : IMessage; |
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 UnityEngine; | |
public interface IDeferredAction | |
{ | |
void OnExecuteDeferred(byte iKey); | |
} | |
/// <summary> | |
/// Delay method calls by time,frame and/or execute repeatedly. |
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
[Collections.ArrayList]$vsFolders = @() | |
[Collections.ArrayList]$excludedFolders = @("$env:LOCALAPPDATA\JetBrains\Transient") | |
[Collections.ArrayList]$excludedFiles = @() | |
$vsVersions = @('2017', '2018', '2019') | |
Function Invoke-AsAdmin() | |
{ | |
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) | |
{ |
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 Newtonsoft.Json; | |
using UnityEngine; | |
namespace Core.Utilities | |
{ | |
/// <summary> | |
/// To extend Unity's serialization process. | |
/// Unity cant serializes inheritance properly e.g in a list of base types, adding an inherited class won’t be serialized as it. |
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.IO; | |
using System.Net; | |
using System.Threading; | |
namespace Websocket | |
{ | |
public class HttpServer | |
{ |
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
// --- instance.id ------------------------------------------------------------ | |
// Thanks to TheZombieKiller and Peter77 for creating this | |
// https://forum.unity.com/threads/editor-skinning-thread.711059/#post-4785434 | |
// Tested on Unity 2019.3.0b1 - 95% Dark mode Conversion | |
// Example Screenshot - https://i.imgur.com/9q5VPQk.png | |
// (Note - Once I ran this, I had to hit play and then it took effect) | |
// ---------------------------------------------------------------------------- | |
using System; | |
using System.Text.RegularExpressions; |
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; | |
using System.Collections.Generic; | |
using Photon.Pun; | |
using Photon.Realtime; | |
using UnityEngine; | |
using UnityEngine.Events; | |
using Hashtable = ExitGames.Client.Photon.Hashtable; | |
public struct PropertyData | |
{ |
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 ExitGames.Client.Photon; | |
using Photon.Pun; | |
using Photon.Realtime; | |
using UnityEngine; | |
/// <summary> | |
/// PhotonNetwork Timer, using Photon Events(RaiseEvents). | |
/// Call Initialize() as soon as the Timer should react to Photon Callbacks(RaiseEvents), Deinitialize if not needed. | |
/// Every Client should Update the Timer : timer.Update(Time.deltaTime) |
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
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEditor.Build; | |
using UnityEditor.Build.Reporting; | |
using UnityEngine; | |
public class AutoVersion : IPreprocessBuildWithReport | |
{ | |
public int callbackOrder | |
{ |