SpatialAudioZone
Used to set the sound insulation zone.
public class SpatialAudioZone {
public int zoneSetId;
public float[] position;
public float[] forward;
public float[] right;
public float[] up;
public float forwardLength;
public float rightLength;
public float upLength;
public float audioAttenuation;
}
Properties
- zoneSetId
- ID of the sound insulation zone.
- position
- Center point of the sound insulation zone. This parameter is an array of length 3, with the three values representing coordinates in the forward, right, and up directions respectively.
- forward
- Forward unit vector from
position. This parameter is an array of length 3, with the three values representing coordinates in the forward, right, and up directions respectively. - right
- Right unit vector from
position. This parameter is an array of length 3, with the three values representing coordinates in the forward, right, and up directions respectively. - up
- Up unit vector from
position. This parameter is an array of length 3, with the three values representing coordinates in the forward, right, and up directions respectively. - forwardLength
- Treat the entire sound insulation zone as a cube. This parameter represents the edge length in the forward direction, in the unit length of the game engine.
- rightLength
- Treat the entire sound insulation zone as a cube. This parameter represents the edge length in the right direction, in the unit length of the game engine.
- upLength
- Treat the entire sound insulation zone as a cube. This parameter represents the edge length in the up direction, in the unit length of the game engine.
- audioAttenuation
- Audio attenuation coefficient when users inside the sound insulation zone communicate with users outside. Value range: [0, 1]. Value details:
- 0: Broadcast mode. Volume and tone do not attenuate with distance. Sound is consistent at near and far distances.
- (0, 0.5): Weak attenuation mode. Volume and tone slightly attenuate during transmission. Sound travels farther than in real environments.
- 0.5: (Default) Simulates real-world volume attenuation.
- (0.5, 1]: Strong attenuation mode. Volume and tone attenuate quickly during transmission.