Solved UI FadeOut?

Discussion in 'Rust Development' started by deer_SWAG, Jul 7, 2016.

  1. Hi guys. I'm currently working with GUI and i noticed that fadeIn property in json is working while fadeOut is not.
    For example:
    Code:
    {
        "type": "UnityEngine.UI.RawImage",
        "imagetype": "Simple",
        "color": "1 1 1 1",
        "fadeIn": "0.5",
        "fadeOut": "1.5"
    }
    WTH?
     
    Last edited by a moderator: Jul 8, 2016
  2. The FadeOut option works something like this: (from what I can tell) works for me :)

    Code:
                    elements.Add(new CuiElement
                        {
                            Name = Title,
                            Parent = "Overlay",
                            FadeOut = 1f,
                            Components =
                                {
                                new CuiRawImageComponent { Color = "1 1 1 1", FadeIn = 0.9f, Url = "http://www.icon.com/icon.png", Sprite = "assets/content/textures/generic/fulltransparent.tga" },
                                new CuiRectTransformComponent { AnchorMin = "0.1 0.1",  AnchorMax = "0.9 0.9"}
                                }
                        });
    just a example of course.
     
  3. Okay. I got it. Components have fadeIn, but Elements have fadeOut.