MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / can_sync

Function can_sync

modules/multiplayer/editor/replication_editor.cpp:537–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

535}
536
537static bool can_sync(const Variant &p_var) {
538 switch (p_var.get_type()) {
539 case Variant::RID:
540 case Variant::OBJECT:
541 return false;
542 case Variant::ARRAY: {
543 const Array &arr = p_var;
544 if (arr.is_typed()) {
545 const uint32_t type = arr.get_typed_builtin();
546 return (type != Variant::RID) && (type != Variant::OBJECT);
547 }
548 return true;
549 }
550 default:
551 return true;
552 }
553}
554
555void ReplicationEditor::_add_property(const NodePath &p_property, bool p_spawn, SceneReplicationConfig::ReplicationMode p_mode) {
556 String prop = String(p_property);

Callers 1

_add_propertyMethod · 0.85

Calls 3

get_typed_builtinMethod · 0.80
get_typeMethod · 0.45
is_typedMethod · 0.45

Tested by

no test coverage detected