I'm using ReSharper 8.1 for Visual Studio 2013, while writing code for Unity 4.6.0.
As expected, functions like Update, Start and Awake are labeled as "unused".
Now, ReSharper suggests adding an Annotations.cs file, and using the [UsedImplicitly] annotation to ignore the warning.
The problem is... this doesn't work, I have Annotations.cs in my project, and the following code still mentions that Start is unused:
[UsedImplicitly]
private void Start()
{
//doStuff
}
The code compiles fine, but trying to ignore this from the context menu suggests to add another Annotations.cs file (in this case, named Annotations1.cs, because Annotations.cs already exists).
Have you changed the namespace in the annotations file? If so, you need to tell ReSharper to look in the new namespace. Presumably, it's not finding the annotation attribute, which is why it's prompting to add another annotations.cs file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With