hey…
so im basicly trying to use a simple press GUI, instantiate missile code… heres what i have.
var cratePrefab:Transform;
function OnGUI () {
if (GUI.Button (Rect (50,50,80,20), "Shoot"))
{
var crate = Instantiate(cratePrefab, transform.position, transform.rotation);
crate.rigidbody.AddForce(transform.forward *10000);
}
}
it works fine when i just click play, but when i build it to the phone i get an error saying my scripts have compiler errors, it exports for standalone just fine, its only for the phone.
after picking it apart, and running some other tests, it seems instantiate is the issue. any help here?
any other way to achieve the same result?