Quantcast
Channel: Latest Questions by Calum1015
Viewing all articles
Browse latest Browse all 19

Checking to see if a loaded level is equal to a member of an integer array

$
0
0
I am currently creating a mouse lock/hide script and have an object in each scene with a script. The script checks a list of if statements to find which level is being used by using Application.loadedLevel. Currently with this setup I will need TONS of if statements. So I was wondering if I could create a whitelist/blacklist sort of setup to check an array of integers and find if any integers in that array was the currently loaded level. Could this be done? Any help would be great since I feel that all those if statements will drop performance by a lot. Thanks!

Viewing all articles
Browse latest Browse all 19

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>