resource stuff

This commit is contained in:
max
2026-04-28 19:17:23 +02:00
parent fec2cd8d24
commit 059638e6e0
9 changed files with 386 additions and 45 deletions
@@ -0,0 +1,19 @@
namespace Nerfed.Runtime;
/// <summary>
/// Attach this component to an entity mapped to raw source-path strings.
/// Useful for testing, hardcoded assets, or before full editor-guided GUID injection.
/// </summary>
public readonly record struct AssetReferenceComponent(Guid AssetId);
/// <summary>
/// A strongly-typed version of an asset reference, preventing the user from accidentally
/// assigning a Shader GUID to a Texture component in the Editor.
/// </summary>
public readonly record struct TypedAssetReference<TRes>(Guid AssetId) where TRes : Resource;
/// <summary>
/// Added to an entity by the AssetStreamingSystem when the physical resource is fully
/// loaded in memory and ready to be used by the renderer or physics engine.
/// </summary>
public struct AssetLoadedTag { }