Fixed windows carsim toggle.

This commit is contained in:
Axel1092 2020-12-10 14:25:32 +01:00 committed by bernat
parent a046aa0c62
commit f408813e72
2 changed files with 6 additions and 2 deletions

View File

@ -26,13 +26,17 @@ public class Carla : ModuleRules
string ConfigDir = Path.GetFullPath(Path.Combine(CarlaPluginPath, "../../../../Config/"));
string CarSimConfigFile = Path.Combine(ConfigDir, "CarSimConfig.ini");
string[] text = System.IO.File.ReadAllLines(CarSimConfigFile);
Console.WriteLine("----------------------------------------------");
foreach (string line in text)
{
Console.WriteLine(line);
if (line == "CarSim ON")
if (line.Contains("CarSim ON"))
{
Console.WriteLine("Enabling carsim-----------");
UsingCarSim = true;
PublicDefinitions.Add("WITH_CARSIM");
PrivateDefinitions.Add("WITH_CARSIM");
Definitions.Add("WITH_CARSIM");
}
}

View File

@ -17,7 +17,7 @@ import: server
@"${CARLA_BUILD_TOOLS_FOLDER}/Import.py" $(ARGS)
CarlaUE4Editor: LibCarla
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat" --build
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat" --build $(ARGS)
launch: CarlaUE4Editor
@"${CARLA_BUILD_TOOLS_FOLDER}/BuildCarlaUE4.bat" --launch