I am trying to move a gun onto my player similar to the way that my health script is attached to my individual enemies.
problem Is that this script uses the serialized image field, and It turns out I can’t drag my gun sprite on it.
Any bright ideas anyone?
3319703–258262–Health.cs (2.8 KB)
It’s much easier for people on the forums, who are reading your thread to see any relevant code here.
Very few people will ever download a file just to look it over; esp on a regular basis.
Please look at this page for how you can post code, formatted nicely, on the forums: Using code tags properly
Note, you can edit your post to include it.
the type ‘Image’ is a script component. A Sprite is something that you can assign to the image.
If you’re looking to drag n drop a sprite, create a variable of type Sprite in the code, save it and then check the inspector. It should be there for you 