Skip to content

Instantly share code, notes, and snippets.

View TarasOsiris's full-sized avatar
🌍
https://ninevastudios.com/

Taras Leskiv TarasOsiris

🌍
https://ninevastudios.com/
View GitHub Profile
@TarasOsiris
TarasOsiris / GetSocialDeepLinkingActivity.java
Last active April 26, 2016 03:04
This activity is created because we cannot get Activity.onNewIntent callback in Unity when the app is running in background.
package im.getsocial.sdk.core.unity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import im.getsocial.sdk.core.GetSocial;
import im.getsocial.sdk.core.util.Log;
@TarasOsiris
TarasOsiris / Driver.cs
Last active April 15, 2016 09:52
Class for frame-by-frame Animation in Editor. Taken from Fabric Unity SDK
namespace Fabric.Internal.Editor.View.Animation
{
using UnityEngine;
using UnityEditor;
using System.Collections;
using System;
public class Driver
{
private uint invocationCount = 0;
@TarasOsiris
TarasOsiris / GetSocialDeepLinkingActivity.java
Created March 4, 2016 14:59 — forked from getsocial-im/GetSocialDeepLinkingActivity.java
Code for Android Unity App and the Intent Trouble Article on GetSocial Blog
package im.getsocial.sdk.core.unity;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import im.getsocial.sdk.core.GetSocial;
import im.getsocial.sdk.core.util.Log;
@TarasOsiris
TarasOsiris / EncryptedXmlSerializer.cs
Created January 11, 2015 23:23
Stack Overflow Question
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Xml.Serialization;
using UnityEngine;
namespace Com.Nravo.FlipTheBoard.PersistantStorage
{
@TarasOsiris
TarasOsiris / NGUI_UpdateLabel.cs
Created November 27, 2014 11:32
Updates NGUI Label with provided parameters. Playmaker Action
using UnityEngine;
using HutongGames.PlayMaker;
[ActionCategory("NGUI")]
[HutongGames.PlayMaker.Tooltip("Updates NGUI Label with provided parameters")]
public class NGUI_UpdateLabel : FsmStateAction
{
[RequiredField]
[CheckForComponent(typeof(UILabel))]
[HutongGames.PlayMaker.Tooltip("Game Object to update.")]
@TarasOsiris
TarasOsiris / LoopedEnumList.cs
Last active August 29, 2015 14:06
Looped Enum List for Unity3D
using System.Collections.Generic;
using System;
using UnityEngine;
public class LoopedEnumList<T>
{
private readonly List<T> _items;
private readonly int _startIndex;
private int _currentIndex;
@TarasOsiris
TarasOsiris / RuntimePlatformUtils.cs
Last active August 29, 2015 14:05
RuntimePlatform utility class for Unity
using UnityEngine;
public static class RuntimePlatformUtils
{
private static RuntimePlatform _platform;
static RuntimePlatformUtils()
{
_platform = Application.platform;
}
@TarasOsiris
TarasOsiris / ListUtils.cs
Last active August 29, 2015 14:04
Collection extension methods
using System.Collections.Generic;
using System;
namespace TarasOsirisGists
{
public static class ListUtils
{
private static Random _rnd;
/// <summary>
@TarasOsiris
TarasOsiris / UTSetAndroidBuildSubtarget.cs
Created June 24, 2014 09:57
Set Android Texture Compression uTomate Action
using UnityEditor;
[UTActionInfoAttribute(actionCategory = "Build")]
[UTDoc(title = "Set Android Texture Compression", description = "Sets Android texture Compression.")]
[UTInspectorGroups(groups = new []{ "Player" })]
public class UTSetAndroidBuildSubtarget : UTAction
{
[UTDoc(description = "Android targets, only: The texture compression.")]
[UTInspectorHint(group = "Player", order = 4, required = true)]
@TarasOsiris
TarasOsiris / SmoothMoves_SetSpriteColor.cs
Last active August 29, 2015 13:58
Playmaker action to set color of the SmoothMoves.Sprite.
using HutongGames.PlayMaker;
using UnityEngine;
[ActionCategory("SmoothMoves")]
[Tooltip("Sets the sprite color of the Sprite")]
public class SmoothMoves_SetSpriteColor : FsmStateAction
{
[RequiredField]
[CheckForComponent(typeof(SmoothMoves.Sprite))]
[Tooltip("Game Object to set the color on.")]