コード例 #1
0
    public override void Populate(CmsGameObject content)
    {
        Image img = content.GetComponent <Image>();

        if (img != null)
        {
            color = img.color;
        }
    }
コード例 #2
0
    public override void Populate(CmsGameObject content)
    {
        TextMeshProUGUI textMeshProUgui = content.GetComponent <TextMeshProUGUI>();

        if (textMeshProUgui != null)
        {
            font     = textMeshProUgui.font;
            color    = textMeshProUgui.color;
            fontSize = textMeshProUgui.fontSize;
        }
    }
コード例 #3
0
        protected override void OnEnable()
        {
            if (target == null || !CmsController.Exists)
            {
                return;
            }

            base.OnEnable();

            cmsGameObject = (CmsGameObject)target;

            options = CmsController.Instance.styleScriptableObject.styles.SecondaryKeys;
            if (options.Contains(cmsGameObject.humanReadableKey))
            {
                currentKey = options.IndexOf(cmsGameObject.humanReadableKey);
            }
        }
コード例 #4
0
 public abstract void Populate(CmsGameObject component);