google / google/play-appbundle-unity

extraScriptingDefines is dropped

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10
Forks
5
PR merge metrics
No merged PRs in 30d

Description

After updating com.google.android.appbundle (from 1.9.0 to 1.10.0) and inspecting the internal build pipeline, we found a breaking change where BuildPlayerOptions.extraScriptingDefines is silently dropped when BuildPlayerOptions is reconstructed.

This causes Unity scripting defines to be ignored, even though the original BuildPlayerOptions contains them.

Need to change **AppBundleBuilder.cs**

```
var updatedBuildPlayerOptions = new BuildPlayerOptions
{
assetBundleManifestPath = buildPlayerOptions.assetBundleManifestPath,
locationPathName = AndroidPlayerFilePath,
options = buildPlayerOptions.options,
scenes = buildPlayerOptions.scenes,
target = buildPlayerOptions.target,
targetGroup = buildPlayerOptions.targetGroup,
};
```
to
```
var updatedBuildPlayerOptions = new BuildPlayerOptions
{
assetBundleManifestPath = buildPlayerOptions.assetBundleManifestPath,
locationPathName = AndroidPlayerFilePath,
options = buildPlayerOptions.options,
scenes = buildPlayerOptions.scenes,
target = buildPlayerOptions.target,
targetGroup = buildPlayerOptions.targetGroup,
extraScriptingDefines = buildPlayerOptions.extraScriptingDefines
};
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.