Skip to content

Instantly share code, notes, and snippets.

@greggraham
Created June 21, 2011 00:29
Show Gist options
  • Save greggraham/1036963 to your computer and use it in GitHub Desktop.
Save greggraham/1036963 to your computer and use it in GitHub Desktop.
Unity script for dropping objects
// This script provides the ability to drop objects.
var newObject: Transform;
function Update() {
if (Input.GetButtonDown("Fire1")) {
Instantiate(newObject, transform.position, transform.rotation);
Debug.Log("Object created?");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment