static string GetBlueprintPluginPathArgument(ProjectParams Params, bool Client, UnrealTargetPlatform TargetPlatform)
    {
        string ScriptPluginArgs = "";

        // if we're utilizing an auto-generated code plugin/module (a product of
        // the cook process), make sure to compile it along with the targets here

        if (Params.RunAssetNativization)
        {
            ProjectParams.BlueprintPluginKey PluginKey = new ProjectParams.BlueprintPluginKey();
            PluginKey.Client         = Client;
            PluginKey.TargetPlatform = TargetPlatform;
            FileReference CodePlugin = null;
            if (Params.BlueprintPluginPaths.TryGetValue(PluginKey, out CodePlugin))
            {
                ScriptPluginArgs += "-PLUGIN \"" + CodePlugin + "\" ";
            }
            else
            {
                LogWarning("BlueprintPluginPath for " + TargetPlatform + " " + (Client ? "client" : "server") + " was not found");
            }
        }

        return(ScriptPluginArgs);
    }
Exemplo n.º 2
0
    static void AddBlueprintPluginPathArgument(ProjectParams Params, bool Client, UnrealTargetPlatform TargetPlatform, string PlatformToCook)
    {
        if (Params.RunAssetNativization)
        {
            ProjectParams.BlueprintPluginKey PluginKey = new ProjectParams.BlueprintPluginKey();
            PluginKey.Client         = Client;
            PluginKey.TargetPlatform = TargetPlatform;

            string ProjectDir = Params.RawProjectPath.Directory.ToString();
            // If you change this target path you must also update logic in CookOnTheFlyServer.cpp. Passing a single directory around is cumbersome for testing, so I have hard coded it.
            // Similarly if you change the .uplugin name you must update DefaultPluginName in BlueprintNativeCodeGenModule.cpp
            string GeneratedPluginPath = CombinePaths(ProjectDir, "Intermediate", PlatformToCook, "NativizedAssets/NativizedAssets.uplugin");
            Params.BlueprintPluginPaths.Add(PluginKey, new FileReference(GeneratedPluginPath));
        }
    }
Exemplo n.º 3
0
    static string AddBlueprintPluginPathArgument(ProjectParams Params, bool Client, UnrealTargetPlatform TargetPlatform, string PlatformToCook)
    {
        string PluginPath = "";

        if (Params.RunAssetNativization)
        {
            // if you change or remove this placeholder value, then you should reflect those changes in the CookCommandlet (in
            // BlueprintNativeCodeGenManifest.cpp - where it searches and replaces this value)
            string PlatformPlaceholderPattern = "<PLAT>";

            string ProjectDir = Params.RawProjectPath.Directory.ToString();
            PluginPath = CombinePaths(ProjectDir, "Intermediate", "Plugins", PlatformPlaceholderPattern, "NativizedAssets", "NativizedAssets.uplugin");

            ProjectParams.BlueprintPluginKey PluginKey = new ProjectParams.BlueprintPluginKey();
            PluginKey.Client         = Client;
            PluginKey.TargetPlatform = TargetPlatform;

            Params.BlueprintPluginPaths.Add(PluginKey, new FileReference(PluginPath.Replace(PlatformPlaceholderPattern, PlatformToCook)));
        }
        return(PluginPath);
    }
    static string AddBlueprintPluginPathArgument(ProjectParams Params, bool Client, UnrealTargetPlatform TargetPlatform, string PlatformToCook)
    {
        string PluginPath = "";

        if (Params.RunAssetNativization)
        {
            // if you change or remove this placeholder value, then you should reflect those changes in the CookCommandlet (in
            // BlueprintNativeCodeGenManifest.cpp - where it searches and replaces this value)
            string PlatformPlaceholderPattern = "<PLAT>";

            string ProjectDir = Params.RawProjectPath.Directory.ToString();
            // NOTE: in UProjectPackagingSettings::PostEditChangeProperty() there is a hardcoded file path/name that is set to match this;
            //       if you alter this path then you need to update that and likely FBlueprintNativeCodeGenPaths::GetDefaultCodeGenPaths() as well
            PluginPath = CombinePaths(ProjectDir, "Intermediate", "Plugins", PlatformPlaceholderPattern, "NativizedAssets", "NativizedAssets.uplugin");

            ProjectParams.BlueprintPluginKey PluginKey = new ProjectParams.BlueprintPluginKey();
            PluginKey.Client         = Client;
            PluginKey.TargetPlatform = TargetPlatform;

            Params.BlueprintPluginPaths.Add(PluginKey, new FileReference(PluginPath.Replace(PlatformPlaceholderPattern, PlatformToCook)));
        }
        return(PluginPath);
    }