Skip to content
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

Autorun will choose correct device when launching application #193

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

todi1856
Copy link
Member

@todi1856 todi1856 commented Nov 13, 2024

Please read and consider what information you want to pass on to people reviewing this PR

Purpose of PR

Type of change:

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)
  • Description of the feature

Logcat was connecting to the wrong device, when there were two or more devices connected to PC. The issue was because Unity didn't provide any info on which device it runs the application.

OnPostrocessLaunch callback was introduced in this PR - https://github.cds.internal.unity3d.com/unity/unity/pull/56719

Checklist for PR maker

  • Have you added a backport label? (if needed)
  • Have you updated the Changelog? Each package has a CHANGELOG.md file
  • Have you added or updated the Documentation to your PR? When you add a new feature, change a property name, or change the behaviour of a feature, it's best practice to include related documentation changes in the same PR

Testing status

  • Existing or new automation tests - what automation was added, changed
    N/A

  • Detailed description of what testing was done, what projects were run

    • Connect two devices to PC
    • Build & Run on device A, see that logcat connects to device A
    • Build & Run on device B, see that logcat connects to device B
  • What environment did you test on?
    Windows, Android 10 and Android 14 connected at the same time.

Note to guardian

Changeset to use, if extra changesets on top. Any other notes to pass along

Comments to reviewers

Notes for the reviewers you have assigned

@todi1856 todi1856 changed the title Fix https://jira.unity3d.com/browse/ALB-42, select appropriate device… Autorun will choose correct device when launching application Nov 14, 2024
@todi1856 todi1856 requested review from BorisShir and a team November 25, 2024 09:28
@IGuscin IGuscin requested review from IGuscin and removed request for a team November 27, 2024 07:27
Copy link

@IGuscin IGuscin left a comment

Choose a reason for hiding this comment

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

Works as expected.
Tested with 2 devices connected, build and run to device A, device B, All compatible devices, Default device, Patch and Run cases. Logcat properly picks which device to connect to (the one app was deployed to, or in case of all compatible devices - first device app was installed to), log in the console provides details on app installation to the device and launch data.

No issues found, but postponing approval until callback PR lands to trunk

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