unity3d - Boo Lists - Cast to (int)? -


I tried to follow this tutorial which was originally written for Unity Script, but instead of bu Uses:

Whatever I have tried here:

  Import Unity Engine Class BuildMe (Monobehavikor): Def Start (M): MeshFilter = Gatecomponent (MeshFiltor) Aries = Aries () Mesh.xx = [Vector 3 (0, 0, 0), vector 3 (1, 0, 0), vector 3 (0, 1, 0), vector 3 (1, 1, 0)] Aries Triangle = [0, 2, 1, 2, 3, 1] mesh. Normal = [-Vector3.forward, -Vector3.forward, -Vector3.forward, -Vector3.forward] meshFilter.mesh = Mesh Def Update (): Pass   

Unfortunately, each of my List liters have caused the problems:

'Boo.Lang.List' can not be changed from '(Unity Engine. Vector 3)'

' Boo.Lang.List 'can not be changed' (int) '

' Boo.Lang.List 'can not be converted to' (UnityEngine.Wecter3) '

It's a little disappointing - I'm hoping After all the elements, that is, able to guess the type of my list, within the same kind, in any event, I think that everyone must be necessarily a cast statement of any kind. Have seen some other bad examples, but none of them like to use lists like I want.

I looked a bit like this and saw that I can put it in the list. So I tried to do this:

  as   

   mesh.triangles = [0, 2, 1, 2, 3, 1] [int], but it still Does not work - this message has changed my error:  

'Boo.Lang.List.List.List [' int] 'to' int '' should not be converted to can.

I do not know what it is by (int) - I thought it was a list in which only < Code> int but it seems that I should be wrong.

Key point: Aries class expects arrays, not lists. Two types are very similar, but are not identical.

  type c # bu ---------------- ---------- --------------------- Integer list list & lt; Int & gt; [Int] List of [interes int] Array [] (int) Dictionary ??? Dictionary [key, value]   

This line creates a list of ints:

  mesh.triangles = [0, 2, 1, 2, 3, 1]   

vs. an array of ints:

  mesh.triangles = (0, 2, 1, 2, 3, 1)   

Note that we swap [] () braces for parens

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -