Title: Add two separate methods to `NetworkVariable` as supplements to `Value` property · Issue #3184 · Unity-Technologies/com.unity.netcode.gameobjects · GitHub
Open Graph Title: Add two separate methods to `NetworkVariable` as supplements to `Value` property · Issue #3184 · Unity-Technologies/com.unity.netcode.gameobjects
X Title: Add two separate methods to `NetworkVariable` as supplements to `Value` property · Issue #3184 · Unity-Technologies/com.unity.netcode.gameobjects
Description: Is your feature request related to a problem? Please describe. In the process of NetworkVariable.Value = value, two parts of operation happen, one is to set the Value, then if new value is different than old value, set NetworkVariable di...
Open Graph Description: Is your feature request related to a problem? Please describe. In the process of NetworkVariable.Value = value, two parts of operation happen, one is to set the Value, then if new value is differen...
X Description: Is your feature request related to a problem? Please describe. In the process of NetworkVariable.Value = value, two parts of operation happen, one is to set the Value, then if new value is differen...
Opengraph URL: https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues/3184
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add two separate methods to `NetworkVariable` as supplements to `Value` property","articleBody":"**Is your feature request related to a problem? Please describe.**\nIn the process of `NetworkVariable.Value = value`, two parts of operation happen, one is to set the `Value`, then if new value is different than old value, set `NetworkVariable` dirty so that remote value get updated and both local and remote `OnValueChanged` delegate gets called.\n\nBut sometimes, we only want to perform one part of operation, e.g. (1) only set the `Value` without notify remote peer and without invoke `OnValueChanged`, (2) just notify without touching the `Value`.\n\n**Describe the solution you'd like**\nadd two methods :\n```csharp\npublic void SetValueWithoutNotify(T value)\n\npublic void Notify()\n```\n\n**Describe alternatives you've considered**\ncurrently as a sub optimal solution, i use this:\n```csharp\nNetworkVariable.Value=value; NetworkVariable.ResetDirty();\n\nNetworkVariable.SetDirty(true); NetworkVariable.OnValueChanged(NetworkVariable.Value,NetworkVariable.Value); \n```\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n","author":{"url":"https://github.com/babaq","@type":"Person","name":"babaq"},"datePublished":"2024-12-29T04:56:22Z","url":"https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/issues/3184"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cbe1d5e0-02fc-16d8-500e-5d045a303081 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B10E:12476C:2884D7E:35B3D9E:6B005E30 |
| html-safe-nonce | bc0a0004ebd20b096b6ebbd93a8884d228bda914619b1af9b3d2e6f1b175e929 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTBFOjEyNDc2QzoyODg0RDdFOjM1QjNEOUU6NkIwMDVFMzAiLCJ2aXNpdG9yX2lkIjoiMzgwNDYzOTEyNTMxNTgwNDcyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6ab58cf4dc33af87451b47629b38dfcc2ce5b3c6afaac88de8a30e56eb052a24 |
| hovercard-subject-tag | issue:2762105956 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Unity-Technologies/com.unity.netcode.gameobjects/3184/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ef2cfabc3b3dd43278ecf2735284888e17106bca5087d8fc39ab80a152c1633/Unity-Technologies/com.unity.netcode.gameobjects/issues/3184 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ef2cfabc3b3dd43278ecf2735284888e17106bca5087d8fc39ab80a152c1633/Unity-Technologies/com.unity.netcode.gameobjects/issues/3184 |
| og:image:alt | Is your feature request related to a problem? Please describe. In the process of NetworkVariable.Value = value, two parts of operation happen, one is to set the Value, then if new value is differen... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | babaq |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| turbo-cache-control | no-preview |
| go-import | github.com/Unity-Technologies/com.unity.netcode.gameobjects git https://github.com/Unity-Technologies/com.unity.netcode.gameobjects.git |
| octolytics-dimension-user_id | 426196 |
| octolytics-dimension-user_login | Unity-Technologies |
| octolytics-dimension-repository_id | 116385203 |
| octolytics-dimension-repository_nwo | Unity-Technologies/com.unity.netcode.gameobjects |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 116385203 |
| octolytics-dimension-repository_network_root_nwo | Unity-Technologies/com.unity.netcode.gameobjects |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width