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 SetUi to shared ui system #5092

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

Conversation

deltanedas
Copy link
Contributor

evil refactor removed it

@deltanedas
Copy link
Contributor Author

@metalgearsloth

@deltanedas deltanedas changed the title re-add AddUi add SetUi to shared ui system May 1, 2024
@deltanedas
Copy link
Contributor Author

@metalgearsloth a

Comment on lines +918 to +919
if (!Resolve(ent, ref ent.Comp, false))
ent.Comp = AddComp<UserInterfaceComponent>(ent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use the normal EnsureComp?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if its cuz of the cursed Entity<> edge case, just do var comp = ensure(ent.Owner) and access it that way

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensurecomp wont check if uid == comp.Owner i think, doing resolve does

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.

None yet

3 participants