re-added MultiScript
The very first Godot version (when it was open sourced) had "MultiScript" which lets you use multiple scripts on one object.
With the addition of mulitple new scripting languages (VisualScript, soon C# and GDNative) it can be of use to combine scripts rather than delegating (with huge maintainance cost) or creating child nodes
which could impact performance.
I used the code from 0b806ee as the base and made it work with the current master.
This commit is contained in:
parent
b474646de0
commit
885239fb09
7 changed files with 1049 additions and 2 deletions
|
|
@ -1696,9 +1696,9 @@ void GDScriptLanguage::reload_tool_script(const Ref<Script> &p_script, bool p_so
|
|||
//same thing for placeholders
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
while (E->get()->placeholders.size()) {
|
||||
for (Set<PlaceHolderScriptInstance *>::Element *P = E->get()->placeholders.front(); P; P = P->next()) {
|
||||
|
||||
Object *obj = E->get()->placeholders.front()->get()->get_owner();
|
||||
Object *obj = P->get()->get_owner();
|
||||
//save instance info
|
||||
List<Pair<StringName, Variant> > state;
|
||||
if (obj->get_script_instance()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue