Hello - I’m trying to understand if script object attributes are replicated to clients. I would think by default they are - as AM_DEFAULT includes AM_FILE and AM_NET. However, the wiki says the following:
“Network replication of the script object variables must be handled manually by implementing WriteNetworkUpdate() and ReadNetworkUpdate() methods, that also write and read a binary buffer. These methods should write/read all replicated of variables of the object. Additionally, the ScriptInstance must be marked for network replication by calling MarkNetworkUpdate() whenever the replicated data changes. Because this replication mechanism can not sync per variable, but always sends the whole binary buffer if even one bit of the data changes, also consider using the automatically replicated node user variables.”
From my understanding the member variables of an angelscript class that inherits from ScriptObject will have all of its members that can be converted to a Variant and that don’t start with an underscore automatically registered as attributes.
So… are these attributes replicated to clients when the ScriptObject and owning node are created in REPLICATED mode?
Also… out of curiosity, what happens if a node is created in LOCAL mode and components for it are created in REPLICATED mode?
Thanks for your time