Hi, I’ve got a quick question about the player manager. In the prefabs folder, it consists of Player Manager, then Player Data and Player as sub objects. However when running a scene Player also has sub objects; sword, sword behind, and feet. My question is what’s creating these objects / where are they coming from? Whats naming them, assigning components to them, etc? Thanks for any help and thanks for the kit.
So if I understand this right you are just asking about children GameObjects to “Player”?
Those are added manually and when you drag and drop that prefab into your scene you will be able to see more children of that GameObject. I am not 100% sure why Unity does that if you are to look at a Prefab in your Folders you will see less children rather than seeing that prefab in your scene.
But to clarify again in-case there is any confusion, I manually added them and when I dragged that to my folders to make it a prefab and it wont show all of the Children. Here is a screenshot of what I see : Screenshot 1
The screenshot above has more added to it than what you have in the Starter Kit but the idea should be similar.
Let me know if you have any other questions or need help with anything with the Kit or Unity based. 😀
That would be the script on the weapon, I have revamped that so that there is only 1 sword and we alter the sorting order based on the animation that is going to be played rather than a boolean that you select on the script to determine the Sorting Order.
So our script names wont match up but for the starter kit it will be the script that is attached to those 2 weapon GameObjects.
I see that inside the Weapon_Attack script there is the OnEnable function for loading all the values of the sword game object. I’m not understanding what is actually setting the sword object as active, which then calls OnEnable. For example if I change the name of the sword and sword behind objects to something like weapon and weapon behind, they no longer activate when hitting the attack key. I’m assuming its because what ever is activating the sword object is looking for the name “sword” in the hierarchy.
Sorry for all the questions about such a small issue, I appreciate the help.