FMOD_StudioEventEmitter.StartEvent C# (CSharp) Метод

StartEvent() публичный Метод

public StartEvent ( ) : void
Результат void
    public void StartEvent()
    {
        if (evt == null || !evt.isValid())
        {
            CacheEventInstance();
        }

        // Attempt to release as oneshot
        if (evt != null && evt.isValid())
        {
            ERRCHECK(evt.start());
            //if (evt.release() == FMOD.RESULT.OK)
            {
                //evt = null;
            }
        }
        else
        {
            FMOD.Studio.UnityUtil.LogError("Event retrieval failed: " + path);
        }

        hasStarted = true;
    }

Usage Example

Пример #1
0
    public void StartEvent(string key, AudioChannel channel = AudioChannel.Action, bool stopPre = true, string para = "", float value = 0f)
    {
        FMOD_StudioEventEmitter emitter = this.GetEmitter(channel);

        if (stopPre)
        {
            emitter.OnDestroy();
        }
        if (!string.IsNullOrEmpty(key))
        {
            emitter.path = key;
        }
        emitter.CacheEventInstance();
        this.SetParamValue(channel, para, value);
        if (this._3dPos != Vector3.zero)
        {
            emitter.Update3DAttributes(this._3dPos);
            this._3dPos = Vector3.zero;
        }
        emitter.StartEvent();
    }
All Usage Examples Of FMOD_StudioEventEmitter::StartEvent