Because if i try to search usage of ReplicatedLooseTags its not used anywhere.
And its not virtual and not marked with ReplicatedWith so i cant change hot its replicated.
Did it work for you?
Nothing happens to me.
There is a similar meta in the BP, but it is not replicated, although it has a flag
What do you mean exactly? These are the definitions:
I’ve used loose tags before, with replication, and they work just as you’d expect
No. I Had to write my version of tag replication.
Yeah. But then.
These functions are not used anywhere else. They just add and remove tags from ReplicatedLooseTags container.
And it does not have ReplicatedUsing, so you cant override it.
And its just there. It Replicates tags but does not uses it. Those tags are not being added to main LooseTag container.
It’s really working as it should, not sure what the issue is on your side. What do you want to override? Loose tags works like regular tags, they just don’t need an effect to exist.
Just because the engine doesn’t use them it doesn’t mean that they don’t work, the functionality is there and you can use it if you want to. I know for a fact that I’ve used it, without any issues
The replication of the tags happens when the ReplicatedLooseTags
property replicates. It’s a FMinimalReplicationTagCountMap, and if you check its NetSerialize
function, you will find this:
So when the property is replicated, and the updated internal tag map of the struct is sent over the network, the received map overwrites the map that was already there, and then the UpdateOwnerTagMap()
call updates the owning Ability System Component’s tags by calling this:
So, short answer, yes, they work just as you’d expect
I wrote the same logic as you.
And it doesn’t work.
Do you have an Ability System Component located in a character or in a player state?
What version of the engine?
There is one more oddity.
When I have only 1 client, then tee is added only to the server.
and when there are 2 clients, then when you click on add a tag on 1 client, the tag will be added to the second client
The example I showed was launcher 5.0.3, and the character did have an ability system component, but I’m also using them in another project with a custom engine build and the ASC being in the player state. I can do some more tests with more clients soon
Looks like you’re right. May be it was a mistake on my side somewhere. Because tags were not being added to LooseTag container from ReplicatedTags. Although cant check it now. Maybe I’ll come back to this thread next time somewhen.
To be honest with you, I did encounter an issue with this that the tags were replicated to everyone but the client that called the server function. I tried to figure out why but I was not able to find why that was the case. I’m thinking of posting a question on UDN about it, because it’s really strange behavior, and I’m invested now. If I do have news I’ll post here
Yes, that’s what I’m talking about)
Give a link to the your question on UDN.
It would be great if you wrote here after you figured out the problem)
You could circumvent this by calling the add/remove functions twice, once locally and once on a server function, and it should work, but yeah it’s very weird that it doesn’t work
Alright after checking a bit more, the issue is this:
The tag map is set to not replicate to the owning client, which is what’s causing this issue. So if you remove that condition for it, like moving lines 1583 and 1584 to 1569 it should fix the issue
What is UDN?
Unreal Developer Network, it’s a premium support service by Epic
You are gorgeous!
Thank you!