Inside of my character blueprint, I have a replicated array that I set, I set it via an event that runs on the server. The problem is that when I try to access this variable from my client in a widget via a character reference, my array is empty. Here is how I set/modify the array:
Here is how I am getting the array:
And here is where I am setting my character reference(I set it from the client):
When printing my array length from the widget, it is 0 when printing from client, and the correct value when printing on server. What I found interesting is that if I turn off replication for my array, and just set it locally, it works fine. My understanding was that if I set my replicated array from the server, it would also set it for all clients, what am I doing wrong here?
I originally just stored this array inside of my widget, but I could not access the client’s array from the server because widgets do not replicate. It works fine if I store it in my character for replication purposes, and again in my widget, but I’d rather not have 2 variables for 1 thing.
Edit: Everything works fine for my CLIENT if I do this on both on the server and locally, but then it does not work for my server, and I’d rather not middleman it.