public static void SetIcon(this BlueprintUnitFact fact, string iconAssetGuid) { var iconFact = Main.Library?.Get <BlueprintUnitFact>(iconAssetGuid); if (iconFact == null) { Main.Logger?.Error($"SetIcon: asset of type {typeof(BlueprintUnitFact).Name} with guid {iconAssetGuid} not found in library."); return; } fact.SetIcon(iconFact.Icon); }
public static void SetNameDescriptionIcon(this BlueprintUnitFact feature, BlueprintUnitFact other) { SetNameDescription(feature, other); feature.SetIcon(other.Icon); }
public static void SetNameDescriptionIcon(this BlueprintUnitFact feature, String displayName, String description, Sprite icon) { SetNameDescription(feature, displayName, description); feature.SetIcon(icon); }