- Home /
Material Array list and its .length not working/showing in dropdown menu
Hi
I have made an array list for materials and I am trying to access its length however as I begin to type myArrayList.Length it insteads only shows.Lerp as I type a capital L.
Any ideas what this is and how to get around it? I am certain its something to do with the fact my array being a list of materials instead of ints for example. If it helps here is some of my code...
public class test : MonoBehaviour { public Material [] colourChanges = new Material [4];
I then set the contents of the array in the inspector. If anyone has any solutions for my problem then please help me and any help is greatly appreciated as this is for my unit work. Thank you for reading my question.
Answer by Lovrenc · Nov 28, 2013 at 06:20 PM
Sometimes if your code cannot compile properly you will get mixed up autocomplete options. Since you know Length is a function of an array you can just type it and then try to compile and see where the real problem is.