본문 바로가기
Unreal Engine5/게임 만들기 - Warehouse Wreckage

Unreal Engine Object & Reference

by wanna_dev 2023. 6. 26.

This time, I'm going to write about "How to use references in Event Graph".

Before that we need to know below.

 

Objects - Collections of data and functionality

Actors - Object that can go in a level

Component -  Objects that can go on a actor 

Reference - Where to find an object

Data Pin - The input or output data for a node (what to run)

Execution Pin - When to run this node (white pins)

 

For example, If you click the Actor Cube, then there is a StaticMeshComponent responsible how to draw a cube.

 

If we copy these bunch of objects, It may require a lot of computer resources. Instead of doing that, we use a clever structure called "References".

References mean address where do I go to find this object in computer memory. 

I will write about it next time.

For now, let's learn how to use References in Blueprint.

 

click a Cube in a main level > go to Event Graph > mouse right click > create a reference to cube

this node is about an address of the cube.

We can use this reference to find a name or the other functionality of the cube.

 

Data Pin 

Data Pin
We can use all the functionalities of the cube
Get Static Mesh Component
Get Display Name - get the input of the static mesh component reference
Get mass from Cube