Answers for "unity wrap around value"

C#
0

unity wrap around value

// Wraping around an array or list
currentIndex = (currentIndex + 1) % myList.Count; // Forward
currentIndex = (myList.Count + currentIndex - 1) % myList.Count; //Backward
Posted by: Guest on November-01-2021

Code answers related to "unity wrap around value"

C# Answers by Framework

Browse Popular Code Answers by Language