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

generateSolution supports unity >= 2022 [ATLAS-1772] #196

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

Joaquimmnetto
Copy link
Contributor

@Joaquimmnetto Joaquimmnetto commented Apr 11, 2024

Description

FIx the generateSolution task to work for unity 2022 and above, due to "UnityEditor.SyncVS.SyncSolution" not being available anymore on those versions.

We now put a script inside of the unity project and run a method in it to generate the solution. It is more complex, but its the more stable solution as it doesn't depend on the project having a specific active external editor. However, we still need to have some external editor UPM package, so we now install the com.unity.ide.rider upm package if its not present.

To run the script we now have a task to execute scripts in a unity project through a task (RunCSScript).

Changes

  • FIX fix generateSolution not working out of the box on unity 2022 and above
  • ADD RunCSScript task type
  • ADD installs com.unity.ide.rider upm package

@Joaquimmnetto Joaquimmnetto force-pushed the fix/generate-solution-unity2021 branch from 728c969 to a2f2198 Compare April 12, 2024 13:24
@Joaquimmnetto Joaquimmnetto force-pushed the fix/generate-solution-unity2021 branch from a2f2198 to 6696136 Compare April 12, 2024 13:26
@Joaquimmnetto Joaquimmnetto marked this pull request as ready for review April 16, 2024 10:42
@Joaquimmnetto Joaquimmnetto force-pushed the fix/generate-solution-unity2021 branch from f69d7b1 to a3f0b4e Compare April 22, 2024 09:01
@Azurelol
Copy link
Contributor

Azurelol commented Apr 22, 2024

So now installing rider becomes a dependency for this task to work, no? There's no guarantee users will have that IDE, and now our agents will need to implicitly install it (though I assume you would manage that).

Is that the only external editor package that provided that functionality?

@Joaquimmnetto
Copy link
Contributor Author

So now installing rider becomes a dependency for this task to work, no? There's no guarantee users will have that IDE, and now our agents will need to implicitly install it (though I assume you would manage that).

No, we only need the unity rider upm package, not the editor itself. Rider or VS/VSCode UPM packages would work, but Unity comes with none of them. I used rider as convenience because it was the one package installed in the game I'm using to test this.

@Azurelol
Copy link
Contributor

Azurelol commented Apr 23, 2024

So now installing rider becomes a dependency for this task to work, no? There's no guarantee users will have that IDE, and now our agents will need to implicitly install it (though I assume you would manage that).

No, we only need the unity rider upm package, not the editor itself. Rider or VS/VSCode UPM packages would work, but Unity comes with none of them. I used rider as convenience because it was the one package installed in the game I'm using to test this.

That's good to know. I would update the description to reflect this too.

@Joaquimmnetto Joaquimmnetto force-pushed the fix/generate-solution-unity2021 branch from 45a5ac1 to 50f4b35 Compare April 23, 2024 09:32
@Joaquimmnetto Joaquimmnetto merged commit 0b2b025 into master Apr 23, 2024
5 checks passed
@Joaquimmnetto Joaquimmnetto deleted the fix/generate-solution-unity2021 branch April 23, 2024 14:08
@Joaquimmnetto Joaquimmnetto changed the title generateSolution supports unity >= 2022 generateSolution supports unity >= 2022 [ATLAS-1772] Apr 25, 2024
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