meta の bool の default 値の nullcheck. AllowAntisocialOrHateUsage

This commit is contained in:
ousttrue 2021-09-16 18:33:08 +09:00
parent 761a810d56
commit e1750c2e35
3 changed files with 10 additions and 4 deletions

View File

@ -55,6 +55,9 @@ namespace UniVRM10
[SerializeField]
public bool PoliticalOrReligiousUsage;
[SerializeField]
public bool AntisocialOrHateUsage;
[SerializeField, Tooltip("Other License Url")]
public string OtherPermissionUrl;
#endregion

View File

@ -680,6 +680,7 @@ namespace UniVRM10
vrm.Meta.AllowExcessivelySexualUsage = meta.SexualUsage;
vrm.Meta.CommercialUsage = meta.CommercialUsage;
vrm.Meta.AllowPoliticalOrReligiousUsage = meta.PoliticalOrReligiousUsage;
vrm.Meta.AllowAntisocialOrHateUsage = meta.AntisocialOrHateUsage;
vrm.Meta.CreditNotation = meta.CreditNotation;
vrm.Meta.AllowRedistribution = meta.Redistribution;
vrm.Meta.Modification = meta.ModificationLicense;

View File

@ -347,13 +347,15 @@ namespace UniVRM10
meta.ContactInformation = src.ContactInformation;
// avatar
meta.AllowedUser = src.AvatarPermission;
meta.ViolentUsage = src.AllowExcessivelyViolentUsage.Value;
meta.SexualUsage = src.AllowExcessivelySexualUsage.Value;
meta.ViolentUsage = src.AllowExcessivelyViolentUsage.GetValueOrDefault();
meta.SexualUsage = src.AllowExcessivelySexualUsage.GetValueOrDefault();
meta.CommercialUsage = src.CommercialUsage;
meta.PoliticalOrReligiousUsage = src.AllowPoliticalOrReligiousUsage.Value;
meta.PoliticalOrReligiousUsage = src.AllowPoliticalOrReligiousUsage.GetValueOrDefault();
meta.AntisocialOrHateUsage = src.AllowAntisocialOrHateUsage.GetValueOrDefault();
// redistribution
meta.CreditNotation = src.CreditNotation;
meta.Redistribution = src.AllowRedistribution.Value;
meta.Redistribution = src.AllowRedistribution.GetValueOrDefault();
meta.ModificationLicense = src.Modification;
meta.OtherLicenseUrl = src.OtherLicenseUrl;
//