Running old code, code not being executed, or related problem
Here's my problem: the code being run in the editor, or in the built exe, appears to use an older version of the code (C#), or maybe it's just skipping the execution of some rows.
No compilation errors or warnings are given, nor in the Unity Editor, nor in Visual Studio.
I'm using Unity 2017.2.0f3. The application is set to "Run In Background", so that's not a "windows focus" problem.
There is a specific line of code (a NetworkTransport.Send, in my case) that isn't being called if I run the game, both in editor or build mode. If I enter in debug mode and put a breakpoint on the call of the method that contains the line (in Visual Studio), I can have two different behaviours: - If I press "Continue" (F5), the execution of the line is skipped, nothing is executed. - If I press "Step Over" (F10) or "Step Into", then the line is being executed (once). If I punt the breakpoint directly on the line, the line is executed both by pressing "Continue" or "Step Over/Into", again, only when the debug is in place: removing the breakpoint stops the line from being executed.
I found the issue on this specific line, but I have weird errors all over the place, so I probably have similar situations all around my code.
I tried to: - Update Unity to the lastest version - Verify that the Assembly-CSharp.dll is actually being updated, via "Date modified", and it is. - Tried to close Unity and delete the "Library" folder, just to be sure. - Remport all assets. - Reimport the specific script. - Delete script's metadata (nonsense, I think, but I just tried).
Nothing worked till now. There is any solution to this that isn't "trash you project a build a new one"?
Thanks.