A Unity Editor tool to quickly create ScriptableObject scripts and assets with custom fields, types, and collections — all from a clean UI.
-
🔹 Generate ScriptableObject scripts + assets in one click
-
🔹 Support for:
- Primitive types (int, float, string, bool)
- Unity types (GameObject, Sprite, AudioClip, etc.)
- Custom classes
- Enums
-
🔹 Collection support:
- List
- Arrays
-
🔹 Smart type picker popup (search + keyboard navigation)
-
🔹 Field validation with real-time preview
-
🔹 Auto-create missing folders (with confirmation popup)
-
🔹 Automatic asset creation after script compilation
-
🔹 Clean, scalable architecture (UI → Service → Validator → Generator)
Field Types
git clone https://github.com/mohamedibrahim155/ScriptableObject-Generator-Tool.gitThen place the folder inside:
Packages/
SOGenerator/
├── Editor/
│ ├── Windows/
│ │ └── ScriptableObjectCreator.cs
│ │ └── TypeSearchPopUpEditor.cs
│ ├── Services/
│ │ └── PendingScriptableObjectAssetCreatorService.cs
│ │ ├── SOCodeGeneratorService.cs
│ │ ├── SOGeneratorService.cs
│ │ └── SOValidator.cs
│ │ └── TypeSearchService.cs
│ ├── Models/
│ │ └── FieldDefinition.cs
│ │ └── SORequestData.cs
│ ├── Settings/
│ │ └── SOGeneratorSettings.cs
- Open the Unity project:
Tools → Scriptable Object Generator
- Fill in:
- Class Name
- Namespace (optional)
- Script Folder
- Asset Folder
- Add fields:
- Choose type
- Set name
- Pick custom class / enum if needed
- Add collections if required
- Click:
Create ScriptableObject
- The tool will:
- Generate
.csfile - Compile scripts
- Automatically create
.assetfile
This tool follows a clean separation of concerns:
EditorWindow → UI only
SOGeneratorService → orchestration
SOValidator → validation rules
SOCodeGenerator → script generation
PendingAssetCreator → post-compilation asset creation
- Unity 2021+ (recommended)
- Editor-only tool (not included in builds)
- Batch generation (CSV / JSON)
- Template system (WeaponData, EnemyData, etc.)
- Inline ScriptableObject editing
- Drag & drop support
- Addressables integration
Contributions are welcome!
Feel free to:
- Open issues
- Suggest features
- Submit pull requests
MIT License (or whatever you choose)
Mohamed Ibrahim Game Programmer | Unity & Unreal Developer
GitHub: https://github.com/mohamedibrahim155 Portfolio: https://ibrahimportfolio.framer.website

