Announcement

Collapse
No announcement yet.

C++ Transition Guide for 4.20

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    It seems that the bGenerateOverlapEvents from UPrimitiveComponent is now private and can't be set directly so bGenerateOverlapEvents = false;
    must be SetGenerateOverlapEvents(false);

    Comment


      #17
      In 4.19, I had set up a UMediaPlaneComponent auto-sizing video screen for playing our cutscenes. It disappeared completely in 4.20 with no more references in any of the Engine Plugin sources, along with it's .h. Was this intentional and is there a replacement in 4.20? To restore functionality, as a temporary workaround, I had to remove all references to get us running again.

      Comment


        #18
        Originally posted by Burnrate View Post
        I'm getting a ton of errors with:
        LogCompile: Error: TakeDamage: Override of UFUNCTION in parent class (MyClassName) cannot have a UFUNCTION() declaration above it; it will use the same parameters as the original declaration.

        The only thing related I've found was this bug that had to do with nativized blueprints but I'm not doing any of that.
        https://issues.unrealengine.com/issue/UE-60119

        Does this have to do with any of the other bugs perhaps?
        That's weird.
        Make sure that you're not using UFUNCTION macro on overridden methods that are already using UFUNCTION macro in the super class.

        Comment


          #19
          Originally posted by Sveitar View Post

          That's weird.
          Make sure that you're not using UFUNCTION macro on overridden methods that are already using UFUNCTION macro in the super class.
          I'm experiencing this as well. When you override the function of the super class to return a covariant type, you get this error. This did not happen in 4.19.

          Comment


            #20
            Hi,

            Do you know what the purpose of thr restricted folder names?
            I had "apple" in content directory and now I can't build, because they add it to their list.

            Thanks,

            Comment


              #21
              Originally posted by Elvince View Post
              Hi,

              Do you know what the purpose of thr restricted folder names?
              I had "apple" in content directory and now I can't build, because they add it to their list.

              Thanks,
              It is so you can put content in that folder that you only want to deploy to that specific platform and not accidentally to other platforms. Rename the folder if the content in that folder is not platform specific.

              EDIT: ...or, more accurately, move this content in the editor to another folder with a different name.
              Last edited by GBX_botman; 07-27-2018, 10:53 AM.

              Comment


                #22
                Hi,
                Just update to 4.20.1,
                then I got also the issue right after create a new project.

                Click image for larger version

Name:	Capture.PNG
Views:	90
Size:	379.1 KB
ID:	1507927
                Then the project won't start, and VS2017 can't compile.

                Click image for larger version

