Im trying to figure out how to see the variables for actors set on the server side say in something like the world outliner. I have been trying to wrap my head around replication and how to take predictive measures when doing something client side. So to say if the client picks up an object to put in their inventory from what I have gathered it is best to do the bare minimum client side. So mostly client side do the visuals then do the rest of the heavy lifting server side like actually setting the variables and replicating them back to the client if need be. However I keep running into problems especially trying to keep down on how much the server and client have to pass information. So I was trying a simple test to see where variables are set and how to manipulate them using say switch has authority, Is locally controlled, Is server, etc.
A fairly simple test but unless I set the test variable to replicated the listen server only sets the server side and not its copy on the client side. The problem I run into is when I click on the character in the world outliner it seams to only show me the client side versions of actors. This makes it hard to fully grasp for me at least were variables are being set and I have to do some blueprint voodoo to get feedback on them.
What im wondering is can I see both versions of an actor and see real time that these variables are changing. I tried going to the blueprint and sifting through the debug filter but it doesn’t seam to tell me that the variable changed. So I dont know why they would only show the client side version of assets in the world outliner that seams a bit odd. I also haven’t tried more than 2 players on a listen server so the host and 1 client.
If anyone has an idea how I might have an easier time monitoring variables as they change on all versions of an actor that would be most helpful. Also I have done a bit of research using that replication compendium as well as searching for documentation and posts to gather the best way to handle information. I just seam to still get deadzones because I cant keep track of who has the info and I dont believe I should have to write debug test code like this to find them.
It’s possible to debug either client or server while running in the editor. If you open the blueprint you would like to debug and hit Play, you’ll see two dropdowns in the toolbar, the first one allowing you to choose the world (client or server), and the second the specific blueprint instance that you would like to debug:
As mentioned in the [docs][3], when All Worlds is chosen then break points in any of all server and client worlds will be triggered.
In addition, to monitor specific variables you can add them to the [Watch Window][4] where their values can be displayed, but only when execution is paused (for example when hitting a break point).
In order to continuously monitor a variable in real time like you requested, a little trick you can use is to keep printing the value of that variable inside your blueprint’s tick function but to specify a value of 0 for the print duration, which will continuously print the updated value neatly in the same location :
Unreal’s print functionality conveniently adds a Server or Client# prefix to the printed message which lets you know which blueprint’s variable you’re printing, like this:
Edit: To be able to choose actors from a specific world to inspect in the World Outliner, look under the View Options dropdown on the bottom right of this panel:
Alrighty most of this I already fairly knew except the watch window that could be really useful. What I was trying to get at is the world outliner like when you make a variable instance editable. You can change that variable in the world outliner when you click on the object. However this only sets the variable client side and in my example when you click the debug key (I set this to Z) in the world outliner you can only see the client side version of this.
Also the debug filter say I only set the variable server side. I set the filter to listen server and the first thing in the list of what to debug. If I click on the variable it wont show it up to date I have to hover over either the out pin coming from the variable or the in pin of what it’s going into to see the value passed.
Being able to see all instances of an actor in my opinion like you can see the client side versions in the world outliner; would be so so so much easier and I feel like you would have so much more control.