Files
blitzkit/src/BlitzKit.CLI/Models/Uasset.cs
T

25 lines
585 B
C#
Raw Normal View History

2025-02-01 21:21:12 -06:00
using CUE4Parse.FileProvider;
using CUE4Parse.FileProvider.Objects;
using CUE4Parse.UE4.Assets.Exports;
namespace BlitzKit.CLI.Models
{
public class Uasset
{
readonly GameFile file;
2025-02-01 21:51:43 -06:00
readonly Dictionary<string, MappedUObject> objects = [];
2025-02-01 21:21:12 -06:00
public Uasset(GameFile file, AbstractFileProvider provider)
{
this.file = file;
var objects = provider.LoadAllObjects(file.Path);
foreach (var obj in objects)
{
2025-02-01 21:51:43 -06:00
this.objects.Add(obj.Name, new(obj.Properties));
2025-02-01 21:21:12 -06:00
}
}
2025-02-01 21:51:43 -06:00
public MappedUObject Get(string name) => objects[name];
2025-02-01 21:21:12 -06:00
}
}