-
-
Notifications
You must be signed in to change notification settings - Fork 543
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Using example from https://www.flecs.dev/flecs/md_docs_2FlecsScript.html#component-values
To Reproduce
struct Level {
width = i32
depth = i32
}
struct Grid {
x = i32
y = i32
}
Game {
Level : {5, 7}
}
const level: Game[Level]
grid1 {
Grid: { $level.width, $level.depth }
}
/*
A script can use the value of a component that is looked up on a specific entity.
The following example fetches the width and depth members from the Level component, that is fetched from the Game entity:
error: script1.flecs: 22: cannot cast identifier 'Game' to flecs.meta.i32
Grid: { Game[Level].width, Game[Level].depth }
*/
grid2 {
Grid: { Game[Level].width, Game[Level].depth }
}
Expected behavior
In grid2 entity it should evaluate component value of width and depth.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working