FishNet icon indicating copy to clipboard operation
FishNet copied to clipboard

IEquatable, Custom comparer, code generation error. Think, not generate op_Equality method.

Open im-ikao opened this issue 1 year ago • 2 comments

General Unity version: 2023.2.11f1 Fish-Networking version: 4.1.2r Discord link: https://discordapp.com/channels/424284635074134018/1034477094731784302/1219792230995464222

Description I try make custom comparer for IEquatable inherited struct, but unity throw error: (0,0): error - Type NetworkGuid implements IEquatable but the comparer method could not be found.

Replication Steps to reproduce the behavior:

  1. Make struct inherited by IEquatable
  2. Make custom comparer by attribute
  3. Make CSP with reconcile and replicate with that struct
  4. See error

Expected behavior Unity not throw error, Custom comparer created

Screenshots image

Minds After a little code reverse I noticed the search method "op_Equality" MethodDefinition cMd = tr.CachedResolve(base.Session).GetMethod("op_Equality"); but there it method don't can be founded, i try to see cache for this "tr" and I also didn’t find the generated method, i think it may'be not generated/not cached, because if i add method "op_Equality" manualy, unity not throw error.

im-ikao avatar Mar 20 '24 00:03 im-ikao

Can you please post the code as text. Don't forget the code tag above this write box.

FirstGearGames avatar Oct 05 '24 00:10 FirstGearGames

Queued to close in 2 weeks if there is no new activity.

FirstGearGames avatar Oct 12 '24 22:10 FirstGearGames