Advertisement
acegiak

Untitled

Mar 26th, 2023
1,638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     var syncs = node.find_children("*","MultiplayerSynchronizer",true,false)
  2.     if syncs.size()<=0:
  3.         push_warning("Trying to pack node with no sync",node)
  4.         return
  5.     var sync = syncs[0]
  6.     if not sync is MultiplayerSynchronizer:
  7.         push_warning("Trying to pack node with non-sync sync??",node)
  8.         return
  9.     root = sync.root_path
  10.     var root_node = sync.get_node(root)
  11.    
  12.     var config:SceneReplicationConfig = sync.replication_config
  13.     for property in config.get_properties():
  14.         var property_value = root_node.get_node(property).get_indexed(property.get_as_property_path())
  15.         properties[property] = property_value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement