Skip to content

Changing Settings at Runtime

HighlightRendererFeature.Instances lists loaded features, one per renderer asset. Change every instance so defaults apply whichever renderer is active.

using PixitGames.HighlightKit;
using UnityEngine;

public static class HighlightOptions
{
    public static void SetQuality(HighlightQuality quality)
    {
        foreach (var feature in HighlightRendererFeature.Instances)
            feature.Quality = quality;
    }

    public static void SetOutlineDefaults(Color color, float width)
    {
        foreach (var feature in HighlightRendererFeature.Instances)
        {
            feature.Outline.color = color;
            feature.Outline.width = width;
        }
    }
}

Changes take effect next frame. The list is empty until a renderer with the feature loads. Apply your desired settings again when additional renderers load later.

Editor asset persistence

Play Mode changes persist on renderer assets. Store and restore the original settings yourself when needed. Demo panels restore them when their scenes stop.