docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method SetHighlight

    SetHighlight(GameObject, bool, Transform, Material, bool, float)

    Method for highlighting objects

    Declaration
    void SetHighlight(GameObject go, bool active, Transform rayOrigin = null, Material material = null, bool force = false, float duration = 0)
    Parameters
    Type Name Description
    GameObject go

    The object to highlight

    bool active

    Whether to add or remove the highlight

    Transform rayOrigin

    RayOrigin that hovered over the object (optional)

    Material material

    Custom material to use for this object

    bool force

    Force the setting or unsetting of the highlight

    float duration

    The duration for which to show this highlight. Keep default value of 0 to show until explicitly hidden

    In This Article
    Back to top
    Copyright © 2024 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)