Calling RPC functions from inside UObjects, Is it possible?

So say i have an actor that contains a uobject class within itself, and this uobject is properly replicated around along with the actor itself is also replicated.

I managed to do variable replication of the uobject variables ( thankfully ) BUT what i want along with the variable replication is the uobject itself calls a function that will be run on server ( for validation purposes ) instead of me needing to use the actor that owns it to run a server call. Any help is appreciated

Thanks in advance!

It should work. You should, technically, be able to run an RPC on any replicated object that the player owns.

Sorry for the late reply, i kinda tried this on my side although the debugging is telling me that even though I’m requesting to the server the client is doing it. The server never actually runs it unless i ask the actor to do the server function

The client should never run a server rpc. Are you sure it was the client? How did you tell?

Thas why i was rather perplexed, it shouldn’t even be possible, though i ran simple debug which runs GetNetMode() on that function. if i were to call from the Actor i get a true for server, but if i were to call it internally from the object, it says client

In the current ue4 model, only APlayerControllers on clients can make RPC calls. You may wish to consider a different approach.
More here Networking RPC (client -> server) & Ownership - Programming & Scripting - Epic Developer Community Forums

I’ve set up my UObject derived class properly (like recomended here). And property replication works good, BUT I can’t call RPC on this object. On server side I’ve tried to call method marked as UFUNCTION(NetMulticast, Reliable). And it didn’t work.
When I rederived this my class from UActorComponent instead of simple UObject, this method started work.
What have I missed? Why didn’t it work?
(I’ve post this as separate question)