Quantcast
Viewing latest article 1
Browse Latest Browse All 14

Enumerators in Boo

Hi, I'm trying to create a simple enumerator in boo. Unity returns the following. Ambiguous reference 'GetEnumerator': Lister.GetEnumerator(), Lister.GetEnumerator() This is working code, according to the standalone boo interpreter, but Unity is messing up somewhere. How can I work around it? import UnityEngine import System.Collections class Lister (Generic.IEnumerable[of int]): public def GetEnumerator() as Generic.IEnumerator[of int]: yield 1 yield 2 yield 3 def IEnumerable.GetEnumerator() as IEnumerator: return GetEnumerator() [ExecuteInEditMode] class Enumerable (MonoBehaviour): def Awake (): l = Lister() for i in l: Debug.Log("$i")

Viewing latest article 1
Browse Latest Browse All 14

Trending Articles