Skip to content

Instantly share code, notes, and snippets.

@0b5vr
Created July 7, 2015 10:03
Show Gist options
  • Save 0b5vr/0a937a02cfa6fd5244c0 to your computer and use it in GitHub Desktop.
Save 0b5vr/0a937a02cfa6fd5244c0 to your computer and use it in GitHub Desktop.
20150707_BSoD_Workshop_scaler
using UnityEngine;
using System.Collections;
public class Scaler : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update(){
if( !OscJack.OscMaster.MasterDirectory.HasData( "/audio/loud" ) ){ return; }
float loud = (float)OscJack.OscMaster.MasterDirectory.GetData( "/audio/loud" )[ 0 ];
transform.localScale = new Vector3( loud, loud, loud );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment