Scripting
Namespace
The namespace
using ChocDino.UIFX;
Adding the FrameFilter Component
Add the FrameFilter component to your GameObject
// Add the component to your GameObject and set default properties
var frame = AddComponent<FrameFilter>();
frame.Shape = FrameShape.Rectangle;
// Padding:
frame.RectPadding = new RectEdge(16f); // Only for FrameShape.Rectangle
frame.RadiusPadding = 16f; // Only for FrameShape.Square and FrameShape.Circle
// Extend to edge:
frame.RectToEdge = new RectPadToEdge(); // Only for FrameShape.Rectangle
// Rounded corners:
frame.RectRoundCornerMode = FrameRoundCornerMode.None; // Only for FrameShape.Rectangle and FrameShape.Square
frame.RectRoundCornersValue = 0.25f; // Only for FrameShape.Rectangle and FrameShape.Square
frame.RectRoundCorners = new RectCorners(0.25f); // Only for FrameShape.Rectangle and FrameShape.Square
frame.Color = Color.black;
frame.Softness = 2f;
frame.BorderSize = 0f;
frame.BorderSoftness = 2f;
frame.BorderColor = Color.white;
frame.CutoutSource = false;
frame.Strength = 1f;