FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
unrealcpp/AddMeshFromFile/AddMeshFromFile.cpp at master · Harrison1/unrealcpp · GitHub
Harrison1
/
unrealcpp
Public
Notifications
You must be signed in to change notification settings
Fork
223
Star
1.3k
Code
Issues
1
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
unrealcpp
/
AddMeshFromFile
/
AddMeshFromFile.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (24 loc) · 981 Bytes
Breadcrumbs
unrealcpp
/
AddMeshFromFile
/
AddMeshFromFile.cpp
Copy path
File metadata and controls
29 lines (24 loc) · 981 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
Harrison McGuire
//
UE4 Version 4.20.2
//
https://github.com/Harrison1/unrealcpp
//
https://severallevels.io
//
https://harrisonmcguire.com
#
include
"
AddMeshFromFile.h
"
//
add constructor header
#
include
"
UObject/ConstructorHelpers.h
"
//
Sets default values
AAddMeshFromFile::AAddMeshFromFile
()
{
//
Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.
bCanEverTick
=
true
;
//
add Cylinder to root
UStaticMeshComponent* Cylinder = CreateDefaultSubobject<UStaticMeshComponent>(
TEXT
(
"
VisualRepresentation
"
));
RootComponent = Cylinder;
static
ConstructorHelpers::FObjectFinder<UStaticMesh>
CylinderAsset
(
TEXT
(
"
/Game/StarterContent/Shapes/Shape_Cylinder.Shape_Cylinder
"
));
if
(CylinderAsset.
Succeeded
())
{
Cylinder->
SetStaticMesh
(CylinderAsset.
Object
);
Cylinder->
SetRelativeLocation
(
FVector
(
0
.
0f
,
0
.
0f
,
0
.
0f
));
Cylinder->
SetWorldScale3D
(
FVector
(
1
.
f
));
}
}
Back
|
FazBrowse Home
|
New Git URL