Ask coding questions

← Back to all posts
Unity - I can't see my gun in my FPS game
Glitterpoop (14)

I'm working on a 3D FPS Shooter game in unity. I used guns from the asset store on this link:

I have a cylinder character that has a camera at its 'head' and is controlled by a character controller component. After finishing the map and the lighting and the movement stuff, i added guns from the asset. I copied one of the 'Active guns' and pasted it into my player, as the player's child. To explain this further, I first went into the asset folder and navigated to the demo scene. From the hierarchy, I literally CTRL+C copied one of the guns from the Active Guns category and CTRL+V pasted it under MYSCENE>PLAYER as a child of the player.

The problem was, that when i went into the game tab (only clicked on the tab), I could see the gun. Good. But when I play the game (pressing the play button) The gun disappears.

SixBeeps (5221)

Does it disappear from the hierarchy, or just from view?

Glitterpoop (14)

@SixBeeps It's there in the hierarchy but in the game view(play button pressed) it dissappears

SixBeeps (5221)

@Glitterpoop Is it in the hierarchy when the game is being played? It's possible that the gun deletes itself at the start of the game.

Glitterpoop (14)

@SixBeeps i fixed the problem now nvm. thanks anyway.