Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - anubhab123

Pages: [1]
1
NGUI 3 Support / Re: NGUI UI Overlapping Problem
« on: June 06, 2014, 03:37:17 PM »
Hey so for the script you showed me I would attach that to the persistent UIRoot object or the individual prefabs?

One thing i'm actually confused about is whether onEnable/onDisable is called when gameobjects are active/inactive or when the individual component is enabled/disabled.

Thanks alot for the help so far!

2
NGUI 3 Support / NGUI UI Overlapping Problem
« on: June 05, 2014, 08:38:44 AM »
I have different UIRoots setup across different scenes in my project in order to draw different UIs for different screens and a singleton-like gamemanager object managing all the screens to help transition from one screen to the next. When I go from one screen to the next screen I have the gamemanager object GameObject.FindObjectWithTag("UIRoot") and Destroy() the current UIRoot gameobject which has a tag on it of "UIRoot" so that it does not appear on the next screen(this screen has a seperate UIRoot Object dedicated to drawing the UI for that Screen).

Everything seems to be working great in the Unity Editor however on stand-alone windows builds and web player builds the UI for one screen remains even after transitioning to the next screen. The two UIs are therefore overlapping each other in subsquent screens.

I was wondering if anyone had any idea as to where the problem might be? Should I use a different design pattern and keep one UIRoot object alive across all scenes as oppossed to having different ones for each screen?

Thanks for any help!




3
NGUI 3 Support / NGUI multiple sliders OnValueChange
« on: May 31, 2014, 11:49:32 AM »
Hey everyone I am new to NGUI and was having some trouble with UISliders.

I have a Settings screen up that has 2 UISliders in it that are children of a UIPanel object. I was trying to get the sliders to alter the volume and music whenever the slider's value changes respectively and so I found that UISliders have an OnValueChanged event and was going to use that event on each slider to make changes.

I wanted however to have one object handle the changes for both sliders instead of each one handling it's own OnValueChange event due to there being alot of code duplication/different scripts causing me to constantly switch back and forth between scripts.

I was wondering if anyone know how I could go about this? I've looked into using Notify to let a single object recieve that event but have gotten confused about what methods i'd need to setup in order to get notifications to work. I am new to event delegation as a design pattern.

Thank you very your help!

Pages: [1]