You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Hides the property from the editor. Does not prevent it from being sent over network or saved in storage.
204
+
///
205
+
/// ### `#[methods]`
206
+
/// Adds the necessary information to a an `impl` block to register the properties and methods with Godot.
207
+
///
208
+
/// **Important**: This needs to be added to one and only one `impl` block for a given `NativeClass`.
209
+
///
210
+
/// For additional details about how `#[methods]` expands, please refer to [gdnative::methods](methods)
211
+
///
212
+
/// ### `#[export]`
213
+
/// Registers the attributed function signature to be used by Godot.
214
+
/// A valid function signature must have:
215
+
/// - `&self` or `&mut self` as its first parameter
216
+
/// - `&T` or `TRef<T>` where T refers to the type declared in `#[inherit(T)]` attribute as it's second parameter; this is typically called the `owner`.
217
+
/// - Optionally, any number of additional parameters, which must have the type `Variant` or must implement the `FromVariant` trait. `FromVariant` is implemented for most common types.
218
+
/// - Return values must implement the `OwnedToVariant` trait (automatically implemented by `ToVariant`)
219
+
/// or be a `Variant` type.
220
+
///
221
+
/// ```ignore
222
+
/// #[export]
223
+
/// fn foo(&self, owner: &Reference)
224
+
/// ```
225
+
/// **Note**: Marking a function with `#[export]` does not have any effect unless inside an `impl` block that has the `#[methods]` attribute.
226
+
///
227
+
/// Possible arguments for this attribute are
228
+
///
229
+
/// - `name` = "overridden_function_name"
230
+
///
231
+
/// Overrides the function name as the method name to be registered in Godot.
232
+
///
233
+
/// - `rpc` = "selected_rpc"
234
+
/// - "selected_rpc" must be one of the following values, which refer to the associated [Multiplayer API RPC Mode](https://docs.godotengine.org/en/stable/classes/class_multiplayerapi.html?highlight=RPC#enumerations)
/// This enables you to set the [Multiplayer API RPC Mode](https://docs.godotengine.org/en/stable/classes/class_multiplayerapi.html?highlight=RPC#enumerations) for the function.
244
+
/// Refer to [Godot's Remote Procedure documentation](https://docs.godotengine.org/en/stable/tutorials/networking/high_level_multiplayer.html#rpc) for more details.
0 commit comments