Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to create plugin that is based on a scene #3895

Closed
Tracked by #6276
kubecz3k opened this issue Mar 1, 2016 · 4 comments
Closed
Tracked by #6276

Ability to create plugin that is based on a scene #3895

kubecz3k opened this issue Mar 1, 2016 · 4 comments

Comments

@kubecz3k
Copy link
Contributor

kubecz3k commented Mar 1, 2016

Currently if I want to create new node with plugin api I need to use add_custom_type() function to provide script that will be the base for a node-plugin. What I would consider the most convenient way to create some types of node-plugins would be the ability to point to a whole scene instead.
Please note that I haven't used plugin system a lot yet and it might be possible that what I need is already there (in this case please show me the way :))

@kubecz3k kubecz3k added this to the 2.1 milestone Mar 1, 2016
@kubecz3k kubecz3k changed the title Ability to create plugin that base on a scene Ability to create plugin that is based on a scene Mar 1, 2016
@Hodes
Copy link
Contributor

Hodes commented Mar 28, 2016

Well @kubecz3k, as far as i'm using Plugin System, I would do something like:

  • Place the scene together with the plugin files. Preferred with new text based format .tscn or .xscn
  • Create a node script for the custom type. That should extends at least Node or deeper in the hierarchy
  • Declare the variable (the_scene) that will hold the wanted scene to be "custom_type", then preload("the/scene.tscn")
  • In the _enter_tree(): do something like this
func _enter_tree():
    the_scene.instance()
    add_child(the_scene)

And then you should have your custom node to have an entire tree of the 'scene.tscn'.

As far as I know, the plugin custom type will always be linked to a script, then you will not have a clear custom node with script slot free.

Well, I hope I have helped with something, or someone can correct me if I'm wrong. Thanks !

@kubecz3k
Copy link
Contributor Author

kubecz3k commented Jun 30, 2016

@reduz according to our irc conversation, this issue is about new function inside EditorPlugin that's similar to add_custom_type(Name, ParentType, Script, icon) but take [packed scene] / [instanced scene] as a third argument instead of Script.

@akien-mga akien-mga modified the milestones: 2.2, 2.1 Jul 15, 2016
@akien-mga
Copy link
Member

Not critical for the upcoming 2.1, so moving to the next milestone.

@Calinou
Copy link
Member

Calinou commented Jun 14, 2020

Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine.

The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker.

If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance!

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

No branches or pull requests

4 participants