forked from rojo-rbx/rojo
@@ -182,6 +182,13 @@ function App:didMount()
|
|||||||
preloadAssets()
|
preloadAssets()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function App:willUnmount()
|
||||||
|
if self.currentSession ~= nil then
|
||||||
|
self.currentSession:disconnect()
|
||||||
|
self.currentSession = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function App:didUpdate()
|
function App:didUpdate()
|
||||||
local connectActive = self.state.sessionStatus == SessionStatus.ConfiguringSession
|
local connectActive = self.state.sessionStatus == SessionStatus.ConfiguringSession
|
||||||
or self.state.sessionStatus == SessionStatus.Connected
|
or self.state.sessionStatus == SessionStatus.Connected
|
||||||
|
|||||||
@@ -4,10 +4,6 @@ end
|
|||||||
|
|
||||||
local Roact = require(script.Parent.Roact)
|
local Roact = require(script.Parent.Roact)
|
||||||
|
|
||||||
Roact.setGlobalConfig({
|
|
||||||
elementTracing = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
local App = require(script.Components.App)
|
local App = require(script.Components.App)
|
||||||
|
|
||||||
local app = Roact.createElement(App, {
|
local app = Roact.createElement(App, {
|
||||||
@@ -16,4 +12,6 @@ local app = Roact.createElement(App, {
|
|||||||
|
|
||||||
Roact.mount(app, game:GetService("CoreGui"), "Rojo UI")
|
Roact.mount(app, game:GetService("CoreGui"), "Rojo UI")
|
||||||
|
|
||||||
-- TODO: Detect another instance of Rojo coming online and shut down this one.
|
plugin.Unloading:Connect(function()
|
||||||
|
Roact.unmount(app)
|
||||||
|
end)
|
||||||
Reference in New Issue
Block a user