|
|
@ -85,7 +85,7 @@ pub fn Entity(comptime ctx: anytype) type { |
|
|
|
/// To set their values you'll need to use `set(...)` on the |
|
|
|
/// To set their values you'll need to use `set(...)` on the |
|
|
|
/// `Entity` returned from this function. |
|
|
|
/// `Entity` returned from this function. |
|
|
|
pub fn init(world: *World(ctx), config: Config, ids: anytype) !Self { |
|
|
|
pub fn init(world: *World(ctx), config: Config, ids: anytype) !Self { |
|
|
|
const meta = @typeInfo(@TypeOf(add)); |
|
|
|
const meta = @typeInfo(@TypeOf(ids)); |
|
|
|
if (meta != .Struct or (meta.Struct.is_tuple == false and meta.Struct.fields.len > 0)) |
|
|
|
if (meta != .Struct or (meta.Struct.is_tuple == false and meta.Struct.fields.len > 0)) |
|
|
|
@compileError("Expected tuple or empty struct, got '" ++ @typeName(@TypeOf(ids)) ++ "'"); |
|
|
|
@compileError("Expected tuple or empty struct, got '" ++ @typeName(@TypeOf(ids)) ++ "'"); |
|
|
|
if (meta.Struct.fields.len > c.FLECS_ID_DESC_MAX) |
|
|
|
if (meta.Struct.fields.len > c.FLECS_ID_DESC_MAX) |
|
|
|