2017-10-25 01:46:58 +08:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
using UnrealBuildTool;
|
|
|
|
using System.Collections.Generic;
|
2023-03-20 19:09:39 +08:00
|
|
|
using System;
|
|
|
|
using System.IO;
|
2017-10-25 01:46:58 +08:00
|
|
|
|
|
|
|
public class CarlaUE4EditorTarget : TargetRules
|
|
|
|
{
|
|
|
|
public CarlaUE4EditorTarget(TargetInfo Target) : base(Target)
|
|
|
|
{
|
|
|
|
Type = TargetType.Editor;
|
|
|
|
ExtraModuleNames.Add("CarlaUE4");
|
2023-03-20 19:09:39 +08:00
|
|
|
|
|
|
|
string ConfigDir = Path.GetDirectoryName(ProjectFile.ToString()) + "/Config/";
|
|
|
|
string OptionalModulesFile = Path.Combine(ConfigDir, "OptionalModules.ini");
|
|
|
|
string[] text = System.IO.File.ReadAllLines(OptionalModulesFile);
|
|
|
|
|
|
|
|
bool UnityOn = true;
|
|
|
|
|
|
|
|
foreach (string line in text) {
|
|
|
|
if (line.Contains("Unity OFF"))
|
|
|
|
{
|
|
|
|
UnityOn = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!UnityOn) {
|
|
|
|
Console.WriteLine("Disabling unity");
|
|
|
|
bUseUnityBuild = false;
|
|
|
|
bForceUnityBuild = false;
|
|
|
|
bUseAdaptiveUnityBuild = false;
|
|
|
|
}
|
2017-10-25 01:46:58 +08:00
|
|
|
}
|
|
|
|
}
|