Unity Tilde Files
Unity Tilde Files are a proprietary text serialization format developed for Gamecraft Agent to dramatically improve AI performance when working with Unity game development projects.
These files convert Unity's binary (or UnityYAML) assets, such as scene (.unity) and prefab (.prefab) files, into a human-readable, AI-optimized text format with the .unity~ extension.
What Are Unity Tilde Files?
Unity Tilde Files represent a breakthrough in AI-assisted Unity development. Instead of working with Unity's complex binary serialization format (or UnityYAML, which is not optimized for AI), Gamecraft Agent processes these specially formatted text files that capture all essential Unity scene and prefab data in a structured, emoji-enhanced format that AI models can understand and manipulate with unprecedented accuracy.
File Types Supported
Scene Files:
.unity→.unity~(e.g.,Assets/Scenes/MainMenu.unity~)Prefab Files:
.prefab→.prefab.unity~(e.g.,Assets/Prefabs/Player.prefab.unity~)
Why Unity Tilde Files Improve AI Performance
🎯 Structured Hierarchy
Traditional Unity files store complex object relationships in an unreadable binary format. UnityYAML files obfuscate many of they key details and relationships between GameObjects, making AI integration difficult. Tilde files use clean indentation to represent GameObject hierarchies, making parent-child relationships immediately visible to AI models, while keeping asset relationships in an easy to understand format.
Note: Tilde files are not just for AI agents. The files are also optimized for quick human edits, making them the optimal file format for working on Unity projects directly in the IDE.
🎨 Emoji-Based Components
Components are represented with intuitive emojis that provide instant visual context:
🎥 Camera
💡 Light
🔊 AudioSource
🖼 Image
🔘 Button
📜 Custom Scripts
📊 Property Optimization
Only non-default properties are serialized, dramatically reducing file size and cognitive load while maintaining complete fidelity to the original Unity data.
🔗 Smart Reference System
Internal object references use a ■ prefix system that clearly indicates relationships between GameObjects and components within the same file.
File Format Specification
Core Structure Principles
Text is Truth: All analysis is based solely on the
.unity~file contentDefaults Matter: Only properties differing from Unity defaults are listed
Hierarchy is Key: Indentation defines parent-child relationships
Cross-Reference Essential: Prefab instances require base prefab analysis
GameObject Representation
• EnabledGameObject: 🎥fov=60 🔊volume=0.8
- DisabledGameObject: 🖼sprite="Assets/UI/icon.png"
• ChildObject: 📜PlayerController speed=5.0GameObject States
•= Enabled GameObject-= Disabled GameObjectIndentation defines hierarchy depth
Tags (Optional)
• Player: 🏷️Player 📜PlayerController health=100Component Format
Components follow the pattern: Emoji[Type] property=value property2=value2
Common Components
📍 Transform - Position, rotation, scale (omitted if all default)
📐 RectTransform - UI layout properties
🎥 Camera - Rendering and projection settings
💡 Light - Illumination properties
🔊 AudioSource - Sound playback settings
🖼 Image - UI image display
🔘 Button - Interactive UI element
📜ScriptName - Custom MonoBehaviour scripts
Property Types
Basic Types
intValue=42
floatValue=3.14f
boolValue=true
stringValue="Hello World"Vectors and Colors
position=[1.0, 2.5, 0.0]
color=🟥#D42111FFNote: Colors in
.unity~files will automatically display a square of that color next to them, which can be updated by hovering and choosing a new color from the pop-up color wheel. This makes it very easy to see colors at a glance and update them if necessary.
Asset References
sprite="Assets/Sprites/character.png"
material="Assets/Materials/metal.mat"Note: Image file paths in
.unity~files will display a preview of that image when hovered, enabling quick reminders of what each image for an asset looks like.
Internal References
targetGraphic=■/🖼
manager=■../GameController/📜GameManager
onClick=[■MainCanvas/Buttons/📜MenuScript.OnStart()]Reference System
The ■ prefix indicates internal file references:
■/🖼- Component on same GameObject■/ChildName/🖼- Component on descendant■../Sibling/🖼- Component on sibling■RootObject/Path/🖼- Absolute path from root
Prefab Instances
• PlayerInstance ("Assets/Prefabs/Player.prefab"): 📍position=[10, 0, 5] 📜PlayerController level=2The format ("Path/To/Prefab.prefab"): indicates the base prefab, followed by instance-specific overrides. This enables quick cross-referencing of prefab overrides against the original prefab.
Namespaces & Script Resolution
Standard Unity namespaces are omitted (e.g., Image instead of UnityEngine.UI.Image).
Benefits for Unity Development
🚀 Enhanced AI Understanding
AI models can instantly comprehend Unity scene structure, component relationships, and property configurations without needing deep Unity engine knowledge.
🔍 Rapid Issue Detection
The format makes it trivial to spot common Unity problems:
Missing component references
Disabled GameObjects that should be active
UI elements outside Canvas hierarchies
Broken prefab connections
⚡ Faster Iteration
Modifications can be proposed and implemented at the speed of text editing rather than navigating Unity's complex inspector interface.
🎯 Precise Modifications
AI can suggest exact line changes with proper syntax, emojis, and property values, ensuring modifications integrate seamlessly.
Working with Tilde Files
Reading Tilde Files
When Gamecraft Agent encounters .unity~ files, it automatically applies Unity-specific intelligence to:
Parse GameObject hierarchies
Understand component relationships
Validate property references
Cross-reference prefab instances with their base definitions
Modifying Tilde Files
The agent can propose exact modifications using the tilde format:
• UIPanel: 🎨Canvas 🧤CanvasGroup alpha=0.5 interactable=false
• Title: 💬text="Welcome" 🖼color=#FFFFFF
• PlayButton: 🔘Button interactable=true 🖼sprite="Assets/UI/btn.png"Best Practices
For AI Interactions
Always reference complete file paths (
Assets/Scenes/Game.unity.txt~)Cite specific GameObject paths and component emojis
Provide exact property names and values
Cross-reference prefab bases when analyzing instances
For Modifications
Include proper indentation for hierarchy
Use correct component emojis and type specifiers
Only specify non-default properties
Validate reference paths within file scope
Integration with Gamecraft Agent
Automatic Recognition
Gamecraft Agent automatically recognizes Unity Tilde Files and applies specialized Unity instructions for optimal processing.
Enhanced Debugging
The agent can quickly identify Unity-specific issues:
Component configuration problems
Reference resolution failures
Hierarchy structure issues
Performance optimization opportunities
Intelligent Suggestions
When modifying Unity projects, the agent leverages both the tilde format structure and Unity best practices to propose optimal solutions.
Performance Impact
Reduced Context Size
By eliminating default values and using compact emoji notation, tilde files significantly reduce the amount of text that needs to be processed while maintaining complete information fidelity.
Improved Accuracy
The structured format with visual cues (emojis) and clear relationships dramatically improves AI comprehension accuracy compared to raw Unity serialization.
Faster Processing
The human-readable format allows for rapid parsing and understanding without complex binary decoding operations or YAML parsing.
Example: Complete Scene File
Assets/Scenes/MainMenu.unity~
• MainCamera: 🎥orthographicSize=5 clearFlags=SolidColor backgroundColor=#001122
• Canvas: 🎨Canvas renderMode=ScreenSpaceOverlay 📏ContentSizeFitter
• Background: 🖼sprite="Assets/UI/bg.png" 📐anchorMin=[0,0] anchorMax=[1,1]
• TitlePanel: 🧤CanvasGroup alpha=1.0
• GameTitle: 💬text="My Amazing Game" fontSize=48 color=#FFFFFF
• Subtitle: 💬text="Press Start to Begin" fontSize=24 color=#CCCCCC
• ButtonPanel: ↕️VerticalLayoutGroup spacing=20
• StartButton: 🔘Button 🖼sprite="Assets/UI/button.png" targetGraphic=■/🖼
• ButtonText: 💬text="Start Game" color=#000000
• QuitButton: 🔘Button 🖼sprite="Assets/UI/button.png" targetGraphic=■/🖼
• ButtonText: 💬text="Quit" color=#000000
• GameManager: 📜GameManager playerName="NewPlayer" difficulty=1This example shows how a complete Unity scene is represented in the tilde format, with clear hierarchy, component relationships, and property overrides all visible in a single, comprehensible text file.
Next Steps
Now is the perfect time to dive into your first task with Gamecraft's coding assistant
Your First Task - Start your first AI-assisted coding session
Unity Tilde Files represent a revolutionary approach to AI-Unity integration, transforming complex Unity-specific data into AI-friendly text that maintains complete fidelity while dramatically improving processing speed and accuracy.
Last updated