obs_object_updater

Attribute Macro obs_object_updater 

Source
#[obs_object_updater]
Expand description

Generates an updater struct for an OBS object (e.g., a source).

This macro creates a struct that implements ObsObjectUpdater, allowing you to modify the settings of an existing OBS object at runtime.

§Arguments

  • name - The unique ID of the OBS object (must match the ID used in obs_object_builder).
  • updatable_type - The type of the struct that holds the object’s state.

§Example

#[obs_object_updater("my_source", ObsSourceRef)]
pub struct MySourceUpdater {
    #[obs_property(type_t = "string")]
    pub url: String,
}