Hey all,
Just about done with this menu system, but of course this last step is giving me a headache…
I’m thinking I need to use the ‘normalized’ function to finish this up, but unfortunatly I’m not understanding how exactly it’s used.
Unity Refrence: : Didn’t offer this no0b much of an explanation…
3rd Party Refrence: : Makes me think this function may not actually be what I’m looking for…
PROBLEM:
I’ll be using the function on this line of code:
mainCam.rect = new Rect (0f, 1f - .5f, .5f, .5f);
My intentions are for the top left camera to only take up so much of the scene view (as a miniMap or something would), so my thought process is that since the camera can only be set to a value 0 - 1 before it’s no longer viewable on screen then I would go ahead and ‘normalize’ the screen.width and screen.height information so that both are independently contained between values 0 and 1. I figure this would then allow me to use that data to accurately place and resize the camera accordingly dependent on the users resolution settings.
I’m thinking if this is to work my code would end up looking something like this (I KNOW THIS IS WRONG):
mainCam.rect = new Rect (0f, 1f - screen.width(normalized)/.3f, screen.length(normalized)/.3f, screen.width(normalized)/.3f);
Anyway, that’s that…if there’s a chance I could just do this some other way, or you don’t understand anything I just said lol please feel free to inform me