docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetPercentage

    GetPercentage(float, float, float)

    Get the percentage of the current value between source and target

    Declaration
    public static float GetPercentage(float current, float target, float source)
    Parameters
    Type Name Description
    float current

    The current value

    float target

    The target value

    float source

    The source value

    Returns
    Type Description
    float

    The percentage

    GetPercentage(Color, Color, Color)

    Get the percentage of the current color between source and target

    Declaration
    public static float GetPercentage(Color currentColor, Color targetColor, Color sourceColor)
    Parameters
    Type Name Description
    Color currentColor

    The current color

    Color targetColor

    The target color

    Color sourceColor

    The source color

    Returns
    Type Description
    float

    The percentage

    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)