I’m trying to clean up my code to get rid of a lot of resharper (omnisharp) warnings that are annoying. I’m a noob but I’d like to understand them
Warning : Assignment is redundant - (27, 13)
26: var anim = newUnit.GetComponent<Animator>();
27: var agent [B]=[/B] newUnit.GetComponent<NavMeshAgent>();
I can’t see the difference, why is it saying that on line 27, but not on 26? The only thing that I can see differs is that NavMeshAgent is from UnityEngine.AI and Animator is from UnityEngine.
Parameter can be IEnumerable - (329, 56)
329: IEnumerator ResetLayers(float timer, IEnumerable<int> [B]layers[/B], float startWeight = 0, float endWeight = 1) { //, int[] layers,
It used to be int[ ] layers, but I got the same error, and tried to change it like what’s above.
Thanks in advance!