Everyday Unity – Telegram
Everyday Unity
1.1K subscribers
157 photos
59 videos
42 files
2.36K links
A game developer and tech lead in a top grossing company posting Unity, programming, and gamedev related stuff that I find interesting
Website: https://gamedev.center

Most used tags are:
#performance
#shader
#interview

Author: @alexmtr
Download Telegram
Reveal-By-Progress-Shader-For-Unity: A custom shader for Unity that reveals an object based on a progress value.

This effect is based on an old tutorial by Alan Zucconi. It's great to see a complete implementation that can be easily used for prototyping. Currently, it supports only the Built-in Render Pipeline.

I have seen this revealing effect in a lot of hyper casual games. Moreover, it can be modified for other purposes—for example, cutting off dark vertices entirely to imitate a 3D printing mechanic.

https://github.com/AnhPham/Reveal-By-Progress-Shader-For-Unity

#shader #reveal #builtin
👍7🔥4
How to Use Dependency Injection with ECS

A new post on my blog.
I’ve seen this question come up quite often in ECS discussions, so I decided to share how I typically integrate Dependency Injection containers with ECS — complete with the simplest working example on GitHub. To me, such a setup always feels more convenient and more efficient. But it doesn't mean it is the only or the right way to work with it. If you prefer the Entities approach, or a manual setup of dependencies via the inspector in Morpeh, then that is also okay.

https://gamedev.center/how-to-use-dependency-injection-with-ecs-for-scalable-game-development/

Repo: https://github.com/AlexMerzlikin/ECS-DI-Sample

#ecs #di
🔥12👍4
Post for those who struggle with motivation to finish their projects.

I came across a study that shows writing down your goals and sharing them with a friend can really help you achieve more (kinda obvious, but proves this point once again). Here are the details:

Participants: 267 people from different backgrounds.
Groups:
Group 1: Just thought about their goals.
Group 2: Wrote their goals down.
Group 3: Wrote goals + made action plans.
Group 4: Wrote goals + action plans + told a friend.
Group 5: Wrote goals + action plans + sent weekly updates to a friend.
Success Rates:
Group 1 (Unwritten Goals): 43% success rate.
Group 2 (Written Goals): 64% success rate.
Group 3 (Written Goals + Action Plans): 68% success rate.
Group 4 (Written Goals + Action Plans + Shared with a Friend): 70% success rate.
Group 5 (Written Goals + Action Plans + Weekly Progress Reports to a Friend): 76% success rate.

The study shows that each step—writing down goals, making action plans, and sharing progress with a friend—increases the likelihood of achieving those goals.

Download the report: https://scholar.dominican.edu/cgi/viewcontent.cgi?article=1002&context=psychology-faculty-conference-presentations

Conclusions:
1. The positive effect of accountability was supported: those who sent weekly
progress reports to their friend accomplished significantly more than those who
had unwritten goals, wrote their goals, formulated action commitments or sent
those action commitments to a friend.
2. There was support for the role of public commitment: those who sent their
commitments to a friend accomplished significantly more than those who wrote
action commitments or did not write their goals.
3. The positive effect of written goals was supported: Those who wrote their goals
accomplished significantly more than those who did not write their goals

I’ve been creating TODO lists and full-blown project boards with a backlog, milestones, and sprints using various tools for quite a while. Right now, I’ve settled on Notion and use various templates there for each new prototype. It hasn't helped me finish many recent games, though.

So with my latest prototype, I’m now trying the “Written Goals + Action Plans + Weekly Progress Reports to a Friend” method to see if it helps me reach a first playable prototype more successfully. I'm curious to see how it goes.

If you're interested in hearing more about my progress and how I'm applying this to my game, let me know by reacting to this post.

🔥 – Post progress updates here in this channel
💯 – Post progress updates, but in another channel; leave this one only for references to interesting posts
👎 – Don’t post updates anywhere 💀
🔥23👍3💯1
Quick and Dirty PlayerPrefs Persistence with VContainer

Lately, I’ve been deep into prototyping, and I’m always on the lookout for quick patterns that speed up the boilerplate. This blog post by Vigrid shares a neat way to persist data using PlayerPrefs and VContainer with minimal setup.

While the original example uses VContainer, the pattern is container-agnostic—you can adapt it easily to any DI framework you're using.

https://vigrid.gg/blog/2025/05/quick-and-dirty-playerprefs-persistence-with-vcontainer/

