docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HasEditorColorMethods

    Methods for classes that implement IHasEditorColor

    Inheritance
    object
    HasEditorColorMethods
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.MARS.Authoring
    Assembly: Unity.MARS.dll
    Syntax
    [MovedFrom("Unity.MARS")]
    public static class HasEditorColorMethods

    Methods

    ApplyHueToChildren(IHasEditorColor, float)

    Declaration
    public static void ApplyHueToChildren(this IHasEditorColor editorColor, float hueSimilarity = 0.9)
    Parameters
    Type Name Description
    IHasEditorColor editorColor
    float hueSimilarity

    SetNewColor(IHasEditorColor, bool, bool)

    Sets a new color for this object

    Declaration
    public static void SetNewColor(this IHasEditorColor editorColor, bool inheritHue, bool forceNew = false)
    Parameters
    Type Name Description
    IHasEditorColor editorColor

    This object (extension method)

    bool inheritHue

    If enabled, the color will use the same hue as any parent with the HasEditorColor interface.

    bool forceNew

    If enabled, the color will use a new color index, even if it is already the highest index in the scene

    SetNewColorIfDefault(IHasEditorColor)

    If the color is set to the default color, then it will choose a new color.

    Declaration
    public static void SetNewColorIfDefault(this IHasEditorColor editorColor)
    Parameters
    Type Name Description
    IHasEditorColor editorColor

    This object (extension method)

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)