Skip to content

Commit

Permalink
update site
Browse files Browse the repository at this point in the history
  • Loading branch information
jagt committed May 13, 2023
1 parent 1ff454e commit bea0ce8
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 2 deletions.
11 changes: 11 additions & 0 deletions dcjsonasset/Changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@ <h1 class="menu-title">DataConfig Json Asset Book</h1>
<h1 id="changes"><a class="header" href="#changes">Changes</a></h1>
<p>All notable changes to this project will be documented in this file.</p>
<p>Version listed here should match with <code>VersionName</code> field in <code>DcJsonAsset.uplugin</code></p>
<h2 id="141---2023-5-13"><a class="header" href="#141---2023-5-13">1.4.1 - 2023-5-13</a></h2>
<ul>
<li>Integrate DataConfig 1.4.1</li>
<li><a href="Schema.html#instanced-struct">Support <code>FInstancedStruct</code> property</a></li>
<li>Support for UE 5.2.
<ul>
<li>Since this release DcJsonAsset only works with UE 5.0+.</li>
<li>You can still get older versions from Epic store for older engines versions. And DataConfigCore still committed to work on UE 4.25+.</li>
</ul>
</li>
</ul>
<h2 id="140---2022-11-17"><a class="header" href="#140---2022-11-17">1.4.0 - 2022-11-17</a></h2>
<ul>
<li>Integrate DataConfig 1.4</li>
Expand Down
56 changes: 56 additions & 0 deletions dcjsonasset/Schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,62 @@ <h2 id="inline-sub-objects"><a class="header" href="#inline-sub-objects">Inline
&quot;ShapeField3&quot; : null
}
</code></pre>
<h2 id="instanced-struct"><a class="header" href="#instanced-struct">Instanced Struct</a></h2>
<p>UE introduced <code>FInstancedStruct</code> with <a href="https://docs.unrealengine.com/5.0/en-US/API/Plugins/StructUtils/">StructUtils plugin</a> since 5.0 which implements lightweight polymorphic serialization. Given a struct hierarchy like this:</p>
<pre><code class="language-c++">// DcJsonAssetTests/Private/DcTestImports3.h
USTRUCT(BlueprintType)
struct FDcJsonAssetTestStructShapeBase
{
// ...
UPROPERTY(EditAnywhere) FName ShapeName;
};

USTRUCT(BlueprintType)
struct FDcJsonAssetTestStructShapeRectangle : public FDcJsonAssetTestStructShapeBase
{
// ...
UPROPERTY(EditAnywhere) float Height;
UPROPERTY(EditAnywhere) float Width;
};

USTRUCT(BlueprintType)
struct FDcJsonAssetTestStructShapeCircle : public FDcJsonAssetTestStructShapeBase
{
// ...
UPROPERTY(EditAnywhere) float Radius;
};
</code></pre>
<p>An asset can be loaded from a JSON like this:</p>
<pre><code class="language-c++">// DcJsonAssetTests/Private/DcTestImports3.h
UCLASS()
class UDcJsonAssetTestAssetInstancedStruct : public UDcPrimaryImportedDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere) FInstancedStruct Instanced1;
UPROPERTY(EditAnywhere) FInstancedStruct Instanced2;
UPROPERTY(EditAnywhere) FInstancedStruct Instanced3;
};

// DcJsonAsset/Tests/DcJsonFixture_InstancedStruct.json
{
&quot;$type&quot; : &quot;DcJsonAssetTestAssetInstancedStruct&quot;,
&quot;Instanced1&quot; : null,
&quot;Instanced2&quot; :
{
&quot;$type&quot; : &quot;DcJsonAssetTestStructShapeRectangle&quot;,
&quot;ShapeName&quot; : &quot;MyBox&quot;,
&quot;Height&quot; : 3,
&quot;Width&quot; : 4
},
&quot;Instanced3&quot; :
{
&quot;$type&quot; : &quot;DcJsonAssetTestStructShapeCircle&quot;,
&quot;ShapeName&quot; : &quot;MyCircle&quot;,
&quot;Radius&quot; : 5
}
}
</code></pre>
<h2 id="other-root-meta-fields"><a class="header" href="#other-root-meta-fields">Other Root Meta Fields</a></h2>
<p>In the root JSON object we now check for some other <code>$meta</code> fields.</p>
<h3 id="reimport-keep-instance"><a class="header" href="#reimport-keep-instance"><code>$reimport-keep-instance</code></a></h3>
Expand Down
67 changes: 67 additions & 0 deletions dcjsonasset/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,62 @@ <h2 id="inline-sub-objects"><a class="header" href="#inline-sub-objects">Inline
&quot;ShapeField3&quot; : null
}
</code></pre>
<h2 id="instanced-struct"><a class="header" href="#instanced-struct">Instanced Struct</a></h2>
<p>UE introduced <code>FInstancedStruct</code> with <a href="https://docs.unrealengine.com/5.0/en-US/API/Plugins/StructUtils/">StructUtils plugin</a> since 5.0 which implements lightweight polymorphic serialization. Given a struct hierarchy like this:</p>
<pre><code class="language-c++">// DcJsonAssetTests/Private/DcTestImports3.h
USTRUCT(BlueprintType)
struct FDcJsonAssetTestStructShapeBase
{
// ...
UPROPERTY(EditAnywhere) FName ShapeName;
};

