mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-22 11:17:05 +02:00
26 lines
585 B
C#
26 lines
585 B
C#
using CUE4Parse.FileProvider;
|
|
using CUE4Parse.FileProvider.Objects;
|
|
using CUE4Parse.UE4.Assets.Exports;
|
|
|
|
namespace BlitzKit.CLI.Models
|
|
{
|
|
public class Uasset
|
|
{
|
|
readonly GameFile file;
|
|
readonly Dictionary<string, MappedUObject> objects = [];
|
|
|
|
public Uasset(GameFile file, AbstractFileProvider provider)
|
|
{
|
|
this.file = file;
|
|
var objects = provider.LoadAllObjects(file.Path);
|
|
|
|
foreach (var obj in objects)
|
|
{
|
|
this.objects.Add(obj.Name, new(obj.Properties));
|
|
}
|
|
}
|
|
|
|
public MappedUObject Get(string name) => objects[name];
|
|
}
|
|
}
|