Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Assets/Rivet/Editor/UI/Dock/Tabs/DevelopController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void InitUI()
_lgsShowLogs = _root.Q("PlayBody").Q("ServerLogsButton");

_buildDeployButton = _root.Q("BuildDeployButton").Q<Button>("Button");
_stepsDropdown = _root.Q<DropdownField>("StepsDropdown");
_stepsDropdown = _root.Q<DropdownField>("BuildStepsDropdown");

// Callbacks
_dock.LocalGameServerManager.StateChange += OnLocalGameServerStateChange;
Expand Down Expand Up @@ -279,12 +279,12 @@ private void OnBuildAndDeploy()
}

// Run deploy with CLI using TaskPopupWindow
var task = TaskPopupWindow.RunTask("Build & Deploy", "deploy", new JObject
TaskPopupWindow.RunTask("Build & Deploy", "deploy", new JObject
{
["cwd"] = Builder.ProjectRoot(),
["environment_id"] = environmentId,
["game_server"] = deployGameServer,
["modules"] = deployModules,
["backend"] = deployModules,
});
}

Expand Down
8 changes: 4 additions & 4 deletions Assets/Rivet/Editor/UI/TaskPopup/TaskPopupWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class TaskPopupWindow : EditorWindow
private RivetTask _task;

// Events
public event Action<object> OnTaskOutput;
public event Action<object>? OnTaskOutput;

public static TaskPopupWindow RunTask(string title, string taskName, JObject taskInput)
{
Expand Down Expand Up @@ -124,14 +124,14 @@ private async void InitializeAndStartTask()
catch (Exception ex)
{
AddLogLine($"Task failed with error: {ex.Message}", LogType.STDERR);
UpdateUI();
EditorApplication.delayCall += () => UpdateUI();
}
}

private void UpdateUI()
{
bool running = _task != null && _task.IsRunning;
_doneButton.text = running ? "Cancel" : "Close";
_doneButton.text = running ? "Cancel" : "Done";
}

private void OnTaskCompleted(Result<JObject> output)
Expand All @@ -145,7 +145,7 @@ private void OnTaskCompleted(Result<JObject> output)
AddLogLine(err.Message, LogType.STDERR);
break;
}
OnTaskOutput.Invoke(output);
OnTaskOutput?.Invoke(output);

UpdateUI();
}
Expand Down
7 changes: 2 additions & 5 deletions rivet.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"server": {
"environment": {
"SERVER_HOSTNAME": "0.0.0.0"
},
"tags": {

},
"ports": {
"game": {
Expand All @@ -23,8 +20,8 @@
}
},
"resources": {
"cpu": 250,
"memory": 250
"cpu": 500,
"memory": 500
}
}
}
Expand Down