Entity references is something we've talked about a bunch of times in the past, and even did a proof-of-concept at some point (#1487).
The general idea is that sometimes you really want a component to just be a reference to an existing component in another entity (or maybe even in the same one..??!).
Consider e.g. the case of a textured Mesh3D: you might want to add an AlbedoTexture component directly to that mesh (let's say it's e.g. a Tensor under the hood) or maybe you just want to point to an existing image-like thing that's already available in another entity.
Something akin to the following:
table Mesh {
vertex_positions: [[float: 3]];
vertex_colors: [uint] (nullable);
vertex_normals: [[float: 3]] (nullable);
indices: [u32] (nullable);
albedo_texture: AlbedoTexture (nullable);
}
table AlbedoTexture {
texture: _AlbedoTexture;
vertex_uvs: [[float: 2]];
}
enum _AlbedoTexture {
entity_path: EntityPath,
tensor: Tensor,
}
No real plans yet, just something to keep in mind.
Entity references is something we've talked about a bunch of times in the past, and even did a proof-of-concept at some point (#1487).
The general idea is that sometimes you really want a component to just be a reference to an existing component in another entity (or maybe even in the same one..??!).
Consider e.g. the case of a textured
Mesh3D: you might want to add anAlbedoTexturecomponent directly to that mesh (let's say it's e.g. aTensorunder the hood) or maybe you just want to point to an existing image-like thing that's already available in another entity.Something akin to the following:
No real plans yet, just something to keep in mind.