Visual Studio does not like VO's constructor

Hi, it looks like Visual Studio 2012 (with UnityVS) does not like the constructor of struct VO in RVOAgent.cs on line 313.

It spits out the following errors:
Field ‘Pathfinding.RVO.Sampled.Agent.VO.sqrCutoffDistance’ must be fully assigned before control is returned to the caller
Field ‘Pathfinding.RVO.Sampled.Agent.VO.sqrCutoffDistance’ must be fully assigned before control is returned to the caller
Field ‘Pathfinding.RVO.Sampled.Agent.VO.sqrCutoffDistance’ must be fully assigned before control is returned to the caller
Field ‘Pathfinding.RVO.Sampled.Agent.VO.sqrCutoffDistance’ must be fully assigned before control is returned to the caller
Field ‘Pathfinding.RVO.Sampled.Agent.VO.sqrCutoffDistance’ must be fully assigned before control is returned to the caller

At first, I was going to chalk this up to something specific to Visual Studio, but it looks like the reason for the error message might be legitimate in that ‘sqrCutoffDistance’ remains uninitialized if the constructor early outs.
Might this be a problem?

Hi

Yeah, some other users have said that as well. I am not sure why mono doesn’t complain about it as it is obviously a bug.

You can just edit the code to initialize sqrCutoffDistance to 0 at the beginning of the constructor.

It will be fixed in the next patch.