Author Topic: Add DataNode to DataNode?  (Read 2166 times)

col000r

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 3
  • Posts: 43
  • Mighty Emperor of Planet "Home Office"
    • View Profile
    • BLACKISH
Add DataNode to DataNode?
« on: June 15, 2016, 10:35:06 AM »
Is there a way to add DataNodes to other DataNodes as values?
If I use SetHierarchy to create the whole DataNode I can then iterate through the entire thing and get DataNodes for all my branches and iterate through those, BUT if I create individual DataNodes and then add those to the main DataNode (node.AddChild( "blah", otherNode ) this doesn't work. What am I doing wrong?
Games: BLACKISH | Blog | Assets

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Add DataNode to DataNode?
« Reply #1 on: June 16, 2016, 04:38:53 AM »
Yes. DataNode.ReplaceChild.

col000r

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 3
  • Posts: 43
  • Mighty Emperor of Planet "Home Office"
    • View Profile
    • BLACKISH
Re: Add DataNode to DataNode?
« Reply #2 on: June 17, 2016, 08:40:08 AM »
Thank you very much!
Games: BLACKISH | Blog | Assets