Name:	Capture2.PNG
Views:	87
Size:	236.1 KB
ID:	1507928
                Is Epic's Team knows?

                Comment


                  #23
                  Hi,

                  In a UUserWidget, bCanEverTick is not recognized anymore:

                  Code:
                  error C2065: 'bCanEverTick': undeclared identifier
                  I couldn't find any setter, any one has an idea ?

                  Thanks
                  Cedric

                  Edit: i commented this line and my widget still ticks correctly, so maybe it's just not needed anymore.
                  Last edited by uced; 07-28-2018, 06:02 AM.

                  Comment


                    #24
                    Code:
                    warning C4996: 'FString::Printf': The formatting string must now be a TCHAR string literal. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
                    Instead of printf, if you need to use a non-litteral string, you can use FString::Format(string, { args });
                    Last edited by Altrue; 07-29-2018, 04:04 PM.

                    Comment


                      #25
                      FUniqueNetIdRepl->ToString() for a SteamID64 (always 17 characters) now returns an 18 characters string starting with "0".

                      Comment


                        #26
                        First change: bGenerateOverlapEvents from UPrimitiveComponent changed from "bGenerateOverlapEvents = bool;" to "SetGenerateOverlapEvents(bool);"
                        Click image for larger version  Name:	GenerateOverlapEvents.png Views:	1 Size:	4.0 KB ID:	1508939

                        Second chage: bUseControllerViewRotation from CameraComponent got_DEPRECATED.
                        Click image for larger version  Name:	CameraComponentDEPRECATED.png Views:	1 Size:	9.3 KB ID:	1508941
                        Now you have to use bUsePawnControlRotation.​​
                        The point is: IntelliSense tells me that bUseControllerViewRotation is inaccessible, but on 4.19 that was not happening.
                        Click image for larger version  Name:	bUsePawnControlRotation.png Views:	1 Size:	4.2 KB ID:	1508940

                        Third chage: I'm getting errors with a function called on my Slate Widget Tick() when playing, after a few seconds
                        Click image for larger version  Name:	ErrorWhileLaunch.png Views:	1 Size:	374.2 KB ID:	1508942pt-BR to en-US ... [787] LogWindows: Warning: CreateProc failed: The sistem can not find the especified file. (0x00000002)

                        CrashReport:
                        Click image for larger version  Name:	CrashReport.png Views:	1 Size:	101.7 KB ID:	1508943

                        My code:
                        Click image for larger version  Name:	MyCode.png Views:	1 Size:	151.3 KB ID:	1508944

                        As you can see, "Create", "SetScalarParameterValue" and "SetTextureParameterValue" are inacessible (IntelliSense).
                        Changed the #include lines (and paths) to header file and the result was the same.
                        Last edited by Pulguinha; 07-30-2018, 11:54 AM.

                        Comment


                          #27
                          Hey,

                          when attempting to create a local build after upgrading our custom code engine to 4.20, i always get following error:

                          Code:
                          CommandUtils.Run: Running: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Source\Programs\AutomationTool\AutomationTool.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /nologo
                          ProcessResult.StdOut:     DotNETUtilities -> W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Binaries\DotNET\DotNETUtilities.dll
                          ProcessResult.StdOut:     MobileDeviceInterface -> W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Binaries\DotNET\IOS\MobileDeviceInterface.dll
                          ProcessResult.StdOut:   C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(2052,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.Setup.Configuration.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
                          ProcessResult.StdOut:   Platform\Windows\UEBuildWindows.cs(11,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?) [W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Source\Programs\UnrealBuildTool\UnrealBuildTool.csproj]
                          CommandUtils.Run: Took 1,2942171s to run MSBuild.exe, ExitCode=1
                          <>c.<PrintExceptionInfo>b__4_1: ==============================================================================
                          <>c.<PrintExceptionInfo>b__4_0: ERROR: Command failed (Result:1): C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Source\Programs\AutomationTool\AutomationTool.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /nologo. See logfile for details: 'MSBuild-2018.07.30-21.46.29.txt' 
                          <>c.<PrintExceptionInfo>b__4_0:        while executing task <CsCompile Project="#RedistUATProjects" Configuration="Development" Platform="AnyCPU" Tag="#StrippedUAT" TagReferences="#StrippedUAT" />
                          <>c.<PrintExceptionInfo>b__4_0:        at Engine\Build\InstalledEngineBuild(386)
                          <>c.<PrintExceptionInfo>b__4_0:        (see W:\Projects\UnrealEngineHG\Engine\Programs\AutomationTool\Saved\Logs\Log.txt for full exception trace)
                          <>c.<PrintExceptionInfo>b__4_1: 
                          <>c.<PrintExceptionInfo>b__4_1: CommandFailedException: Command failed (Result:1): C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe W:\Projects\UnrealEngineHG\Saved\StrippedUAT\Engine\Source\Programs\AutomationTool\AutomationTool.csproj /property:Platform=AnyCPU /property:Configuration=Development /verbosity:minimal /nologo. See logfile for details: 'MSBuild-2018.07.30-21.46.29.txt' 
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 958
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary`2 EnvVars, SpewFilterCallbackType SpewFilterCallback) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 911
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.CommandUtils.MsBuild(CommandEnvironment Env, String Project, String Arguments, String LogName) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildUtils.cs:line 35
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Tasks.CsCompileTask.Execute(JobContext Job, HashSet`1 BuildProducts, Dictionary`2 TagNameToFileSet) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\BuildGraph\Tasks\CsCompileTask.cs:line 132
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Node.Build(JobContext Job, Dictionary`2 TagNameToFileSet) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\BuildGraph\Node.cs:line 177
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.BuildGraph.BuildNode(JobContext Job, Graph Graph, Node Node, TempStorage Storage, Boolean bWithBanner) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\BuildGraph\BuildGraph.cs:line 700
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.BuildGraph.BuildAllNodes(JobContext Job, Graph Graph, TempStorage Storage) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\BuildGraph\BuildGraph.cs:line 629
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.BuildGraph.Execute() in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\BuildGraph\BuildGraph.cs:line 435
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 562
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Automation.Process(String[] Arguments, StartupTraceListener StartupListener) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 532
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Program.MainProc(String[] Arguments, StartupTraceListener StartupListener) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\Program.cs:line 174
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Program.<>c__DisplayClass1_0.<Main>b__2() in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\Program.cs:line 100
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 725
                          <>c.<PrintExceptionInfo>b__4_1:    at AutomationTool.Program.Main() in W:\Projects\UnrealEngineHG\Engine\Source\Programs\AutomationTool\Program.cs:line 100
                          <>c.<PrintExceptionInfo>b__4_1:    data: EpicGames.Context = ("while executing task <CsCompile Project="#RedistUATProjects" Configuration="Development" Platform="AnyCPU" Tag="#StrippedUAT" TagReferences="#StrippedUAT" />", "at Engine\Build\InstalledEngineBuild(386)")
                          <>c.<PrintExceptionInfo>b__4_1: ==============================================================================
                          The Microsoft.VisualStudio.Setup.Configuration.Interop.dll is correctly located inside of the Engine\Binaries\ThirdParty\VisualStudio folder.
                          No matter if i try to use -2015 in RunUAT, it will always result in the same error.

                          This is my RunUAT command:
                          Code:
                          ./RunUAT.bat BuildGraph -target=”Make Installed Build Win64” -script=Engine/Build/InstalledEngineBuild.xml -set:WithMac=false -set:WithAndroid=false -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=false -set:WithHTML5=false -set:WithSwitch=false -WithDCC=false
                          When i directly open the UnrealBuildTool.csproj located in Engine/Source/Programs/UnrealBuildTool, which seems to be the cause of that RunUAT error (no matter if VS 2015 or 2017), it will compile properly.

                          Can anyone help me with this?

                          Comment


                            #28
                            Originally posted by uced View Post
                            Hi,

                            In a UUserWidget, bCanEverTick is not recognized anymore:

                            Code:
                            error C2065: 'bCanEverTick': undeclared identifier
                            I couldn't find any setter, any one has an idea ?

                            Thanks
                            Cedric

                            Edit: i commented this line and my widget still ticks correctly, so maybe it's just not needed anymore.
                            Have a bunch of user widgets and never declared them as bCanEverTick and they Tick() just fine. Looks like it was never needed.

                            Comment


                              #29
                              Iterating currently loaded streaming levels changed slightly. This:

                              Code:
                              // 4.18 code to iterate all streaming level and hide them
                              TArray<ULevelStreaming*>& streamedLevels = GetWorld()->StreamingLevels;
                               for (ULevelStreaming* streamingLevel : streamedLevels)
                               {
                                   streamingLevel->bShouldBeVisible = false;
                               }
                              changed to:

                              Code:
                              // 4.20 code to iterate all streaming level and hide them
                              const TArray<ULevelStreaming*>& streamedLevels = GetWorld()->GetStreamingLevels(); for (ULevelStreaming* streamingLevel : streamedLevels) { streamingLevel->SetShouldBeVisible(false); }

                              Comment


                                #30
                                Epic changed most of internal public variables into private. You should swap those lines with related getter/setter functions.

                                Comment

                                Working...
                                X