SShortSingh.
Back to feed

Unity UI framework FUI shifts object graph composition from runtime to compile time

0
·1 views

FUI, a Unity UI framework, has evolved its code generation pipeline by moving UI composition steps from runtime to compile time using C# Roslyn Source Generators. Rather than scanning assemblies and resolving type relationships at runtime, the generator now emits binding factories and strongly typed routes so the Player runtime executes a pre-validated object graph. The approach eliminates a class of hard-to-detect bugs — such as missing unsubscribes or mismatched binding targets — that previously only surfaced when a specific screen was opened. An earlier prototype used an external FUICompiler executable, but it was discarded the same day it was created in favor of integrating directly into the Roslyn compilation pipeline. The shift to in-compilation generation allows SemanticModel and typed symbols to validate relationships at build time, surfacing errors as ordinary C# compiler messages rather than runtime failures.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

How Well-Written Pull Requests Make Code Review Faster and More Effective

A poorly documented pull request with a blank description, a vague title, and 600 lines of unexplained changes once slipped past review and crashed a production checkout flow. The incident highlights how PRs are often treated as bureaucratic checkboxes rather than collaborative conversations, undermining their core purpose. A pull request is a formal request to merge code changes into a main branch, but its real value lies in the social layer — the discussion, decisions, and context it preserves for future developers. Experts recommend that PR titles clearly state the change in imperative form, while descriptions should answer why the change was made, what it includes, and how to test it. Following these practices can significantly reduce review turnaround time and improve overall code quality across engineering teams.

0
ProgrammingDEV Community ·

Why Smart Contract Token Approvals Are Transactions, Not Toggles

Token approvals on ERC-20 contracts are stored on-chain as allowance entries, not app-level settings, meaning any system relying on them must treat that on-chain record as the sole source of truth. Revoking an approval is itself a full blockchain transaction that must be signed, broadcast, and confirmed — it is not instant and can be delayed by network congestion. Services that cache approval states locally risk acting on stale data, either attempting to spend tokens already revoked or blocking valid spends when a revocation is still unconfirmed. The safest engineering practice is to read the allowance directly from the chain immediately before executing any token transfer, rather than relying on a database record. This approach adds RPC latency and infrastructure load but prevents a class of bugs where a system's internal state diverges from what the token contract will actually permit.

0
ProgrammingDEV Community ·

Developer builds HTTP 402 reverse proxy to charge AI agents per API call

A developer has released x402-micro-tollgate, an open-source Express-based tool that acts as both an HTTP 402 reverse proxy and an MCP server. The project was built to enable per-call payments for existing HTTP APIs without distributing API keys. Ungated routes return a 402 Payment Required response, and requests are only forwarded to the upstream URL after payment is settled. The tool also exposes MCP tools, with some available for free and others requiring payment. It can be self-hosted via npx and is available on both GitHub and npm.

0
ProgrammingDEV Community ·

Aviation Mechanic's 80-Year Career Sparks Dev Community Talk on Maintenance Culture

A human-interest article about an aviation mechanic with an 80-year career gained traction on a developer community platform, accumulating 47 points and 13 comments. Although it is not a tool or software library, it resonated with developers because it reflects engineering values such as procedural discipline, long feedback loops, and institutional knowledge preservation. The discussion highlights how reliable systems are sustained through careful documentation and consistent maintenance rather than dramatic overhauls. Key takeaways for developers include recording the reasoning behind fixes, treating maintenance as first-class engineering work, and ensuring handoffs do not depend solely on a single expert's memory. The post serves as a reminder that lessons from high-stakes physical systems like aviation can offer meaningful parallels for software reliability practices.

Unity UI framework FUI shifts object graph composition from runtime to compile time · ShortSingh