Struct AudioCategory
Provides functionality for manipulating multiple sounds at a time.
public struct AudioCategory : IEquatable<AudioCategory>
- Implements
- Inherited Members
Properties
Name
Gets the category's friendly name.
public string Name { get; }
Property Value
Methods
Equals(AudioCategory)
Determines whether two AudioCategory instances are equal.
public bool Equals(AudioCategory other)
Parameters
otherAudioCategoryAudioCategory to compare with this instance.
Returns
- bool
true if the objects are equal or false if they aren't
Equals(object)
Determines whether two AudioCategory instances are equal.
public override bool Equals(object obj)
Parameters
objobjectObject to compare with this instance.
Returns
- bool
true if the objects are equal or false if they aren't.
GetHashCode()
Gets the hash code for this instance.
public override int GetHashCode()
Returns
- int
Hash code for this object.
Pause()
Pauses all associated sounds.
public void Pause()
Resume()
Resumes all associated paused sounds.
public void Resume()
SetVolume(float)
Set the volume for this AudioCategory.
public void SetVolume(float volume)
Parameters
volumefloatThe new volume of the category.
Exceptions
- ArgumentException
If the volume is less than zero.
Stop(AudioStopOptions)
Stops all associated sounds.
public void Stop(AudioStopOptions options)
Parameters
optionsAudioStopOptions
ToString()
Returns the name of this AudioCategory
public override string ToString()
Returns
- string
Friendly name of the AudioCategory
Operators
operator ==(AudioCategory, AudioCategory)
Determines whether two AudioCategory instances are equal.
public static bool operator ==(AudioCategory first, AudioCategory second)
Parameters
firstAudioCategoryFirst AudioCategory instance to compare.
secondAudioCategorySecond AudioCategory instance to compare.
Returns
- bool
true if the objects are equal or false if they aren't.
operator !=(AudioCategory, AudioCategory)
Determines whether two AudioCategory instances are not equal.
public static bool operator !=(AudioCategory first, AudioCategory second)
Parameters
firstAudioCategoryFirst AudioCategory instance to compare.
secondAudioCategorySecond AudioCategory instance to compare.
Returns
- bool
true if the objects are not equal or false if they are.