You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Select-UnitySetupInstance : Readme indicates a non-existant 'Project' parameter and description of 'Path' parameter doesn't match functionality. #194
When calling Start-UnityEditor -Project .\build-machine-setup
I am getting this error:
Start-UnityEditor : Cannot process argument transformation on parameter 'Project'.
Cannot convert value ".\build-machine-setup" to type "UnityProjectInstance[]". Error:
"Cannot convert value ".\build-machine-setup" to type "UnityProjectInstance". Error:
"Exception calling "Load" with "1" argument(s): "(Line: 1, Col: 1, Idx: 0) - (Line: 1,
Col: 2, Idx: 1): While scanning for the next token, find character that cannot start any
token."""
At line:1 char:28
+ Start-UnityEditor -Project .\build-machine-setup
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Start-UnityEditor], ParameterBindingArgu
mentTransformationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Start-UnityEditor
Interesting. Looking at the constructor for UnityProjectInstance,, my guess is that it's failing to parse either ProjectSettings\ProjectVersion.txt or ProjectSettings\ProjectSettings.asset.
Thanks for your answer ! But it didn't fix the problem. My project is empty unity project. But it was created with different version. I don't know if that matters. Also I notice when I call Select-UnitySetupInstance -Project '.\build-machine-setup'
Also getting an error
Select-UnitySetupInstance doesn't have a Project parameter so that error makes sense. That cmdlet is for filtering the results of Get-UnitySetupInstance which finds installs of Unity on your machine. Highly recommend reading the README and running help <command>, e.g. help Select-UnitySetupInstance to learn more about the API.
Get-UnityProjectInstance -Recurse will find unity projects recursively under a folder. If .\build-machine-setup is the root of a Unity project it should find it, detect the version, and print out the details. Start-UnityEditor -Project <path to project> will either launch the right version of Unity or complain that it can't find it (it uses the *-UnitySetupInstance cmdlets for this).
Can you post your ProjectSettings\ProjectVersion.txt and ProjectSettings\ProjectSettings.asset? These are the only files relied upon by UnitySetup and if it's a clean Unity project shouldn't have any private information in it. With those I should be able to reproduce your issue and give further guidance.
You are right, Get-UnitySetupInstance doesn't have a project parameter. After I did Get-UnityProjectInstance -Recurse I was able to do a Start-UnityEditor -Project <path to project>. This Get-UnitySetupInstance | Select-UnitySetupInstance -Project '.\MyUnityProject' command inside README file is outdated then. Thanks. Can you modified README file?
changed the title [-]Start-UnityEditor : Cannot process argument transformation on parameter 'Project'.[/-][+]Select-UnitySetupInstance : Readme indicates a non-existant 'Project' parameter and description of 'Path' parameter doesn't match functionality.[/+]on Sep 30, 2019
Activity
jwittner commentedon Sep 27, 2019
Interesting. Looking at the constructor for UnityProjectInstance,, my guess is that it's failing to parse either ProjectSettings\ProjectVersion.txt or ProjectSettings\ProjectSettings.asset.
Does your Unity project have it's Asset Serialization Mode set as 'Force Text'? Text assets are expected by UnitySetup.
If that isn't the issue, would you mind taking a snip of your folder hierarchy and dropping your copies of the above two files into the issue?
kobechenyang commentedon Sep 27, 2019
Thanks for your answer ! But it didn't fix the problem. My project is empty unity project. But it was created with different version. I don't know if that matters. Also I notice when I call
Select-UnitySetupInstance -Project '.\build-machine-setup'Also getting an error
jwittner commentedon Sep 28, 2019
Select-UnitySetupInstancedoesn't have aProjectparameter so that error makes sense. That cmdlet is for filtering the results ofGet-UnitySetupInstancewhich finds installs of Unity on your machine. Highly recommend reading the README and runninghelp <command>, e.g.help Select-UnitySetupInstanceto learn more about the API.Get-UnityProjectInstance -Recursewill find unity projects recursively under a folder. If.\build-machine-setupis the root of a Unity project it should find it, detect the version, and print out the details.Start-UnityEditor -Project <path to project>will either launch the right version of Unity or complain that it can't find it (it uses the*-UnitySetupInstancecmdlets for this).Can you post your ProjectSettings\ProjectVersion.txt and ProjectSettings\ProjectSettings.asset? These are the only files relied upon by UnitySetup and if it's a clean Unity project shouldn't have any private information in it. With those I should be able to reproduce your issue and give further guidance.
kobechenyang commentedon Sep 28, 2019
You are right,
Get-UnitySetupInstancedoesn't have a project parameter. After I didGet-UnityProjectInstance -RecurseI was able to do aStart-UnityEditor -Project <path to project>. ThisGet-UnitySetupInstance | Select-UnitySetupInstance -Project '.\MyUnityProject'command inside README file is outdated then. Thanks. Can you modified README file?[-]Start-UnityEditor : Cannot process argument transformation on parameter 'Project'.[/-][+]Select-UnitySetupInstance : Readme indicates a non-existant 'Project' parameter and description of 'Path' parameter doesn't match functionality.[/+]jwittner commentedon Sep 30, 2019
Reopening under new title to capture these doc issues.