阅读背景:

Raycast让gameobject被击中以在gameobject上运行脚本和功能

来源:互联网 

I'm in the process of getting multiple enemies to work in my game for my college project. I have a player with a ShootGun script which raycasts the gun and detects whether or not the object hit is one of the enemy colliders (tagged with Enemy_Head, _Torso and _Limb). If it is, it will get the gameobject of the enemy hit and the enemyHealth script component on that gameobject and will then call public functions on that script. Currently, when the ShootGun script tries to get the component / script it says the following error:I'm in the process of getting multiple enemies




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: