Ejemplo n.º 1
0
    void Update()
    {
        TimelineUtilities.Initialize();

        if (properties == null)
        {
            properties = new MaterialPropertyBlock();
        }

        if (m_light == null)
        {
            m_light = GetComponentInChildren <Light>();
        }

        if (m_renderer == null)
        {
            m_renderer = GetComponent <MeshRenderer>();
        }

        m_light.color = LightColor;
        properties.SetColor("_EmissionColor", 4 * LightColor);
        m_renderer.SetPropertyBlock(properties);

        UpdateProperties();
        UpdateView();
    }