Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

BCE0023: No appropriate version of 'UnityEngine.Object.Instantiate' for the argument list '(UnityEngine.GameObject, UnityEngine.GameObject)' was found.

$
0
0
i get the BCE0023 error and i cant find out why //Variables var ammo : int = 100; var fireRate : float = 0.0; var Effect : Transform; var TheDammage = 100; var muzzelflash : GameObject; var ShootingPoint : GameObject; private var nextFire : float = 0.0; function Update() { var hit : RaycastHit; var ray : Ray = Camera.main.ScreenPointToRay(Vector3(Screen.width*0.5, Screen.height*0.5, 0)); if(Input.GetButton("Fire1")&& ammo>0) { if (Physics.Raycast (ray, hit, 100)) { } if(Time.time > nextFire) { var particleClone = Instantiate(Effect, hit.point, Quaternion.LookRotation(hit.normal)); Destroy(particleClone.gameObject, 1); hit.transform.SendMessage("ApplyDammage", TheDammage, SendMessageOptions.DontRequireReceiver); } if(Time.time > nextFire) { nextFire = Time.time + fireRate; GetComponent.().Play(); //here's the problem Instantiate(muzzelflash, ShootingPoint); ammo -= 1; } } if(ammo <= 30) { if(Input.GetKeyDown("r")) { ammo = 30; } } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>