Announcement

Collapse
No announcement yet.

C++ Transition Guide for 4.23

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

    C++ Transition Guide for 4.23

    Dear UE4 Community,

    Here is a thread where you can discuss any issues you are encountering as you upgrade to 4.23!

    Feel free to ask questions about compile errors, post C++ code solutions,, or mention any other 4.23 upgrade related issues that you are encountering.

    Victory to You!



    Rama
    100+ UE4 C++ Tutorials on the UE4 Code Wiki, including UE4 Multi-Threading!

    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    Visit www.ue4code.com to see lots of videos about my C++ Creations! ♥ Rama

    #2
    Hi Rama, I had started a similar thread here but maybe this section is more appropriate

    Comment


      #3
      I am not happy about the ActionMappings TArray in UInputSettings being changed to a protected variable.

      The only way to access it now is using GetActionMappings(), which returns a const reference to the TArray.

      This is a problem, because there is now no way to edit a FInputActionKeyMapping element in the array. The action mapping needs to be removed, then a new action mapping added in its place. This is a problem because it changes the order of the action mappings in the ActionMappings TArray.

      For example, if you are generating a list of key bindings in UMG based on the contents of the ActionMappings TArray in InputSettings, when a user bind a new key binding to an action, the list of key bindings becomes reordered such that the new key binding appears at the bottom of the generated list. This is an ugly and confusing UI behavior for the user.

      A solution to this is of course to manually order the input actions before displaying them in a widget, but this is tedious and creates a new code upkeep task, whereas if the ActionMappings TArray can be edited without reordering its elements, the order of the action mappings key bindings can be set and maintained simply by editing their order in DefaultInput.ini.

      Another solution is to make a copy of the ActionMappings array, remove all action mappings, edit the ActionMapping in the array copy, then loop over the copied array and re-add all of the ActionMappings. This is the solution I'm currently using. I guess it's fine, since the array is very small, but it is a little inefficient and rather inelegant.

      Perhaps there is a good reason why direct access to the ActionMappings array was made const only, but if not it would be nice to be able to have write access to the array.

      If any devs are reading this, please consider having GetActionMappings() return a non-const reference to the ActionMappings TArray in UInputSettings.
      Last edited by superdreamgen; 09-15-2019, 02:48 AM.

      Comment


        #4
        superdreamgen You should consider opening an issue in the UE4 Github At least you'd be sure to get a proper response... at some point. And have it looked at by more people.

        Comment


          #5
          Originally posted by Altrue View Post
          superdreamgen You should consider opening an issue in the UE4 Github At least you'd be sure to get a proper response... at some point. And have it looked at by more people.
          Thank you, Altrue. I will look into doing that.

          Comment


            #6
            Originally posted by superdreamgen View Post
            A solution to this is of course to manually order the input actions before displaying them in a widget, but this is tedious and creates a new code upkeep task, whereas if the ActionMappings TArray can be edited without reordering its elements, the order of the action mappings key bindings can be set and maintained simply by editing their order in DefaultInput.ini.
            Manually ordering inputs is the only sane way to do a UI settings screen, regardless of how the input map works in the background. If you have any non-trivial number of inputs, the UI screen should be: (1) grouping similar inputs, (2) putting high priority inputs at the top. Those two things don't happen by just hoping the input map in the background happens to be in the right order in memory.

            Not to mention, manually ordering the UI isn't hard to do. Each entry in your input settings UI would be composed of:

            (1) a user friendly display text "Move Right"
            (2) a handle to the actual input map "MoveRight"
            (3) a display of what key is bound to the input

            Changing input key is then simply: user selects new key >> delete by handle >> add by handle >> refresh UI.

            Comment


              #7
              Attempting to build a project using 4.23 (note this is using an installed build) the following occurs when generating project files:

              "WARNING: Exception while generating include data for UnrealHeaderTool: Program targets are not currently supported from this engine distribution."

              Attempting to compile the project results in an error with the same message: "Program targets are not currently supported from this engine distribution."

              Cant find any info on what/why this is occurring.

              Comment


                #8
                Originally posted by Clayton.Campbell View Post
                Attempting to build a project using 4.23 (note this is using an installed build) the following occurs when generating project files:

                "WARNING: Exception while generating include data for UnrealHeaderTool: Program targets are not currently supported from this engine distribution."

                Attempting to compile the project results in an error with the same message: "Program targets are not currently supported from this engine distribution."

                Cant find any info on what/why this is occurring.
                Ok, I have managed to get my project to build: It seems that UBT now restricts Program targets from being compiled from installed builds (which makes sense since they shouldn't ever need to be recompiled on a distributed engine bulid), so UnrealHeaderTool (who's target is Development Program) build must be disabled.

                In order to get my project to compile I did the following in Visual Studio:
                1) Go to Build > Configuration Manager
                2) Find UnrealHeaderTool and disable it's build.
                3) Compile project successfully.

                Comment

                Working...
                X