Announcement

Collapse
No announcement yet.

How to set UK2Nodes' UPROPERTIES from inside Project Settings?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to set UK2Nodes' UPROPERTIES from inside Project Settings?

    Hello!

    First of all, thanks for being such an amazing and inspiring community!

    I created a custom UK2Node with a set of UPROPERTIES. These UPROPERTIES can be edited using my node's details panel. Everything is working fine!

    Now, here's my issue: In addition to this details panel, I would like to allow users to modify my nodes' UPROPERTIES inside the Project Settings (for this purpose, I have a settings page that lists all custom UK2Node used in the project). As a result, any change made in this settings page would be propagated back to the node's details panel.

    Would you have any thoughts on how to implement this?

    PS: I tried to keep pointers to my nodes inside the settings page and use these pointers to update my nodes whenever updates occurred. Unfortunately, while the UPROPERTIES are initially updated, the update is lost as soon as the nodes are compiled or saved. Maybe I'm missing something here?

    #2
    Finally got it working! Yey!

    My overall approach was fine, but I was using the wrong pointers!

    At first, I was using the pointers provided by my UK2Node instances (using 'this'). These pointers did not work for my purposes. While the UPROPERTIES were initially updated, updates were lost as soon as the nodes were compiled or saved.

    Instead, everything worked fine when I started using the pointers queried via the FAssetRegistryModule. The approach is a bit more convoluted, but worked great for me!

    While my problem is solved, there is one thing I still don't understand: Why the 'this' pointers from my UK2Node instances didn't allow me to modify the nodes permanently?

    Thoughts would be welcomed!

    Comment

    Working...
    X