JetBrains / JetBrains/resharper-unity

Warning never assigned on [SerializeReference] using interface

Open
#2,426 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.2k
Forks
142
PR merge metrics
No merged PRs in 30d

Description

When using [SerializeReference] attribute and an Interface you get a never assigned warning
![image](https://github.com/JetBrains/resharper-unity/assets/54956736/ecf97753-2642-4bdd-b34b-85780ee2b46c)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the warning in a C# Unity sample that uses [SerializeReference] with an interface, using the attached report as the expected scenario. Trace which inspection produces the never-assigned warning and confirm that the warning is no longer reported for this pattern.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.