#save
👍9🔥2
Is your AI safe? Threat analysis of MCP (Model Context Protocol)

Cyber Ark finished digging into the Model Context Protocol (MCP) security model and found some nasty vulnerabilities that could seriously mess with devs using AI coding tools.

Quick Context: MCP is what lets tools like Claude Desktop and Cursor connect to external services and your local files. Basically, it's an API layer for AI apps.

The Problems:
- Malicious Tool Registration: Attackers can publish “helpful” tools that actually steal your code or secrets
- Server Chaining: Legit servers can quietly route requests to malicious ones
- Hidden Prompt Injection: Servers can embed invisible instructions that hijack the AI
- Weak Auth: Most MCP servers don’t really check who’s calling them

Why It Matters:
If you’re using AI coding assistants with MCP:
- Your codebase could be exfiltrated
- API keys in env vars are exposed
- Custom integrations might be backdoored

Quick Fixes:
- Stick to verified MCP servers
- Check the official registry
- Read server code before installing
- Don’t keep secrets in env vars if using MCP
- Use clients that require approval before calling tools

This is what happens when we rush to plug AI into everything without thinking about security. MCP’s flexibility is a double-edged sword.

I have personally been trying various MCPs for quite a while since they started to become popular. While I was concerned about security, not gonna lie, I didn't put enough effort into reviewing every MCP server myself (it is open source and totally safe, right? 💀), as I was focused on adding new features to multiple prototypes I've been working on lately and was more concerned about the tool's efficiency and how it improves the workflow rather than its security. What's more, I see some companies also pushing for MCP adoption, and I hope they pay more attention to security than I did with my prototypes.

Do you use any MCP for game dev and find it helpful?

Worth a look if you’re building or integrating with MCP

https://www.cyberark.com/resources/threat-research-blog/is-your-ai-safe-threat-analysis-of-mcp-model-context-protocol

#ai #mcp
🔥6👍2
Please open Telegram to view this post
VIEW IN TELEGRAM
Memory optimization guide in Unity 6

While this guide has some decent profiling and memory optimization tips, I was puzzled by the claim that Unity GC can compact managed memory blocks.

I even went to recheck the official documentation to verify that Unity still uses Boehm GC for both Mono and IL2CPP noscripting backends, and it is a non-compacting GC.

So I discussed this topic with ChatGPT, and it gave me the same claim about the compacting algorithm until I referenced official documentation in the chat. It's sad that a guide from such a well-known website with various valid tips is still affected by AI hallucinations and false claims (btw, if what the post claims regarding the compaction step is valid, then share links to the GC implementation or any docs, I would love to update my knowledge).

Apart from that AI slop, the tips are valid and can be used to optimize your runtime memory.

If you like reviews calling out misleading info, drop a 🔥

If you think I should skip posting stuff like this, hit 🗿

https://theknightsofu.com/memory-optimization-guide-in-unity-6/

#gc
🔥28👍1
So your code is slow: General C# and DOTS-specific performance tips – Technical Articles – Unity Discussions

A list of questions to ask yourself when your code is slow.
Don't forget the obligatory "profile first" to avoid optimizing what doesn't matter. I once saw a stellar 100x optimization, the author didn’t mention the function took 0.001 ms to begin with and was invoked once an hour though.
So this post also mentions how domain knowledge is important in optimization.

https://discussions.unity.com/t/so-your-code-is-slow-general-c-and-dots-specific-performance-tips/1654372

#optimization #dots
🔥10👍5
Rider 2025.2 EAP 7: Low-Level Exception Suppression and Other Updates for Debugging Games

Amazing news. You can now debug shaders in Rider. Gonna be super handy compared to how I did it before when needed: write data into a texture and render the texture onto the screen to see what's going on in the shader.

The new Frame Viewer plugin introduced in EAP 6 takes shader debugging to a new level by introducing source-level debugging for Unity shaders.

You can now inspect .rdc snapshots from RenderDoc, step through original ShaderLab code, set breakpoints, and analyze draw calls with vertex and pixel selection, texture previews, and shader-based filters.


https://blog.jetbrains.com/dotnet/2025/06/26/rider-2025-2-eap-7-low-level-exception-suppression/

#rider
🔥20👍4
How to optimize UIs in Unity: slow performance causes and solutions

A good post to elaborate on general tips regarding UI optimization.

