mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Use asset pipeline for blocking asset loading, remove old texture loader
This commit is contained in:
@@ -4,14 +4,21 @@ namespace GlitchyEngine.Content;
|
||||
|
||||
public class AssetIdentifier
|
||||
{
|
||||
public const String ResourcesPrefix = "Resources/";
|
||||
public const String AssetsPrefix = "Assets/";
|
||||
|
||||
private String _fullIdentifier ~ delete:append _;
|
||||
|
||||
private bool _isResource;
|
||||
|
||||
private int _subassetSeperator;
|
||||
|
||||
public StringView FullIdentifier => _fullIdentifier;
|
||||
public StringView AssetIdentifier => _subassetSeperator > 0 ? StringView(_fullIdentifier, 0, _subassetSeperator) : _fullIdentifier;
|
||||
public StringView SubassetIdentifier => _subassetSeperator > 0 ? StringView(_fullIdentifier, _subassetSeperator + 1) : .();
|
||||
|
||||
public bool IsResource => _isResource;
|
||||
|
||||
[AllowAppend]
|
||||
public this(StringView assetIdentifier)
|
||||
{
|
||||
@@ -21,6 +28,8 @@ public class AssetIdentifier
|
||||
Fixup(_fullIdentifier);
|
||||
|
||||
_subassetSeperator = _fullIdentifier.IndexOf(':', 0);
|
||||
|
||||
_isResource = _fullIdentifier.StartsWith(ResourcesPrefix);
|
||||
}
|
||||
|
||||
[AllowAppend]
|
||||
|
||||
Reference in New Issue
Block a user