Use provider UI handle for Unity commands
This commit is contained in:
parent
d3d67ecb56
commit
ae3c1f9ff2
5 changed files with 37 additions and 15 deletions
|
|
@ -93,6 +93,18 @@ public static class AetheriaUnityRuntimeClientProvider
|
|||
return RuntimeClient(stateBoot, runtimeId).Control;
|
||||
}
|
||||
|
||||
public static AetheriaUi Ui(string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(runtimeId).Ui;
|
||||
}
|
||||
|
||||
public static AetheriaUi Ui(
|
||||
AetheriaRuntimeStateBootReport stateBoot,
|
||||
string runtimeId = "")
|
||||
{
|
||||
return RuntimeClient(stateBoot, runtimeId).Ui;
|
||||
}
|
||||
|
||||
public static CultMeshReactiveDocument<TDocument> Reactive<TDocument>(string runtimeId = "")
|
||||
where TDocument : class
|
||||
{
|
||||
|
|
|
|||
|
|
@ -344,8 +344,8 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
try
|
||||
{
|
||||
var submitted = AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeClient(RequireLocalStateBoot(), "unity-input-screen")
|
||||
.Ui.InputSettingsAsync(command, body, "unity-input-screen")
|
||||
.Ui(RequireLocalStateBoot(), "unity-input-screen")
|
||||
.InputSettingsAsync(command, body, "unity-input-screen")
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
|
|
|
|||
|
|
@ -428,8 +428,8 @@ public class MainMenu : MonoBehaviour
|
|||
try
|
||||
{
|
||||
var submitted = AetheriaUnityRuntimeClientProvider
|
||||
.RuntimeClient(stateBoot, "unity-main-menu")
|
||||
.Ui.SurfaceCommandAsync(request, "unity-main-menu")
|
||||
.Ui(stateBoot, "unity-main-menu")
|
||||
.SurfaceCommandAsync(request, "unity-main-menu")
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
|
|
|
|||
|
|
@ -1079,13 +1079,13 @@ private void Update()
|
|||
|
||||
try
|
||||
{
|
||||
var client = AetheriaUnityRuntimeClientProvider.RuntimeClient("unity-inventory");
|
||||
var loadout = CreateLoadoutTemplate(targetEntityKey);
|
||||
if (loadout?.RootEntity == null || string.IsNullOrWhiteSpace(loadout.RootEntity.Hull?.ItemKey ?? ""))
|
||||
return;
|
||||
|
||||
var submitted = client
|
||||
.Ui.SaveLoadoutTemplateAsync(loadout, "unity-inventory")
|
||||
var submitted = AetheriaUnityRuntimeClientProvider
|
||||
.Ui("unity-inventory")
|
||||
.SaveLoadoutTemplateAsync(loadout, "unity-inventory")
|
||||
.GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue