{"repo":"lazysquirrellabs/min_max_range_attribute","free":true,"listed":false,"github":"https://github.com/lazysquirrellabs/min_max_range_attribute","clone":"git clone https://github.com/lazysquirrellabs/min_max_range_attribute.git","description":"A bounded (i.e., with a minimum and maximum) range attribute for Unity's Vector2 and Vector2Int fields.","language":"C#","stars":26,"topics":["unity","unity-editor","unity3d-plugin","game-development","gamedev","unity-tools"],"license":"MIT","category":"game-templates","readme_excerpt":"Min/max Range Attribute A bounded (i.e., with a minimum and maximum) range attribute for Unity's Vector2 and Vector2Int fields that draws fields as min/max range sliders, easing the definition of bounded ranges on the inspector. Features - Intuitive, compact inspector representation. - Support for Unity's Vector2 and Vector2Int types. - Easy to use: just add the attribute to a serialized field of a supported type. - Custom floating-point decimal places (0 to 3). - Error prevention. Unlike using separate fields for minimum and maximum, value integrity is guaranteed (e.g., the minimum will never be greater than the maximum) by the inspector. - Uses built-in Unity's EditorGUILayout.MinMaxSlider under the hood. Usage To use the attribute, simply add it to a serialized field of a supported type ( Vector2 or Vector2Int ). Its inspector representation will be a MinMaxSlider , a slider than can be used to represent a range within minimum and maximum limits. The left handle controls the vector's x component and the right handle controls the vector's Vector2 usage When using the attribute on a field of type Vector2 , its constructor takes 3 arguments: - minLimit : the minimum possible value (lower bound). - maxLimit : the maximum possible value (upper bound). - decimals : how many decimal places the inspector should display. Default is 1 and values must be in the [0, 3] range. For example, the field below has minLimit equal to 0, maxLimit equal to 10 and decimals equal to 3: And its in","default_branch":null,"files":null,"tree":[],"storefront":"/r/lazysquirrellabs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/lazysquirrellabs/min_max_range_attribute/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}