/// <summary> Resets this instance to the default values </summary> public void Reset() { SoundData = new SoundyData(); AnimatorEvents = new List <AnimatorEvent>(); GameEvents = new List <string>(); Event = new UnityEvent(); Action = delegate { }; }
/// <summary> Set a new SoundyData that will be used by Soundy to play a sound when this UIAction is invoked </summary> /// <param name="soundyData"> SoundyData used by Soundy to play a sound when this UIAction is invoked </param> public UIAction SetSoundyData(SoundyData soundyData) { if (soundyData == null) { return(this); } SoundData = soundyData; return(this); }
public override void CopyNode(Node original) { base.CopyNode(original); var node = (SoundNode)original; SoundData = new SoundyData { AudioClip = node.SoundData.AudioClip, DatabaseName = node.SoundData.DatabaseName, OutputAudioMixerGroup = node.SoundData.OutputAudioMixerGroup, SoundName = node.SoundData.SoundName, SoundSource = node.SoundData.SoundSource }; SoundAction = node.SoundAction; }
private void UpdateThisAudioDataPreviewReference(SerializedProperty property) { if (SoundyDataDatabase.ContainsKey(property.propertyPath)) { SoundyDataDatabase.Remove(property.propertyPath); } var soundyData = new SoundyData { DatabaseName = Properties.Get(PropertyName.DatabaseName, property).stringValue, SoundName = Properties.Get(PropertyName.SoundName, property).stringValue, AudioClip = (AudioClip)Properties.Get(PropertyName.AudioClip, property).objectReferenceValue, OutputAudioMixerGroup = (AudioMixerGroup)Properties.Get(PropertyName.OutputAudioMixerGroup, property).objectReferenceValue }; SoundyDataDatabase.Add(property.propertyPath, soundyData); }