mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Merge pull request #45161 from Xrayez/bind-emit-changed
Expose `Resource.emit_changed()` to script
This commit is contained in:
commit
70a70a4f2b
@ -386,6 +386,7 @@ void Resource::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("is_local_to_scene"), &Resource::is_local_to_scene);
|
ClassDB::bind_method(D_METHOD("is_local_to_scene"), &Resource::is_local_to_scene);
|
||||||
ClassDB::bind_method(D_METHOD("get_local_scene"), &Resource::get_local_scene);
|
ClassDB::bind_method(D_METHOD("get_local_scene"), &Resource::get_local_scene);
|
||||||
ClassDB::bind_method(D_METHOD("setup_local_to_scene"), &Resource::setup_local_to_scene);
|
ClassDB::bind_method(D_METHOD("setup_local_to_scene"), &Resource::setup_local_to_scene);
|
||||||
|
ClassDB::bind_method(D_METHOD("emit_changed"), &Resource::emit_changed);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("duplicate", "subresources"), &Resource::duplicate, DEFVAL(false));
|
ClassDB::bind_method(D_METHOD("duplicate", "subresources"), &Resource::duplicate, DEFVAL(false));
|
||||||
ADD_SIGNAL(MethodInfo("changed"));
|
ADD_SIGNAL(MethodInfo("changed"));
|
||||||
|
@ -29,6 +29,19 @@
|
|||||||
[b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
|
[b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="emit_changed">
|
||||||
|
<return type="void">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
Emits the [signal changed] signal.
|
||||||
|
If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).
|
||||||
|
The method is equivalent to:
|
||||||
|
[codeblock]
|
||||||
|
emit_signal("changed")
|
||||||
|
[/codeblock]
|
||||||
|
[b]Note:[/b] This method is called automatically for built-in resources.
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
<method name="get_local_scene" qualifiers="const">
|
<method name="get_local_scene" qualifiers="const">
|
||||||
<return type="Node">
|
<return type="Node">
|
||||||
</return>
|
</return>
|
||||||
|
Loading…
Reference in New Issue
Block a user