Skip to content

πŸš€ Getting Started

Dennis edited this page Feb 2, 2025 · 6 revisions

πŸš€ Getting Started

1️⃣ Add the CustomUI Component

  1. Select a UI component in Unity (e.g., Image, TextMeshProUGUI)
  2. Open the Inspector panel
  3. Click Add Component and search for UIMaterialModifier

2️⃣ Assign a Shader

  1. Ensure the UI component's Material uses a shader that supports modification.
  2. Example: UI/Unlit/Transparent

3️⃣ Modify Shader Parameters

You can modify properties directly in the Inspector:

  • Color (_Color)
  • Transparency (_Alpha)
  • Saturation (_Saturation)
  • Contrast (_Contrast)

Or modify them via script:

using Dennis.UI;

CustomUI customUI = myGameObject.GetComponent<CustomUI>();
customUI.SetFloat("_Saturation", 1.5f);
customUI.SetColor("_Color", Color.red);

πŸ“¦ Installation | πŸ“Œ Shader Property Support | πŸ›  API Reference

Clone this wiki locally