USTRUCT(BlueprintType)
struct FDcJsonAssetTestStructShapeRectangle : public FDcJsonAssetTestStructShapeBase
{
// ...
UPROPERTY(EditAnywhere) float Height;
UPROPERTY(EditAnywhere) float Width;
};

USTRUCT(BlueprintType)
struct FDcJsonAssetTestStructShapeCircle : public FDcJsonAssetTestStructShapeBase
{
// ...
UPROPERTY(EditAnywhere) float Radius;
};
</code></pre>
<p>An asset can be loaded from a JSON like this:</p>
<pre><code class="language-c++">// DcJsonAssetTests/Private/DcTestImports3.h
UCLASS()
class UDcJsonAssetTestAssetInstancedStruct : public UDcPrimaryImportedDataAsset
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere) FInstancedStruct Instanced1;
UPROPERTY(EditAnywhere) FInstancedStruct Instanced2;
UPROPERTY(EditAnywhere) FInstancedStruct Instanced3;
};

// DcJsonAsset/Tests/DcJsonFixture_InstancedStruct.json
{
&quot;$type&quot; : &quot;DcJsonAssetTestAssetInstancedStruct&quot;,
&quot;Instanced1&quot; : null,
&quot;Instanced2&quot; :
{
&quot;$type&quot; : &quot;DcJsonAssetTestStructShapeRectangle&quot;,
&quot;ShapeName&quot; : &quot;MyBox&quot;,
&quot;Height&quot; : 3,
&quot;Width&quot; : 4
},
&quot;Instanced3&quot; :
{
&quot;$type&quot; : &quot;DcJsonAssetTestStructShapeCircle&quot;,
&quot;ShapeName&quot; : &quot;MyCircle&quot;,
&quot;Radius&quot; : 5
}
}
</code></pre>
<h2 id="other-root-meta-fields"><a class="header" href="#other-root-meta-fields">Other Root Meta Fields</a></h2>
<p>In the root JSON object we now check for some other <code>$meta</code> fields.</p>
<h3 id="reimport-keep-instance"><a class="header" href="#reimport-keep-instance"><code>$reimport-keep-instance</code></a></h3>
Expand Down Expand Up @@ -584,6 +640,17 @@ <h2 id="dump-assets"><a class="header" href="#dump-assets">Dump Assets</a></h2>
<div style="break-before: page; page-break-before: always;"></div><h1 id="changes"><a class="header" href="#changes">Changes</a></h1>
<p>All notable changes to this project will be documented in this file.</p>
<p>Version listed here should match with <code>VersionName</code> field in <code>DcJsonAsset.uplugin</code></p>
<h2 id="141---2023-5-13"><a class="header" href="#141---2023-5-13">1.4.1 - 2023-5-13</a></h2>
<ul>
<li>Integrate DataConfig 1.4.1</li>
<li><a href="Schema.html#instanced-struct">Support <code>FInstancedStruct</code> property</a></li>
<li>Support for UE 5.2.
<ul>
<li>Since this release DcJsonAsset only works with UE 5.0+.</li>
<li>You can still get older versions from Epic store for older engines versions. And DataConfigCore still committed to work on UE 4.25+.</li>
</ul>
</li>
</ul>
<h2 id="140---2022-11-17"><a class="header" href="#140---2022-11-17">1.4.0 - 2022-11-17</a></h2>
<ul>
<li>Integrate DataConfig 1.4</li>
Expand Down
2 changes: 1 addition & 1 deletion dcjsonasset/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dcjsonasset/searchindex.json

Large diffs are not rendered by default.

0 comments on commit bea0ce8

Please sign in to comment.