-
Notifications
You must be signed in to change notification settings - Fork 0
Singleton safe getter #119
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
base: develop
Are you sure you want to change the base?
Conversation
LouisNillusFC
left a comment
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @rascar-capac)
MaxDaniels
left a comment
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @rascar-capac)
fishingcactus-nathan-istace
left a comment
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @rascar-capac)
lucas-baran
left a comment
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @rascar-capac)
This hasn't been tested but I just wanted to have your opinion on it.
TryGetInstance()can be called instead of usingHasInstancebefore getting the instance.The main benefit is that we can actually use the
FindObjectOfTypein the getter and fetch any instance present in the scene before theAwakeis called.The workaround we used on Corsairs was to change the script execution order, but I find this more convenient.
I'll test it and update the version if you find it useful.
This change is