CustomPremadeModifier.cs 443 B

123456789101112131415161718
  1. using UnityEngine;
  2. /* Uncomment this to work from it as a base for your own modifier
  3. *
  4. *
  5. [ModifierID("Your Modifier Identity here")]
  6. public class CustomPremadeModifier : ProceduralImageModifier {
  7. #region implemented abstract members of ProceduralImageModifier
  8. public override Vector4 CalculateRadius (Rect imageRect){
  9. float r = Mathf.Min (imageRect.width,imageRect.height)*0.5f;
  10. return new Vector4(r,r,r,0);
  11. }
  12. #endregion
  13. }
  14. */