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.Resources;
/// <summary>
/// A sample component demonstrating how to use strongly-typed asset references
/// in a realistic scenario where an entity requires multiple distinct resources.
/// </summary>
public struct SampleMeshVisualComponent
{
// The user safely assigns a Mesh GUID in the Editor inspector.
public TypedAssetReference<Shader> VertexShader;
// The user safely assigns a Material GUID in the Editor inspector.
public TypedAssetReference<Shader> FragmentShader;
public SampleMeshVisualComponent(Guid vertexId, Guid fragId) {
VertexShader = new TypedAssetReference<Shader>(vertexId);
FragmentShader = new TypedAssetReference<Shader>(fragId);
}
}