Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    335

    Creating Plugins with Unreal 4, some notes for version 4.10.1

    These are my notes to update the "Creating Plugins with Unreal 4" so it works with a recent release of Unreal Engine 4 (ue4).

    The video uses ue4 version 4.2.1 with visual studio 2013
    These notes work with ue4 4.10.1 with vs 2015


    Video 03:

    The Plugins menu item is found in
    Edit > Plugins not Window > Plugins

    Module.h need to change the two "OVERRIDE" to "override", lowercase

    Video 04:
    replace
    #include "Slate.h"

    with
    #include "SlateBasics.h"
    #include "SlateExtras.h"

    The SlateExtras isn't needed in this video but is needed in video 07

    "WindowLocalTabSpawner" isn't in the menus so use "EditLocalTabSpawner" instead and see the result in the Edit menu



    Video 07:

    edit CoolPluginPch.h and add 2 lines
    #include "Runtime/Engine/Classes/Engine/TriggerBox.h"
    #include "Runtime/Engine/Public/EngineGlobals.h"

    this fixes the ATriggerBox and GEditor not defined errors


    in GetWorld() change the TArray to a TIndirectArray

  2. #2
    Join Date
    Aug 2003
    Posts
    335
    Updated notes for UE4 v4.23.0, Creating Plugins with Unreal4 videos


    video 03

    don't create file folder structure, instead
    Edit > Plugins > New Plugin
    blank template ...

    edit CoolPlugin.uplugin and change "RunTime" to "Editor"

    edit CoolPlugin.Build.cs and add private dependencies
    "UnrealEd",
    "InputCore",
    "Core",
    "EditorStyle",
    "CoreUObject"

    Use the files created by the New Plugins process, CoolPlugin.h and CoolPlugin.cpp instead of Module.cpp and Module.h
    Skip creation of PCH file? - looks like something is built in already?

    video 04

    Edit > Editor Preferences, General > Miscellaneous, check Display UI Extension Points - shows that "WindowLocalTabSpawners" does not exist, so use "WindowGlobalTabSpawners" instead

    replace #include "Slate.h" with
    #include "SlateBasics.h"
    #include "SlateExtras.h"

    LOCTEXT_NAMESPACE already exists from the New Plugins process

    change all references from "Module" to "FCoolPluginModule"

    place new code inside the LOCTEXT_NAMESPACE define

    video 05

    place CoolWindow.h before CoolPlugin.h inside the CoolWindow.cpp file

    video 06 - nothing


    video 07
    first error is for ATriggerBox - search unreal online docs for ATriggerBox - api says #include "Engine/TriggerBox.h"
    add #include "Engine/TriggerBox.h" to the CoolPlugin.h file


    error - cannot convert from FString to FText
    CoolWindow.h change FString GetBoundsActorName() to FText GetBoundsActorName()
    CoolWindow.cpp the same change and wrap the return values with FText::FromString(xxx)

    error - iterator wont work, undefined class TActorIterator<ATriggerBox>, ATriggerBox already has include so should be ok
    search docs for TActorIterator says #include "EngineUtils.h"
    add #include "EngineUtils.h" to the CoolPlugin.h file

    error - cannot convert TIndirectArray to TArray
    hover on GEngine->GetWorldContexts() shows that it returns a TIndirectArray not an TArray - so change TArray to TIndirectArray

    video 08
    convert FString to FText error for GetAlleySpaceText, wrap return value with FText::FromString(xxx)


    video 09
    error - UCubeBuilder not defined, search docs shows UBrushBuilder, with a link to UEditorBrushBuilder and now can see a UCubeBuilder link, finally UCubeBuilder says #include "Builders/CubeBuilder.h"
    add #include "Builders/CubeBuilder.h" to the CoolPlugin.h file


    error - GetBrush is not member of UWorld, so replace GetBrush with GetDefaultBrush

    strange FText conversion error const Othertype to FText::EInitToEmptyString, error from file Attribute.h
    output console error points to the .Text(FString(TEXT("Build")))
    replace with .Text(LOCTEXT("Build","Build"))

    and now the whole thing works with ue 4.23.0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •