Figured out a solution to making a camera fixed to the edge. Basically, I had my UI root set up wrong. Tasharen, the makers of NGUI, has their website set up differently than I remember, or they changed the site while I was reading the documentation. I noticed more in-depth documentation seemed to be on the forums and I can't seem to find the docs from their site that I was using before. After reading the section on UIRoot, I discovered that UIRoot determines a lot about scaling and resolution adjustment in a game. I set the project's resolution to 1024x600 then set UIRoot's ScalingStyle property to "FixedSizeOnMobiles" with a Maximum and Manual height of 600. After rebuilding and testing on my obnoxiously large Android phone, I got the desired effect. I'm still not sure at this point if this is the correct approach, and I'm reading more on the NGUI documents. I also am not a fan of the stretch look either, but I suspect this is the aspect of android that people warned me about; namely, producers release builds for several resolutions. I can always tell a crappy game in the Android store when graphics are all stretched to hell. I don't want my games to look crappy, so mastering clean UIs will be added to my to-do list. I suspect I'll still have to use stretch, but export multiple resolutions of my source graphics to get the best of both worlds.
While reading the doc, I also found that UIAnchor is deprecated. The original video tutorial on NGUI I watched said to use the UIAnchor class to anchor. Now, NGUI has an anchor option on all of its GameObjects (widgets?).
No comments:
Post a Comment