ArgumentException: get_time can only be called from the main thread.
It is posted because of this script;
var projectile : Rigidbody;
var speedBall = 100;
var timer = Time.time;
function Update ()
{
if( Input.GetButtonDown( "Fire1") )
{
timer=Time.time;
}
if( Input.GetButtonUp( "Fire1") )
{
var powerShot = (Time.time - timer) * speedBall;
if (powerShot > 100)
{
powerShot = 100;
}
var instantiatedProjectile : Rigidbody = Instantiate( projectile, transform.position, transform.rotation );
instantiatedProjectile.velocity = transform.TransformDirection( Vector3( 0, 0, powerShot ) );
projectile.tag = "monarchProjectile";
print (powerShot);
}
}
Everything seems to work as it should, even in a windows build.