-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
✈️ export custom scripts #91
Conversation
@@ -1,5 +1,6 @@ | |||
## An entity acts a container for properties and is used to represent | |||
## a category or an actual concept in any game. | |||
@tool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is critical that PandoraEntity
(and all its custom scripts) are a tool script, as this needs to be accessible inside the editor. No clue if there is another way to solve this!
## .tscn file and then dynamically look up the actual entity | ||
## at runtime by accessing Pandora's API. | ||
@tool | ||
class_name PandoraEntityProxy extends PandoraEntity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class prevented us from exporting custom types. Instead, we are now relying on class lookup.
|
||
|
||
# ClassName -> Dictionary | ||
var _global_class_cache = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to maintain a class cache so we can lookup class dependency structures. Only exporting custom types of type PandoraEntity
should be eligible for selection.
Closes #44
Description
This pull request aims to allow for exporting custom scripts in scenes. As a consequence, this pull request removes the concept of a
PandoraEntityProxy
as we have to store custom types directly.Open Issues
Item
should only produce entries whereentity is Item
is true!)