From eaa960f7aa7170511b0459e5151478bfffff85ca Mon Sep 17 00:00:00 2001 From: lucaw Date: Tue, 13 Aug 2024 11:08:36 -0700 Subject: [PATCH] Adding the CreateRuntimeAssets function back that was lost in merge 3e66d4354bcee315dff5aca4eee98ba410f62dc8 --- .../Assets/Scripts/BaseFPSAgentController.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/unity/Assets/Scripts/BaseFPSAgentController.cs b/unity/Assets/Scripts/BaseFPSAgentController.cs index 2d8ce92c60..0246f6a67e 100644 --- a/unity/Assets/Scripts/BaseFPSAgentController.cs +++ b/unity/Assets/Scripts/BaseFPSAgentController.cs @@ -7960,6 +7960,32 @@ public ActionFinished CreateRuntimeAsset( return new ActionFinished(success: true, actionReturn: assetData); } + public class UnityLoadableAsset { + public string id; + public string dir; + public string extension = ".msgpack.gz"; + + public ObjectAnnotations annotations = null; + } + + public ActionFinished CreateRuntimeAssets( + List assets, + string dir = null + ) { + foreach (var asset in assets) { + var actionFinished = CreateRuntimeAsset( + id: asset.id, + dir: dir ?? asset.dir, + extension: asset.extension, + annotations: asset.annotations + ); + if (!actionFinished.success) { + return actionFinished; + } + } + return ActionFinished.Success; + } + public void GetStreamingAssetsPath() { actionFinished(success: true, actionReturn: Application.streamingAssetsPath); }