Download

Wiki Code Tutorials

Thank you so much for this!

Awesome! Thank you!

@Everyone

Yay, I am glad you are enjoying my efforts!

@DAAAAAVVE

I’m liking your name, I hope I spelled it right

:slight_smile:

Rama

Rama! <3 Thanks so much.

Thanks a lot!!

[FONT=Comic Sans MS]New Tutorial: Dynamic Arrays

Dynamic Arrays

Hee hee your welcome SaxonRah!

UE4 C++ is so much fun!

:slight_smile:

Rama

Great job Rama, and thank it will be handful ^^

thanks, that really will help me to get things started!, the fps tutorial is just awesome.

Heey, welcome Daimaku, I’ve been missing you from the UE3 forums :slight_smile:

Rama

Heh, yes, Rama likes is our resident exhibitionist.
I’m just a bit of a flasher :slight_smile:

Great work, now I have a lot of stuff to read on! Thank you! :smiley:

Hee hee, you’re welcome!

:slight_smile:

Rama

Thanks Rama, It covers most of my UE4 questions :slight_smile:

[FONT=Comic Sans MS]Tutorial Added, USTRUCTS(), UE4 C++ Structs

UE4 C++ Structs

Yay!

Rama

Wow, this is a fantastic start. I am amazed you’ve done all this so quickly :smiley:

Hopefully this will break the ice for more people to contribute, although you seem to be a one man coding tutorial army at the moment hah.

[FONT=Comic Sans MS]New tutorial!

**
Static Libraries, Your Own Version of UE4 C++, No Engine Compile Times**

Haha yea!

But** Bob Gneu**, Kris, and Alexander Paschall have contributed amazingly helpful tutorials as well!

So essentially i have this little bit of code that is

are you telling me i can assign MazeSize’s value inside a blueprint ? O_O ?

EDIT -
Nvm doesnt look like it. If you have any ideas rama I’d love to know. I probably should just use a vector for x and y instead.

Dear SaxonRah,

My example of assigning values to a dynamic array in Blueprints was more for:

  1. adding values in blueprints, to then be accessed during run time in C++
  2. something like this

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=BP)
TArray<FVector2D> DesignerSpecified2DPoints;

In this hypothetical case,

you are giving the rest of your team the power to create a list of 2D points in the default properties of a blueprint

And then you can access this data in the C++ at game launch.

This could be 2D points where you are supposed to iterate over all the points and create hud elements, or anything really!

Or it could be 3D points where you should spawn items, or FNames that you should iterate over and use for some purpose.

The point is that you can give your Team the power to send you an unknown amount of data, **AFTER compile time, **

that can vary day to day,

and you can set up the C++ code to use this unknown amount of data!

It’s an amazing thing about blueprints!

That you can add more data AFTER compile time, yet use dynamic arrays to perform the same logic in C++ no matter how much data the Designers add.


**Concrete Example**

You give Designers an FName Array to add entries to over the lifetime of the project



```

UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category=SMAssetPaths)
TArray<FName> SMAssetPaths;

```



In the C++, for each FName Entry, which should be the full asset path of  a static mesh,

you **[dynamically load](https://wiki.unrealengine.com/Dynamic_Load_Object)** the UStaticMesh and spawn a new Static Mesh Actor and assign the UStaticMesh.


In this way you have engineered a C++ system that Blueprint Designers can extend and utilize to create their chosen number of unique static mesh actors with unique static mesh assets that they create!


The best part is,

**they can add more tomorrow, and the next day, without you ever doing a code compile!**



**I think this aspect of C++ to Blueprint interaction is amazing!**


It really means that you are empowering your entire team!

Whereas you are 1 programmer, you might have 30 Designers who can now create a change to the C++ behavior using **Blueprints + Dynamic Arrays.**

Rama

Thank you Rama! Very generous of you.

:cool: Now I understand. That’s super useful.