---
tags:
    - "Physics, 2D"
---

# Bounce Threshold

[Physics 2D](index.md) / **Bounce Threshold**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :green_circle: Can Write

</div>

## Description

The Bounce Threshold static property of the Physics 2D class

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]
    [Set]

    [Title("Bounce Threshold")]
    [Category("Physics 2D/Bounce Threshold")]
    [Description("The Bounce Threshold static property of the Physics 2D class")]

    [Image(typeof(IconPhysics), ColorTheme.Type.Lime, typeof(Badge2D))]
    [Keywords("Physics, 2D")]

    [Serializable]
    public class GenTypeNumber_Physics2D_BounceThreshold : TypeNumber
    {

        public override double GetPreview(GameObject source)
        {
            return Physics2D.bounceThreshold;
        }

        public override double Get(Args args)
        {
            return Physics2D.bounceThreshold;
        }

        public override void Set(double value, Args args)
        {
            Physics2D.bounceThreshold = (float) value;
        }

        public override string ToString()
        {
            return $"Physics 2D Bounce Threshold";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}
```

