Skip to content

Instantly share code, notes, and snippets.

@zsoi
Created October 19, 2020 15:49
Show Gist options
  • Save zsoi/cc91e1fba22cf4e82f5420e9e5aeceb3 to your computer and use it in GitHub Desktop.
Save zsoi/cc91e1fba22cf4e82f5420e9e5aeceb3 to your computer and use it in GitHub Desktop.
Unity's addressables project config API is private. This hack provides a public API for some parts of the ProjectConfigData and can be easily extended.
namespace UnityEditor.AddressableAssets.Settings
{
/// <summary>
/// Adapter to provide a public API into <seealso cref="ProjectConfigData"/> internals.
/// </summary>
public static class ProjectConfigDataAdapter
{
public static bool generateBuildLayout
{
get => ProjectConfigData.generateBuildLayout;
set => ProjectConfigData.generateBuildLayout = value;
}
public static bool ignoreUnsupportedFilesInBuild
{
get => ProjectConfigData.ignoreUnsupportedFilesInBuild;
set => ProjectConfigData.ignoreUnsupportedFilesInBuild = value;
}
}
}
{
"reference": "GUID:69448af7b92c7f342b298e06a37122aa"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment