using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using FVS;
using LitJson;

public class DemoStyle2 : FVSBaseStyle
{

    [FVSGetConfig("cubeColor", "ɫ")]
    public ColorType GetCubeColor()
    {
        GameObject cube = GameObject.Find("Cube");
        var color = cube.GetComponent<MeshRenderer>().sharedMaterial.color;
        return new ColorType(color);
    }

    [FVSSetConfig("cubeColor")]
    public void SetCubeColor(string color)
    {
        GameObject cube = GameObject.Find("Cube");
        Material material = cube.GetComponent<MeshRenderer>().material;
        material.color = BaseUtils.CssColor2UnityColor(color);
    }
}
