Example #1
0
        public static IEnumerable <Validation> Validate(GameObject ExportRoot)
        {
            if (ExportRoot == null)
            {
                yield break;
            }

            if (ReduceBlendshape && ExportRoot.GetComponent <VRMBlendShapeProxy>() == null)
            {
                yield return(Validation.Error(VRMExporterWizardMessages.NEEDS_VRM_BLENDSHAPE_PROXY.Msg()));
            }

            var vrmMeta = ExportRoot.GetComponent <VRMMeta>();

            if (vrmMeta != null && vrmMeta.Meta != null && vrmMeta.Meta.Thumbnail != null)
            {
                var thumbnailName = vrmMeta.Meta.Thumbnail.name;
                if (NameValidator.IsFileNameLengthTooLong(thumbnailName))
                {
                    yield return(Validation.Error(NameValidator.ValidationMessages.FILENAME_TOO_LONG.Msg() + thumbnailName));
                }
            }
        }
Example #2
0
        public void DetectFileNameLength(string fileName, bool isIllegal)
        {
            var result = NameValidator.IsFileNameLengthTooLong(fileName);

            Assert.AreEqual(result, isIllegal);
        }