SoundEntity¶
Beta
SoundEntity Play the configured audio clip,and play the local configuration firstFunctions¶
Play 2d sound,no playback distance limit
soundNameThe name of the sound you want to playisLoopwhether to loopdelayTimedelay play time
YaSoundHandle Play3DSound(string soundName, float3 position, quaternion rotation, [boolean isLoop], [number delayTime])Beta
Play 3d sound at position
soundNameThe name of the sound you want to playpositionworld positionrotationworld rotationisLoopwhether to loopdelayTimedelay play time
YaSoundHandle Play3DSound(string soundName, float3 position, [float3 eulerAngle], [boolean isLoop], [number delayTime])Beta
Play 3d sound at position
soundNameThe name of the sound you want to playpositionworld positioneulerAngleworld euler angleisLoopwhether to loopdelayTimedelay play time
YaSoundHandle Play3DSound(string soundName, YaEntity followTarget, [number bonePoint], [boolean isLoop], [number delayTime])Beta
Play 3d sound follow target
soundNameThe name of the sound you want to playfollowTargettarget entity you want to followbonePointwhich way to follow the goal.Default 0 is follow the root position.if target entity is an avatar,1 is follow the left hand,2 is follow the right hand,4 is follow the top of headisLoopwhether to loopdelayTimedelay play time
Play BGM,The new one will replace the old one
soundNameThe name of the sound you want to playisLoopwhether to loopdelayTimedelay play time