mchrbn / unity-traffic-simulation

A Unity asset that lets you easily simulate very simple traffic into your scene.
264 stars 57 forks source link

Script errors in 5.6.7f1 #25

Closed KostyanSigaev closed 2 years ago

KostyanSigaev commented 2 years ago

When I open a project on Unity 5.6.7F1, I see CS4.0 errors, on this I installed SC6Supprot and get only two errors: Assets\TraficSimulation\Scripts\Editor\TrafficEditor.cs(94,40) error CS1525: Invalid expression term 'float' Assets\TraficSimulation\Scripts\Editor\TrafficEditor.cs(148,77) error CS1525: Invalid expression term 'bool' Search for solutions on the Internet did not give results ... How to solve the problem?

P.S. I am not going to install newer editor versions, because it does not pull the computer and there is no support for DX9, which is very important to me

mchrbn commented 2 years ago

maybe declare the variable and then set it to the out

so instead of: plane.Raycast(ray, out float dst);

float dst = 0f;
plane.Raycast(ray, out dst);

and same for the other one:

bool restructureSystem = false;
TrafficEditorInspector.DrawInspector(wps, out restructureSystem);