Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

unity for loop array

 for (int i = 0; i < Objects.Length; i++)
{
  if (Objects[i] == ItemLookingAt)
  {
    dot.SetActive(true);
  } else
  {
    dot.SetActive(false);
  }
}
 
PREVIOUS NEXT
Tagged: #unity #loop #array
ADD COMMENT
Topic
Name
1+7 =