Skip to content

Game.Prefabs.GuideLineSettingsData

Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs

Type: struct

Base: System.ValueType
Implements: Unity.Entities.IComponentData, Unity.Entities.IQueryTypeParameter

Summary:
A lightweight ECS component that stores color settings used by guide/preview lines in the game (e.g., placement preview, guidance overlays). Each field is a UnityEngine.Color and represents the color to use for a particular priority level or for positive feedback. This struct is intended to be added as component data to entities so systems rendering or evaluating guide lines can read consistent color settings.


Fields

  • public UnityEngine.Color m_VeryLowPriorityColor
    Color used for very-low-priority guide lines (least prominent).

  • public UnityEngine.Color m_LowPriorityColor
    Color used for low-priority guide lines.

  • public UnityEngine.Color m_MediumPriorityColor
    Color used for medium-priority guide lines.

  • public UnityEngine.Color m_HighPriorityColor
    Color used for high-priority guide lines (most prominent).

  • public UnityEngine.Color m_PositiveFeedbackColor
    Color used to indicate positive feedback (for example, when an action or placement is valid).

Properties

  • None.
    This is a plain data struct (IComponentData) with public fields for direct storage and access.

Constructors

  • public GuideLineSettingsData()
    No explicit constructor is declared in the source; the default parameterless struct constructor will initialize the Color fields to their default values (RGBA = 0). Create instances using an object initializer to set desired colors.

Methods

  • None.
    This type contains only public fields and no methods.

Usage Example

using Unity.Entities;
using UnityEngine;
using Game.Prefabs;

public class GuideLineSettingsExample
{
    void CreateAndAssign()
    {
        var em = World.DefaultGameObjectInjectionWorld.EntityManager;
        var entity = em.CreateEntity();

        var settings = new GuideLineSettingsData
        {
            m_VeryLowPriorityColor = new Color(0.6f, 0.6f, 0.6f, 1f), // gray
            m_LowPriorityColor     = Color.green,
            m_MediumPriorityColor  = Color.yellow,
            m_HighPriorityColor    = Color.red,
            m_PositiveFeedbackColor= Color.cyan
        };

        em.AddComponentData(entity, settings);
    }
}

{{ This component is intended for use by rendering or logic systems that query guide-line color settings. Because it implements IQueryTypeParameter, it can be used in ECS queries for efficient access. If you need these settings to be editable in the editor, provide an authoring MonoBehaviour/authoring component that converts authored data into this IComponentData during conversion. }}