コード例 #1
0
    /// <summary>
    /// Creation and setup of post processing components.
    /// </summary>
    private void InitImageEffects()
    {
        EnviroSkyRender = PlayerCamera.gameObject.GetComponent <EnviroSkyRenderingLW>();

        if (EnviroSkyRender == null)
        {
            EnviroSkyRender = PlayerCamera.gameObject.AddComponent <EnviroSkyRenderingLW>();
        }

        EnviroPostProcessing = PlayerCamera.gameObject.GetComponent <EnviroPostProcessing>();

        if (EnviroPostProcessing == null)
        {
            EnviroPostProcessing = PlayerCamera.gameObject.AddComponent <EnviroPostProcessing>();
        }
    }
コード例 #2
0
    private void InitImageEffects()
    {
        if (addEnviroSkyRendering)
        {
            skyRender = myCam.gameObject.GetComponent <EnviroSkyRenderingLW>();

            if (skyRender == null)
            {
                skyRender = myCam.gameObject.AddComponent <EnviroSkyRenderingLW>();
            }

            skyRender.isAddionalCamera = true;
        }

        if (addEnviroSkyPostProcessing)
        {
            enviroPostProcessing = myCam.gameObject.GetComponent <EnviroPostProcessing>();

            if (enviroPostProcessing == null)
            {
                enviroPostProcessing = myCam.gameObject.AddComponent <EnviroPostProcessing>();
            }
        }
    }