This is what I write (a lot):
Rigidbody rb = G
Now I would expect ReSharper Code Completion to suggest me this:
GetComponent<Rigidbody>()
But it doesn't. It suggests GetComponent<>()
and leaves me to fill out the type myself. What I actually want is something like this:
SomeComponent foo = GetComponent<SomeComponent>();
ReSharper should have all the information necessary to make this type inference at the time the variable is about to be assigned.
Is there a way to manually add this kind of suggestion to ReSharper, so it infers the correct type? I tried Live Templates, but there does not seem to be a way to access the type of the variable I want to assign.