AudioInput

From Unify Community Wiki
Jump to: navigation, search

Author: Jonathan Czeck

Description

This plugin provides a starting grounds for audio input in Unity. It computes the volume of the default audio input (set in Mac OS X System Preferences) every FixedUpdate.

Use this to, for example, apply force to boxes in front of a player in a first-person game when the player blows into the microphone. Another possibility would be to have in game characters react to when a player makes a sound in real life.

Usage

There are two downloads provided. One is a .unityPackage which can be double clicked to be imported into your current project. That contains the Mac OS X plugin, the C# script that interfaces it, and a folder of sample JavaScripts that use the plugin and a sample scene. Download this if you do not plan on modifying the C/Objective-C source code to the plugin, or if you are unsure which to download.

The second download contains the full Unity project (with the assets in the .unityPackage above) and an Xcode project with the plugin source code.

After you have imported the plugin into your Unity project using Import Package, you may now write scripts in any language that simply use AudioInput.Volume. Experiment around and share cool ideas you've come up with using this plugin on the forum or IRC channel!

Downloads

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Tools