1. Yes we can, but it will be bad way... We just need to wait for new update.
     
  2. The only current bypass that MIGHT work is to randomly generate the button name on every UI call. So for example Button88 will increment to Button89 and so on. This is just an idea that is not tested.

    I will recommend waiting for Garry/Rust to fix this issue.
     
  3. It's bad way(
    I prefer to create static elements (ex: TitleButton) and just change the text without deleting button every update.
     
  4. at RustIO will be a display issue cards on servers behind a router. You can, of course, to bypass the configuration in which you specify the ip address of the server...
     
  5. Yeah, this helped (for now i just want learn it a bit and trying to make some simple menu).

    I'm used simple (maybe bit ugly) random number what added everytime to all panel names:
    Code:
    var RndName = ((int)Math.Round(UnityEngine.Random.Range(0f, 10000000f))).ToString();
    ps i know that UnityEngine.Random.Range access also int, but while testing it was bugged and almost always returns same value, at least this was few updates before.

    Anyway its just temporary for testing...

    And i have question - is there way to create some filled rectangle of a certain size? Or i must use images for that (with needed sizes)? Because for now i'm getting only "black" square always with same size using this:

    Code:
                            {
                                ""name"": ""Test{RND}"",
                                ""parent"": ""Overlay"",
                                ""components"":
                                [
                                    {
                                        ""type"":""RectTransform"",
                                        ""anchormin"": ""0 0"",
                                        ""anchormax"": ""1 1""
                                    },
                                    {
                                        ""type"":""NeedsCursor""
                                    }
                                ]
                            },
                            {
                                ""name"": ""TitlePanelBase{RND}"",
                                ""parent"": ""Test{RND}"",
                                ""components"":
                                [
                                    {
                                        ""type"":""UnityEngine.UI.Button"",
                                        ""close"":""Test{RND}"",
                                        ""color"": ""0.3 0.3 0.3 1.0"",
                                    },
                                ]
                            }
    It seems like i can't find way to set size of RectTransform thing, only position...
     
    Last edited by a moderator: Jun 14, 2015
  6. Well basically the Position is also the size. It's a very ugly complex system to work from just raw values. I wrote up a pretty decent system which I'm hoping to release when most of the issues has been fixed.

    The next best thing you can do to create a filled space on screen is to use this...
    Code:
    {
         ""type"":""UnityEngine.UI.Image"",
         ""color"":""0.1 0.1 0.1 1"",
    },
    This will help you get a filled space using colors instead of an image.
    so basically you have 4 values for "color" to fill in. it's your basic RGBA system where A is the Alpha/Opacity of the color.

    Code:
       COLOR    :   RED GREEN BLUE ALPHA
    ""COLOR"": ""0.1 0.1 0.1 1"",
     
  7. @Zuen thank you! now i understand what i doing wrong, i didn't correctly understand what is "anchormin" and max, I thought this position of my panels, but it also scales it. Now i'm finally got something working.

    Another question - as i can understand we can use rust icons here, how can i look this icon names etc?
     
  8. I honestly have no idea how to look up the names right now. I will try and find some solution to this but right now i'm a bit clueless on it.
     
  9. Hmmm, does anyone else have issue with text on buttons? When there is text on button you can't anymore click on button where is text displayed, only in outer of text.
     
  10. Can you post the JSON of the button and text for me please? It seems like you didn't make the Text a child of the button.
     
  11. here is button part:

    Code:
                            {
                                ""name"": ""TitlePanelBut{RND}"",
                                ""parent"": ""TitlePanelBase{RND}"",
                                ""components"":
                                [
                                    {
                                        ""type"":""UnityEngine.UI.Button"",
                                        ""close"":""Test{RND}"",
                                        ""color"": ""0.6 0.3 0.3 1.0"",
                                    },
                                    {
                                        ""type"":""RectTransform"",
                                        ""anchormin"": ""0.9 0.9"",
                                        ""anchormax"": ""1 1""
                                    },
                                ]
                            },
                            {
                                ""parent"": ""TitlePanelBut{RND}"",
                                ""components"":
                                [
                                    {
                                        ""type"":""UnityEngine.UI.Text"",
                                        ""text"":""X"",
                                        ""fontSize"":20,
                                        ""align"": ""MiddleCenter"",
                                    },
                                ]
                            },
    Like you can see i set it like children, but previous panel is also childer of another, if this can affect, don't know.
     
  12. Well this is suppose to work then. I see nothing wrong at all...
     
  13. Hmm, i have idea or so... Maybe someone can code something for garry or so so we can create something what will can use http://docs.unity3d.com/Manual/StyledText.html ? I mean some form/component in UI where we can use tags like in chat etc. Because right now there is very hard to display messages in multiple colors when i want only highlight small part of text... Not sure anyway if this is possible. Also some scroll functional can be good addition.
     
    Last edited by a moderator: Jun 15, 2015
  14. Would be awesome to put in style for text!

    On another note!

    I'm glad to announce that my UI system is working pretty good. I also added a new feature where the UI you send to the client can now be destroyed after a certain set time. This is useful for displaying notifications or w/e crap we can come up with!

    Next feature:
    Giving the option to update values of a current UI control. So if you wanted to display some small box displaying the players online and want to update it. This is the kind of feature you need.
     
  15. Problem with that is you have to refresh the data not the whole UI... BUT I have yet to figure that out. xD Since you can't destroy the text and then re-write it... You have to destroy the whole Panel then re-draw everything.
     
  16. Honestly, that is incorrect. If you use the default examples given by Garry then yes it is not possible. but with the system I made I am able to.

    ...

    So I just tested my theory and I managed to re-position a button without having to re-create the whole panel.

    http://gyazo.com/7dccc2cb673b1611f6002a9ec42adc85

    How my system works.

    You create a window.
    Then you start adding your controls (Button/Image/RawImage/Label)
    Then you send the window to the player.

    Now when creating the window you can set some properties for it like the fadeOut time | if it needs a cursor | and if it needs to be removed after x amount of time.

    You can also update controls of the window for a selected player.
     
    Last edited by a moderator: Jun 15, 2015
  17. Hm.. Nice. I think I'll still stay with Garry's though... I mean good work and all.. :p But What I want the GUI Faces to be used for are just information panels... And maybe a shop... But :) Whatever works xD
     
  18. Whatever floats your boat :p
     
  19. you already can use them ;)
    [DOUBLEPOST=1434371425][/DOUBLEPOST]
    you only need to re-draw text part, not button or panel
    [DOUBLEPOST=1434371565][/DOUBLEPOST]
    we can create that, only what we need - fix error from new update
     
  20. I made a pull request for the error. Hopefully he accepts it or fixes it himself.