Dynamic Material System ⭐ Unity Asset with Fade & Object Pool ⭐ Throw Control

Опубликовано: 15 Ноябрь 2025
на канале: Makaka Games ⭐ Unity Developer
226
3

The Dynamic Material System and Object Pool are parts of Unity Asset called
Throw Control (*) ⭐ https://makaka.org/o/throw-control

📙 Features 📙

— Fading In & Fading Out: Dissolving/Appearing VFX,
— Material Changing in Runtime for Any Custom Game Logic (e.g., fail, win),
— Preventing Redundant Memory Allocations.

📙 Foundation 📙

"Material.SetColor" function (by Unity) performs Memory Allocations by Creating New Materials.

To avoid this, I developed "SetMaterial" function.

So if you plan to change the Colors of Objects in the Runtime, you need to create separate Materials with Target Colors in advance.

In the Unity Editor (MaterialControl.cs) you can customize Fading In & Fading Out with Full Control of Min & Max Values, Delay & Speed for Indicated Shader Parameter.

Actually, you can change any Float Parameter in your Shader.

🔮 Shaders (URP) 🔮

The Nature of the Fade depends on the _SliceGuide Texture on one side, and on the UV map on the other side. There are 2 Custom Shader Graphs with _SliceGuide Texture for Fading of Game Object and its Shadow.

Check [Your Material] — Shader — Shader Graphs — Makaka Games:

— Diffuse (Dissolving) Shader Graph,
— Bumped Diffuse (Dissolving) Shader Graph.

⭐ Unity Assets Used ⭐

The Dynamic Material System and Object Pool are parts of Throw Control (*) https://makaka.org/o/throw-control

Sensor Camera (*) https://makaka.org/o/sensor-camera
Grid & Skybox (*) https://makaka.org/o/standard-assets

🍊 Must-Have Unity Assets 🍊

Find & Fix Problems in Your Unity Project (*) https://makaka.org/o/maintainer
GameDev Humble Bundle (*) https://makaka.org/o/humble-unity

😊 All My Social Media 😊 https://makaka.org/social

#GameDev #Unity3D #Unity ‪@unity‬

(*) Disclosure: This post may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won't cost you any money, they will help me fund my dev projects while recommending great assets!