MCPcopy Create free account
hub / github.com/PerroEngine/Perro / generic_inner

Function generic_inner

perro_editor/res/scripts/ui/editor_inspector_values.rs:3365–3370  ·  view source on GitHub ↗
(ty: &str, outer: &str)

Source from the content-addressed store, hash-verified

3363
3364pub fn coerce_scene_value_to_kind(value: SceneValue, kind: &str) -> SceneValue {
3365 match kind {
3366 "Unit" => SceneValue::F32(scene_value_as_unit(value).unwrap_or(0.0)),
3367 "UnitVector2" => scene_value_as_unit_vec2(value)
3368 .map_or(SceneValue::Vec2 { x: 0.0, y: 0.0 }, |(x, y)| {
3369 SceneValue::Vec2 { x, y }
3370 }),
3371 "UnitVector3" => scene_value_as_unit_vec3(value).map_or(
3372 SceneValue::Vec3 {
3373 x: 0.0,

Callers 6

parse_vec_default_valueFunction · 0.85
is_node_ref_typeFunction · 0.85
resolve_script_typeFunction · 0.85
script_type_labelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected