Ammo changing between guns
Im somewhat new to C# and Unity. I followed the Brackeys tutorial for making guns with raycasts and for weapon switching. I added reloading and sounds and ammo with an ammo counter by myself and the weapon switching works fine. I was having issues with my ammo counter though. I have a default for ammo set at 25. When I hit R it sets the ammo back to 25 which is the default I set for one gun, but for the other, I set the default to 8 in the object editor under my Gun script, but since it's the same script it resets the ammo to 25 for the second gun, even though I want it to be 8. Is there a way I can find the variable I set in the editor and reference it in the script? Sorry if that doesn't make sense. I can also provide screenshots of what I am trying to say if needed. Thanks!