Esempio n. 1
0
        private void Start()
        {
            // Get the attached AudioLoFiEffect script.
            loFiEffect = gameObject.GetComponent <AudioLoFiEffect>();

            // Get the renderer.
            objectRenderer = gameObject.GetComponent <Renderer>();

            // Set the material of the emitter object to match that of the
            // initial AudioLoFiEffect.SourceQuality value.
            SetEmitterMaterial(loFiEffect.SourceQuality);
        }
Esempio n. 2
0
    private void Start()
    {
        // Get the attached AudioLoFiEffect script.
        loFiEffect = gameObject.GetComponent <AudioLoFiEffect>();
        if (loFiEffect == null)
        {
            Debug.LogError("LoFiFilterSelection requires an AudioLoFiEffect to be attached to the game object.");
        }

        // Set the material of the emitter object to match that of the
        // initial AudioLoFiEffect.SourceQuality value.
        SetEmitterMaterial(loFiEffect.SourceQuality);
    }