Exemplo n.º 1
0
        protected override void Start()
        {
            base.Start();
            m_crosshair = gameObject.GetComponentInChildren <GrabbableCrosshair>();

            m_crosshairManager = FindObjectOfType <GrabManager>();

            RefreshCrosshair();
        }
Exemplo n.º 2
0
 protected override void Start()
 {
     base.Start();
     m_crosshair        = gameObject.GetComponentInChildren <GrabbableCrosshair>();
     m_renderer         = gameObject.GetComponent <Renderer>();
     m_crosshairManager = FindObjectOfType <GrabManager>();
     m_mpb = new MaterialPropertyBlock();
     RefreshCrosshair();
     m_renderer.SetPropertyBlock(m_mpb);
 }
        protected override void Start()
        {
            base.Start();
            m_crosshair = gameObject.GetComponentInChildren <GrabbableCrosshair>();
            m_renderer  = gameObject.GetComponent <Renderer>();
            if (m_renderer == null)
            {
                m_renderer = gameObject.GetComponentInChildren <Renderer>();
            }
            m_crosshairManager = FindObjectOfType <GrabManager>();
            m_mpb = new MaterialPropertyBlock();
            RefreshCrosshair();
            m_mpb.SetColor(m_materialColorField, Color.white);

            m_renderer?.SetPropertyBlock(m_mpb);
        }