RenderImage.SetBackground C# (CSharp) Method

SetBackground() public method

The rendertexture is not transparent. So if you want to the UI elements can be seen in the back of the models/particles in rendertexture, you can set a maximunm two images for background. Be careful if your image is 9 grid scaling, you must make sure the place holder is inside the middle box(dont cover from border to middle).
public SetBackground ( GObject, image ) : void
image GObject,
return void
    public void SetBackground(GObject image)
    {
        SetBackground(image, null);
    }

Same methods

RenderImage::SetBackground ( GObject, image1, GObject, image2 ) : void

Usage Example

    protected override void OnInit()
    {
        this.contentPane = UIPackage.CreateObject("RenderTexture", "TestWin").asCom;
        this.SetXY(200, 50);

        _renderImage = new RenderImage(contentPane.GetChild("holder").asGraph);
        //RenderImage是不透明的,可以设置最多两张图片作为背景图
        _renderImage.SetBackground(contentPane.GetChild("frame").asCom.GetChild("n0"), contentPane.GetChild("n20"));

        contentPane.GetChild("btnLeft").onTouchBegin.Add(__clickLeft);
        contentPane.GetChild("btnRight").onTouchBegin.Add(__clickRight);
    }
All Usage Examples Of RenderImage::SetBackground