mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Use real Rojo metadata for live sync
This commit is contained in:
parent
e6ba6203bb
commit
fc01eecdcb
3 changed files with 50 additions and 28 deletions
|
|
@ -111,16 +111,15 @@ impl ApiService {
|
|||
let message_cursor = message_queue.cursor();
|
||||
|
||||
let tree = self.serve_session.tree();
|
||||
let inner_tree = tree.inner();
|
||||
|
||||
let mut instances = HashMap::new();
|
||||
|
||||
for id in requested_ids {
|
||||
if let Some(instance) = inner_tree.get_instance(id) {
|
||||
instances.insert(id, Instance::from_rbx_instance(instance));
|
||||
if let Some(instance) = tree.get_instance(id) {
|
||||
instances.insert(id, Instance::from_rojo_instance(instance));
|
||||
|
||||
for descendant in inner_tree.descendants(id) {
|
||||
instances.insert(descendant.get_id(), Instance::from_rbx_instance(descendant));
|
||||
for descendant in tree.descendants(id) {
|
||||
instances.insert(descendant.id(), Instance::from_rojo_instance(descendant));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue