Home > other >  Suspension of unity in the Game window.
Suspension of unity in the Game window.

Time:09-30

Everyone a great god, and I want to do a first instance in unity cube then buttons burst, the effect of the effect were suspended after instance, somehow it opens at pause will burst, the HTML code is as follows, to solve!
using UnityEngine;

Public class Clone: MonoBehaviour
{
Public GameObject playerFab;
Private Rigidbody r;
Void the Start ()
{
R=GetComponent (a);
}

Void the Update ()
{
If (Input. GetKeyDown (KeyCode. Q))
{
Vector3 pos=new Vector3 ();
Pos. X=Random. Range (5-5 f, f);
Pos. Z=Random. Range (5-5 f, f);
Pos. Y=0.5 f;
Float Angle.=the Random Range (0 f, 360 f).
Instantiate (playerFab, pos, Quaternion. AngleAxis (Angle, Vector3. Up));
}
If (Input. GetKey (KeyCode. 1))
{
Of state Richard armitage ddExplosionForce (1500 f, Vector3. Zero, 5 f);
}
}
}

CodePudding user response:

See if there are any error, output a if there is an error in the log will pause button, see if there are any is pressed

CodePudding user response:

Hung on the Rigidbody component is casting objects, r should look for the fabrication of, hung on the script object if there is no Rigidbody, should be suspended, since moving
  • Related