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

InvalidOperationException: Sequence contains no matching element System.Linq.Enumerable.First #35

Open
xpc-yx opened this issue Jul 18, 2023 · 4 comments
Labels
question Further information is requested

Comments

@xpc-yx
Copy link

xpc-yx commented Jul 18, 2023

_mainGroupNameDic[shader].Keys.First

@xpc-yx
Copy link
Author

xpc-yx commented Jul 18, 2023

InvalidOperationException: Sequence contains no matching element System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)

@xpc-yx xpc-yx changed the title nvalidOperationException: Sequence contains no matching element System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable1[T] source, System.Func2[T,TResult] predicate) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0) InvalidOperationException: Sequence contains no matching element System.Linq.Enumerable.First Jul 18, 2023
@xpc-yx
Copy link
Author

xpc-yx commented Jul 18, 2023

First调用会抛出异常

@JasonMa0012
Copy link
Owner

unity版本, 如何复现

@xpc-yx
Copy link
Author

xpc-yx commented Jul 18, 2023

unity2020 3.42 切换材质时候有几率复现 改成FirstOrDefault 可以消除异常

@JasonMa0012 JasonMa0012 added the question Further information is requested label Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants