Skip to content

PLAT-5159 Unity TimingTrackerObject destroys on load #239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2021

Conversation

rich-bugsnag
Copy link
Contributor

Goal

The session tracking object was not persisting across scenes

Design

Adding DontDestroyOnLoad is the cleanest way to make sure it stays around.
I would have added a singleton pattern to make sure it was the only one created, but i checked and the init process that creates it already has a check to make sure init only runs once.

Changeset

Added DontDestroyOnLoad to the awake method of the TimingTrackerObject behaviour

Testing

This was tested manually in the unity editor

@rich-bugsnag rich-bugsnag requested a review from kattrali May 5, 2021 08:31
@rich-bugsnag rich-bugsnag self-assigned this May 5, 2021
Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one

@rich-bugsnag rich-bugsnag changed the base branch from next to integration/unity-native-notifier-uplifts May 5, 2021 13:51
@rich-bugsnag rich-bugsnag merged commit b124405 into integration/unity-native-notifier-uplifts May 5, 2021
@rich-bugsnag rich-bugsnag deleted the PLAT-5159 branch May 5, 2021 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants