1.0.0-exp.8: Changing Variant in Meta-data for GhostComponents throws exception

The new Meta-data for GhostComponent is a very good addition to the new 1.0.0 release.

But currently, I can’t modify the variant on that component on a ghost prefab as it throws the following exception:

InvalidOperationException: Sequence contains no matching element
System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <b017b385d9884952b62c7b35f9fed747>:0)
Unity.NetCode.Editor.GhostAuthoringInspectionComponentEditor+<>c__DisplayClass26_0.<CreateVariantDropdown>b__0 (UnityEngine.UIElements.ChangeEvent`1[T] evt) (at Library/PackageCache/com.unity.netcode@1.0.0-exp.8/Editor/Authoring/GhostAuthoringInspectionComponentEditor.cs:347)

Whenever I chose one of my own variants (even if they are declared as Default)

Hey Occuros! Ah, AFAIR the fix for that was backported. When I login tomorrow I’ll find out what happened to it. The best workaround is right click > reset, then reapply your custom variant. Apologies!

Edit: Thanks for the feedback, also. Glad you found it useful.

1 Like

Update: Looks like this was not backported ever, in fact, but it’s fixed in the next (upcoming) release (along with some other UI layout fixes).

1 Like