Code Generation
Basic Usage
string code = await "Create a C# class for a player character"
.GENCode()
.ExecuteAsync();Input Types
String Input
string code = await "Unity script that rotates an object"
.GENCode()
.ExecuteAsync();Prompt Input
var prompt = new Prompt("Create a {language} {type} for {purpose}");
string code = await prompt
.GENCode()
.ExecuteAsync();Configuration
Language Selection
Code Style
Complexity Level
Common Use Cases
1. Generate New Code
2. Refactor Existing Code
3. Explain Code
4. Fix Bugs
5. Add Features
6. Convert Between Languages
Unity-Specific Examples
Example 1: MonoBehaviour Component
Example 2: ScriptableObject
Example 3: Editor Script
Example 4: Coroutine
Best Practices
✅ Do
❌ Don't
Provider Support
Provider
Support
Best Models
Error Handling
Integration Example
Next Steps
Last updated