Wiki Code Tutorials

[FONT=Comic Sans MS]New tutorial!

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

[=Straits;2428]
Wow, is a fantastic start. I am amazed you’ve done all so quickly :smiley:

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

Haha yea!

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

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

Dynamic Arrays
https://wiki.unrealengine./Dynamic_Arrays_in_UE4_C%2B%2B

Hee hee your welcome SaxonRah!

UE4 C++ is so much fun!

:slight_smile:

[/]

So essentially i have little bit of code that is
[]
const int MazeSize = 21;
AStaticMeshActor* grid[MazeSize][MazeSize];
[/]
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 I’d love to know. I probably should just use a vector for x and y instead.

[=SaxonRah;2564]
So essentially i have little bit of code that is are you telling me i can assign MazeSize’s value inside a blueprint ? O_O ?
[/]

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

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

In 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 data in the C++ at game launch.

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 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./Dynamic_Load_Object)** the UStaticMesh and spawn a new Static Mesh Actor and assign the UStaticMesh.


In 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 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.**

Thank you! Very generous of you.

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

[FONT=Comic Sans MS]New Tutorial!

My Static Library Trace Functions For You](https://wiki.unrealengine./Trace_Functions_For_You)

[=Vorx;2631]
Thank you! Very generous of you.
[/]

Hee hee!

[=SaxonRah;2636]
:cool: Now I understand. That’s super useful.
[/]

Hee heeeeeee!

Bump for new arrivals

Enjoy the 41 C++ tutorials on the wiki!

https://wiki.unrealengine./Category:Code

Perfect! Thank you very much!

Thank you!!!:slight_smile:

[=chiefGui;3099]
Perfect! Thank you very much!
[/]

[=spdd;3375]
Thank you!!!:slight_smile:
[/]

Hee hee you’re welcome!

Bump for new comers over weekend,

Enjoy the tutorials!

Thank you great work as usual!:slight_smile:

So glad that you finally got to make a wiki out of all of these. So much easier to view them now :slight_smile:

[=iMuse;3541]
Thank you great work as usual!:slight_smile:
[/]

Hee hee!

[=DaveVoyles;3769]

So glad that you finally got to make a wiki out of all of these. So much easier to view them now :slight_smile:
[/]

Yea I agree!

I love the table of content system especially!

:slight_smile:

Thank You Epic for the Epic Wiki !

Special thanks to !

Just came here looking for C++ tutorials, many thanks
Hope a moderator make a sticky post for all tutorials, books or any resources that may come up so we dont miss it and new members can find easily.

[=MorningStar;3927]
Just came here looking for C++ tutorials, many thanks
Hope a moderator make a sticky post for all tutorials, books or any resources that may come up so we dont miss it and new members can find easily.
[/]

You’re welcome Morning Star!

Wow, great work! is an amazing amount of useful content for the Wiki, which was pretty sparse just 4.5 days ago.

[=;4087]
Wow, great work! is an amazing amount of useful content for the Wiki, which was pretty sparse just 4.5 days ago.
[/]

Yaaay!

I am very happy that you are enjoying my efforts!

I’ve also published the entire source code for my Vertex Snap Editor Plugin, as well as the plugin itself!

So that people have an entire working foundation for making their own plugins or editor plugins!

Vertex Snap Editor Plugin With Entire Source Code
https://forums.unrealengine./showthread.php?777–s-Vertex-Snap-Editor-Plugin-Download-for-You!

Thank you for taking the time to write to me !

https://www.mediafire./convkey/a416/xh2a0w6qocsc9xb6g.jpg

Thank you, is much appreciated!

Thanks for these !

As a heads up I have been tidying up the formatting (not changing any text but removing excess section headers that had no content etc - blame my need for consistency :P). If for some reason you have left these with blank headings to come back later please let me know and I will stop doing it :slight_smile:

Thanks,

SwitchNZ