You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a game is running and calls Net.CreateDefinitions then Events are created under the net.out._NetManagedInstance
When starting a rojo server using a "$path" to load dependencies including rbx-net, the rojo server creates a DataModel with a net.outInstance 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 _NetManagedInstance 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.
The text was updated successfully, but these errors were encountered:
Problem
When a game is running and calls
Net.CreateDefinitions
thenEvent
s are created under thenet.out._NetManaged
Instance
When starting a rojo server using a
"$path"
to load dependencies including rbx-net, the rojo server creates aDataModel
with anet.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
Instance
s currently in the game with the ones the server knows about. This removes theEvent
s created byNet.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 contentsthe previous setup will keep the
Event
s created byNet.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.
The text was updated successfully, but these errors were encountered: