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.Collections; | |
public class MonoBehaviourSingleton<T> : MonoBehaviour where T : MonoBehaviour | |
{ | |
private static T _instance = null; | |
private static bool _applicationIsQuitting = false; | |
[RuntimeInitializeOnLoadMethod] |
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.Collections; | |
using System; | |
using BestHTTP; | |
using BestHTTP.SocketIO; | |
public class SimpleChat : MonoBehaviour { | |
public UILabel lblChatMessages; |
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; | |
using System.Collections.Generic; | |
using System.IO; | |
// Scene 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
public static class UtilsEnum | |
{ | |
public static bool HasFlag(this Enum mask, Enum flags) // Same behavior than Enum.HasFlag is .NET 4 | |
{ | |
#if DEBUG | |
if (mask.GetType() != flags.GetType()) | |
throw new System.ArgumentException( | |
string.Format("The argument type, '{0}', is not the same as the enum type '{1}'.", | |
flags.GetType(), mask.GetType())); | |
#endif |
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
/* | |
Copyright (C) 2016 Apple Inc. All Rights Reserved. | |
See LICENSE.txt for this sample’s licensing information | |
Abstract: | |
`DirectoryMonitor` is used to monitor the contents of the provided directory by using a GCD dispatch source. | |
*/ | |
import Foundation |
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.Linq; | |
using System.Text; | |
using UnityEngine; | |
public class D | |
{ | |
/// <summary> | |
/// Author: WeslomPo | |
/// InspiredBy: Ant.Karlov |
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
/** | |
* Input Module to use the new unity ui with multitouch from https://github.com/TouchScript | |
* Install TouchScript in your unity project, then add an EventSystem and replace the InputModules by this one. | |
* | |
* | |
* Basically modified TouchInputModule from | |
* https://bitbucket.org/Unity-Technologies/ui/src/5fc21bb4ecf4b40ff6630057edaa070252909b2e/UnityEngine.UI/EventSystem/InputModules/TouchInputModule.cs?at=4.6 | |
* and changing ProcessTouchEvent to take events from TouchScript | |
* | |
* Got the TouchScript stuff from |