DynamicRangeAttribute.cs 770 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. using UnityEngine;
  9. namespace Meta.WitAi.Utilities
  10. {
  11. public class DynamicRangeAttribute : PropertyAttribute
  12. {
  13. public string RangeProperty { get; private set; }
  14. public float DefaultMin { get; private set; }
  15. public float DefaultMax { get; private set; }
  16. public DynamicRangeAttribute(string rangeProperty, float defaultMin = float.MinValue, float defaultMax = float.MaxValue)
  17. {
  18. DefaultMin = defaultMin;
  19. DefaultMax = defaultMax;
  20. RangeProperty = rangeProperty;
  21. }
  22. }
  23. }