Skip to main content

command_method_name

Function command_method_name 

Source
pub fn command_method_name(variant: &str) -> String
Expand description

The rhai method name a command variant is called by: its name in snake_case, with acronym runs kept together and a digit split off after a letter, so SpawnCube becomes spawn_cube, SetIblIntensity becomes set_ibl_intensity, and DrawText3d becomes draw_text_3d. A tool that highlights or documents the script surface uses this to map a CommandSpec name to the identifier a script actually writes.