Skip to content

[BUG] PhoneApp.OnDestroyed() is not implemented #76

@LegionnaireLenny

Description

@LegionnaireLenny

Summary

PhoneApp.OnDestroyed() is not implemented, so overriding it does nothing.

Game Version

Other (specify in Additional Context)

S1API Version

3.0.1

MelonLoader Version

Other (specify in Additional Context)

Runtime Environment

IL2CPP (Regular)

Steps to Reproduce

I was trying to clean up some Actions in my app using PhoneApp.OnDestroyed() thinking it was called when returning to the main menu. The below code is never executed, at least not that I saw.

protected override void OnDestroyed()
{
LogManager.LogMessage("Unsubscribing OnLocaleChanged from OnLocalUpdated", LogLevel.Warning);
LocalizationManager.OnLocaleUpdated -= OnLocaleChanged;
base.OnDestroyed();
}

Expected vs Actual Behavior

Expected: PhoneApp.OnDestroyed() is called when returning to the main menu from the game. I don't know where it should be called, but that's at least one point I would expect.
Actual: PhoneApp.OnDestroyed() is never called

MelonLoader Log

No response

What Have You Tried?

No response

Additional Context

Schedule 1: 0.4.5f
MelonLoader: 0.7.2

Pre-submission Checklist

  • I have read the installation guide
  • I am using the latest version of S1API
  • I have verified this issue is related to S1API (not general modding support)
  • I am using MelonLoader 0.7.0 or have noted compatibility issues with 0.7.1+
  • I have included my MelonLoader log or relevant excerpts

Metadata

Metadata

Assignees

No one assigned

    Labels

    HighAPI features not working, or minor gameplay hinderancebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions