Skip to content

Instantly share code, notes, and snippets.

View kalineh's full-sized avatar

kalineh

  • Funktronic Labs
  • Pasadena, CA
View GitHub Profile
using UnityEngine;
using System.Collections;
public class CameraSmooth
: MonoBehaviour
{
public Camera cameraTarget;
public Camera cameraSelf;
public bool enableSmooth = true;
using UnityEngine;
using System.Collections;
using Valve.VR;
using Valve.Interop;
// bool VR_IVRTrackedCamera_HasCamera(IntPtr instancePtr, uint nDeviceIndex);
// bool VR_IVRTrackedCamera_GetCameraFirmwareDescription(IntPtr instancePtr, uint nDeviceIndex, string pBuffer, uint nBufferLen);
// bool VR_IVRTrackedCamera_GetCameraFrameDimensions(IntPtr instancePtr, uint nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat, ref uint pWidth, ref uint pHeight);
// bool VR_IVRTrackedCamera_SetCameraVideoStreamFormat(IntPtr instancePtr, uint nDeviceIndex, ECameraVideoStreamFormat nVideoStreamFormat);
using UnityEngine;
using System.Collections;
using DG.Tweening;
public class ToolBallWhip
: ToolCore
{
private Rigidbody rigidBody;
private Vector3 prevPosition;
using UnityEngine;
using System.Collections;
public class CoroutineBugTest
: MonoBehaviour
{
public IEnumerator OuterReturnIEnumerator(string s)
{
Debug.LogFormat("Outer: enter: {0}", s);
yield return Inner(s);
using UnityEngine;
using System.Collections;
using Valve.VR;
public class SteamPlayAreaResizer
: MonoBehaviour
{
private bool resized = false;
public void Update()
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class MeshFilterVariants
: MonoBehaviour
{
public Mesh[] Meshes;
public void Start()
using UnityEngine;
using System.Collections;
using System.Reflection;
public class SingletonMonoBehaviour<T>
: MonoBehaviour
{
#if UNITY_EDITOR
[UnityEditor.Callbacks.DidReloadScripts]
public static void OnScriptReload()
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
[InitializeOnLoad]
public class EditorCameraSpeed
: EditorWindow
@kalineh
kalineh / UnityScriptReloadBroadcast.cs
Last active December 17, 2015 01:01
Place in Unity project to call OnScriptReloaded() on any object when scripts reload.
using UnityEngine;
using System.Reflection;
public class ScriptReloadBroadcast
{
#if UNITY_EDITOR
[UnityEditor.Callbacks.DidReloadScripts]
static void OnScriptsReloaded()
{
var flags =
@kalineh
kalineh / UnitySimpleEase.cs
Created November 20, 2015 21:19
Unity - Simple ease functions.
//
// extracted from http://dotween.demigiant.com/
//
using UnityEngine;
public class SimpleEase
: MonoBehaviour
{
static float _PiOver2 = Mathf.PI / 2.0f;