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

Enable setting NetworkVariable with&without invoking OnValueChanged. #1185

Closed
babaq opened this issue Jan 25, 2024 · 1 comment
Closed

Enable setting NetworkVariable with&without invoking OnValueChanged. #1185

babaq opened this issue Jan 25, 2024 · 1 comment
Labels
type:feature New feature or request

Comments

@babaq
Copy link

babaq commented Jan 25, 2024

Is your feature request related to a problem? Please describe.
The default behavior of updating NetworkVariable was that the new value should be different than old value, but sometimes we want the OnValueChanged to be invoked no matter it's same or not. And in another case, we want to set NetworkVariable value without invoking OnValueChanged.

Describe the solution you would like:
Add a member function:

public void SetValue<T>(T value, bool notify)

notify==true means no matter whether new value equals old value, we always invoke OnValueChanged.
notify==false means no matter whether new value equals old value, we don't invoke OnValueChanged.

@babaq babaq added the type:feature New feature or request label Jan 25, 2024
@jabbacakes
Copy link
Collaborator

Thank you for making this feature request ^_^ I've forwarded it to the development team to consider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants