ExtendRealityLtd / Zinnia.Unity

A collection of design patterns for solving common problems.
http://vrtk.io
MIT License
319 stars 38 forks source link

Ability to set FloatRange min and max values #505

Closed extendreality closed 4 years ago

extendreality commented 4 years ago

You can't set the min max values on a FloatRange property as the FloatRange is a strut. So just provide two methods on the FloatRange strut so its easier to update the values.

thestonefox commented 4 years ago

This is actually intended because the FloatRange strut is passed by value so direct modifications on the property would cause adverse effects. The recommended way is to save out the property to a local type, make the change and save back into it.