Hey Everyone!
So I’ve tried to follow along with this tutorial to create a similar health system
Everything appears to be working up until the 8:30 mark where he drags his HealthController GameObject into the script. Every time I try to drag and drop my game object it doesn’t allow me.
It’s worth noting that my game is 3d and I did change his collider code from 2D to 3D (as he mentioned in his video)
Anyone have any thoughts on why this isn’t working? I’m sure it’s some simple thing but this is a new system to me.
For reference, the prefab I am trying to apply the script to is simply a sphere with a Sphere Collider and a Rigidbody
if you need any more information to support this thread please comment. Thanks in advance
EDIT:
If I drag my prefab into my scene hierarchy it adds the HealthController fine. But when i drag the prefab back to my assets folder it removes it and I cannot add it. I am reading now that prefabs cannot reference gameObjects.
Can anyone suggest a work around? Essentially I have a gameobject (empty object with health controller script attached), and a bullet I want to instantiate from an enemy