unity list length
public List<GameObject> gameObjects = new List<GameObject>();
void Start()
{
int listLength = gameObjects.Count;
}
unity list length
public List<GameObject> gameObjects = new List<GameObject>();
void Start()
{
int listLength = gameObjects.Count;
}
how to get the length list in c# unity
public List<Transform> items = new List<Transform>();
void Start()
{
print(items.Count);
items.Add(new Transform());
print(items.Count);
}
//output\\
/// 0
/// 1
unity get list length
//Get list length / count
//Example
public List<GameObject> gameObjects = new List<GameObject>();
void Update()
{
int listLength = gameObject.Count;
if(listLength >= 0)
Debug.Log("Do something");
else
Debug.Log("Do something else");
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us