Objects inside the scripts (ie. variabletype of a gameobject)


My background:
Used to work with Unity3D, scripting everything in C#.

I have been struggling with object based scripting (and when it comes to gameplay, is important to interact with gameobjects through the code).

In C# I used to do following:

//declare gameobject “variable”
public GameObject <nameofthevariable>.

I could drag&drop the prefab to the script in the editor, and use the <nameofthevariable> to indicate at the object, to for instance instantiate it, and it was great. How would I get the same outcome in UE4&C++?

Thanks, -DoctorPC