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 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 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; | |
public static class ConfigurableJointExtensions | |
{ | |
/// <summary> | |
/// Sets a joint's targetRotation to match a given local rotation. | |
/// The joint transform's local rotation must be cached on Start and passed into this method. | |
/// </summary> | |
public static void SetTargetRotationLocal (this ConfigurableJoint joint, Quaternion targetLocalRotation, Quaternion startLocalRotation) | |
{ |
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
brew install ffmpeg --with-vpx --with-libvpx --with-vorbis --with-libvorbis --with-theora --with-libtheora --with-libogg --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libvo-aacenc --with-libx264 --with-libxvid |
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
// Close ports if they were already open under another configuration | |
if (catch(`commandPort -name ":7001" -close True`)) { | |
warning "Could not close port 7001 (maybe it is not opened yet...)"; | |
} | |
if (catch(`commandPort -name ":7002" -close True`)) { | |
warning "Could not close port 7002 (maybe it is not opened yet...)"; | |
} | |
// Open new ports | |
commandPort -name ":7001" -sourceType "mel"; |
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 UnityEditor; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class CreateMergedMesh : ScriptableWizard | |
{ | |
[MenuItem ("Prototype/Create Merged Mesh")] | |
static void CreateDataMesh () | |
{ |
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; | |
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 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); | |
} |
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; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using System.Text; | |
using UnityEditor; | |
using UnityEngine; | |
/* |
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
# ##### BEGIN GPL LICENSE BLOCK ##### | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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; | |
public class Fps : MonoBehaviour | |
{ | |
private float count; | |
private IEnumerator Start() | |
{ | |
GUI.depth = 2; |