Hi,
Consider the following Script
//my integer variable
var intValue : int;
function Update(){
print( intValue );
}
the above code will print the value what ever it will be set in the inspector.
I want to apply the constraint on the possible range of values that can be set in the (var intValue : int; )
intValue variable. in inspector.
for example i want to apply the constraint that the variable intValue should only contain value between 0 - 100
how can i do that, is there any method to set this type of constraint.
Edit: one way could be to use the editor script that would check if value entered is more than upper limit and set the set the upper limit value, and for lower limit vise versa