I am looping an array which has 6 values. These values get filled from an external script. How do I check which array[i] has 0 value? Currently the loop shows how many 0 values are there. But does not show which array[i] has 0 value.
public int[] Total_Val;
void Start()
{
for(int i = 0; i<Total_Val.Length; i++)
{
if(Total_Val[i] <= 0)
{
Debug.Log("The array" +Total_Val[i]+" has null value");
}
}
}