Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to get the size an array in unity

//Declaring it
[SerializeField] private GameObject[] specimen;
[SerializeField] private int arraySize;

//Getting the array size
arraySize = specimen.Length;
 
PREVIOUS NEXT
Tagged: #size #array #unity
ADD COMMENT
Topic
Name
8+4 =