Skip to content

Better method of specifying a target source property type for FGD entities - #261

Open
redxdev wants to merge 1 commit into
func-godot:mainfrom
redxdev:better-target-source-property
Open

Better method of specifying a target source property type for FGD entities#261
redxdev wants to merge 1 commit into
func-godot:mainfrom
redxdev:better-target-source-property

Conversation

@redxdev

@redxdev redxdev commented Aug 6, 2026

Copy link
Copy Markdown

This is an alternate take on fixing #215 as opposed to using StringName like #240 and I believe sets a better standard for how to handle "extended" property types going forward.

The idea is that to make a target_source property you make a new inline resource of type FuncGodotTargetSourceProperty instead of an Object (since that won't save properly and gets reset to null on reload of the entity definition resource).

image

A benefit of this approach for future property type support is that additional options could be made available in the resource, such as a proper default value instead of it always being empty.

An alternate approach would be to have a more generic extended property data resource type for specifying custom FGD types like so:

class_name FuncGodotPropertyData
extends Resource

@export var prop_type: String
@export var prop_val: String

but that requires a bit more work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant