Exemple #1
0
        /// <summary>
        /// Writes the plugin descriptor to an existing Json writer
        /// </summary>
        /// <param name="Writer">The writer to receive plugin data</param>
        public void Write(JsonWriter Writer)
        {
            Writer.WriteValue("FileVersion", (int)ProjectDescriptorVersion.Latest);
            Writer.WriteValue("Version", Version);
            Writer.WriteValue("VersionName", VersionName);
            Writer.WriteValue("FriendlyName", FriendlyName);
            Writer.WriteValue("Description", Description);
            Writer.WriteValue("Category", Category);
            Writer.WriteValue("CreatedBy", CreatedBy);
            Writer.WriteValue("CreatedByURL", CreatedByURL);
            Writer.WriteValue("DocsURL", DocsURL);
            Writer.WriteValue("MarketplaceURL", MarketplaceURL);
            Writer.WriteValue("SupportURL", SupportURL);
            if (!String.IsNullOrEmpty(EngineVersion))
            {
                Writer.WriteValue("EngineVersion", EngineVersion);
            }
            if (bEnabledByDefault.HasValue)
            {
                Writer.WriteValue("EnabledByDefault", bEnabledByDefault.Value);
            }
            Writer.WriteValue("CanContainContent", bCanContainContent);
            if (bIsBetaVersion)
            {
                Writer.WriteValue("IsBetaVersion", bIsBetaVersion);
            }
            if (bInstalled)
            {
                Writer.WriteValue("Installed", bInstalled);
            }

            if (bRequiresBuildPlatform)
            {
                Writer.WriteValue("RequiresBuildPlatform", bRequiresBuildPlatform);
            }

            if (SupportedTargetPlatforms != null && SupportedTargetPlatforms.Length > 0)
            {
                Writer.WriteEnumArrayField <UnrealTargetPlatform>("SupportedTargetPlatforms", SupportedTargetPlatforms);
            }

            ModuleDescriptor.WriteArray(Writer, "Modules", Modules);

            LocalizationTargetDescriptor.WriteArray(Writer, "LocalizationTargets", LocalizationTargets);

            if (PreBuildSteps != null)
            {
                PreBuildSteps.Write(Writer, "PreBuildSteps");
            }

            if (PostBuildSteps != null)
            {
                PostBuildSteps.Write(Writer, "PostBuildSteps");
            }

            PluginReferenceDescriptor.WriteArray(Writer, "Plugins", Plugins);
        }
        /// <summary>
        /// Writes the plugin descriptor to an existing Json writer
        /// </summary>
        /// <param name="Writer">The writer to receive plugin data</param>
        public void Write(JsonWriter Writer)
        {
            Writer.WriteValue("FileVersion", (int)ProjectDescriptorVersion.Latest);
            Writer.WriteValue("Version", Version);
            Writer.WriteValue("VersionName", VersionName);
            Writer.WriteValue("FriendlyName", FriendlyName);
            Writer.WriteValue("Description", Description);
            Writer.WriteValue("Category", Category);
            Writer.WriteValue("CreatedBy", CreatedBy);
            Writer.WriteValue("CreatedByURL", CreatedByURL);
            Writer.WriteValue("DocsURL", DocsURL);
            Writer.WriteValue("MarketplaceURL", MarketplaceURL);
            Writer.WriteValue("SupportURL", SupportURL);
            if (!String.IsNullOrEmpty(EngineVersion))
            {
                Writer.WriteValue("EngineVersion", EngineVersion);
            }
            if (bEnabledByDefault.HasValue)
            {
                Writer.WriteValue("EnabledByDefault", bEnabledByDefault.Value);
            }
            Writer.WriteValue("CanContainContent", bCanContainContent);
            if (bIsBetaVersion)
            {
                Writer.WriteValue("IsBetaVersion", bIsBetaVersion);
            }
            if (bIsExperimentalVersion)
            {
                Writer.WriteValue("IsExperimentalVersion", bIsExperimentalVersion);
            }
            if (bInstalled)
            {
                Writer.WriteValue("Installed", bInstalled);
            }

            if (bRequiresBuildPlatform)
            {
                Writer.WriteValue("RequiresBuildPlatform", bRequiresBuildPlatform);
            }

            if (bExplicitlyLoaded)
            {
                Writer.WriteValue("ExplicitlyLoaded", bExplicitlyLoaded);
            }

            if (SupportedTargetPlatforms != null && SupportedTargetPlatforms.Count > 0)
            {
                Writer.WriteStringArrayField("SupportedTargetPlatforms", SupportedTargetPlatforms.Select <UnrealTargetPlatform, string>(x => x.ToString()).ToArray());
            }

            if (SupportedPrograms != null && SupportedPrograms.Length > 0)
            {
                Writer.WriteStringArrayField("SupportedPrograms", SupportedPrograms);
            }
            if (bIsPluginExtension)
            {
                Writer.WriteValue("bIsPluginExtension", bIsPluginExtension);
            }

            if (Modules != null && Modules.Count > 0)
            {
                ModuleDescriptor.WriteArray(Writer, "Modules", Modules.ToArray());
            }

            LocalizationTargetDescriptor.WriteArray(Writer, "LocalizationTargets", LocalizationTargets);

            if (PreBuildSteps != null)
            {
                PreBuildSteps.Write(Writer, "PreBuildSteps");
            }

            if (PostBuildSteps != null)
            {
                PostBuildSteps.Write(Writer, "PostBuildSteps");
            }

            if (Plugins != null && Plugins.Count > 0)
            {
                PluginReferenceDescriptor.WriteArray(Writer, "Plugins", Plugins.ToArray());
            }
        }