How to show string in explorer? #882
Answered
by
SanderMertens
ThomasBrixLarsen
asked this question in
Q&A
-
I thought it would be something like this: struct Test
{
const char *test = "test";
};
world.component<Test>().member<const char *>("test"); But it only shows a single char in explorer and so far the char it has shown has never been one of 't', 'e', 's', or 't'. I was using newest master (e55fdc2) for the test. |
Beta Was this translation helpful? Give feedback.
Answered by
SanderMertens
Dec 13, 2022
Replies: 1 comment
-
The reason this happens is that the pointer is removed from the component declaration. To register a string member, do: world.component<Test>().member(flecs::String, "test"); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ThomasBrixLarsen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The reason this happens is that the pointer is removed from the component declaration. To register a string member, do: