Home > Blockchain >  I'm shooting from the spaceship
I'm shooting from the spaceship

Time:11-26

I'm shooting from the spaceship. to hit the enemies. I created the enemy prefab. When I shoot at the first enemy, there is a sound, but when I shoot at the enemy's prefab, there is no sound, why?

I'm shooting from the spaceship. to hit the enemies. I created the enemy prefab. When I shoot at the first enemy, there is a sound, but when I shoot at the enemy's prefab, there is no sound, why? :)

CodePudding user response:

MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object.

CodePudding user response:

update the prefab including the audio source.

  • Related