UniformModifier.cs 452 B

1234567891011121314151617181920212223242526
  1. using UnityEngine;
  2. using UnityEngine.UI;
  3. [ModifierID("Uniform")]
  4. public class UniformModifier : ProceduralImageModifier {
  5. [SerializeField]private float radius;
  6. public float Radius {
  7. get {
  8. return radius;
  9. }
  10. set {
  11. radius = value;
  12. }
  13. }
  14. #region implemented abstract members of ProceduralImageModifier
  15. public override Vector4 CalculateRadius (Rect imageRect){
  16. float r = this.radius;
  17. return new Vector4(r,r,r,r);
  18. }
  19. #endregion
  20. }