question

shanekingston avatar image
shanekingston asked

23 Compiler errors in Unreal SDK (using 4.12.5). Are these going to be resolved?,23 compiler errors In Unreal SDK (using 4.12.5) - are these going to be resolved?

,

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tgraupmann avatar image tgraupmann commented ·
0 Likes 0 ·
1807605288 avatar image
1807605288 answered

UPDATE: With some customer help we've gotten our Unreal Sdks working with the latest versions of 4.9 thru 4.13.

Unfortunately, this answer is a bit of a confession.

PlayFab does not have an Unreal expert on staff. Our Unreal SDKs were donated to us by customers, as you can see in the GitHub readme Acknowledgements section for those SDKs:

https://github.com/PlayFab/UnrealCppSdk#5-acknowledgements

https://github.com/PlayFab/UnrealBlueprintSDK#7-acknowledgements

The entire plugin is open source. If a member of our community submits a pull-request which fixes these issues, we would greatly appreciate it, and we would be happy to add something like "4.12 upgrade submitted by <your SFW name>" in the same section. It would be particularly nice those changes maintain support for 4.9 and 4.11, as we have customers using those versions.

Otherwise, a PlayFab employee will eventually take the necessary time to dive in and fix this, but we can't give any reasonable ETA for when we will start, or finish.

I know that's not the answer you're looking for and I apologize for that. I will say that PlayFab has been known to send t-shirts and/or hoodies to those who have helped us in similar ways. :D

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tgraupmann avatar image
tgraupmann answered

Okay starting by installing Unreal Engine 4.12.5 retail version...

Cloning: https://github.com/PlayFab/UnrealBlueprintSDK

Right-click `UnrealBlueprintSDK\PlayFabClientSDK\ExampleProject\ExampleProject.uproject` and switch Unreal Version to 4.12.

The first error to deal with is generating the project files, before fixing the compile errors.

```

Running C:/Program Files (x86)/Epic Games/4.12/Engine/Binaries/DotNET/UnrealBuildTool.exe -projectfiles -project="G:/PlayFab/UnrealBlueprintSDK/PlayFabClientSDK/ExampleProject/ExampleProject.uproject" -game -rocket -progress Discovering modules, targets and source code for project... Messages while compiling G:\PlayFab\UnrealBlueprintSDK\PlayFabClientSDK\ExampleProject\Intermediate\Build\BuildRules\ExampleProjectModuleRules.dll: g:\PlayFab\UnrealBlueprintSDK\PlayFabClientSDK\ExampleProject\Plugins\PlayFab\Source\PlayFab\PlayFab.Build.cs(12,48) : error CS0619: 'UnrealBuildTool.RulesCompiler.GetModuleFilename(string)' is obsolete: 'GetModuleFilename is deprecated, use the ModuleDirectory property on any ModuleRules instead to get a path to your module.' UnrealBuildTool Exception: ERROR: UnrealBuildTool encountered an error while compiling source files

```

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

tgraupmann avatar image
tgraupmann answered

Open: `UnrealBlueprintSDK\PlayFabClientSDK\ExampleProject\Plugins\PlayFab\Source\PlayFab\PlayFab.Build.cs`

There's a note here for Unreal 4.11.

        // NOTE: Please remove this section for Unreal 4.11
        private string ModulePath
        {
            get { return Path.GetDirectoryName(RulesCompiler.GetModuleFilename(this.GetType().Name)); }
        }

And for Unreal 4.12.

        // NOTE: Change for Unreal 4.12
        private string ModulePath
        {
            get { return Path.GetDirectoryName(ModuleDirectory); }
        }

After making that change, right-click `UnrealBlueprintSDK\PlayFabClientSDK\ExampleProject\ExampleProject.uproject` and switch Unreal Version to 4.12.

And then the project files can generate.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Thanks for the additional info. Our tools team is working on getting these issues patched now, and expect to have this update available next week.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

metathias@gmail.com avatar image
metathias@gmail.com answered

As much as i appreciate the Playfab SDKs available for UE4. I've found that learning to use a more maintained path like VaRest is preferable. Implementing the Playfab API in UE4 through VaRest is not very difficult, Even though it is slightly more work. Its easier to ensure the JSON calls you make are crafted to suit the need of the PlayFab API. With both UE4, and Playfab undergoing continuous development, and feature roll out. It would probably be easier moving forward to create tutorials, and example material based on implementation through VaRest. As opposed to the existing SDKs. Which really are built on VaRest anyway. This would ensure that future development to both PlayFab, And UE4 can be easily adjusted for and supported. As much as i do like the further extrapolation layer of the available through those SDKs. They just break all easily. And do to the nature of this extra layer makes it significantly more difficult (especially for blueprint users) to debug, and fix.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Thanks! I've opened a work item for the tools team to investigate the VaRest plugin in Unreal, so that they can evaluate making use of it in our SDK. Always appreciate feedback on ways to improve the SDKs. :)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Zhi Kang Shao avatar image
Zhi Kang Shao answered

I encountered the same errors when I included the PlayFab UnrealCppSdk in our 4.12 project. I looked into the errors and it appears they are all related to UE4.12 requiring stricter syntax when assigning new values to Unreal's smart pointers (TSharedPtr) and structs (USTRUCTS).

I updated the plugin code and created a pull request for it: https://github.com/PlayFab/UnrealCppSdk/pull/32

With this pull request PlayFab UnrealCppSdk works with 4.12 and 4.11 (tested), and most likely 4.9 as well because all I've done is use more appropriate syntax. I would test with 4.9 as well, but it would require me to redownload VS2013 since 4.9 requires that. Can someone else test 4.9 instead?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image
1807605288 answered

It's going to take me a few hours to download and install all the Unreal versions that we need to test, so these are posted AS-IS with no guarantees. I have however ported the suggested changes into our sdkGenerator: https://github.com/PlayFab/SDKGenerator

A potential beta fix for PlayFab-UnrealBlueprintSdk:

https://github.com/PlayFab/UnrealBlueprintSDK/tree/4.12fixes

A potential beta fix for PlayFab-UnrealCppSdk:

https://github.com/PlayFab/UnrealCppSdk/tree/Testing4-12

Both of these are GitHub branches off of our Sdk. I'll test them myself tomorrow when I have all the necessary versions of Unreal installed properly. Until then, feel free to check them out or wait for some verification that the changes have succeeded.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.