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

Feature: Allow unityVersion of auto for Package Testing #227

Open
trudeaua21 opened this issue Jun 11, 2023 · 0 comments
Open

Feature: Allow unityVersion of auto for Package Testing #227

trudeaua21 opened this issue Jun 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@trudeaua21
Copy link
Contributor

Context

For Unity project testing, an auto strategy is available, which will automatically pick up the Unity Editor version for the project being tested from that project's settings. However, for the first iteration of package testing, I didn't implement this feature.

It would be nice if the auto strategy were available for Package Testing as well.

Suggested solution

I think this can be accomplished by modifying the UnityVersionParser.read(projectPath) function. The modification could be to detect whether a package is being tested, and if so, parse the package's package.json for the Unity Editor version.

I believe the relevant fields in the package.json are unity and unityRelease - there are a couple of considerations to make with those fields:

  • Since those fields are not technically required (see the docs link in additional details), the auto strategy should be equipped to handle their absence and fail gracefully
  • The way they split up Unity version and Unity release into two fields may necessitate either modifying the UnityVersionParser.parse(projectVersionTxt) function, or creating a new function for parsing package versions altogether

Considered alternatives

n/a

Additional details

List of Unity Package Manifest (package.json) fields as of version 2023.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants