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 / 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.")]
@TarasOsiris
TarasOsiris / .gitignore
Last active August 29, 2015 13:56 — forked from zasadnyy/.gitignore
# =============== #
# Unity generated #
# =============== #
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
#Unity3D Generated File On Crash Reports
sysinfo.txt
@TarasOsiris
TarasOsiris / CustomAssetUtility.cs
Last active August 29, 2015 13:56
Generic method to create .asset files. Taken from here http://www.jacobpennock.com/Blog/?page_id=715 and modified a bit.
using UnityEngine;
using UnityEditor;
using System.IO;
/// <summary>
/// Taken from here : http://www.jacobpennock.com/Blog/?page_id=715 and modified
/// </summary>
public static class CustomAssetUtility
{
public static void CreateAsset<T>() where T : ScriptableObject
@TarasOsiris
TarasOsiris / UiHighlightCenteredItem.cs
Created February 26, 2014 09:54
Put this script on game object with UIDragScrollView to get scale and alpha highlighting effect. Might be not very efficient but it works ok.
using UnityEngine;
using System;
namespace Com.Nravo.NGUI {
[RequireComponent(typeof(UIDragScrollView))]
public class UiHighlightCenteredItem : MonoBehaviour {
// coefs to monitor
// zero means target is centered, 1 means target is max away
[Range(0.0f, 1.0f)] public float distanceFromCenterHorizontalCoef;