Skip to content

Prevent duplicate Purchases.Configure() initialization calls #930

Description

@Karushna

Developers accidentally call Purchases.Configure() multiple times during scene reloads or singleton recreation in Unity applications.

Currently, repeated initialization may happen silently, which can make debugging more difficult and potentially lead to unexpected behavior.

Possible Improvement

  • Detect repeated initialization calls
  • Log a warning instead of silently reconfiguring

Example:

if (_configured)
{
    Debug.LogWarning("Purchases.Configure() has already been called.");
    return;
}

This could improve the developer experience and make initialization issues easier to identify.

Happy to help with a PR if this approach is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions