HammeriteAudioMaterials
Audio. Inherits RefCounted
What each material does to sound: a table of material names to HammeriteAudioMaterial.
It answers one question - what does OAK do to sound - and deliberately not the other one. Which material a given texture IS is the game's to say, because a texture name is geometry's and what it MEANS belongs to whoever authored the level: see HammeriteAudioRuntime.material_resolver. This table used to answer both, by taking the first material whose name appeared anywhere in the texture name - so textile was tile, environment contained iron, and a plank texture with stone in its specifier was stone (#241).
Assign a table of your own as HammeriteAudio.materials and every bake from then on samples rooms against it. Without one the defaults below apply.
Fallback for a material the table has never heard of, so that get_material() always answers something a room can be built of.
Properties
| Type | Name | Default |
|---|---|---|
HammeriteAudioMaterial | default_material |
Methods
| Returns | Method |
|---|---|
void | add_material(material: HammeriteAudioMaterial) |
HammeriteAudioMaterial | find_material(material_name: StringName) const |
HammeriteAudioMaterial | get_material(material_name: StringName) const |
StringName[] | get_material_names() const |
bool | has_material(material_name: StringName) const |
bool | remove_material(material_name: StringName) |
Property descriptions
default_material
var default_material: HammeriteAudioMaterial
Undocumented.
Method descriptions
add_material()
func add_material(material: HammeriteAudioMaterial) -> void
Undocumented.
find_material()
func find_material(material_name: StringName) -> HammeriteAudioMaterial
Undocumented.
get_material()
func get_material(material_name: StringName) -> HammeriteAudioMaterial
Undocumented.
get_material_names()
func get_material_names() -> StringName[]
Undocumented.
has_material()
func has_material(material_name: StringName) -> bool
Undocumented.
remove_material()
func remove_material(material_name: StringName) -> bool
Undocumented.