Jump to content

moving RnD nodes


Recommended Posts

I'm attempting to update the position of RnD nodes (in game). I've been able to call the node position using "RDNode.transform.localPosition". I have tried using "RDNode.transform.localPosition.Set()" to change the position, but nothing seems to happen when that function is called. After I use the function I call the value again and print it to the screen, and it just stays the same. Any ideas how I could force it to update the node position? I know TreeEdit was able to do this (along with dragging the node), and based on the source code for TreeLoader, it was using the same "RDNode.transform.localPosition" to get the node positions.

Any ideas?

Also, I'm looking for a way to update the RnD sidebar menu. When I change info or what parts are assigned to a node, the changes do not show unless I select and deselect the node.

Link to comment
Share on other sites

Sorry, I don't see how that helps. I'm eventually going to implement dragging the nodes similar to how TreeEdit functioned, so I don't think my solution will involve ModuleManager.

Link to comment
Share on other sites

That works. Now I need to figure out how to fix the arrows. I found out how to manually remove them, but not how to re-generate them. As an alternate solution, I found that after moving a node I could click the "Rebuild Tree" button in the debug menu to fix the lines. It doesn't appear that I can call a function for that button, but I assume it uses the functions SaveTechTree(), WipeTechTree(), and LoadTechTree(). For whatever reason the first two functions work fine for me, but I cannot get it to reload a tree. The arguments for it are

RDTechTree.LoadTechTree(string filePath, System.Collections.Generic.List<RDNode> rdNodes)

I know I have the first argument correct. For the second argument I've tried the list of the nodes right before they were wiped, the reference "RDController.Instance.nodes" (which is empty after the wipe), and I've even tried sending it an empty list. All produce the same result. They load the start node with max scale and no picture, and nothing else.

Any ideas what the second argument should be?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...