Community Made Tools

Have you made any useful utilities with Odin?

Login and submit your creations here

Log Range Slider

Authored by Frantasad
Shared 09-05-2024

Range Attribute to draw slider with a logarithmic scale. Get code on Github.

Info

  • Sometimes you want more detail on one side of a scale rather than uniform.
  • Specifying such a range can be painful too
  • So here is an attribute that will allow you to do it with just 3 values - min, max, and center
  • Each value has a string method getter variant too, if you want to dynamically adjust the range.

Usage

[LogRange(0, 10, 1000)]
[SerializeField]
private int _ValueInt;

[LogRange(0, 10, 1000)]
[SerializeField]
private float _ValueFloat;