@@ -23,13 +23,12 @@ type CallableCustomInfo = sys::GDExtensionCallableCustomInfo2;
23
23
24
24
/// A `Callable` represents a function in Godot.
25
25
///
26
- /// Usually a callable is a reference to an `Object` and a method name, this is a standard callable. But can
27
- /// also be a custom callable, which is usually created from `bind`, `unbind`, or a GDScript lambda. See
28
- /// [`Callable::is_custom`].
29
- ///
30
- /// Currently, it is impossible to use `bind` and `unbind` in GDExtension, see [godot-cpp#802].
31
- ///
32
- /// [godot-cpp#802]: https://github.com/godotengine/godot-cpp/issues/802
26
+ /// Callables can be created in many ways:
27
+ /// - From an `Object` and a (non-static) method name. This is a _standard_ callable.
28
+ /// - From a GDScript class name and a static function name. (This typically works because classes are instances of `GDScript`).
29
+ /// - From a GDScript lambda function.
30
+ /// - By modifying an existing `Callable` with [`bind()`][Self::bind] or [`unbind()`][Self::unbind].
31
+ /// - By creating a custom callable from Rust.
33
32
///
34
33
/// # Godot docs
35
34
///
@@ -72,6 +71,11 @@ impl Callable {
72
71
/// Note that due to varying support across different engine versions, the resulting `Callable` has unspecified behavior for
73
72
/// methods such as [`method_name()`][Self::method_name], [`object()`][Self::object], [`object_id()`][Self::object_id] or
74
73
/// [`get_argument_count()`][Self::arg_len] among others. It is recommended to only use this for calling the function.
74
+ ///
75
+ /// # Compatibility
76
+ /// Up until and including Godot 4.3, this method has some limitations:
77
+ /// - [`is_valid()`][Self::is_valid] will return `false`, even though the call itself succeeds.
78
+ /// - You cannot use statics to connect signals to such callables. Use the new typed signal API instead.
75
79
pub fn from_local_static (
76
80
class_name : impl meta:: AsArg < StringName > ,
77
81
function_name : impl meta:: AsArg < StringName > ,
0 commit comments