docs.unity.cn
    Show / Hide Table of Contents

    Class ColorHelper

    Inheritance
    Object
    ColorHelper
    Namespace: UnityEngine.Reflect
    Syntax
    public static class ColorHelper

    Methods

    CalculateAverageColor(Renderer, Int32, Int32)

    Declaration
    public static Color CalculateAverageColor(Renderer renderer, int precision = 1, int materialWithTextureBias = 1)
    Parameters
    Type Name Description
    Renderer renderer
    Int32 precision
    Int32 materialWithTextureBias
    Returns
    Type Description
    Color

    ReadColor(NativeArray<Byte>, TextureFormat, Int32, ref Color)

    Declaration
    public static void ReadColor(NativeArray<byte> bytes, TextureFormat format, int colorIndex, ref Color color)
    Parameters
    Type Name Description
    NativeArray<Byte> bytes
    TextureFormat format
    Int32 colorIndex
    Color color

    WriteColor(NativeArray<Byte>, TextureFormat, Int32, Color)

    Declaration
    public static void WriteColor(NativeArray<byte> bytes, TextureFormat format, int colorIndex, Color color)
    Parameters
    Type Name Description
    NativeArray<Byte> bytes
    TextureFormat format
    Int32 colorIndex
    Color color
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 26 April 2021