ClientRpc and ServerRpc decorators should give an error if attached to a non-NetworkBehaviour class method
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- csharp
- 領域
- networking
調査の方向性
Issue ではファイル、テスト、エントリポイントが指定されていません。まず ClientRpc および ServerRpc デコレーターの処理と、NetworkBehaviour の継承がどのようにチェックされているかを特定します。NetworkBehaviour を継承していないクラスのメソッドに対する診断を定義してテストし、要求されているランタイムまたはエディターでの動作も含めます。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
I'm finding it easy to accidentally add [ClientRpc] or [ServerRpc] methods to MonoBehaviour-derived classes, where clearly they won't do anything. This leads to a bunch of confusion while I try to figure out what's wrong with the networking only to do the forehead-slap when I notice that the class hasn't been switched to NetworkBehaviour.
Describe the solution you'd like
At a minimum, a runtime error with a descriptive error message would be helpful. Something like "FooClientRpc was added to a class that doesn't derive from NetworkBehaviour - as a result, FooClientRpc will never be called."
Better would be a similar error logged when in the editor. Compile-time errors would be ideal if possible, of course.
Describe alternatives you've considered
Beyond "vigilance" (which can be assumed doesn't work), if it becomes a more serious issue then I'd have to rig some sort of linting rule to catch this.
- 主要言語
- C#
- スター
- 2.3k
- フォーク
- 461
- 平均マージ
- 3日 16時間
- マージ済み PR(30日)
- 20
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Unity-Technologies/com.unity.netcode.gameobjects のほかの issue
-
stat:import type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
-
stat:reply-needed type:support
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
Unity-Technologies/com.unity.netcode.gameobjects#4095 · コメント 10 件 ·
-
stat:awaiting-triage stat:Investigating type:bug
Unity-Technologies/com.unity.netcode.gameobjects#3912 · コメント 5 件 · 担当者 1 名 ·
-
Tracking type:feature-2.x
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
Unity-Technologies/com.unity.netcode.gameobjects#3870 · コメント 5 件 ·
-
Tracking type:feature
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
Unity-Technologies/com.unity.netcode.gameobjects#3830 · コメント 7 件 ·
Unity-Technologies/com.unity.netcode.gameobjects の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
dotnet/AspNetCore.Docs#37699 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SubtitleEdit/subtitleedit#15108 · コメント 1 件 ·
-
area/docs-content Bug pulumi/docs
難易度 1/5 1〜3時間 初心者へのやさしさ 94/100
-
agentic-workflows untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100