Unreal 4.12 still requires a workaround. The updated one is here, which should work regardless of whether FMODStudio is in the game or the engine plugins directory. I’ll update the official docs for next release, as well as pinging Epic for a better ETA on real support.
Add the following to GetFilesToDeployOrStage in XboxOnePlatform.Automation.cs, before the end of the function:
// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio")))
{
FMODDLLPath = Path.Combine(SC.ProjectRoot, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio")))
{
FMODDLLPath = Path.Combine(SC.LocalRoot, "Engine/Plugins/FMODStudio/Binaries/XBoxOne/");
}
else
{
LogError("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
Log("Copying FMOD dlls to loose directory: " + RelativeBinPath);
SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmod.dll", false, null, RelativeBinPath, false, false);
SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodL.dll", false, null, RelativeBinPath, false, false);
SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudio.dll", false, null, RelativeBinPath, false, false);
SC.StageFiles(StagedFileType.NonUFS, FMODDLLPath, "fmodstudioL.dll", false, null, RelativeBinPath, false, false);
}
// FMOD code end
Add the following to PrepTargetForDeployment in XboxOneDeploy.cs, before the end of the function:
// FMOD code start
string FMODDLLPath = null;
if (Directory.Exists(Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio")))
{
FMODDLLPath = Path.Combine(InTarget.ProjectDirectory.FullName, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else if (Directory.Exists(Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins/FMODStudio")))
{
FMODDLLPath = Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins/FMODStudio/Binaries/XBoxOne/");
}
else
{
Log.TraceWarning("Failed to find FMODStudio plugin in game or engine directory");
}
if (FMODDLLPath != null)
{
Log.TraceInformation("...copying the FMOD dlls...");
string FMODDLLName = "fmod.dll";
Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
FMODDLLName = "fmodL.dll";
Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
FMODDLLName = "fmodstudio.dll";
Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
FMODDLLName = "fmodstudioL.dll";
Log.TraceInformation("\tcopying " + FMODDLLPath + FMODDLLName + " to " + DestDir + "/" + FMODDLLName);
CopyFile(FMODDLLPath + FMODDLLName, DestDir + "/" + FMODDLLName, true);
}
// FMOD code end