This file contains hidden or 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
import { ChildProcess, spawn } from 'child_process'; | |
import * as puppeteer from 'puppeteer'; | |
const DEBUG = Boolean(process.env.DEBUG); | |
const CI = Boolean(process.env.CI); | |
const QUERY = Boolean(process.env.QUERY); | |
jest.setTimeout((QUERY ? 200 : 100) * 1000); | |
interface MemorySample { |
This file contains hidden or 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; | |
/// <summary> | |
/// Put this script on a camera, assign a target and the camera will always look at that target, smoothly following it. | |
/// </summary> | |
public class CameraLookAt : MonoBehaviour { | |
public Transform target; //Look at this | |
private Transform aimTarget; |
This file contains hidden or 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 ObliqueCameraProjection : MonoBehaviour | |
{ | |
private Matrix4x4 originalProjection; | |
public Vector2 slideViewport; | |
public Vector2 slideFrustum; | |
public Vector2 slideFarClip; // compound slideViewport and slideFrustum | |
public Vector2 skew; |
This file contains hidden or 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; | |
//Version 0.21 | twitter:@izm update for DK2 | |
//Version 0.2 | s.b.Newsom Edition | |
//Source from http://answers.unity3d.com/questions/179775/game-window-size-from-editor-window-in-editor-mode.html | |
//Modified by seieibob for use at the Virtual Environment and Multimodal Interaction Lab at the University of Maine. | |
//Use however you'd like! |
This file contains hidden or 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.Collections.Generic; | |
using System.Linq; | |
[RequireComponent (typeof(SpriteRenderer))] | |
public class SpriteAnimator : MonoBehaviour | |
{ | |
public List<Sprite> frames = new List<Sprite> (); | |
public float fps = 15; |
This file contains hidden or 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.Collections.Generic; | |
public delegate void InputKeyDelegate (KeyCode key); | |
public delegate void InputAxisDelegate (string name,float value); | |
public class InputEvents : MonoBehaviour | |
{ |
This file contains hidden or 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.Collections.Generic; | |
using System.IO; | |
public class FileUtility { | |
/// <summary> | |
/// Determine whether a given path is a directory. | |
/// </summary> |
This file contains hidden or 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 Fps : MonoBehaviour { | |
string label = ""; | |
float count; | |
IEnumerator Start () | |
{ |
This file contains hidden or 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; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using UnityEditor; | |
using UnityEngine; | |
/* |
This file contains hidden or 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
void GetComponentsInChildrenRecursive<T> (Transform parent, List<T> buffer) | |
where T : Component | |
{ | |
foreach (Transform t in parent) { | |
var c = t.GetComponent<T> (); | |
if (c) { | |
buffer.Add (c); | |
} | |
GetComponentsInChildrenRecursive (t, buffer); | |
} |
NewerOlder