Skip to content
Merged
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
8 changes: 5 additions & 3 deletions Assets/Examples/LobbiesServers/Scripts/UI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ private BackendClient TEMPBackendClient()
return new BackendClient(config.BackendEndpoint);
}

private string TEMPGameVersion() {
var config = new Configuration();
return config.GameVersion;
private string TEMPGameVersion()
{
// var config = new Configuration();
// return config.GameVersion;
return "default";
}

private void Start()
Expand Down
27 changes: 27 additions & 0 deletions Assets/Rivet/Editor/Native/librivet_toolchain_ffi.dylib.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/Rivet/Editor/PluginSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static void UpdateFromPlugin()
BackendEndpoint = plugin.MainController.EnvironmentType switch
{
Rivet.UI.Screens.EnvironmentType.Local => $"http://localhost:{plugin.LocalBackendPort}",
Rivet.UI.Screens.EnvironmentType.Remote => plugin.MainController.RemoteEnvironment?.Endpoint ?? "http://localhost:6420",
Rivet.UI.Screens.EnvironmentType.Remote => plugin.MainController.RemoteEnvironmentBackend?.Endpoint ?? "http://localhost:6420",
_ => throw new System.NotImplementedException(),
};

Expand Down
30 changes: 11 additions & 19 deletions Assets/Rivet/Editor/UI/Screens/MainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public int? RemoteEnvironmentIndex
{
if (BootstrapData is { } data)
{
var idx = data.Environments.FindIndex(x => x.EnvironmentId == RemoteEnvironmentId);
var idx = data.Environments.FindIndex(x => x.Id == RemoteEnvironmentId);
return idx >= 0 ? idx : 0;
}
else
Expand All @@ -96,11 +96,20 @@ public int? RemoteEnvironmentIndex
{
if (value != null && value >= 0 && value < BootstrapData?.Environments.Count)
{
RemoteEnvironmentId = BootstrapData?.Environments[value.Value].EnvironmentId;
RemoteEnvironmentId = BootstrapData?.Environments[value.Value].Id;
}
}
}

public EnvironmentBackend? RemoteEnvironmentBackend
{
get
{
var remoteEnv = RemoteEnvironment;
return remoteEnv != null ? BootstrapData?.Backends[remoteEnv.Value.Id] : null;
}
}

public MainController(RivetPlugin window, VisualElement root)
{
_pluginWindow = window;
Expand Down Expand Up @@ -170,27 +179,10 @@ public async Task GetBootstrapData()
var data = result.Data.ToObject<BootstrapData>(); ;
BootstrapData = data;

<<<<<<< HEAD
Comment thread
NathanFlurry marked this conversation as resolved.
try
{
var data = result.Data.ToObject<BootstrapData>();
BootstrapData = data;
ExtensionData.ApiEndpoint = data.ApiEndpoint;

_developController.OnBootstrap(data);
_deployController.OnBootstrap(data);
}
catch (Exception ex)
{
RivetLogger.Error($"Exception in GetBootstrapData: {ex.Message}");
RivetLogger.Error($"Stack trace: {ex.StackTrace}");
}
=======
_developController.OnBootstrap(data);
_deployController.OnBootstrap(data);

SharedSettings.UpdateFromPlugin();
>>>>>>> 3ace6b6 (chore: re-impl deploys)
}

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion Assets/Rivet/Editor/UI/Tabs/DeployController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ void InitUI()

_environmentDropdown.RegisterValueChangedCallback(ev =>
{
_mainController.EnvironmentType = EnvironmentType.Remote;
_mainController.RemoteEnvironmentIndex = _environmentDropdown.index;
_mainController.OnSelectedEnvironmentChange();
});
Expand Down