// Use this for initialization void Start() { var spr = GetComponent <SpriteRenderer>(); var tex = Texture_Blur.CreateBlurTexture(spr.sprite.texture, 2.0f); spr.sprite = Sprite.Create(tex, spr.sprite.rect, new Vector2(0.5f, 0.5f), 100.0f); }
// Use this for initialization void Start() { var img = GetComponent <Image>(); var tex = Texture_Blur.CreateBlurTexture(img.sprite.texture, 10.0f); img.sprite = Sprite.Create(tex, img.sprite.rect, new Vector2(0.5f, 0.5f), 100.0f); }