Skip to content

JetBrains.Rider.Unity.Editor.UIElementsSupport.GenerateSchema fails with TargetParameterCountException #2386

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

Closed
mikz opened this issue Feb 1, 2023 · 2 comments
Assignees

Comments

@mikz
Copy link

mikz commented Feb 1, 2023

This is happening for about a year. From Unity 2022.x and Rider 2022. Right now I'm on Unity 2022.2.1 and Rider 2022.3.2.

Generating schema from the yellow bar suggestion when editing UXML results in:

TargetParameterCountException: Number of parameters specified does not match the expected number.
System.Reflection.RuntimeMethodInfo.ConvertValues (System.Reflection.Binder binder, System.Object[] args, System.Reflection.ParameterInfo[] pinfo, System.Globalization.CultureInfo culture, System.Reflection.BindingFlags invokeAttr) (at <1b72fc97b7c245a483150421232eb6a9>:0)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1b72fc97b7c245a483150421232eb6a9>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1b72fc97b7c245a483150421232eb6a9>:0)
JetBrains.Rider.Unity.Editor.UIElementsSupport.GenerateSchema () (at <a26e6ba76929460aadbd68434abe4966>:0)
UnityEngine.Debug:LogException(Exception)
JetBrains.Rider.Unity.Editor.UIElementsSupport:GenerateSchema()
JetBrains.Rider.Unity.Editor.<>c:<AdviseGenerateUISchema>b__30_0(Unit)
JetBrains.Rd.Tasks.<>c__DisplayClass8_0`2:<Set>b__0(Lifetime, Unit)
JetBrains.Rd.Tasks.RdCall`2:OnWireReceived(UnsafeReader)
JetBrains.Rd.Impl.MessageBroker:Execute(IRdWireable, Byte[])
JetBrains.Rd.Impl.<>c__DisplayClass10_0:<Invoke>b__0()
JetBrains.Rider.Unity.Editor.MainThreadDispatcher:DispatchTasks()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:361)

Doing it from unity Assets > Update UXML schema works just fine.

updateSchemaFiles.Invoke(null, null);

vs

https://github.com/Unity-Technologies/UnityCsReference/blob/f9f7224dcb49951ed9eeb3b087aecf1e39bb0b4d/ModuleOverrides/com.unity.ui/Editor/UXMLSchemaGenerator.cs#L62

@van800
Copy link
Member

van800 commented Feb 1, 2023

image
I will fix that, thanks.

@van800
Copy link
Member

van800 commented Feb 2, 2023

Fix would appear in 2023.1 ~ EAP4.

@van800 van800 closed this as completed Feb 2, 2023
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

No branches or pull requests

2 participants