Ejemplo n.º 1
0
    private void Awake()
    {
        if (GetComponent<SpriteRenderer>() != null)
        {
            m_oMotionBlurBase = new MotionBlur2D(this, GetComponent<SpriteRenderer>());
        }
        else if (GetComponent<MeshFilter>() != null)
        {
            m_oMotionBlurBase = new MotionBlur3D(this, GetComponent<MeshFilter>());
        }
        else
        {
            Debug.LogError("The motion blur cannot be apply on an object without renderer.");
        }

        m_oMotionBlurBase.Awake();
    }
    private void Awake()
    {
        if (GetComponent <SpriteRenderer>() != null)
        {
            m_oMotionBlurBase = new MotionBlur2D(this, GetComponent <SpriteRenderer>());
        }
        else if (GetComponent <MeshFilter>() != null)
        {
            m_oMotionBlurBase = new MotionBlur3D(this, GetComponent <MeshFilter>());
        }
        else
        {
            Debug.LogError("The motion blur cannot be apply on an object without renderer.");
        }

        m_oMotionBlurBase.Awake();
    }