Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GetObjects as fallback for instances that can't be created normally #401

Closed
wants to merge 22 commits into from

Conversation

Kampfkarren
Copy link
Member

@Kampfkarren Kampfkarren commented Feb 26, 2021

Closes #205.

TODO:

  • Everything labelled TODO 😄
  • Track and fix bug where sometimes children are duplicated - I can't actually seem to reproduce this? I think I just did something wrong locally one time...
  • Package DogeUpdate rbxm used in tests, and parent to content folder automatically
  • Remove isDebugBuild edit
  • Track and fix "Connect" button just, not showing anything? - It's a Flipper bug.
  • Test metadata
  • Fix crash when updating MeshId in *.project.json.*
  • Possibly some sort of GC for all the assets being created in filesystem.

* - This is because the serve is trying to request an update with the service its under. It tries to insert the service as a child, and then crashes. GetObjects should not be trying to create new instances when its just metadta that is different.


-- GetObjects won't help with anything that failed to remove
unappliedPatch.removed = patch.removed
-- TODO: Implement this? Do we have to?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! This is important for if a file is newly added on the filesystem

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured, just couldn't figure it out because I was using existing projects, and wasn't creating new files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied and pasted a file and...it worked perfectly? It was still under updated, not added.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, added seems to be used when modifying .project.json.

src/web/api.rs Outdated Show resolved Hide resolved
src/web/api.rs Outdated Show resolved Hide resolved
src/web/api.rs Outdated Show resolved Hide resolved
@Kampfkarren
Copy link
Member Author

Kampfkarren commented Feb 26, 2021

It's not just Connect that's not changing state...it's Settings too? Honestly clueless, will look further 🤷

@Kampfkarren
Copy link
Member Author

Oh...it's because Flipper is using PreRender now, which isn't actually enabled yet. CC @Reselim, might not want to do that yet!

@Reselim
Copy link
Contributor

Reselim commented Feb 26, 2021

Yeah, no worries. I realized that and I figured it would be okay to keep it as is as long as there isn't a new release... it seems Rojo is using the master branch though. I'll revert the change for now.

@Reselim
Copy link
Contributor

Reselim commented Feb 26, 2021

Should be all good!

@Kampfkarren
Copy link
Member Author

@LPGhatguy It appears that invalid rbxm files crash Roblox Studio, while invalid rbxmx files will simply error. I think it is better for Rojo to produce the latter for GetObjects, any thoughts?

@Kampfkarren
Copy link
Member Author

Code is all ready (except for the GC entry I added to the changelog).

I'm going to start battle testing this for my own games.

@Kampfkarren
Copy link
Member Author

Found the bug, when you create an instance in Studio then save to file, it duplicates. I don't think GetObjects has anything to do with this though, as nothing in this was GetObjects-worthy (maybe SourceAssetId?).

2021-02-27T20-26-39.mp4

@Kampfkarren
Copy link
Member Author

Kampfkarren commented Feb 28, 2021

image

I have NO idea what is going on here. This is a MeshPart that was imported through GetObjects.

Possibly related?

image

Rojo build correctly handles the size.

@Kampfkarren
Copy link
Member Author

Kampfkarren commented Mar 10, 2021

I've been looking for a while and honestly still have no clue what's up with MeshParts being funky, and am honestly worried that its just a GetObjects bug.

The visual size is what the mesh was actually modeled at (if I import that deagle normally it's that huge). The blue is the actual Size.

@LPGhatguy
Copy link
Contributor

Can you upload the model to the website and try to insert it with InsertService? Obviously this isn't quite a working solution for Rojo... probably, it might indicate whether there's a deeper issue or if this is just something funny about game:GetObjects().

@Kampfkarren
Copy link
Member Author

It's already on the website, and I can import it just fine, it just imports really big (but the part size is accurate to the model).

@Kampfkarren
Copy link
Member Author

Looks like game:GetObjects("rbxassetid://4716256451")[1].Parent = workspace imports it correctly, weird!

@Kampfkarren
Copy link
Member Author

Looks like in this implementation, refs are not being reserved.

@LPGhatguy
Copy link
Contributor

Refs are going to be tricky! We'll need to use a hybrid approach to write ref properties that fall outside the bounds of the object we use GetObjects on.

@unix-system
Copy link

So if I can understand the problem here, the Ref structure in the file format (which points to some other part of the file?) doesn't get preserved and so we lose this information. What approach can we take to solve this?

This is the primary blocker for my team using Rojo 😔 so I'd love to help out if you'd like!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abuse game:GetObjects for live-sync
5 participants