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 - mimmog

Pages: [1] 2 3
1
NGUI 3 Support / Re: Menu enter from left
« on: April 09, 2015, 06:03:21 PM »
Hi! thank you for your answer. I have solved using TweenPosition but I have another problem....
The menu is on the left out of the screen and it is anchored to UIRoot. It enter from left using TweenPosition using this code attached to it

  1. void Awake () {
  2.         tw = gameObject.GetComponent<TweenPosition>();
  3.         uiTweener = tw.GetComponent<UITweener>();
  4.         originalPosition = transform.localPosition;
  5.         TweenPosition.Begin(gameObject,1f,originalPosition);
  6.         //Take the x position from another object on the screen
  7.         tw.to.x = liveObj.transform.localPosition.x;
  8. }  
  9.  
  10. private void playTw(){
  11.     if(transform.localPosition.x == tw.from.x){
  12.         uiTweener.PlayForward();
  13.         setStateBonus(true);
  14.     }else{
  15.         uiTweener.PlayReverse();
  16.         setStateBonus(false);
  17.    }
  18.    GetComponent<UISprite>().ResetAndUpdateAnchors();
  19. }

All work fine but if I want to reset the sprite to the original position and also reset TweenPosition as if I had never used it, how can I do ? I have tried to use this code

  1. TweenPosition.Begin(gameObject,1f,originalPosition);
  2. uiTweener.ResetToBeginning();
  3. GetComponent<UISprite>().ResetAndUpdateAnchors();
  4. NGUITools.SetActive(gameObject,false);
  5. tw.enabled = true;
  6. setStateBonus(false);

but not work fine on device :( when the menu go back it not coming out the screen to the initial position but instead it work fine on Unity Player....why ?

This is the problem

2
NGUI 3 Support / Menu enter from left
« on: April 09, 2015, 04:08:49 AM »
Is possible to create one menu that enter from left and stop it on specific point ? I'm using TweenPosition but I have a problem because if the screen resolution change also the stop position must change....

3
NGUI 3 Support / Re: Infinite scrollView
« on: January 13, 2015, 06:04:42 PM »
I must use SpringPanel.Begin for auto scrolling and UIScrollView with SetDragAmount for touch scroll? And for looping how can I use ?

4
NGUI 3 Support / Infinite scrollView
« on: January 13, 2015, 12:16:12 PM »
I want to create a scrollview that contain a text that scroll to the top automatically. But I also want that I can scroll it with a finger but when I not touch it must scroll up automatically and when it finishes it should start again. It' possible ? How can I do this ?

5
NGUI 3 Support / LightPoint
« on: January 05, 2015, 11:59:30 AM »
How can add one point light over a NGUI Texture into 2d menu ?

6
NGUI 3 Support / Re: More menu and one click
« on: December 20, 2014, 10:47:35 AM »
Can you help men? My menu is showed over another menu and I want that when it is active the menu's button  under are not clickable. Is it possibile?

7
NGUI 3 Support / More menu and one click
« on: December 19, 2014, 01:11:46 PM »
I want that when I show a menu all other buttons under it not are clickable...how can I do it ? I try to use more panels with more depth but it not work...

8
NGUI 3 Support / Change UITexture runtime
« on: December 12, 2014, 09:45:09 AM »
I must change the texture of <UITexture> with an image that I download from web. The code is :

  1.                 userImg.GetComponent<UITexture>().material.mainTexture = SPFacebook.instance.userInfo.GetProfileImage(FacebookProfileImageSize.square);
  2.                 GameObject.Find("UI Root").GetComponent<UIPanel>().Refresh();
  3.  

It's right ? because the texture not change....

9
NGUI 3 Support / Re: How to make scene loading ?
« on: November 30, 2014, 11:59:39 AM »
No, not work fine... :( this is the code :

  1.  
  2. public void loadLevel(int numL){
  3.                 string levelName = "Level_" + numL;
  4.                 setLevelInfo (numL);
  5.                 StartCoroutine(waitLoading(levelName));
  6. }
  7.  
  8. IEnumerator waitLoading(string levelName){
  9.                 NGUITools.SetActive(menuLoading,true);
  10.                 yield return null;
  11.                 Application.LoadLevel(levelName);
  12.                 NGUITools.SetActive(menuLoading,false);
  13.                
  14. }
  15.  

The problem is that It not show the menuLoading but if I delete the row NGUITools.SetActive(menuLoading,false); the menu is showed..why it not wait for NGUITools.SetActive(menuLoading,false); ?

10
NGUI 3 Support / Re: How to make scene loading ?
« on: November 29, 2014, 09:19:42 PM »
Like this?

  1.  
  2. VisualLoadingScreen();
  3. yield WaitForEndOfFrame();
  4. Application.LoadLevel("1level");
  5. DisableLoadingScreen();
  6.  

11
NGUI 3 Support / Re: Error with Unity 4.6f1 and NGUI 3.7.6
« on: November 10, 2014, 03:06:04 AM »
I'm sorry but the ngui version is 3.7.5 not 3.7.6 have you solved the problem with 3.7.6 version ?

12
NGUI 3 Support / Error with Unity 4.6f1 and NGUI 3.7.6
« on: November 08, 2014, 05:43:54 PM »
I have this error when I NOT click play the scene is one background image and three button images

Quote
NullReferenceException: Object reference not set to an instance of an object
UIPanel.get_worldCorners () (at Assets/NGUI/Scripts/UI/UIPanel.cs:623)
UIPanelInspector.OnSceneGUI () (at Assets/NGUI/Scripts/Editor/UIPanelInspector.cs:87)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.SceneView.CallOnSceneGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/SceneView/SceneView.cs:1659)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/SceneView/SceneView.cs:1078)
UnityEditor.SceneView.OnGUI () (at C:/BuildAgent/work/d63dfc6385190b60/Editor/Mono/SceneView/SceneView.cs:991)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at

13
NGUI 3 Support / Re: What is the best way for to do....
« on: October 06, 2014, 11:14:16 AM »
So... call it yourself then.
  1. NGUITools.SetActive(Menu, true);
  2. Menu.GetComponent<UITweener>().ResetToBeginning();
Ok but I have just set ResetToBeginning from editor -> UI Play Tween --> onFinished section Notify TweenScale -> ResetToBeginning why I must use the script code ? I don't want use the script..

14
NGUI 3 Support / Re: What is the best way for to do....
« on: October 06, 2014, 05:30:00 AM »
Eh. You see the OnFinished section on the tween? Drag & drop the tween's game object here. Now select the ResetToBeginning function.

Done, no need to write a script. ;)
Hi ! I tried but not work fine because if I recall NGUITools.SetActive(Menu, true); from script, it not work because when it disable the menu after first tween reverse it disable the menu but also the tween and not reenable it also if you set ResettoBeginning

15
NGUI 3 Support / How to make scene loading ?
« on: October 05, 2014, 12:48:46 PM »
Is possibile to create a loading screen for scenes with NGUI ? I would like also only the text "Loading..." without progress bar...I have not Unity Pro and I can't use Application.LoadLevelAsync and similar.

PS: It's enough also only a loading screen when the game start and to load all game's assets.

Thank you

Pages: [1] 2 3