using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class PencilColorFromButtonColor : MonoBehaviour { public PencilTool pencil; protected Image image; protected void Start() { image = GetComponent(); } public void OnClick() { pencil.selectedColor = image.color; } }