docs.unity3d.com
    目次を表示する/隠す

    Class ColorPreset

    Object that contains a list of predefined colors and parameters to generate more colors.

    Inheritance
    Object
    Object
    ScriptableObject
    ColorPreset
    Inherited Members
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(String)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Unity.MARS.Authoring
    Syntax
    [CreateAssetMenu(fileName = "ColorPreset", menuName = "MARS/Developer/ColorPreset")]
    [MovedFrom("Unity.MARS")]
    public class ColorPreset : ScriptableObject

    Methods

    GetColor(Int32)

    Gets the color for a given index. This will choose from the predefined list or generate a color based on the index.

    Declaration
    public Color GetColor(int colorIndex)
    Parameters
    Type Name Description
    Int32 colorIndex

    The index into the list of predefined colors. If greater than the list length, it will be the index into the procedural color generation.

    Returns
    Type Description
    Color

    A new color from this preset.

    GetNewSaturation(Int32)

    Generate a saturation (HSV) in the defined range

    Declaration
    public float GetNewSaturation(int index)
    Parameters
    Type Name Description
    Int32 index

    Index into the sequence

    Returns
    Type Description
    Single

    Saturation value from 0 to 1

    GetNewValue(Int32)

    Generate a value (HSV) in the defined color range

    Declaration
    public float GetNewValue(int index)
    Parameters
    Type Name Description
    Int32 index

    Index into the sequence

    Returns
    Type Description
    Single

    Value from 0 to 1

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)