tuningfork icon indicating copy to clipboard operation
tuningfork copied to clipboard

Fixed a bug that the wrong index is used for Addressable scene

Open AlanLiu90 opened this issue 3 years ago • 1 comments

Problem

Google Play Console shows all Addressable scenes as 'Scene':'unknown'

Why it's happening

The index of an Addressable scene increases from 1000, but it's clampped to the count of Enum Scene minus 1:

public static void SetScene(IMessage message, int sceneBuildIndex)
{
	// ...

	// To prevent incorrect enum value.
	var enumSize = Enum.GetValues(sceneEnumType).Length;
	sceneBuildIndex = Mathf.Clamp(sceneBuildIndex, 0, enumSize - 1);

	// ...
}

AlanLiu90 avatar Jan 12 '23 06:01 AlanLiu90

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Jan 12 '23 06:01 google-cla[bot]