Skip to content

Commit

Permalink
Adding the CreateRuntimeAssets function back that was lost in merge 3…
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucaweihs committed Aug 13, 2024
1 parent 07445be commit eaa960f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions unity/Assets/Scripts/BaseFPSAgentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<UnityLoadableAsset> 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);
}
Expand Down

0 comments on commit eaa960f

Please sign in to comment.