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; | |
using System.Collections.Generic; | |
public delegate void Callback(); | |
public delegate void Callback<T>(T arg1); | |
public delegate void Callback<T, U>(T arg1, U arg2); | |
public delegate void Callback<T, U, V>(T arg1, U arg2, V arg3); | |
public enum MessengerMode { | |
DONT_REQUIRE_LISTENER, |
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
// https://frarees.github.io/default-gist-license | |
using System; | |
using UnityEngine; | |
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)] | |
public class MinMaxSliderAttribute : PropertyAttribute | |
{ | |
public float Min { get; set; } | |
public float Max { get; set; } |
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
var folderPath = "/c/Users/Adam/Projects/myproject" | |
//var inputFolder = Folder.selectDialog ("Select the folder that contains the files for export:"); | |
var inputFolder = Folder(folderPath); | |
var files = inputFolder.getFiles (/\.(psd)$/i); | |
for (var i = 0; i < files.length; i++) { | |
var f = files[i]; | |
var doc = app.open (f); |
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 UnityEngine.UI; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
using System.Collections; | |
// inspired by: https://github.com/AyARL/UnityGUIExamples/blob/master/EventTrigger/Assets/TriggerSetup.cs | |
// gist: https://gist.github.com/rusticode/05b306f11aa4a33bb113 | |
[RequireComponent(typeof(RectTransform))] |
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; | |
using UnityEngine; | |
/// <summary> | |
/// This is a generic Singleton implementation for Monobehaviours. | |
/// Create a derived class where the type T is the script you want to "Singletonize" | |
/// Upon loading it will call DontDestroyOnLoad on the gameobject where this script is contained | |
/// so it persists upon scene changes. | |
/// </summary> | |
/// <remarks> |
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 UnityEditor; | |
using System.Collections.Generic; | |
// Put this memu command script into Assets/Editor/ | |
class ExportTool | |
{ | |
static void ExportXcodeProject () | |
{ | |
EditorUserBuildSettings.SwitchActiveBuildTarget (BuildTarget.iOS); |
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
@ECHO OFF | |
ECHO Running "adb install -r %1" | |
adb install -r %1 | |
PAUSE |
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 DG.Tweening; | |
// BOA | |
public class SlideTween : MonoBehaviour | |
{ | |
public enum Position { OutsideTop, OutsideBottom, OutsideLeft, OutsideRight, Center, InsideTop, InsideBottom, InsideLeft, InsideRight }; | |
public Position enterPoint; | |
public Position targetPoint; |
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.Collections.Generic; | |
using UnityEngine; | |
using DG.Tweening; | |
public class LoadingDots : MonoBehaviour { | |
//the total time of the animation | |
public float repeatTime = 1; | |
//the time for a dot to bounce up and come back down |
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.Collections; | |
using DG.Tweening; | |
using UnityEngine; | |
using UnityEditor; | |
public class UISlideTween : MonoBehaviour | |
{ | |
[HideInInspector] | |
public Vector3 enterPosition, enterScale, targetPosition, targetScale, exitPosition, exitScale; | |
[HideInInspector] |
OlderNewer