-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
172 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
|
||
<meta charset="utf-8"> | ||
|
||
|
||
<title>DataConfig 1.5 & 1.6 with UE 5.4 support - slowburn.dev </title> | ||
<meta property="og:title" content="DataConfig 1.5 & 1.6 with UE 5.4 support - slowburn.dev" /> | ||
|
||
|
||
<meta name="description" content="DataConfig 1.5 and 1.6 release with UE 5.4 support, adding optional property support, core types serializers and blueprint nodes"> | ||
<meta property="og:description" content="DataConfig 1.5 and 1.6 release with UE 5.4 support, adding optional property support, core types serializers and blueprint nodes" /> | ||
|
||
|
||
|
||
|
||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<meta name="twitter:card" content="summary" /> | ||
<meta name="twitter:site" content="@slowburndev" /> | ||
<meta name="twitter:creator" content="@slowburndev" /> | ||
|
||
<meta property="og:url" content="https://slowburn.dev/blog/dataconfig-1-5-and-1-6/" /> | ||
|
||
<link rel="stylesheet" href="/css/normalize.css"> | ||
<link rel="stylesheet" href="/css/skeleton.css"> | ||
<link rel="stylesheet" href="/css/main.css"> | ||
|
||
<link rel="icon" type="image/png" href="/images/favicon.png"> | ||
|
||
</head> | ||
<body> | ||
|
||
<div class="container page"> | ||
|
||
<h1>DataConfig 1.5 & 1.6 with UE 5.4 support</h1> | ||
<span class="alt after-h1">2024-03-31</span> | ||
|
||
<h2 id="intro">Intro<a class="zola-anchor" href="#intro"> | ||
<svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg> | ||
</a></h2> | ||
<p>We just pushed <a href="https://github.com/slowburn-dev/DataConfig/releases/tag/1.6.0">DataConfig 1.6.0</a> and <a href="https://github.com/slowburn-dev/DataConfig/releases/tag/1.5.0">1.5.0</a> a month prior. Both have some cool features that we'll quickly go through here!</p> | ||
<h2 id="blueprint-nodes">Blueprint Nodes<a class="zola-anchor" href="#blueprint-nodes"> | ||
<svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg> | ||
</a></h2> | ||
<p>We now ship DataConfig Blueprint Nodes for dumping/loading JSON! I don't remember why we didn't do this in the first place but having this means that you can start trying out DataConfig without writing C++ code.</p> | ||
<p><img src="https://slowburn.dev/dataconfig/Extra/Images/DataConfigEngineExtra-BlueprintNodes.png" alt="Blueprint Nodes" /></p> | ||
<p>It's bundled with extra samples so you can try play it with <a href="https://slowburn.dev/dataconfig/Extra/GameplayTag">Gameplay Tag</a> and <a href="https://slowburn.dev/dataconfig/Extra/InstancedStruct">Instanced Struct</a>.</p> | ||
<ul> | ||
<li><a href="https://slowburn.dev/dataconfig/Extra/BlueprintNodes">Extra - Blueprint Nodes</a></li> | ||
</ul> | ||
<h2 id="optional-property">Optional Property<a class="zola-anchor" href="#optional-property"> | ||
<svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg> | ||
</a></h2> | ||
<p>Unreal 5.4 introduced optional property that allows you to mark <code>TOptional</code> fields as <code>UPROPERTY</code>:</p> | ||
<pre data-lang="c++" style="background-color:#ffffff;color:#4d4d4c;" class="language-c++ "><code class="language-c++" data-lang="c++"><span style="color:#999999;">// DataConfigTests54/Private/DcTestUE54.h</span><span style="color:#999999;"> | ||
</span><span style="color:#c82829;">USTRUCT</span><span>()</span><span> | ||
</span><span style="color:#8959a8;">struct </span><span>FDcTestOptional</span><span> | ||
</span><span>{</span><span> | ||
</span><span> </span><span style="color:#c82829;">GENERATED_BODY</span><span>()</span><span> | ||
</span><span> | ||
</span><span> </span><span style="color:#4271ae;">UPROPERTY</span><span>() TOptional<</span><span style="color:#8959a8;">float</span><span>> OptionalFloatField1;</span><span> | ||
</span><span> </span><span style="color:#4271ae;">UPROPERTY</span><span>() TOptional<</span><span style="color:#8959a8;">float</span><span>> OptionalFloatField2;</span><span> | ||
</span><span> | ||
</span><span> </span><span style="color:#4271ae;">UPROPERTY</span><span>() TOptional<FString> OptionalStrField1;</span><span> | ||
</span><span> </span><span style="color:#4271ae;">UPROPERTY</span><span>() TOptional<FString> OptionalStrField2;</span><span> | ||
</span><span> | ||
</span><span> </span><span style="color:#4271ae;">UPROPERTY</span><span>() TOptional<FDcInnerStruct54> OptionalStructField1;</span><span> | ||
</span><span> </span><span style="color:#4271ae;">UPROPERTY</span><span>() TOptional<FDcInnerStruct54> OptionalStructField2;</span><span> | ||
</span><span>};</span><span> | ||
</span></code></pre> | ||
<p>DataConfig fully supports this now and it works perfectly with JSON format since any JSON value can be <code>null</code>:</p> | ||
<pre data-lang="c++" style="background-color:#ffffff;color:#4d4d4c;" class="language-c++ "><code class="language-c++" data-lang="c++"><span style="color:#999999;">// DataConfigTests54/Private/DcTestUE54.cpp</span><span style="color:#999999;"> | ||
</span><span>FString Str </span><span style="color:#3e999f;">= </span><span style="color:#c82829;">TEXT</span><span style="color:#4271ae;">(</span><span style="color:#8959a8;">R</span><span style="color:#718c00;">"(</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> {</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "OptionalFloatField1" : 17.5,</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "OptionalFloatField2" : null,</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "OptionalStrField1" : "Alpha",</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "OptionalStrField2" : null,</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "OptionalStructField1" : {</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "StrField" : "Beta",</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "IntField" : 42</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> },</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> "OptionalStructField2" : null</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> }</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;"> | ||
</span><span style="color:#718c00;">)"</span><span style="color:#4271ae;">)</span><span>;</span><span> | ||
</span><span> | ||
</span><span style="color:#999999;">// equivalent fixture</span><span style="color:#999999;"> | ||
</span><span>FDcTestOptional Expect;</span><span> | ||
</span><span>Expect.</span><span style="color:#c82829;">OptionalFloatField1 </span><span style="color:#3e999f;">= </span><span style="color:#f5871f;">17.5</span><span style="color:#8959a8;">f</span><span>;</span><span> | ||
</span><span>Expect.</span><span style="color:#c82829;">OptionalStrField1 </span><span style="color:#3e999f;">= </span><span style="color:#c82829;">TEXT</span><span style="color:#4271ae;">(</span><span style="color:#718c00;">"Alpha"</span><span style="color:#4271ae;">)</span><span>;</span><span> | ||
</span><span>Expect.</span><span style="color:#c82829;">OptionalStructField1</span><span>.</span><span style="color:#c82829;">Emplace</span><span>();</span><span> | ||
</span><span>Expect.</span><span style="color:#c82829;">OptionalStructField1</span><span>-></span><span style="color:#c82829;">StrField </span><span style="color:#3e999f;">= </span><span style="color:#c82829;">TEXT</span><span style="color:#4271ae;">(</span><span style="color:#718c00;">"Beta"</span><span style="color:#4271ae;">)</span><span>;</span><span> | ||
</span><span>Expect.</span><span style="color:#c82829;">OptionalStructField1</span><span>-></span><span style="color:#c82829;">IntField </span><span style="color:#3e999f;">= </span><span style="color:#f5871f;">42</span><span>;</span><span> | ||
</span></code></pre> | ||
<ul> | ||
<li><a href="https://slowburn.dev/dataconfig/Advanced/Optional">Advanced - Optional</a></li> | ||
</ul> | ||
<h2 id="core-types-serializers">Core Types Serializers<a class="zola-anchor" href="#core-types-serializers"> | ||
<svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg> | ||
</a></h2> | ||
<p>DataConfig now comes bundled with a set of serialization handlers that read/writes core types like <code>FVector</code> into a more compact format:</p> | ||
<pre data-lang="JSON" style="background-color:#ffffff;color:#4d4d4c;" class="language-JSON "><code class="language-JSON" data-lang="JSON"><span>{</span><span> | ||
</span><span> </span><span style="color:#718c00;">"VecField1" </span><span>: [ </span><span style="color:#f5871f;">0</span><span>, </span><span style="color:#f5871f;">0</span><span>, </span><span style="color:#f5871f;">1</span><span>],</span><span> | ||
</span><span> </span><span style="color:#718c00;">"ColorField1" </span><span>: </span><span style="color:#718c00;">"#000000FF"</span><span>,</span><span> | ||
</span><span> </span><span style="color:#718c00;">"DateTimeField1" </span><span>: </span><span style="color:#718c00;">"0001.01.01-00.00.00"</span><span>,</span><span> | ||
</span><span>}</span><span> | ||
</span></code></pre> | ||
<p>This works both ways in serialization and deserializations.</p> | ||
<ul> | ||
<li><a href="https://slowburn.dev/dataconfig/Advanced/CoreTypes">Advanced - CoreTypes</a></li> | ||
</ul> | ||
<h2 id="breaking-changes">Breaking Changes<a class="zola-anchor" href="#breaking-changes"> | ||
<svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg> | ||
</a></h2> | ||
<p>Both versions now have some breaking changes. They're all <a href="https://slowburn.dev/dataconfig/Advanced/Breaking">documented here</a>.</p> | ||
<h2 id="closing">Closing<a class="zola-anchor" href="#closing"> | ||
<svg class="octicon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg> | ||
</a></h2> | ||
<p>Download the <a href="https://github.com/slowburn-dev/DataConfig/releases/tag/1.6.0">latest release here</a>. We'll update <a href="https://www.unrealengine.com/marketplace/en-US/product/dataconfig-json-asset">DataConfig JSON Asset</a> later when 5.4 is out.</p> | ||
|
||
|
||
<div class="footer"> | ||
<a href="/">slowburn.dev</a> | ||
</div> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters