public PostProcessingBehaviour getComponentPostProcessingBehaviour()
    {
        ADDITIONAL_COMPONENT_TYPE type = ADDITIONAL_COMPONENT_TYPE.POST_PROCESSING_BEHAVIOUR;

        if (m_additionalComponents.ContainsKey(type) == false)
        {
            PostProcessingBehaviour pp = m_mainCamera.gameObject.AddComponent <PostProcessingBehaviour> ();
            pp.profile = new PostProcessingProfile();
            ReferenceCountBase value = new AdditionalComponent <PostProcessingBehaviour> (pp);
            m_additionalComponents.Add(type, value);
        }
        var obj = m_additionalComponents [type] as AdditionalComponent <PostProcessingBehaviour>;

        return(obj.getObject());
    }
    public ScreenOverlay getComponentScreenOverlayBehaviour()
    {
        ADDITIONAL_COMPONENT_TYPE type = ADDITIONAL_COMPONENT_TYPE.SCREEN_OVERLAY;

        if (m_additionalComponents.ContainsKey(type) == false)
        {
            ScreenOverlay so = m_mainCamera.gameObject.AddComponent <ScreenOverlay> ();

            ReferenceCountBase value = new AdditionalComponent <ScreenOverlay> (so);
            m_additionalComponents.Add(type, value);
        }

        var obj = m_additionalComponents [type] as AdditionalComponent <ScreenOverlay>;

        return(obj.getObject());
    }
    public void releaseAdditionalComponent(ADDITIONAL_COMPONENT_TYPE type)
    {
        switch (type)
        {
        case eSkyPlayerCameraEffectManager.ADDITIONAL_COMPONENT_TYPE.POST_PROCESSING_BEHAVIOUR:
        {
            if (m_additionalComponents.ContainsKey(eSkyPlayerCameraEffectManager.ADDITIONAL_COMPONENT_TYPE.POST_PROCESSING_BEHAVIOUR) == true)
            {
                var obj = m_additionalComponents [type] as AdditionalComponent <PostProcessingBehaviour>;
                if (obj.releaseObject() == true)
                {
                    m_additionalComponents.Remove(type);
                    UnityEngine.Object.DestroyImmediate(m_mainCamera.gameObject.GetComponent <PostProcessingBehaviour> ());
                }
            }
        }
        break;

        case eSkyPlayerCameraEffectManager.ADDITIONAL_COMPONENT_TYPE.SCREEN_OVERLAY:
        {
            if (m_additionalComponents.ContainsKey(eSkyPlayerCameraEffectManager.ADDITIONAL_COMPONENT_TYPE.SCREEN_OVERLAY) == true)
            {
                var obj = m_additionalComponents [type] as AdditionalComponent <ScreenOverlay>;
                if (obj.releaseObject() == true)
                {
                    m_additionalComponents.Remove(type);
                    UnityEngine.Object.DestroyImmediate(m_mainCamera.gameObject.GetComponent <ScreenOverlay> ());
                }
            }
        }
        break;

        default:
            break;
        }
    }