示例#1
0
    void Awake()
    {
        //m_camLighting = GetComponentsInChildren<MogoCameraLighting>(true)[0];
        m_camLighting = gameObject.AddComponent <MogoCameraLighting>();
        //m_camLighting.enabled = false;
        //gameObject.AddComponent<FadeCamera>().enabled = false;

        //float screenWidth = camera.GetScreenWidth();
        //float screenHeight = camera.GetScreenHeight();

        //float manualAspect = 1280f / 720f;

        //float manualWidth = screenHeight * manualAspect;

        //float widthDelta = screenWidth - manualWidth;
        //float widthDeltaPercent = widthDelta / screenWidth;

        //camera.rect = new Rect(widthDeltaPercent * 0.5f, 0, manualWidth / screenWidth, 1);
    }
示例#2
0
    void Awake()
    {
        //m_camLighting = GetComponentsInChildren<MogoCameraLighting>(true)[0];
        m_camLighting = gameObject.AddComponent<MogoCameraLighting>();
        //m_camLighting.enabled = false;
        //gameObject.AddComponent<FadeCamera>().enabled = false;

        //float screenWidth = camera.GetScreenWidth();
        //float screenHeight = camera.GetScreenHeight();

        //float manualAspect = 1280f / 720f;

        //float manualWidth = screenHeight * manualAspect;

        //float widthDelta = screenWidth - manualWidth;
        //float widthDeltaPercent = widthDelta / screenWidth;

        //camera.rect = new Rect(widthDeltaPercent * 0.5f, 0, manualWidth / screenWidth, 1);
    }