Skip to content
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

Add public property Id to world. #192

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AustinSmith13
Copy link

Added a public accessor to the internal world id. This is needed by our project so our extension methods can operate in a non global way.

@nrader95
Copy link
Contributor

nrader95 commented Mar 1, 2024

Probably better to make it as GetHashCode() override instead of standalone property, the same way its done on entities.

@AustinSmith13
Copy link
Author

AustinSmith13 commented Mar 1, 2024

@nrader95 I've updated this to use GetHashCode(), It also makes me wonder if this is really needed. I'm pretty new to this Library and so it wasn't obvious to me that I could add a world component to achieve the same thing. Although it may be useful to newcomers to have a simple way to grab a unique id without having to create a component that must be managed by them.

@nrader95
Copy link
Contributor

nrader95 commented Mar 2, 2024

I mean, standalone property is not needed. At all.
You just return World-Id when calculating GetHashCode and call it a day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants