-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow components to store any datatype #138
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't had time to read the full changes yet. I have gotten to some of the central changes though.
Could you also update the description of the PR with a brief description of how this PR achieves what it says in the title in case anyone looks back at it later? |
Updated the description. |
@LastTalon, I started updating the docs but I'm still not sure what to call everything. As it stands, the docs for |
How so? It seems to me like it does. |
Well, it can return a |
This doesn't seem complicated to me. We clearly just have two types of component instance now. What else would have you it return? It seems to me it returns a |
Just updated the docs to what I believe they could potentially look like. Curious if this is what you had in mind. |
This PR adds support for non-table components. Calling
Components.Model(model)
will return a table that has a special marker on it that tells theWorld
it should be unwrapped on insertion. I explicitly chose this strategy because it means that we can do not need to store this table in archetypes.Unfortunately, we still need to store
Components.Model(model)
initially inside of a table because we need a way to get the component ID and Luau does not have tuples.