Unity Community


Page 99 of 155 FirstFirst ... 4989979899100101109149 ... LastLast
Results 1,961 to 1,980 of 3093

  1. Location
    Toronto, ON
    Posts
    1,901
    Quote Originally Posted by CJO View Post
    I've heard that NGUI is not compatible with SpriteManager2 because of conflicting editor classes among other things.

    Is this true? If so is there a way around it?
    NGUI is not compatible with EZGUI or SpriteManager, but you can make it compatible by renaming conflicting class names.
    NGUI Resources: Documentation | Forum | Release Notes
    Want to get notified when NGUI gets updated? Subscribe to this thread.


  2. Posts
    166
    Quote Originally Posted by ArenMook View Post
    @Asse: Instead of OnRelease, consider using OnClick.
    No no, I want to use OnRelease, but as I said, the behavior differes from what you know from other GUIs of applications/operating systems like Windows, iOS and so on. When you release the press/click and you're not above the item, it shouldn't trigger the OnRelease method.


  3. Location
    Toronto, ON
    Posts
    1,901
    If you want that kind of behaviour, change UIButtonMessage OnPress function from:

    Code:  
    1. void OnPress (bool isPressed)
    2. {
    3.     if (((isPressed && trigger == Trigger.OnPress) ||
    4.         (!isPressed && trigger == Trigger.OnRelease))) Send();
    5. }

    To:

    Code:  
    1. void OnPress (bool isPressed)
    2. {
    3.     if (((isPressed && trigger == Trigger.OnPress) ||
    4.         (!isPressed && trigger == Trigger.OnRelease && UICamera.lastHit.collider == collider))) Send();
    5. }
    NGUI Resources: Documentation | Forum | Release Notes
    Want to get notified when NGUI gets updated? Subscribe to this thread.


  4. Location
    Bangalore, India
    Posts
    4
    I'm trying to build a tree like control using NGUI to show hierarchical data. I've got a simple tree view using nested UIGrid's but have to manually insert blank items (underneath parent tree nodes) to show tree indentation. What could be the best possible approach in NGUI to make such a control?


  5. Location
    Toronto, ON
    Posts
    1,901
    Best approach? Create a custom widget. It may not be necessarily the fastest, however. You can also write your own placement class instead of the grid / table. That would be faster.
    NGUI Resources: Documentation | Forum | Release Notes
    Want to get notified when NGUI gets updated? Subscribe to this thread.


  6. Posts
    23
    Hi.
    How to change the UILabel alpha In script?
    My code can't works.

    Code:  
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class NewBehaviourScript : MonoBehaviour {
    5.     private UILabel label;
    6.     // Use this for initialization
    7.     void Start () {
    8.         label = GameObject.Find("Label").GetComponent<UILabel>();
    9.     }
    10.    
    11.     // Update is called once per frame
    12.     void Update () {
    13.         label.color.a = 0.5f;
    14.     }
    15. }

    Where is alpha ?


  7. Location
    Switzerland
    Posts
    289
    Hi,

    I d like to make a feature request:
    I d like to have a new Clipping option for the UIGrid:
    -When any of the child of an item in the UIGrid is not visible, then make the whole item not visible.

    This way I could certainly avoid using the slow OpenGL ES 2.0.

    Please let me know if that is ok.

    Stephane


  8. Location
    Toronto, ON
    Posts
    1,901
    @ArcDragon:
    You shouldn't use GameObject.Find. It's slow, and hard-coding names is a very bad practice. Attach this script directly to the label instead, or have a public reference to your label that you will set in the inspector.
    Try attaching this script to your label:

    Code:  
    1. using UnityEngine;
    2.  
    3. [RequireComponent(typeof(UILabel))]
    4. public class NewBehaviourScript : MonoBehaviour
    5. {
    6.     UILabel mLabel;
    7.  
    8.     void Start ()
    9.     {
    10.         mLabel = GetComponent<UILabel>();
    11.     }
    12.  
    13.     void Update ()
    14.     {
    15.         Color c = mLabel.color;
    16.         c.a = 0.5f;
    17.         mLabel.color = c;
    18.     }
    19. }

    @mohydine: Clipping is done entirely via shaders right now. You can certainly write a different class to do the kind of clipping you're describing, and it would be pretty easy to do -- simply store the rectangles of each of the child of the new grid (NGUIMath.CalculateRelativeWidgetBounds), then check them against some rectangle specified in your script.
    NGUI Resources: Documentation | Forum | Release Notes
    Want to get notified when NGUI gets updated? Subscribe to this thread.


  9. Posts
    23
    @ArenMook
    Thank you for your tip!
    You've been very helpful!


  10. Posts
    198
    Hi guys!

    Probably you will be interested in our NGUI extension - NData, that allows you to implement ui independent logic and use automatic data bindings - http://forum.unity3d.com/threads/127...ework-for-NGUI

    Cheers,


  11. Posts
    23
    Hi.
    Excuse me.
    I want to question again.

    I use progress bar.
    Bar works in unity project.
    but,progress bar don't works in web player,after I build game.

    This is my code,which is attached to progress bar object.

    Code:  
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class NewBehaviourScript : MonoBehaviour {
    5.     private UISlider slider;
    6.  
    7.     void Start () {
    8.         slider = GetComponent<UISlider>();
    9.     }
    10.  
    11.     void Update () {
    12.         slider.rawValue = slider.rawValue * 0.9f;
    13.     }
    14. }

    Why?


  12. Location
    Aarhus, Denmark
    Posts
    61

    Text formatting

    Hi,

    I was wondering what kind of text formatting is possible with NGUI? Are we just able to change the colour or can we do other things as well?

    I'm currently working on a project that requires a lot of text formatting - pretty much anything you can do with HTML would be nice, but I know that's asking a lot

    The two primary features I would need are proper bullets with indentation:

    • Item 1
    • Item 2
    • Item 3


    And being able to specify a hyperlink in the text.

    Do you have any plans for more text formatting?
    Thanks for your time - the plugin looks great


  13. Posts
    2,225
    Quote Originally Posted by ArcDragon View Post
    Hi.
    Excuse me.
    I want to question again.

    I use progress bar.
    Bar works in unity project.
    but,progress bar don't works in web player,after I build game.

    This is my code,which is attached to progress bar object.

    Code:  
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class NewBehaviourScript : MonoBehaviour {
    5.     private UISlider slider;
    6.  
    7.     void Start () {
    8.         slider = GetComponent<UISlider>();
    9.     }
    10.  
    11.     void Update () {
    12.         slider.rawValue = slider.rawValue * 0.9f;
    13.     }
    14. }

    Why?
    you need to use slider.sliderValue instead of rawValue. rawValue is only for use in the editor.


  14. Location
    Toronto, ON
    Posts
    1,901
    Quote Originally Posted by Peter Hou View Post
    Hi,

    I was wondering what kind of text formatting is possible with NGUI? Are we just able to change the colour or can we do other things as well?

    I'm currently working on a project that requires a lot of text formatting - pretty much anything you can do with HTML would be nice, but I know that's asking a lot

    The two primary features I would need are proper bullets with indentation:

    • Item 1
    • Item 2
    • Item 3


    And being able to specify a hyperlink in the text.

    Do you have any plans for more text formatting?
    Thanks for your time - the plugin looks great
    I currently have no plans to add support for hyperlinks in text. A skilled dev could add support for that within a few days, but it would complicate the system too much for me to add it to NGUI myself. I want to keep it simple to make it easier for others to modify it to suit their needs.
    NGUI Resources: Documentation | Forum | Release Notes
    Want to get notified when NGUI gets updated? Subscribe to this thread.


  15. Location
    Spain
    Posts
    172
    Does NGUI offers an easy system to create menus for different screens resolutions like iPhone3G or iPhone4. iPad or iPad retina..

    Thanks!


  16. Posts
    23
    @Jaimi
    Thank you very much!
    It works!


  17. Location
    Toronto, ON
    Posts
    1,901
    Quote Originally Posted by bitomule View Post
    Does NGUI offers an easy system to create menus for different screens resolutions like iPhone3G or iPhone4. iPad or iPad retina..

    Thanks!
    Yes, there are a few tools for that. You can choose your layout to scale with the resolution, or stay pixel-perfect as the dimensions change. UIAnchor lets you glue widgets to sides or corners of the screen. UIAtlas and UIFont have a 'replacement' parameter, letting you swap SD for HD atlas... and a few other tricks.
    NGUI Resources: Documentation | Forum | Release Notes
    Want to get notified when NGUI gets updated? Subscribe to this thread.


  18. Location
    Spain
    Posts
    172
    Thanks @ArenMook, that's all I need to know to purchase it!


  19. Location
    Lucerne
    Posts
    102
    Hi

    And whats about changing cursor pointer by rollover a button?
    I mean, this is the very common way to show the user, what's interactive and what not..


  20. Posts
    23
    Hi.
    I'm sorry to bother you again.

    I have a health bar question in the NGUI.
    How can I set health bar above game object?

    I read this topic.

    http://www.tasharen.com/?topic=creat...ite-on-the-fly

    With reference to this topic, I tried to make.but my project don't works...
    What should I do?

    my project construction
    Hierarchy
    Cube(AddUnitHUD is attached),MainCamera,Ground

    Project
    Anchor,AddUnitHUD,UnitHUD,NGUI

    Anchor
    -Panel(UnitHUD is attached)
    --Label
    --Progress Bar

    Thank you.
    Last edited by ArcDragon; 03-18-2012 at 08:45 AM. Reason: Optional

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •