public void ValidateAndFinalise() { string cardName = GetCardName(); if (string.IsNullOrEmpty(cardName)) { DisplayError("This card still needs a name."); return; } if (effectTab.GetNumberOfEffects() == 0) { DisplayError("This card needs at least one effect."); return; } if (artTab.ExportTexture() == null) { DisplayError("Something went wrong getting the art for your card :("); return; } CardData card = new CardData(); card.Name = cardName; card.ArtTexture = artTab.ExportTexture(); card.AddEffect(effectTab.GetConcatenatedEffects()); foreach (string tag in tagTab.GetTags()) { card.AddTag(tag); } card.compilerVersion = EffectData.CompilerVersion; Debug.Log($"Saving a new card! {cardName}, {tagTab.GetTags().Count} tags, {effectTab.GetNumberOfEffects()} effects. [{card.GetID()}]"); effectTab.PostFinishSteps(card); }