{"id":121,"date":"2022-10-19T14:45:30","date_gmt":"2022-10-19T14:45:30","guid":{"rendered":"https:\/\/merserver.com\/?p=121"},"modified":"2022-10-19T14:46:06","modified_gmt":"2022-10-19T14:46:06","slug":"unreal-c-interfaces","status":"publish","type":"post","link":"http:\/\/merserver.com\/index.php\/2022\/10\/19\/unreal-c-interfaces\/","title":{"rendered":"Unreal C++ interfaces"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"introduction\">Introduction<\/h1>\n\n\n\n<p>I wrote this blog post to fill a few gaps in the&nbsp;<a href=\"https:\/\/docs.unrealengine.com\/en-US\/Programming\/UnrealArchitecture\/Reference\/Interfaces\/index.html\">documentation<\/a>&nbsp;I\u2019d found for C++ interfaces in Unreal. Specifically I have a few tips for what I think are common usage scenarios that no blog post I found talked about.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"note-this-blog-post-is-based-on-unreal-engine-version-4-25-3\">Note: This blog post is based on Unreal Engine version 4.25.3<\/h4>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-interfaces\">What are Interfaces?<\/h2>\n\n\n\n<p>Interfaces are great in any language. They let you define a set of functionality that anything can implement, and not be tied to a rigid class hierarchy. My favourite implementation of this is actually in&nbsp;<a href=\"https:\/\/golang.org\/\">Go<\/a>, where you don\u2019t even have to declare that you\u2019re implementing an interface &#8211; if you happen to have the right combination of functions on your type, you just&nbsp;<em>are<\/em>. Lovely.<\/p>\n\n\n\n<p>C++ technically doesn\u2019t have interfaces, but it does have multiple inheritance, which can be made to emulate it. This is what UE4 does, with a bunch of boilerplate tacked on to make it a bit more explicit, and to support the reflection system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-another-blog-post-about-this\">Why another blog post about this?<\/h2>\n\n\n\n<p>There&nbsp;<em>are<\/em>&nbsp;a bunch of blog posts out there teaching you how to use UE4 C++ interfaces, and I used them to get up to speed (I\u2019m not an expert, I only started using them recently).<\/p>\n\n\n\n<p>But I found pretty quickly that they skip over a few things that I needed almost immediately. For example they generally assume you\u2019re working entirely within C++, when I think a lot of us are working in mixed C++ \/ Blueprint environments. They also didn\u2019t talk about what you need to do when you want interface variables. So I felt I could add something from what I\u2019ve learned in the last few weeks.<\/p>\n\n\n\n<p>I could just refer to the other tutorials for the basics, but I decided to make this post self-contained and cover C++ interfaces from the ground up as well.<\/p>\n\n\n\n<p>So this post will cover:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Creating and implementing a C++ interface<\/li><li>Implementing this interface directly in Blueprints as well as C++<\/li><li>Storing variables typed to the interface in C++ and Blueprints<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"declaring-the-c-interface\">Declaring the C++ Interface<\/h2>\n\n\n\n<p>I like to declare my interfaces in C++ and not as&nbsp;<a href=\"https:\/\/docs.unrealengine.com\/en-US\/Engine\/Blueprints\/UserGuide\/Types\/Interface\/index.html\">Blueprint Interfaces<\/a>, because it gives me more options; C++ interfaces can be used in both C++ and Blueprints, while Blueprint Interfaces can only be used in Blueprints.<\/p>\n\n\n\n<p>Let\u2019s say we\u2019re creating an interface called&nbsp;<code>DoSomeThings<\/code>&nbsp;which, well, does some things. First we need a header file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#<strong>pragma<\/strong> once\n#<strong>include<\/strong> \"CoreMinimal.h\"\n#<strong>include<\/strong> \"DoSomeThings.generated.h\"\n\nUINTERFACE(MinimalAPI)\n<strong>class<\/strong> UDoSomeThings : <strong>public<\/strong> UInterface\n{\n    GENERATED_BODY()\n    \/\/ This will always be empty!\n};\n\n\n<strong>class<\/strong> YOURPROJECT_API IDoSomeThings\n{\n    GENERATED_BODY()\n<strong>public<\/strong>:\n    \/\/ ... Here is where we will define UFUNCTION interface methods\n};\n\n<\/code><\/pre>\n\n\n\n<p>As you can see, you have a&nbsp;<code>UDoSomeThings<\/code>&nbsp;and&nbsp;<code>IDoSomeThings<\/code>&nbsp;&#8211; there doesn\u2019t seem to be any link between them, but the naming convention actually does this automatically thanks to UE header magic.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"adding-methods\">Adding methods<\/h2>\n\n\n\n<p>So next, you\u2019ll want to add some methods to the interface, which you always do inside the&nbsp;<code>IDoSomeThings<\/code>&nbsp;class. Lets start with something simple:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>class<\/strong> YOURPROJECT_API IDoSomeThings\n{\n    GENERATED_BODY()\n<strong>public<\/strong>:\n    \/\/\/ Get the number of things\n    UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category=\"Things\")\n    <strong>int<\/strong> <strong>GetNumberOfThings<\/strong>();\n};\n<\/code><\/pre>\n\n\n\n<p>There\u2019s a couple of things to note there:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>I\u2019ve made it&nbsp;<code>BlueprintCallable<\/code>, because I want to be able to use it in Blueprints<\/li><li>I\u2019ve said&nbsp;<code>BlueprintNativeEvent<\/code>&nbsp;because I want to give C++ classes the option of implementing it<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"why-blueprintnativeevent\">Why BlueprintNativeEvent?<\/h2>\n\n\n\n<p>Usually when you declare&nbsp;<code>BlueprintNativeEvent<\/code>&nbsp;it means you immediately want to add a C++ implementation, named in this case&nbsp;<code>GetNumberOfThings_Implementation<\/code>. But, since this is just the interface definition, you don\u2019t have to do that yet. You wait until you actually implement this interface on a C++ class to do that.<\/p>\n\n\n\n<p><strong>However<\/strong>: I\u2019ve discovered that this doesn\u2019t mean you&nbsp;<em>must<\/em>&nbsp;have a C++ implementation. In my testing you can totally implement this interface directly in Blueprints with no C++ intermediate class if you want, the&nbsp;<code>BlueprintNativeEvent<\/code>&nbsp;just allows you to have C++ implementors as well.<\/p>\n\n\n\n<p>As such I don\u2019t see why you\u2019d use any other specifier; the&nbsp;<a href=\"https:\/\/docs.unrealengine.com\/en-US\/Programming\/UnrealArchitecture\/Reference\/Interfaces\/index.html\">documentation<\/a>&nbsp;says the other options are: no specifier (can\u2019t be implemented in BP), or&nbsp;<code>BlueprintImplementableEvent<\/code>&nbsp;(must be implemented in BP, can\u2019t be implemented in C++). Since BNE seems to let you do&nbsp;<em>anything<\/em>&nbsp;I can\u2019t see why the others are useful, in interfaces specifically. \ud83e\udd37\u200d\u2642\ufe0f<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"implementing-the-interface-in-c\">Implementing the Interface in C++<\/h2>\n\n\n\n<p>Here\u2019s a minimal C++ implementation of the interface on an Actor called SomeThingsActor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#<strong>pragma<\/strong> once\n\n#<strong>include<\/strong> \"CoreMinimal.h\"\n#<strong>include<\/strong> \"DoSomeThings.h\"\n#<strong>include<\/strong> \"SomeThingsActor.generated.h\"\n\nUCLASS(Blueprintable)\n<strong>class<\/strong> YOURPROJECT_API ASomeThingsActor : <strong>public<\/strong> AActor, <strong>public<\/strong> IDoSomeThings\n{\n    GENERATED_BODY()\n<strong>public<\/strong>:\n    <strong>virtual<\/strong> <strong>int<\/strong> <strong>GetNumberOfThings_Implementation<\/strong>() override;\n};\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>#<strong>include<\/strong> \"SomeThingsActor.h\"\n\n<strong>int<\/strong> ASomeThingsActor::GetNumberOfThings_Implementation()\n{\n    <strong>return<\/strong> 1;\n}\n<\/code><\/pre>\n\n\n\n<p>Easy, right? The only interesting thing is that because the interface definition was set to&nbsp;<code>BlueprintNativeEvent<\/code>, we implement&nbsp;<code>GetNumberOfThings_Implementation<\/code>&nbsp;rather than&nbsp;<code>GetNumberOfThings<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"implementing-the-interface-in-blueprints\">Implementing the Interface in Blueprints<\/h2>\n\n\n\n<p>As I mentioned earlier,&nbsp;<code>BlueprintNativeEvent<\/code>&nbsp;doesn\u2019t stop you implementing this interface&nbsp;<strong>directly<\/strong>&nbsp;in Blueprints if you want &#8211; at least in my experience. I don\u2019t know if this is by accident or by design. It\u2019s specific to interfaces, if you use&nbsp;<code>BlueprintNativeEvent<\/code>&nbsp;on a regular&nbsp;<code>UCLASS<\/code>&nbsp;you must have a C++ implementation, but it\u2019s in the same class in that case.<\/p>\n\n\n\n<p>You can also subclass a Blueprint class from a C++ implementation like&nbsp;<code>ASomeThingsActor<\/code>&nbsp;above, and override the method. But you don\u2019t&nbsp;<em>have<\/em>&nbsp;to, with interfaces.<\/p>\n\n\n\n<p>Here\u2019s how you\u2019d implement it directly. On your Blueprint class:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Click on \u201cClass Settings\u201d in the toolbar<\/li><li>In the \u201cDetails\u201d pane under Interfaces, click \u201cAdd\u201d next to \u201cImplemented Interfaces\u201d.<\/li><li>Pick the interface:<img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface-impl.png\" alt=\"Implementing in BP\"><\/li><li>Under \u201cMy Blueprint\u201d you\u2019ll see the interface definition:<img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface2.png\" alt=\"Implementing in BP\"><\/li><li>Double-click it and implement however you like:<img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface3.png\" alt=\"Implementing in BP\"><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"detecting-calling-the-interface\">Detecting &amp; Calling the Interface<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"calling-in-c\">Calling in C++<\/h3>\n\n\n\n<p>A lot of information online will tell you that you can just use&nbsp;<code>Cast&lt;&gt;<\/code>&nbsp;to both detect and access an interface in C++:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>auto<\/strong> I = Cast&lt;IDoSomeThings&gt;(Actor);\n<strong>if<\/strong> (I)\n{\n    <strong>int<\/strong> Num = I-&gt;GetNumberOfThings();\n}\n<\/code><\/pre>\n\n\n\n<p>It\u2019s true that this works&nbsp;<strong>if<\/strong>&nbsp;<code>Actor<\/code>&nbsp;is a C++ implementation of&nbsp;<code>IDoSomeThings<\/code>, or a Blueprint subclass of a C++ implementor.<\/p>\n\n\n\n<p>If, however, you implement this interface&nbsp;<em>directly<\/em>&nbsp;on a Blueprint,&nbsp;<code>Cast&lt;IDoSomeThings&gt;<\/code>&nbsp;will&nbsp;<strong>always return nullptr<\/strong>. Always. This is because the C++ side has no idea the actor implements this. This is particularly nefarious because nothing will look wrong until you happen to use a trivial direct BP implementation and suddenly a bunch of things will start to fail silently.<\/p>\n\n\n\n<p>To detect interfaces reliably, whether they\u2019ve been implemented as C++ or Blueprints, you need&nbsp;<em>avoid using&nbsp;<code>Cast&lt;&gt;<\/code><\/em>&nbsp;and use UE4\u2019s explicit interface utilities which use the full reflection system and can therefore detect Blueprints.<\/p>\n\n\n\n<p>First, detecting if the interface is implemented:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/\/ Either of these 2 are valid\n\n\/\/\/ Option 1 does more sanity checks, is null-safe on Actor\nbImpl = UKismetSystemLibrary::DoesImplementInterface(Actor, UDoSomeThings::StaticClass())\n\n\/\/\/ Option 2 skips some checks, you must ensure Actor is non-null\nbImpl = Actor-&gt;GetClass()-&gt;ImplementsInterface(UDoSomeThings::StaticClass())\n<\/code><\/pre>\n\n\n\n<p>Once you\u2019ve detected if the interface is present, you must call it via the interface wrappers, not directly on the instance:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>if<\/strong> (bImpl)\n{\n    <strong>int<\/strong> Num = IDoSomeThings::Execute_GetNumberOfThings(Actor);\n}\n<\/code><\/pre>\n\n\n\n<p>This will work universally, whether the interface has been implemented in C++ or Blueprints, so it seems best to&nbsp;<em>always<\/em>&nbsp;use this method. It\u2019s probably less efficient, but personally I tend to use interfaces at a fairly high level so am not particularly concerned.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"calling-in-blueprints\">Calling in Blueprints<\/h3>\n\n\n\n<p>This is a little simpler because there\u2019s really only one way to do it; you can call&nbsp;<strong>any<\/strong>&nbsp;interface on&nbsp;<strong>any<\/strong>&nbsp;object:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface4.png\" alt=\"Calling in BP\"\/><\/figure>\n\n\n\n<p>Notice the envelope icon which shows that this is a \u201cMessage\u201d to the receiving object, which is silently ignored if that interface is not implemented. It works whether the interface was implemented in C++ or Blueprints. When you pick the function from the list, it displays like this:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface5.png\" alt=\"Calling in BP\"\/><\/figure>\n\n\n\n<p>If you specifically need to know whether an object implements an interface, you can test with the \u201cDoes Implement Interface\u201d node:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface6.png\" alt=\"Calling in BP\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"storing-interfaces-as-variables\">Storing Interfaces As Variables<\/h2>\n\n\n\n<p>Sometimes you want to hold on to a reference to an interface, as the general type.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"blueprint-variables\">Blueprint Variables<\/h3>\n\n\n\n<p>In Blueprints this is pretty easy. You need to make sure your \u201cU\u201d interface class has the&nbsp;<code>BlueprintType<\/code>&nbsp;specifier, which allows it to be stored in Blueprint variables:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>UINTERFACE(MinimalAPI, BlueprintType)\n<strong>class<\/strong> UDoSomeThings : <strong>public<\/strong> UInterface\n<\/code><\/pre>\n\n\n\n<p>Once you\u2019ve done that, you can just create variables with this type inside your Blueprints like any other variable:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/merserver.com\/wp-content\/uploads\/2022\/10\/ue-cpp-interface7.png\" alt=\"BP Variable\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"c-variables\">C++ variables<\/h3>\n\n\n\n<p>I usually prefer to define my variables in C++, because then I can use them in C++ code or Blueprints.<\/p>\n\n\n\n<p>In C++ things are slightly more tricky, because you can\u2019t store a&nbsp;<code>IDoSomeThings<\/code>&nbsp;pointer as a&nbsp;<code>UPROPERTY()<\/code>, because they don\u2019t play nice with the garbage collector. We need something that holds on to the UObject.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"tscriptinterface-prone-to-error\">TScriptInterface (Prone to error!)<\/h4>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Spoiler: You might wonder in a minute why I talk about TScriptInterface only to tell you in the end not to use it. Well, it\u2019s because it\u2019s actually suggested by the compiler if you try to use an interface pointer as a UPROPERTY. That\u2019s how I found it, only to discover its problems later.<\/p><\/blockquote>\n\n\n\n<p>Unreal provides a&nbsp;<code>TScriptInterface&lt;&gt;<\/code>&nbsp;type which is designed to wrap an object as a specific interface. It\u2019s the official suggested way to hold on to both the object reference safely and the interface it\u2019s supposed to be presenting. You can use it like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>UPROPERTY(BlueprintReadWrite)\nTScriptInterface&lt;IDoSomeThings&gt; SomethingInstance;\n<\/code><\/pre>\n\n\n\n<p><code>TScriptInterface&lt;&gt;<\/code>&nbsp;is used as a value type, so rather than null when not initialised, the default state is an empty wrapper. To test whether it\u2019s empty or not, use the&nbsp;<code>bool()<\/code>&nbsp;overloaded operator:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>if<\/strong> (SomethingInstance)\n{\n    \/\/ OK this points to something useful\n}\n<\/code><\/pre>\n\n\n\n<p>The simplest way to assign an object which implements the interface to this property is to use the assignment operator:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>if<\/strong> (UKismetSystemLibrary::DoesImplementInterface(Actor, UDoSomeThings::StaticClass()))\n{\n    SomethingInstance = Actor;\n}\n<\/code><\/pre>\n\n\n\n<p>When you want to use this stored reference, you call it using the overloaded&nbsp;<code>-&gt;<\/code>&nbsp;operator, i.e.:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>int<\/strong> Num = SomethingInstance-&gt;GetNumberOfThings();\n<\/code><\/pre>\n\n\n\n<p>Simple in theory, but there\u2019s one&nbsp;<strong>major<\/strong>&nbsp;problem with this, and that\u2019s that&nbsp;<code>TScriptInterface&lt;&gt;<\/code>&nbsp;derives the interface pointer using&nbsp;<code>Cast&lt;&gt;<\/code>. And as we established earlier,&nbsp;<code>Cast&lt;&gt;<\/code>&nbsp;will&nbsp;<strong>always return nullptr<\/strong>&nbsp;if the instance in question is only implementing the interface at the Blueprint level, and none of its superclasses implement it in C++.<\/p>\n\n\n\n<p>The thing is, you can still make&nbsp;<code>TScriptInterface&lt;&gt;<\/code>&nbsp;work in this scenario, by instead calling:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>int<\/strong> Num = IDoSomeThings::Execute_GetNumberOfThings(SomethingInstance.GetObject());\n<\/code><\/pre>\n\n\n\n<p>This is because the UObject pointer in the TScriptInterface is fine, but the interface pointer is null.<\/p>\n\n\n\n<p>Also, calls in Blueprints will work&nbsp;<em>fine<\/em>&nbsp;with this&nbsp;<code>TScriptInterface&lt;&gt;<\/code>&nbsp;variable, which can hide the problem. Various methods of&nbsp;<code>TScriptInterface&lt;&gt;<\/code>&nbsp;will fail in C++ if your class only implements at a Blueprint level, so I consider it unsafe to use.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"uobject-the-more-reliable-way\">UObject: the more reliable way<\/h4>\n\n\n\n<p>I\u2019ve now chosen to skip&nbsp;<code>TScriptInterface<\/code>&nbsp;and instead just hold a&nbsp;<code>UObject*<\/code>, because the object reference is the only bit of&nbsp;<code>TScriptInterface<\/code>&nbsp;which is reliable in cases where the interface is only implemented in Blueprints anyway.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>UPROPERTY(BlueprintReadWrite)\nUObject* SomethingInstance;\n<\/code><\/pre>\n\n\n\n<p>This way you can just assign the \u201craw\u201d object pointer to this variable and use the standard \u201csafe\u201d way to call it, avoiding&nbsp;<code>Cast&lt;&gt;<\/code>&nbsp;as we previously discussed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ I'm assuming here that we checked the object supported the interface before saving\n\/\/ it to the variable; if not we should check for that as well as nulls\n<strong>if<\/strong> (SomethingInstance)\n{\n    <strong>int<\/strong> Num = IDoSomeThings::Execute_GetNumberOfThings(SomethingInstance);\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"the-end\">The End<\/h2>\n\n\n\n<p>So, that\u2019s what I\u2019ve learned about interfaces in Unreal in a mixed C++ \/ Blueprint environment in the last couple of weeks. I\u2019d written it all down in my personal notes but came to the conclusion my usage must be pretty common, and those little gotchas seemed worth putting down somewhere public for others to potentially benefit from.<\/p>\n\n\n\n<p>I\u2019ve done my best but I\u2019m not an expert, if I\u2019ve misunderstood anything in this blog post, please do let me know on&nbsp;<a href=\"https:\/\/www.twitter.com\/stevestreeting\">Twitter<\/a>. \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction I wrote this blog post to fill a few gaps in the&nbsp;documentation&nbsp;I\u2019d found for C++ interfaces in Unreal. Specifically I have a few tips for what I think are common usage scenarios that no blog post I found talked about. Note: This blog post is based on Unreal Engine version 4.25.3 What are Interfaces?&#8230;<\/p>\n<p class=\"more-link-wrap\"><a href=\"http:\/\/merserver.com\/index.php\/2022\/10\/19\/unreal-c-interfaces\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &ldquo;Unreal C++ interfaces&rdquo;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-121","post","type-post","status-publish","format-standard","hentry","category-unreal-engine"],"_links":{"self":[{"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/comments?post=121"}],"version-history":[{"count":1,"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/posts\/121\/revisions"}],"predecessor-version":[{"id":130,"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/posts\/121\/revisions\/130"}],"wp:attachment":[{"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/media?parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/categories?post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/merserver.com\/index.php\/wp-json\/wp\/v2\/tags?post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}