How can I create objects on the server from UMG blueprints?
I'm trying to create a UI that allows the user to stack UMG widgets and based on the stack it will create something different. The thing I'm trying to create is essentially a tree structure with many different possible nodes and subtrees. My intention was to take the stack and iterate through the widgets to build the tree, however this only works on the listen server. All the objects created on clients are null. This aligns with how I understand replication, but now I'm unsure how to solve my problem. I've tried a few things but these were the two big ideas I couldn't find success with:
Anything I construct using the "Construct object from class" blueprint function is null when passed to the server from the clients. As far as I can tell, UMG can only exist on the client.
This works in a basic sense of creating objects, but I can't return them to the function that called it. I need to be able to connect nodes to build the tree, so this is either insufficient or I don't know how to do it well enough. I could maybe pass by reference and assign that way but I worry about undefined behaviour because I don't know what order the function calls will complete in, and I run the risk of hitting null pointers.
I'm a bit at a loss. Is what I want possible with Slate C++?
asked Jun 13 '18 at 12:10 AM in Blueprint Scripting
Follow this question
Once you sign in you will be able to subscribe for any updates here