# Renderer Realtime Lightmap Index

[Mesh](../index.md) / [Renderer](index.md) / **Renderer Realtime Lightmap Index**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Realtime Lightmap Index property of the 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;

namespace VisualScript.Runtime
{
    [Get]
    [Set]
    
    [Title("Renderer Realtime Lightmap Index")]
    [Category("Mesh/Renderer/Realtime Lightmap Index")]
    [Description("The Realtime Lightmap Index property of the Renderer component")]
    
    [Image(typeof(IconMesh), ColorTheme.Type.Blue)]
    
    [Serializable]
    public class GenTypeInteger_Renderer_RealtimeLightmapIndex : TypeNumber
    {
        [SerializeField] private GetGameObject m_Renderer = new GetGameObject(
            new GenTypeGameObject_Renderer()
        );
        
        public override double GetPreview(GameObject source)
        {
            GameObject instance = this.m_Renderer.GetPreview(source);
            if (instance == null) return default;
            
            Renderer component = instance.GetComponent<Renderer>();
            return component != null ? component.realtimeLightmapIndex : default;
        }
        
        public override double Get(Args args)
        {
            Renderer instance = this.m_Renderer.Get<Renderer>(args);
            return instance != null
                ? instance.realtimeLightmapIndex
                : default;
        }
        
        public override void Set(double value, Args args)
        {
            Renderer component = this.m_Renderer.Get<Renderer>(args);
            if (component != null) component.realtimeLightmapIndex = (int) value;
        }
        
        public override string ToString()
        {
            return $"{this.m_Renderer} Realtime Lightmap Index";
        }
        
        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}


```

