diff --git a/Classnotes/Module-2/2.1.ObjectNavigation/Assets/Scripts/Hero/GreenArrowBehavior.cs b/Classnotes/Module-2/2.1.ObjectNavigation/Assets/Scripts/Hero/GreenArrowBehavior.cs index e8a36f1..12d4eba 100644 --- a/Classnotes/Module-2/2.1.ObjectNavigation/Assets/Scripts/Hero/GreenArrowBehavior.cs +++ b/Classnotes/Module-2/2.1.ObjectNavigation/Assets/Scripts/Hero/GreenArrowBehavior.cs @@ -16,7 +16,7 @@ public class GreenArrowBehavior : MonoBehaviour void Start() { Debug.Assert(mTheCamera != null); // must be set in the editor before starting the game! - GetComponent().material.color = mMouseColor; + GetComponent().color = mMouseColor; } // Update is called once per frame @@ -28,9 +28,9 @@ void Update() mFollowMousePosition = !mFollowMousePosition; Debug.Log("Current control mode Mouse=" + mFollowMousePosition); if (mFollowMousePosition) - GetComponent().material.color = mMouseColor; + GetComponent().color = mMouseColor; else - GetComponent().material.color = Color.white; + GetComponent().color = Color.white; } if (mFollowMousePosition)