In my game I have a ball (The player) with i want to make skins to. At the moment I’m able to change the material of my prefab player. and the next step is to give the player a hat. I have done research but I’m not able to find the answer!
My player is made out of a GameObject called Player that is the parent to 4 other GameObjects.
The GameObject Player has a Sphere Collider, a Rigidbody and my Player Movement script.
The 4 child GameObjects of my Player GameObject is:
- Trail (Not used yet)
- Color (Switching between colors via materials)
- Face (Not used yet)
- Hat (My Problem)
I’m trying to modify my Player prefab so that the user can select a hat that then will go via script and connect a hat prefab and child it under the Hat GameObejct.
My Player Prefab + My TopHat Prefab = Player with TopHat Prefab
The way is want it to work (which i hope is possible) is that using my SkinsMenu. you can choose from an array of pictures (which works) and then you click the button “Choose Hat” then the code should do something like this:
Picture = number
number = hat
give the player hat[number]
If there are missing some information just tell me and I will find and post it!
Thanks for all the help I can get!
Sorry if this is a duplicate (I tried reseaching alot!)
(First time posting, hope I done it right)