Instantiate problem

NodeCanvas Forums General Discussion Instantiate problem

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10850
    pplasto
    Participant

    i have a Prefab in Assets folder, this prefab has a blackboard, and the blackboard has a variable to linked this prefab’s child gameObject.
    and when i instantiate it, in hierarchy the blackboard variable still linked to Assets folder Prefab..

    like this:

    pict

    my spawn code is:

    my unity Version is 5.3.4f1

    Attachments:
    You must be logged in to view attached files.
    #10852
    Gavalakis
    Keymaster

    Hello,
    Wow… that’s a critical bug. Thanks!
    To fix this, please open up Blackboard.cs and in method ‘OnBeforeSerialize’, add at the very first line of the method (above #if UNITY_EDITOR) this hasDeserialized = false;
    Also, please do exactly the same in Graph.cs in the first line of it’s ‘OnBeforeSerialize’

    Thanks a lot for reporting!

    Join us on Discord: https://discord.gg/97q2Rjh

    #13092
    luis
    Participant

    This is still happening on the latest version

    #13124
    Gavalakis
    Keymaster

    Hello Luis,
    This was fixed way back in 2016 🙂 I can’t reproduce a case where this happens.
    Can you please elaborate?
    Thank you.

    Join us on Discord: https://discord.gg/97q2Rjh

    #13155
    luis
    Participant

    I noticed it is not about the blackboard, but the graph’s variables.

    1) create a new game object in scene call it “root”
    2) create a child of that game object
    2) add fsm owner component to the “root” object
    3) add state with action, “Set visibility”
    4) In the action “Set Visibiity” set the target to the child object
    5) make the “root” gameobject -> prefab
    6) Instantiate that prefab by code
    7) notice the “Set Visibility” node is chaning the prefab, and not the instance child.

    #13161
    Gavalakis
    Keymaster

    Hello again,

    I followed your steps exactly and everything works as expected. The “Instantiated” child is affected and not the prefab child.
    So, only one question remains 🙂
    What exact version of NodeCanvas and Unity are you using just to confirm?

    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.