ME: 1. 1.
This seems like. Hope to jump through. Just for filtering. In the editor. Because now wouldn’t you have to create? Additional scenes. For example. If I set. A specific. Requirement that I want a weapon seen to only show scenes that are weapons. How do I define? What scenes are weapons or not? In the editor. I’m questioning its validity. Do not edit anything to show me, just talk to me. 1. 1.
AI: 1.
You’re absolutely right to question this—it’s a fair point about the limitations. Let me break down how this custom resource approach works (or doesn’t) for filtering and categorization in Godot, and why it might still be useful despite the manual overhead. 1. 1.
How Godot’s Resource Assignment Works 1.
Base PackedScene Picker: When you export @export var my…
ME: 1. 1.
This seems like. Hope to jump through. Just for filtering. In the editor. Because now wouldn’t you have to create? Additional scenes. For example. If I set. A specific. Requirement that I want a weapon seen to only show scenes that are weapons. How do I define? What scenes are weapons or not? In the editor. I’m questioning its validity. Do not edit anything to show me, just talk to me. 1. 1.
AI: 1.
You’re absolutely right to question this—it’s a fair point about the limitations. Let me break down how this custom resource approach works (or doesn’t) for filtering and categorization in Godot, and why it might still be useful despite the manual overhead. 1. 1.
How Godot’s Resource Assignment Works 1.
Base PackedScene Picker: When you export @export var my_scene: PackedScene, the editor shows every PackedScene in your project. No built-in filtering by folder, content, or type—it’s a flat list of all .tscn files. This is what you’re trying to avoid with the "many different types of pack scenes" issue. 1.
Custom Resource Wrappers: By creating MapScene (or WeaponScene), you’re not changing how scenes are detected or validated. Instead, you’re creating a container resource that holds a PackedScene. The editor’s picker now shows only MapScene resources (not all PackedScenes), which is a form of filtering—but it’s filtering the wrappers, not the scenes themselves. 1.
The Manual Nature and Limitations 1.
No Automatic Content Detection: Godot doesn’t analyze scene contents (e.g., "does this scene have a Weapon script?"). You have to manually decide: "This scene is a weapon, so I’ll wrap it in a WeaponScene resource." If you accidentally assign a non-weapon scene to a WeaponScene, the editor won’t stop you—it’s purely organizational. 1.
Creation Overhead: For each category, you create wrapper resources (e.g., SwordWeapon.tres containing sword.tscn). If you have 50 weapon scenes, that’s 50 wrapper files. It’s not "jumping through hoops" for nothing, but it does add steps. 1.
Defining "Weapon Scenes": There’s no built-in way to define this in the editor. It’s up to your project’s conventions: 1. 1.
Why It Might Still Be Valid 1.
Design-Time Organization: It’s a common Godot pattern for large projects. It provides "type safety" in the editor, reducing mistakes (e.g., accidentally assigning a map to a weapon slot). It’s like TypeScript for resources—helps with self-documentation and prevents obvious errors without runtime cost. 1.
Editor UX Improvement: Instead of scrolling through 100 scenes, you see categorized lists (Maps, Weapons, etc.). For teams or complex projects, this scales better than relying on naming/folder conventions alone. 1.
Alternatives and Trade-offs: 1.
Folders + Search: Use Godot’s resource picker search/filter by name or path. Less overhead, but still shows everything initially. 1.
No Wrappers: Stick with PackedScene and use comments or tooltips in your scripts to guide users. Simplest, but doesn’t solve the "many types" problem. 1. 1.
Advanced Custom Editors: You could write a custom inspector plugin to add content-based filtering (e.g., check for specific nodes/scripts in scenes), but that’s more complex and overkill for most projects. 1.
When It Shines: If you have clear categories (e.g., levels vs. UI vs. enemies) and want to enforce them at the export level, this works well. For smaller projects or loose organization, it might feel like overkill. 1.
In summary, it’s a valid tool for editor organization and preventing accidental assignments, but it’s not automatic or content-aware—it’s manual categorization. If the overhead doesn’t outweigh the benefits for your workflow, the folder + search approach might be simpler. Does this align with what you were thinking, or is there a specific pain point you’re trying to solve? I can suggest tweaks or alternatives!