Localization error when building DFU from Github

Discuss modding questions and implementation details.
Post Reply
User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Localization error when building DFU from Github

Post by BadLuckBurt »

Hi all,

- edit

Check my other post in this thread for the solution: viewtopic.php?p=59107#p59107

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

When I build DFU from the Github repo it runs fine but I'm getting the localization not found errors all over the place. I figured out that Unity is not building the 'aa' folder in the StreamingAssets folder from the Addressable Assets, I'm stumped on how to fix this sadly.

I copied over the aa-folder from the 0.13.4 release so it runs fine now but I would like to know how to get the Addressables to build properly. Can anyone shed some light on this for me?
Last edited by BadLuckBurt on Tue Dec 28, 2021 8:46 am, edited 1 time in total.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
pango
Posts: 3359
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Localization error when building DFU from Github

Post by pango »

I'm interested too.
Currently, since I prefer building Daggerfall Unity from command line, I added an Assets/Editor/BuildAddressables.cs script:

Code: Select all

/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
using System.Collections;

class BuildAddressablesProcessor
{
    /// <summary>
    /// Run a clean build before export.
    /// </summary>
    static public void PreExport()
    {
        Debug.Log("BuildAddressablesProcessor.PreExport start");
        AddressableAssetSettings.CleanPlayerContent(
            AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilder);
        AddressableAssetSettings.BuildPlayerContent();
        Debug.Log("BuildAddressablesProcessor.PreExport done");
    }

    [InitializeOnLoadMethod]
    private static void Initialize()
    {
        BuildPlayerWindow.RegisterBuildPlayerHandler(BuildPlayerHandler);
    }

    private static void BuildPlayerHandler(BuildPlayerOptions options)
    {
        if (EditorUtility.DisplayDialog("Build with Addressables",
            "Do you want to build a clean addressables before export?",
            "Build with Addressables", "Skip"))
        {
            PreExport();
        }
        BuildPlayerWindow.DefaultBuildMethods.BuildPlayer(options);
    }

}
... and added -executeMethod BuildAddressablesProcessor.PreExport to the Unity build command line; But I still wonder how to do the same thing by other means. Maybe that same script can help?
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Localization error when building DFU from Github

Post by Interkarma »

If you're building from within Unity itself (using Ctrl+Shift+B > set platform > build), I've never not seen it create the "aa" folder in output build. I create local builds like this all the time for testing, though the release builds are cooked in Cloud Build.

I'm just guessing here, but check that "include in build" is set in your Default Local Group settings. Though not sure how this would be changed, these settings should come down when cloning from git. Below found in Window > Asset Management > Addressables > Groups.

local-group-settings.png
local-group-settings.png (173.22 KiB) Viewed 1146 times

Otherwise all I can suggest is a fresh clone of project to another folder. Maybe Unity has lost track of some local settings somewhere along the line.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Localization error when building DFU from Github

Post by BadLuckBurt »

Thank you both for the replies. I think I know what the issue is thanks to the link in Pango's post. They have disabled the automatic building of Addressables for performance reasons so you need to build them manually at least once.

You can do this by going to Window > Asset Management > Addressables > Groups:

Image

You will get a new window:

Image

I used New Build since I don't know what I'm doing :lol: but after doing this and building the entire project with Ctrl+Shift+B, the aa folder appears as expected.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

Post Reply