Ejemplo n.º 1
0
 public void SetTarget(AudioAssetLibrary library)
 {
     _SelectableAudioAssetList.ResetSelection();
     _RawTarget        = library;
     _SerializedTarget = new SerializedObject(library);
     _MappingList      = _SerializedTarget.FindProperty("_AudioAssetIdentifierMappings");
 }
Ejemplo n.º 2
0
        public void SetTarget(AudioAsset audioAsset)
        {
            if (audioAsset == null)
            {
                ResetTarget();
                return;
            }

            _RawTarget        = audioAsset;
            _SerializedTarget = new SerializedObject(_RawTarget);
            _ClipList         = _SerializedTarget.FindProperty("_AudioClips");
            _PitchMin         = _SerializedTarget.FindProperty("_PitchMin");
            _PitchMax         = _SerializedTarget.FindProperty("_PitchMax");
            _Looped           = _SerializedTarget.FindProperty("_Looped");
            _MaxDistance      = _SerializedTarget.FindProperty("_MaxDistance");
            _MinDistance      = _SerializedTarget.FindProperty("_MinDistance");
            _Pan                 = _SerializedTarget.FindProperty("_Pan");
            _AudioMixerGroup     = _SerializedTarget.FindProperty("_AudioMixerGroup");
            _Volume              = _SerializedTarget.FindProperty("_Volume");
            _AvoidRepetition     = _SerializedTarget.FindProperty("_AvoidRepetition");
            _Doppler             = _SerializedTarget.FindProperty("_Doppler");
            _SpatialBlend        = _SerializedTarget.FindProperty("_SpatialBlend");
            _RandomStartPosition = _SerializedTarget.FindProperty("_RandomStartPosition");
            _SelectableList.ResetSelection();
        }