Skip to content

Instantly share code, notes, and snippets.

View kirillrybin's full-sized avatar
🏠
Working from home

Kirill Rybin kirillrybin

🏠
Working from home
  • Yaroslavl', Russia
  • 19:25 (UTC +03:00)
View GitHub Profile
@kirillrybin
kirillrybin / SimpleChat.cs
Created June 26, 2019 14:23 — forked from heartgamer/SimpleChat.cs
BEST HTTP socket.io example.
using UnityEngine;
using System.Collections;
using System;
using BestHTTP;
using BestHTTP.SocketIO;
public class SimpleChat : MonoBehaviour {
public UILabel lblChatMessages;
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using System.Collections.Generic;
using System.IO;
// Scene selection
@kirillrybin
kirillrybin / UtilsEnum.cs
Created July 15, 2018 21:45 — forked from yagero/UtilsEnum.cs
Enum.HasFlag in .NET 2 / Unity 5
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
/*
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
@kirillrybin
kirillrybin / D.cs
Created March 1, 2017 13:20 — forked from WeslomPo/D.cs
using System.Linq;
using System.Text;
using UnityEngine;
public class D
{
/// <summary>
/// Author: WeslomPo
/// InspiredBy: Ant.Karlov
@kirillrybin
kirillrybin / TouchScriptInputModule.cs
Last active August 31, 2015 13:06 — forked from simonbroggi/TouchScriptInputModule.cs
Input Module to use the new unity ui with multitouch from https://github.com/TouchScript
/**
* 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