示例#1
0
        private void LoadColorPicker(SerializableColor color)
        {
            GameObject itemDisplay = Instantiate(ColorItemPrefab);

            itemDisplay.transform.SetParent(ColorPageContainer.transform, false);
            itemDisplay.GetComponentInChildren <Image>().color = color.ToColor();

            var itemButton = itemDisplay.AddComponent <ColorItemButton>();

            itemButton.OnButtonClick = OnButtonClick;
            itemButton.BtnName       = "ColorItem";
            itemButton.Color         = color.ToColor();
        }
示例#2
0
 // after deserialize serializable_color then update to unity_color
 public void OnAfterDeserialize()
 {
     my_color = my_scolor.ToColor();
 }