resource stuff
This commit is contained in:
@@ -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 { }
|
||||
Reference in New Issue
Block a user