# Canvas Renderer Get Secondary Texture

[Rendering](../index.md) / [Canvas Renderer](index.md) / **Canvas Renderer Get Secondary Texture**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns the execution of Get Secondary Texture method on the Canvas Renderer component

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.Rendering;

namespace VisualScript.Runtime
{
    [Get]
    
    [Title("Canvas Renderer Get Secondary Texture")]
    [Category("Rendering/Canvas Renderer/Get Secondary Texture")]
    [Description("Returns the execution of Get Secondary Texture method on the Canvas Renderer component")]
    
    [Image(typeof(IconEye), ColorTheme.Type.TextLight)]
    
    [Serializable]
    public class GenTypeTexture_CanvasRenderer_GetSecondaryTexture_1 : TypeTexture
    {
        [SerializeField] private GetGameObject m_CanvasRenderer = new GetGameObject(
            new GenTypeGameObject_CanvasRenderer()
        );
        
        [SerializeField] private GetInteger m_Index = new GetInteger();
        
        public override Texture Get(Args args)
        {
            CanvasRenderer component = this.m_CanvasRenderer.Get<CanvasRenderer>(args);
            if (component == null) return default;
            
            Texture value = (Texture) component.GetSecondaryTexture(
                (int) this.m_Index.Get(args)
            );
            
            return value;
        }
        
        public override string ToString()
        {
            return $"{this.m_CanvasRenderer} Get Secondary Texture ({this.m_Index})";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