TL;DR:
Layout rebuilds are a major performance bottleneck in Unity UI. Common triggers include transform changes, sprite swaps, text updates, and activating/deactivating GameObjects. To reduce rebuilds:
– Isolate changes with SubCanvases (but don’t overuse them, each adds its own draw call and layout pass, which can hurt batching and performance)
– Toggle visibility using SubCanvas or Canvas Group + pooling
– Use shaders for visual changes without layout impact
– Replace Unity's layout groups with custom ones for better performance in simpler cases.

A grain of salt: for such posts with performance tests, I would like to see a reference to a repo, ideally with automation to run all cases in one click to verify the results yourself on any version of Unity and device, as well as to verify the code under test itself.
What’s more, a table with all results would also be appreciated, since it allows for easier analysis of the findings.
Drop a 🔥 if you agree

https://dev.to/mygames/how-to-optimize-uis-in-unity-slow-performance-causes-and-solutions-3inh

#ui #optimization
🔥10👍2
Batching tamed: reducing batches via UI mask optimization

The post explains how UI masks kill batching and provides an example of how to implement a custom rectangular mask for the Image component that doesn't break a batch.

https://medium.com/my-games-company/batching-tamed-reducing-batches-via-ui-mask-optimization-4d346175140d

#ui #mask
🔥9👍2
Media is too big
VIEW IN TELEGRAM
A VHS effect breakdown in less than 1 minute

I built a custom VHS effect from scratch to get that gritty, analog vibe for my prototype about a post‑apocalypse. Cheaper, faster, and fully tailored to my needs.

Want the full shader code and a deeper dive into how it works? Drop a 🔥

#postprocess #shader #builtin #vhs
🔥15💩1
VHS effect breakdown in less than a minute

Following the post about sharing my progress here. While working on my prototype, I wanted to add a VHS-style post-processing effect for a retro, analog vibe.

I explored the asset store and found a good one, but at a pretty high price point, it felt too much for this stage of development.

I also checked several free and open-source implementations on GitHub, but many lacked documentation or even basic instructions on how to integrate them.

And since I prioritize development speed, it turned out building my own was faster than reverse-engineering someone else's code, especially with the help of AI to speed up shader prototyping and testing.

So, I created a custom VHS effect from scratch.

I broke the look down into key components:
🔹 Scanlines – flickering lines to mimic CRT displays
🔹 Color grading – slight desaturation with a soft blue tint
🔹 Color bleed – RGB channel separation (chromatic aberration)
🔹 Noise/static – analog-style grain
🔹 Wobble/distortion – horizontal offset to simulate tape playback

Each of these can be toggled on/off and fine-tuned in real time, and when combined, they recreate the familiar imperfections of VHS playback.

Have you seen any open source VHS effect that you can recommend? Or do you have any suggestions to improve my version?

#postprocess #shader #builtin #vhs
🔥13🗿4
Debug LMKs

I recommend reading this page because it offers clear, practical guidance on how Android manages low memory and how Unity games are impacted. Understanding these concepts is key for creating stable and efficient apps that perform well across a range of devices. The page provides actionable steps to help developers detect and handle low memory situations, leading to fewer crashes and a better user experience.

I also like advice regarding stuff like IL2CPP metadata, because I rarely see it being mentioned online and how it affects the memory.

https://developer.android.com/games/engines/unity/unity-lmks

#memory #optimization
👍11🔥3🗿1
Everyday Unity
A VHS effect breakdown in less than 1 minute I built a custom VHS effect from scratch to get that gritty, analog vibe for my prototype about a post‑apocalypse. Cheaper, faster, and fully tailored to my needs. Want the full shader code and a deeper dive into…
I made a post with a detailed line-by-line breakdown of the VHS shader I shared earlier. It was pretty helpful to me in the first place to understand and describe in layman's terms what each function does in the shader, in the same manner as I did before with the interactive grass shader in my blog.

I know that four texture samples for such a basic effect are less than optimal, but for the prototype it's okay for now. If you have any other ideas to optimize it, I'd be happy to hear them.

Also, thanks for sharing other great solutions in comments and DMs. Inspired by that, I have already started creating an improved version of my VHS effect and will post an update here once it is ready.

https://gamedev.center/how-to-make-a-retro-vhs-effect-shader-in-unity/

#vhs #vfx #shader #builtin
🔥12👍2