1. Calytic

    Calytic Community Admin Community Mod

    Hopefully this will be fixed soon. Let me explain this in a little more detail so people might understand better what is happening..

    Basically, the Rust client stores an index of all the GUI elements sent to it by the server. When the server sends the message "DestroyGUI", the gui is hidden to the client but the element index is not properly cleared. When the client is sent the same GUI again, it cannot add a GUI element that uses the same name as an element previously sent (because it already exists in the index).

    In effect, any GUI the server sends will work as intended only the first time and not anytime after that.

    Your solution of adding a RNG to the element name is the only known workaround. This workaround is imperfect as there is a chance that the same RNG will be created again. During the clients play session, the pool of available element names (with RNG) will slowly shrink until eventually the GUI breaks again in the same way. The only way to workaround this is to increase the min/max range of the RNG or tell the player to reconnect to the server and thus reset their element index.
     
  2. Ohh! I understand now. Thanks!
     
  3. Just to add that it's because the client checks the index to see if the GUI "GClock" is in the list, it will find it but once it tries to get the actual GUI GameObject in the Hierarchy it doesn't find it and then pops out the error.

    As far as I know, this error will not be fixed anytime soon. It has been here for months and I even contacted Garry about this issue, explaining it and requesting a fix, and he declined to change it. =(
     
  4. Nothing. Solved. Where is the delete?
     
    Last edited by a moderator: Sep 26, 2015
  5. Anyone know how using icons from game? I've saw on this thread : ""sprite"": ""assets/icons/items/rifle_ak.png"" but don't work. Thanks for your help.
     
  6. I used Icons from URL's. I picked them from a website.
     
  7. Not possible to use icons from games and with SPRITE instead of URL? I think it's possible.. URL make ugly icons.
     
  8. It was possible somehow. But I am not sure. Never used that.
     
  9. Thanks for your help.
     
  10. Just today noticed that some of my UI looks weird on different screen resolutions while rust UI stay unmoved.
    It makes me really sad :/
    Few screenshots under the spoiler:
    [​IMG]
    [​IMG]
    [​IMG]
    Code:
                var btnContainer = new CuiPanel
                {
                    RectTransform =
                        {
                            AnchorMin = "0.6756176 0.1137503",
                            AnchorMax = "0.7821605 0.1628347"
                        },
                    Image = {Color = "0.3 0.3 0.3 0.3"}
                };
    Is there any method to deal with that? To fix position\size?
     
  11. Did anyone else experience that CommunityEntity.ServerInstance is null? Can't use UI since that is a problem on my server.
    Edit: I have fixed this by restarting my server multiple times.
     
    Last edited by a moderator: Feb 6, 2016
  12. You will have to play around with it but using
    Code:
    Resources.Load("") as Sprite
    might help... just read up about assets and loading them into your game for Unity3D.
    [DOUBLEPOST=1456386954][/DOUBLEPOST]
    EDIT: Wait this is server side calling client side so that won't work. =/