eos_plugin_for_unity icon indicating copy to clipboard operation
eos_plugin_for_unity copied to clipboard

Correct `MacOSBuilder`'s `PreBuild` step

Open paulhazen opened this issue 1 year ago • 0 comments

While investigating a related issue I discovered that the MacOSBuilder's PreBuild function was inappropriately overridden. Per the documentation on the base implementation of PreBuild within PlatformSpecificBuilder:

/// <summary>
/// Implement this function on a per-platform basis to provide custom logic for the platform being compiled.
/// Any overriding implementations should first call the base implementation.
/// </summary>
/// <param name="report"></param>
public virtual void PreBuild(BuildReport report)
{
    // Check to make sure that the platform configuration exists
    CheckPlatformConfiguration();

    // Configure the version numbers per user defined preferences
    ConfigureVersion();

    // Check to make sure that the binaries for the platform exist, and build them if necessary.
    CheckPlatformBinaries();
}

I'm not certain how this got introduced - very likely it's my oversight. But it's a good reminder to make sure you read the documentation for any function you are overriding. In this particular case the overridden function was using an old means of checking to see that the binaries existed - but as you'll note from the base implementation above there is more that this function does, and those steps were being ignored.

paulhazen avatar May 03 '24 21:05 paulhazen