How can I set a property for the upper limit for another property's range

by Bane   Last Updated May 16, 2018 12:13 PM

I have two properties, I would like to set one property as the upper limit of another property, hence making the upper rely on a property. As below:

public int fullLength;

[Range(0, fullLength)]
public int segmentLength;

Is there a way to do this, possibly with a custom editor? If yes, how can it be done?

Tags : unity

Related Questions

How to animate objects in Unity 3D

Updated July 12, 2015 13:05 PM