docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Price

    Represents a price in a format that is serialized as both a decimal and a double.

    Inheritance
    object
    Price
    Implements
    ISerializationCallbackReceiver
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    [Serializable]
    public class Price : ISerializationCallbackReceiver

    Fields

    value

    The price as a decimal.

    Declaration
    public decimal value
    Field Value
    Type Description
    decimal

    Methods

    OnAfterDeserialize()

    Callback executed after Deserialization. Converts the raw data to a decimal and asigns it to value.

    Declaration
    public void OnAfterDeserialize()

    OnBeforeSerialize()

    Callback executed before Serialization. Converts value to raw data and to a double.

    Declaration
    public void OnBeforeSerialize()

    Implements

    ISerializationCallbackReceiver
    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)