Reply To: Iterator Decorator breakes 'current' variable

NodeCanvas Forums Support Iterator Decorator breakes 'current' variable Reply To: Iterator Decorator breakes 'current' variable

#14184
wanderfalke
Participant

Hello Gavalakis,

I checked the output of Debug.Log(typeof(IList).GetEnumerableElementType()); and I get the same result as you: typeof(Vector3)

Then I created a Test class public class Test : IList and found, that typeof(Test).GetEnumerableElementType() returns null. The reason for this behaviour is, that type.RTIsGenericType() in GetEnumerableElementType returns false for typeof(Test) which has no generic arguments.

Uncommenting the commented code in GetEnumerableElementType results in typeof(Test).GetEnumerableElementType()returning typeof(Vector3).

Unity: 2018.3.6f1
Scripting Runtime Version: .Net 4.x Equivalent
Scripting Backend: Mono
Api Compatibility Level .Net Standard 2.0

Thank you!