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

Connecting a running game to a rojo server deletes events #85

Open
xeqi opened this issue Feb 20, 2023 · 1 comment
Open

Connecting a running game to a rojo server deletes events #85

xeqi opened this issue Feb 20, 2023 · 1 comment

Comments

@xeqi
Copy link

xeqi commented Feb 20, 2023

Problem

When a game is running and calls Net.CreateDefinitions then Events are created under the net.out._NetManaged Instance

When starting a rojo server using a "$path" to load dependencies including rbx-net, the rojo server creates a DataModel with a net.out Instance without the events, as it only knows about what is on the filesystem.

If I attempt to connect a running game to that running rojo server using the rojo plugin, the plugin(?) will overwrite the runtime Instances currently in the game with the ones the server knows about. This removes the Events created by Net.CreateDefinitions.

Then event handlers in the game no longer work.

Workaround

When go into my dependency tree and add a file net/out/init.meta.json with contents

{"ignoreUnknownInstances": true}

the previous setup will keep the Events created by Net.CreateDefinitions, as rojo will ignore the _NetManaged Instance when updating. Then I can use the rewire library to hot reload code as desired.

Potential Fix

Adding this file to the repo might be a solution, but I have not given proper consideration to the ramifications of leaving old events around, and how such a choice could conflict with the intentional design decision mentioned in #78.

@Vorlias
Copy link
Member

Vorlias commented May 16, 2023

This'll be adjusted in 3.1, will end up moving the remotes back to ReplicatedStorage but under a versioned folder instead.

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

No branches or pull requests

2 participants