Some objects don't replicate by default and return None

Hello,

I have noticed that some objects don’t replicate by default. For example, when you create a child class to the Uobject class and try to replicate it, it is going to return None every time the server sends it to the client. Also, I remember using drag and drop operations and they wouldn’t replicate, so I had do send each variable separately to get a not-NULL value after a RPC call.
I found a solution online ([C++] Variable gets set to null if replicated to owning client using a function - #2 by Jackblue) for when you create your own class to have it replicate which consists on making a base c++ class for it, adding
virtual bool IsSupportedForNetworking();
to it and make it return true.
I wonder why this is not specified anywhere even though it can block people’s progression and feels like a weird bug the first time you come across it with only one topic casually mentioning it, with only a c++ solution to it.
Is there a way to know which object it is possible to replicate without having to look for the function IsSupportedForNetworking(); in the engine source ?

Correct, UObjects aren’t supported for networking by default, and I don’t know any built-in UObject derivative class (i.e. classes that are prefixed with U) that has support for replication. Shouldn’t take you more than a couple of seconds to look in the source code, to figure that out.

Also, this is the full post that explains how to replicate UObjects: Replicating UObjects: Building a Flexible Inventory System – James Baxter

1 Like

Sorry for the late answer. Thank you very much for that ! It is the kind of knowledge that is never easy to find online. As I mentioned, I already found a way around but if I come to the same problem in the future, I will know how to do.
Cheers