You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
* Added support for deserializing BgObject types directly into native classes. * Removed opcodes for creating graph structures. These are now created in user code from BgObject types. * Removed BgNodeSpecBuilder. BgNode objects can now be modified directly (returning a modified copy). * Added concrete types for option parameters. The VM now keeps track of any parameters for evaluated options, allowing them to be added into the graph definition. * Order dependencies now take nodes rather than outputs. * Added explicit support for native thunks, whose bindings are saved to a sideband channel during compilation and referenced in bytecode as an index. This generalizes code that was previously specific to node definitions. * Added a name table to bytecode, to optimize situations where we reference the same string mulitple times. #preflight 62bf3c583f0d6beee2e8f4a6 [CL 20918762 by Ben Marsh in ue5-main branch]
82 lines
1.8 KiB
C#
82 lines
1.8 KiB
C#
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
using System;
|
|
using System.Linq;
|
|
|
|
namespace EpicGames.BuildGraph.Expressions
|
|
{
|
|
/// <summary>
|
|
/// Specification for a label
|
|
/// </summary>
|
|
public class BgLabel : BgExpr
|
|
{
|
|
/// <summary>
|
|
/// Name of this badge
|
|
/// </summary>
|
|
public BgString? DashboardName { get; }
|
|
|
|
/// <summary>
|
|
/// Category for this label
|
|
/// </summary>
|
|
public BgString? DashboardCategory { get; }
|
|
|
|
/// <summary>
|
|
/// Name of the badge in UGS
|
|
/// </summary>
|
|
public BgString? UgsBadge { get; }
|
|
|
|
/// <summary>
|
|
/// Path to the project folder in UGS
|
|
/// </summary>
|
|
public BgString? UgsProject { get; }
|
|
|
|
/// <summary>
|
|
/// Which change to show the badge for
|
|
/// </summary>
|
|
public BgEnum<BgLabelChange>? Change { get; }
|
|
|
|
/// <summary>
|
|
/// Constructor
|
|
/// </summary>
|
|
public BgLabel(BgString? name = null, BgString? category = null, BgString? ugsBadge = null, BgString? ugsProject = null, BgEnum<BgLabelChange>? change = null)
|
|
: base(BgExprFlags.ForceFragment)
|
|
{
|
|
DashboardName = name;
|
|
DashboardCategory = category;
|
|
UgsBadge = ugsBadge;
|
|
UgsProject = ugsProject;
|
|
Change = change;
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public override void Write(BgBytecodeWriter writer)
|
|
{
|
|
BgObject<BgLabelDef> obj = BgObject<BgLabelDef>.Empty;
|
|
if (!(DashboardName is null))
|
|
{
|
|
obj = obj.Set(x => x.DashboardName, DashboardName);
|
|
}
|
|
if (!(DashboardCategory is null))
|
|
{
|
|
obj = obj.Set(x => x.DashboardCategory, DashboardCategory);
|
|
}
|
|
if (!(UgsBadge is null))
|
|
{
|
|
obj = obj.Set(x => x.UgsBadge, UgsBadge);
|
|
}
|
|
if (!(UgsProject is null))
|
|
{
|
|
obj = obj.Set(x => x.UgsProject, UgsProject);
|
|
}
|
|
if (!(Change is null))
|
|
{
|
|
obj = obj.Set(x => x.Change, Change);
|
|
}
|
|
writer.WriteExpr(obj);
|
|
}
|
|
|
|
/// <inheritdoc/>
|
|
public override BgString ToBgString() => "{Label}";
|
|
}
|
|
}
|