This topic contains 6 replies, has 2 voices, and was last updated by  jhand 1 year, 4 months ago.

  • Author
    Posts
  • #1737

    jhand
    Participant

    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.

    #1739

    Joey Lubonty
    Moderator

    Hey jhand,

    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. 😀

    Joey,
    Troll Bridge Studios

    • This reply was modified 1 year, 4 months ago by  Joey Lubonty.
    • This reply was modified 1 year, 4 months ago by  Joey Lubonty.
    #1742

    jhand
    Participant

    I would have never thought of that, thanks for the help. As a follow up question, what is setting the sword or sword behind object as active when the attack key is pressed?

    #1743

    Joey Lubonty
    Moderator

    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.

    Example Screenshot to give you a better visual : Screenshot Help

    Let me know if you have any other questions :D.

    Joey,
    Troll Bridge Studios

    #1744

    jhand
    Participant

    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.

    #1745

    Joey Lubonty
    Moderator

    OK I think I know what you referring to now. This is happening due to “Animation” tab.

    Here is a screenshot to help out a bit : Screenshot to help explain the Animation Tab

    Never apologize for asking questions 🙂 as I wont shame you or anyone for wanting to gain knowledge of anything. Feel free to ask away and I will do my best to get back to you in a timely manner.

    Joey,
    Troll Bridge Studios

    #1746

    jhand
    Participant

    That’s exactly what I was looking for, thanks for everything.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.