KROYSDOCS
HomeWhat's newv0.1.0
SCRIPTING API / Audio / AudioSource

AudioSource

Script access to an entity's Audio Source: clip, playback, volume, pitch, spatial settings and mixer bus.

Kindclass
NamespaceKroys.EngineScripting
Members49
SourceGenerated/NativeComponents.g.cs, NativeComponents.cs
DECLARATION

Declaration

Component access: every member takes the entity first, for example AudioSource.Has(Entity). The values are the ones the Inspector shows for this component.

Declaration
public static partial class AudioSource
REFERENCE

Members

Methods
#public static bool Has(Entity e)
Whether the entity has a Audio Source component.
methodstatic
#public static bool IsEnabled(Entity e)
Reads the Audio Source component's Enabled value of the entity.
methodstatic
#public static void SetEnabled(Entity e, bool value)
Sets the Audio Source component's Enabled value on the entity.
methodstatic
#public static bool IsPlaying(Entity e)
Reads the Audio Source component's Playing value of the entity.
methodstatic
#public static void Play(Entity e)
Play on the entity's Audio Source component.
methodstatic
#public static void Stop(Entity e)
Stop on the entity's Audio Source component.
methodstatic
#public static bool IsPlayOnAwake(Entity e)
Reads the Audio Source component's Play On Awake value of the entity.
methodstatic
#public static void SetPlayOnAwake(Entity e, bool value)
Sets the Audio Source component's Play On Awake value on the entity.
methodstatic
#public static bool IsLooping(Entity e)
Reads the Audio Source component's Looping value of the entity.
methodstatic
#public static void SetLooping(Entity e, bool value)
Sets the Audio Source component's Looping value on the entity.
methodstatic
#public static bool IsSpatial(Entity e)
Reads the Audio Source component's Spatial value of the entity.
methodstatic
#public static void SetSpatial(Entity e, bool value)
Sets the Audio Source component's Spatial value on the entity.
methodstatic
#public static bool IsMuted(Entity e)
Reads the Audio Source component's Muted value of the entity.
methodstatic
#public static void SetMuted(Entity e, bool value)
Sets the Audio Source component's Muted value on the entity.
methodstatic
#public static bool IsPreviewInEditor(Entity e)
Reads the Audio Source component's Preview In Editor value of the entity.
methodstatic
#public static void SetPreviewInEditor(Entity e, bool value)
Sets the Audio Source component's Preview In Editor value on the entity.
methodstatic
#public static ulong GetClip(Entity e)
Reads the Audio Source component's Clip value of the entity.
methodstatic
#public static void SetClip(Entity e, ulong value)
Sets the Audio Source component's Clip value on the entity.
methodstatic
#public static float GetVolume(Entity e)
Reads the Audio Source component's Volume value of the entity.
methodstatic
#public static void SetVolume(Entity e, float value)
Sets the Audio Source component's Volume value on the entity.
methodstatic
#public static float GetPitch(Entity e)
Reads the Audio Source component's Pitch value of the entity.
methodstatic
#public static void SetPitch(Entity e, float value)
Sets the Audio Source component's Pitch value on the entity.
methodstatic
#public static float GetMinDistance(Entity e)
Reads the Audio Source component's Min Distance value of the entity.
methodstatic
#public static void SetMinDistance(Entity e, float value)
Sets the Audio Source component's Min Distance value on the entity.
methodstatic
#public static float GetMaxDistance(Entity e)
Reads the Audio Source component's Max Distance value of the entity.
methodstatic
#public static void SetMaxDistance(Entity e, float value)
Sets the Audio Source component's Max Distance value on the entity.
methodstatic
#public static float GetRolloff(Entity e)
Reads the Audio Source component's Rolloff value of the entity.
methodstatic
#public static void SetRolloff(Entity e, float value)
Sets the Audio Source component's Rolloff value on the entity.
methodstatic
#public static float GetDopplerScale(Entity e)
Reads the Audio Source component's Doppler Scale value of the entity.
methodstatic
#public static void SetDopplerScale(Entity e, float value)
Sets the Audio Source component's Doppler Scale value on the entity.
methodstatic
#public static string GetBus(Entity e)
Reads the Audio Source component's Bus value of the entity.
methodstatic
#public static void SetBus(Entity e, string value)
Sets the Audio Source component's Bus value on the entity.
methodstatic
#public static uint GetPriority(Entity e)
Reads the Audio Source component's Priority value of the entity.
methodstatic
#public static void SetPriority(Entity e, uint value)
Sets the Audio Source component's Priority value on the entity.
methodstatic
#public static AudioAttenuationModel GetAttenuation(Entity e)
Reads the Audio Source component's Attenuation value of the entity.
methodstatic
#public static void SetAttenuation(Entity e, AudioAttenuationModel value)
Sets the Audio Source component's Attenuation value on the entity.
methodstatic
#public static Vector3 GetCustomCurve(Entity e)
Reads the Audio Source component's Custom Curve value of the entity.
methodstatic
#public static void SetCustomCurve(Entity e, Vector3 value)
Sets the Audio Source component's Custom Curve value on the entity.
methodstatic
#public static float GetSpread(Entity e)
Reads the Audio Source component's Spread value of the entity.
methodstatic
#public static void SetSpread(Entity e, float value)
Sets the Audio Source component's Spread value on the entity.
methodstatic
#public static float GetConeInnerAngle(Entity e)
Reads the Audio Source component's Cone Inner Angle value of the entity.
methodstatic
#public static void SetConeInnerAngle(Entity e, float value)
Sets the Audio Source component's Cone Inner Angle value on the entity.
methodstatic
#public static float GetConeOuterAngle(Entity e)
Reads the Audio Source component's Cone Outer Angle value of the entity.
methodstatic
#public static void SetConeOuterAngle(Entity e, float value)
Sets the Audio Source component's Cone Outer Angle value on the entity.
methodstatic
#public static float GetConeOuterVolume(Entity e)
Reads the Audio Source component's Cone Outer Volume value of the entity.
methodstatic
#public static void SetConeOuterVolume(Entity e, float value)
Sets the Audio Source component's Cone Outer Volume value on the entity.
methodstatic
#public static float GetLowPassCutoff(Entity e)
Reads the Audio Source component's Low Pass Cutoff value of the entity.
methodstatic
#public static void SetLowPassCutoff(Entity e, float value)
Sets the Audio Source component's Low Pass Cutoff value on the entity.
methodstatic
#public static void SetClip(Entity e, AssetRef<AudioClipAsset> value)
Sets the audio clip from an asset reference.
methodstatic
Signatures
public static bool Has(Entity e)
public static bool IsEnabled(Entity e)
public static void SetEnabled(Entity e, bool value)
public static bool IsPlaying(Entity e)
public static void Play(Entity e)
public static void Stop(Entity e)
public static bool IsPlayOnAwake(Entity e)
public static void SetPlayOnAwake(Entity e, bool value)
public static bool IsLooping(Entity e)
public static void SetLooping(Entity e, bool value)
public static bool IsSpatial(Entity e)
public static void SetSpatial(Entity e, bool value)
public static bool IsMuted(Entity e)
public static void SetMuted(Entity e, bool value)
public static bool IsPreviewInEditor(Entity e)
public static void SetPreviewInEditor(Entity e, bool value)
public static ulong GetClip(Entity e)
public static void SetClip(Entity e, ulong value)
public static float GetVolume(Entity e)
public static void SetVolume(Entity e, float value)
public static float GetPitch(Entity e)
public static void SetPitch(Entity e, float value)
public static float GetMinDistance(Entity e)
public static void SetMinDistance(Entity e, float value)
public static float GetMaxDistance(Entity e)
public static void SetMaxDistance(Entity e, float value)
public static float GetRolloff(Entity e)
public static void SetRolloff(Entity e, float value)
public static float GetDopplerScale(Entity e)
public static void SetDopplerScale(Entity e, float value)
public static string GetBus(Entity e)
public static void SetBus(Entity e, string value)
public static uint GetPriority(Entity e)
public static void SetPriority(Entity e, uint value)
public static AudioAttenuationModel GetAttenuation(Entity e)
public static void SetAttenuation(Entity e, AudioAttenuationModel value)
public static Vector3 GetCustomCurve(Entity e)
public static void SetCustomCurve(Entity e, Vector3 value)
public static float GetSpread(Entity e)
public static void SetSpread(Entity e, float value)
public static float GetConeInnerAngle(Entity e)
public static void SetConeInnerAngle(Entity e, float value)
public static float GetConeOuterAngle(Entity e)
public static void SetConeOuterAngle(Entity e, float value)
public static float GetConeOuterVolume(Entity e)
public static void SetConeOuterVolume(Entity e, float value)
public static float GetLowPassCutoff(Entity e)
public static void SetLowPassCutoff(Entity e, float value)
public static void SetClip(Entity e, AssetRef<AudioClipAsset> value)

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.