Skip to main content

material_from_json

Function material_from_json 

Source
pub fn material_from_json(
    value: &Value,
) -> Result<(AssetHandle<Box<dyn Material>>, AssetUUID), String>
Expand description

Reconstructs a (handle, uuid) pair from a JSON object produced by material_to_json. The type_name selects the matching registration; the material sub-value is decoded by that registration’s deserialize_json.