Wiki Code Tutorials

4.9 Update to USTRUCT Wiki

Dear Community,

I’ve updated my USTRUCT wiki to reflect the removal of RepRetry UPROPERTY keyword

UE4 UStructs

Enjoy!

UE4 Engine Singleton Class

Dear Community,

I’ve updated my Engine Singleton Wiki to 4.9

Global Data Storage Class

is a class that you can define and Blueprint, and store any core essential asset references or other core game data that you need.

Keep in mind you should only store essential info here as the class is instanced at game startup and any assets it links to are also loaded.

:slight_smile:

@

Do you know whether I can use UE4 in my own programs(eg: I get a window handle, and then use UE4 to show the 3d scene in the window. It seem like directx 3d)?

Empower Your Entire Team With Blueprint Native Events

Dear Community,

In wiki I show you how you can empower your entire team with Blueprint Native Events!

These events allow you to run Blueprint code from C++, with an optional C++ implementaiton.

A great example is a lot of the core functions in the GameMode class which can now be overridden in Blueprints, adding to or replacing the C++ base functionality!

Empower Your Team With BlueprintNativeEvents

:slight_smile:

[=张朝锐;382927]
@

Do you know whether I can use UE4 in my own programs(eg: I get a window handle, and then use UE4 to show the 3d scene in the window. It seem like directx 3d)?
[/]

I’ve never tried to do that :slight_smile: Let me know how it goes!

How to Modify BP Variable References in C++ And Send Back to BP

Dear Community,

Here’s a wiki on how you can pass BP variable data to C++, modify it in C++, and then send it back to BP without copying the data!

is really imporant for modifying BP variable arrays, and I also found a handy usecase for making a BP ++ operator node!

How to Modify Blueprint Variable References In C++ Without Copying

Enjoy!

Learning UE4 C++

I have over 80 wiki tutorials on the UE4 Code wiki to help you learn UE4 C++!

UE4 Code Wiki

Enjoy!

:heart:

How to Run Dedicated Servers From Commandline

Dear Community,

I"ve just created a tutorial on how to run Dedicated Servers with 2 connecting clients from commandline! (editor closed)

How To Test Dedicated Server Games Via Commandline

Enjoy!

:slight_smile:

How to Prevent Stale AActor* Pointers in UE4

Dear Community,

If you are experiencing crashes due to stale AActor* pointers, I have just the new wiki for you!

A stale pointer means the AActor* returns true when you verify != nullptr, but then dereferencing still causes a crash.

Check out the solution here:

:slight_smile:

You can now Get Traced Distance At No Extra CPU Cost!

Dear Community,

Epic accepted my pull request to expose Distance information as part of FHitResult!

The PhysX engine was always returning information, so my requested Engine code change did not affect performance at all.

The advantage is that now whenever you do a trace, you already have the non-squared actual distance from the start of the trace to the impact point available to you!

Trace Functions Wiki Updated With Info About New Distance Property of FHitResult

Enjoy!

:slight_smile:

Packaged Game Paths: Obtain Paths based on Game Executable

Dear Community,

In wiki I share with you many functions that enable you to obtain absolute paths that are based on the location of the game exectuable.

In otherwords you can package the game, and then move it at any time to any directory, and the path generated will be accurate for your whole moved project!

Example:



//InstallDir/WindowsNoEditor/GameName
const FString ThePath = FPaths::ConvertRelativePathToFull(FPaths::GameDir());


In a pre-packaged game will be where the .uproject is, but in packaged game it will be your game directory off of windowsnoeditor!

Packaged Game Paths ~ Obtain Directories Based on Executable Location

:slight_smile:

AI Pathing Customization in C++

Dear Community,

In wiki I show you how you can completely customize the UE4 PathFollowing behavior every tick in C++!

I used method to make my C++ AI Jump Pathing videos!

Custom UE4 AI Pathing Every Tick


https://youtube.com/watch?v=sMMSQdnyt6o

Enjoy!

Entry-level Guide to UE4 C++

Dear Community,

For anyone wanting to learn UE4 C++ I have posted an entry-level wiki guide here!

I discuss the essential basics you need to know to get used to both C++ and UE4 C++

Have fun today!

:slight_smile:

Custom Level Blueprints in C++

Dear Community,

In wiki I show you how you can use a custom Level Blueprint, which enables your level designers to utilize custom features of your game’s code base!

Solus C++ Wiki Tutorials ~ Custom Level Blueprint

Get Enum From String

Dear Community,

I’ve added a new entry to my UE4 C++ Enum wiki!

I am giving you the code to get an enum value back from a string, after it was initially converted to a string!

UE4 Wiki Link



emplate <typename EnumType>
static FORCEINLINE EnumType GetEnumValueFromString(const FString& EnumName, const FString& String)
{ 
	UEnum* Enum = FindObject<UEnum>(ANY_PACKAGE, *EnumName, true);
	if(!Enum) 
        { 
          return EnumType(0);
        }		
	return (EnumType)Enum->FindEnumIndex(FName(*String));
}
 
//Sample Usage
EChallenge ChallengeEnumValue = //Initial Value

FString ParseLine = GetEnumValueAsString<EChallenge>("EChallenge", ChallengeEnumValue))); //To String

EChallenge Challenge = GetEnumValueFromString<EChallenge>("EChallenge", ParseLine);  //Back From String!


Enjoy!

Solus C++ Wiki Tutorials

Dear Community,

I have created many C++ tutorials around the development of The Solus Project (with Hourences)

Solus C++ Wiki

Topics include:

  1. Custom Level Blueprints

  2. Getting List of Hardware Supported Screen Resolutions

  3. Concatenating FText

  4. Custom Actor Components Via C++

  5. Globally Accessible Data Storage Class

  6. Custom Game Instance Class

  7. Declare Console Commands in C++, implement in BP!

:slight_smile:

UDP Sockets Wiki, Send Data From UE4 Instance To Another!

Dear Community,

Here is my latest wiki, on sending any data you want from 1 UE4 Instance to Another using UDP sockets!

:heart:

Wiki on Delegates

I’ve released a new wiki on C++ and BP-Exposed Delegates!

I discuss:

  1. Raw C++ Delegates
  2. Slate Delegates
  3. UObject Delegates
  4. BP and Level BP exposed delegates

Delegates in UE4

Thanks a lot for these tutorials I’ve benefited immensely from so many of them. Also happy to see the new wiki on delegates; just a few months ago I was searching to see if you’d written one!

With so many delegate types, combinations and special macros like BindDynamic/etc I found them very confusing while starting out despite being familiar with basic function pointers. Hopefully newcomers to delegates will find it easier now!

BTW I can’t be the only one who types “unreal <search topic>” while looking for UE4 resources :slight_smile: Definitely interested in the book you said you were working earlier in thread.

[=anonymous_user_e71e0d8aSZ;500430]
Thanks a lot for these tutorials I’ve benefited immensely from so many of them. Also happy to see the new wiki on delegates; just a few months ago I was searching to see if you’d written one!

With so many delegate types, combinations and special macros like BindDynamic/etc I found them very confusing while starting out despite being familiar with basic function pointers. Hopefully newcomers to delegates will find it easier now!

BTW I can’t be the only one who types “unreal <search topic>” while looking for UE4 resources :slight_smile: Definitely interested in the book you said you were working earlier in thread.
[/]

You’re welcome @!

Yes the book is still something I am working on!

:slight_smile:

:slight_smile: