NoesisGUI Meets AI: TypeScript MVVM with Automated Code Generation
NoesisDemo - TypeScript + AI-Powered MVVM Development Solution
π Project Repository: https://github.com/No-needto-recall/NoesisDemo
π― What Does This Project Do?
This is an Unreal Engine 5.4 sample project that demonstrates:
π Table of Contents
β¨ Core Features
π€ AI-Assisted Development - Near-Automated UI Code Generation
Why Is This Approach AI-Friendly?
This solution adopts a completely code-based workflow:
1. Automatically Generate ViewModel Code
Simply describe your requirements, and AI generates complete ViewModels:
2. Automatically Modify and Refactor Code
ποΈ Technical Architecture Highlights
1. PuerTS uclass_extends - Auto-Generate Blueprint Classes
Using TypeScript decorators to define properties and methods, PuerTS automatically generates blueprint classes:
2. UNoesisViewModeInstance - Solving DataContext Limitations
Custom UNoesisInstance subclass that automatically sets DataContext in the XamlLoaded callback, solving the issue where the official class doesn't support dynamic setting.
3. NoesisProxy - Automatic Property Notifications
Using JavaScript Proxy API to automatically intercept property modifications and trigger NoesisGUI updates:
Data Binding Flow:
π¨ Perfect Recreation of Official Samples
Buttons Sample
Demonstrates basic MVVM data binding:
Demonstrates complex data binding:
π Quick Start
Requirements:
β οΈ Important Notes:
π Related Links
π‘ Summary
This project provides a new approach to NoesisGUI development in Unreal Engine:
We also welcome PRs to recreate more official UI demos - let's improve this solution together! π
Made with β€οΈ for the NoesisGUI Community
π Project Repository: https://github.com/No-needto-recall/NoesisDemo
π― What Does This Project Do?
This is an Unreal Engine 5.4 sample project that demonstrates:
- Writing NoesisGUI ViewModels in TypeScript - Using PuerTS's uclass_extends to eliminate blueprint development
- Perfect recreation of official Buttons and QuestLog samples - Proving the completeness and viability of the approach
- Full AI-assisted development support (e.g., Claude Code) - Enabling near-automated UI code generation
- Completely code-based workflow - XAML + TypeScript, version control friendly, no blueprint merge conflicts
π Table of Contents
- Core Features
- AI-Assisted Development - Near-Automated UI Code Generation
- Technical Architecture Highlights
- Official Sample Recreation
- Quick Start
- Related Links
β¨ Core Features
- β Perfect Recreation of Official Samples: Successfully recreated NoesisGUI's official Buttons and QuestLog samples using TypeScript
- π TypeScript Code-Based ViewModels: Using PuerTS's uclass_extends to inherit UE classes and auto-generate blueprints
- π§ Dynamic DataContext Setting: Custom UNoesisViewModeInstance to adjust DataContext assignment timing
- π€ AI-Friendly: Both XAML and ViewModels are code, easy for AI to understand and generate
- π¦ Version Control Friendly: Completely code-based, say goodbye to blueprint merge conflicts
- β‘ Automatic Property Notifications: NoesisProxy automatically handles PropertyChanged, supports TArray and TMap
π€ AI-Assisted Development - Near-Automated UI Code Generation
Why Is This Approach AI-Friendly?
This solution adopts a completely code-based workflow:
- β XAML files are text format - AI can understand and generate them
- β ViewModels written in TypeScript - AI excels at handling them
- β Data binding logic is clear and readable - AI can reason about it
- Claude Code
- GitHub Copilot
- Cursor
- Other AI coding assistants
1. Automatically Generate ViewModel Code
Simply describe your requirements, and AI generates complete ViewModels:
Code: Select all
// Input: "Create a settings interface with volume and quality options"
// AI automatically generates:
class TS_SettingsViewMode extends UE.Object {
@uproperty(uproperty.EditAnywhere, uproperty.BlueprintReadWrite)
Volume: number = 80;
@uproperty(uproperty.EditAnywhere, uproperty.BlueprintReadWrite)
Quality: string = "High";
@ufunction(ufunction.BlueprintCallable)
ApplySettings(): void {
console.log(`Applying: Volume=${this.Volume}, Quality=${this.Quality}`);
}
}
- Tell AI "add sound effects toggle" β Automatically modifies TypeScript and XAML
- AI understands data binding logic, automatically adds corresponding properties and commands
- Automatically handles complex collection bindings (TArray, TMap)
- "Create an interface with a user list" β AI automatically generates XAML + ViewModel
- "Add search and filtering functionality" β AI automatically adds related code
- "Implement drag-and-drop sorting" β AI generates complete event handling logic
Using AI tools like Claude Code, simply describe your UI requirements and interaction logic, and AI automatically generates XAML and ViewModel code.
Developers only need to review and fine-tune, dramatically improving development efficiency and achieving a near-automated UI code development experience.
"No more manual blueprint wiring - AI generates the code directly!" - Developer
ποΈ Technical Architecture Highlights
1. PuerTS uclass_extends - Auto-Generate Blueprint Classes
Using TypeScript decorators to define properties and methods, PuerTS automatically generates blueprint classes:
Code: Select all
class TS_ButtonsViewMode extends UE.Object {
static Path(): string {
return "/Game/BluePrints/TypeScript/ViewMode/Buttons/TS_ButtonsViewMode_C";
}
@uproperty(uproperty.EditAnywhere, uproperty.BlueprintReadWrite)
TestValue: string = "Hello NoesisGUI";
@ufunction(ufunction.BlueprintCallable)
StartCommand(): void {
console.log("Button clicked!");
}
}
Custom UNoesisInstance subclass that automatically sets DataContext in the XamlLoaded callback, solving the issue where the official class doesn't support dynamic setting.
3. NoesisProxy - Automatic Property Notifications
Using JavaScript Proxy API to automatically intercept property modifications and trigger NoesisGUI updates:
Code: Select all
const proxy = createNoesisProxy<TS_ButtonsViewMode>(viewMode);
// Any property modification automatically notifies NoesisGUI
proxy.TestValue = "New Value";
// Supports TArray automatic notifications
proxy.items.Add(newItem); // Automatically calls NotifyArrayPostAdd
proxy.items.RemoveAt(0); // Automatically calls NotifyArrayPreRemove + PostRemove
// Supports TMap automatic notifications
proxy.map.Add("key", value); // Automatically calls NotifyMapPostAdd
Code: Select all
TypeScript class definition (@uproperty, @ufunction)
β
PuerTS generates blueprint class
β
TypeScript creates instance (UE.NewObject)
β
Bind to UNoesisViewModeInstance (PendingDataContext)
β
XAML loading complete (XamlLoaded callback)
β
Automatically set DataContext
β
Data binding takes effect (XAML Binding β ViewModel properties)
β
Property updates (NoesisProxy β NotifyPropertyChanged β UI refresh)
π¨ Perfect Recreation of Official Samples
Buttons Sample
Demonstrates basic MVVM data binding:
- Basic property binding
- Command binding
- XAML animations and styles
Demonstrates complex data binding:
- TArray collection binding - Quest list
- Complex data objects - Quest class (title, image, difficulty, description, etc.)
- Dynamic data operations - AddQuest method, automatically triggers UI updates
Code: Select all
// QuestLog ViewModel Example
class TS_QuestLogViewMode extends UE.Object {
@uproperty(uproperty.EditAnywhere, uproperty.BlueprintReadWrite)
Quests: UE.TArray<TS_Quest>;
@ufunction(ufunction.BlueprintCallable)
AddQuest(Title: string, Image: UE.Texture2D, ...): TS_Quest {
const Quest = UE.NewObject(TS_Quest);
Quest.Initialize(Title, Image, ...);
// Use Proxy to automatically trigger TArray update notifications
let Proxy = createNoesisProxy<TS_QuestLogViewMode>(this);
Proxy.Quests.Add(Quest);
return Quest;
}
}
π Quick Start
Requirements:
- Unreal Engine 5.4
- NoesisGUI Plugin 3.2+
- PuerTS Plugin (latest version)
Code: Select all
git clone https://github.com/No-needto-recall/NoesisDemo.git
- β Windows Users: After cloning, simply double-click NoesisDemo.uproject to open - works out of the box
- β οΈ Mac/Linux Users: Manual C++ code compilation required
π Related Links
- GitHub Repository: https://github.com/No-needto-recall/NoesisDemo
- PuerTS UClass Extends Documentation: https://puerts.github.io/docs/puerts/unreal/uclass_extends/
- NoesisGUI Property Change Notifications: Official Documentation
π‘ Summary
This project provides a new approach to NoesisGUI development in Unreal Engine:
- β Use TypeScript instead of blueprints for ViewModels
- β Completely code-based, version control friendly, no blueprint merge conflicts
- β Full compatibility with AI-assisted development tools, enabling near-automated UI code generation
- β Recreation of official samples, proving the completeness and viability of the approach
- β Automatic property notifications, supports complex TArray and TMap bindings
- Projects requiring frequent UI iterations
- Team projects with multiple collaborators
- Developers wanting to leverage AI-assisted development
- Developers seeking to eliminate blueprint merge conflicts
We also welcome PRs to recreate more official UI demos - let's improve this solution together! π
Made with β€οΈ for the NoesisGUI Community
Who is online
Users browsing this forum: No registered users and 0 guests