Exemplo n.º 1
0
        void Validate(GameObject go)
        {
            // Debug.Log($"size = {position.size}");
            if (m_validationLabel != null)
            {
                m_validationLabel.text = "";
            }
            if (m_logLabel != null)
            {
                m_logLabel.text = "";
            }

            m_validation.Clear();
            var isValid = ValidateRoot(go);

            // metaのvalidation
            foreach (var msg in m_meta.GetVRMMetaObject().Validate())
            {
                isValid = false;
                m_validation.Push($"Meta: {msg}");
            }

            m_meta.SetEnabled(!(go is null));
            m_exportButton.SetEnabled(isValid);

            if (isValid)
            {
                m_validation.Push(MSG_EXPORT_OK);
            }
            m_validationLabel.text = m_validation.ToString();
        }