FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
UnrealEnginePython/examples/blueprint_dynamic_cast.py at master · Devination/UnrealEnginePython · GitHub
Devination
UnrealEnginePython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
UnrealEnginePython
/
examples
/
blueprint_dynamic_cast.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (18 loc) · 940 Bytes
Breadcrumbs
UnrealEnginePython
/
examples
/
blueprint_dynamic_cast.py
Copy path
File metadata and controls
27 lines (18 loc) · 940 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
import
unreal_engine
as
ue
from
unreal_engine
.
classes
import
Blueprint
,
K2Node_DynamicCast
,
Actor
,
Object
from
unreal_engine
.
structs
import
EdGraphPinType
from
unreal_engine
.
enums
import
EEdGraphPinDirection
bp_foo
=
ue
.
load_object
(
Blueprint
,
'/Game/Foo.Foo'
)
bp_bar
=
ue
.
load_object
(
Blueprint
,
'/Game/Bar.Bar'
)
cast_node
=
K2Node_DynamicCast
()
cast_node
.
TargetType
=
bp_bar
.
GeneratedClass
graph
=
ue
.
blueprint_add_function
(
bp_foo
,
'FooCaster'
)
func
=
graph
.
Nodes
[
0
]
pin_type
=
EdGraphPinType
(
PinCategory
=
'object'
,
PinSubCategoryObject
=
Actor
)
pin
=
func
.
node_create_pin
(
EEdGraphPinDirection
.
EGPD_Input
,
pin_type
,
'Arg001'
)
graph
.
graph_add_node
(
cast_node
,
600
,
0
)
cast_node
.
node_find_pin
(
'Object'
).
category
=
'object'
cast_node
.
node_find_pin
(
'Object'
).
sub_category
=
Object
pin
.
make_link_to
(
cast_node
.
node_find_pin
(
'Object'
))
func
.
node_find_pin
(
'then'
).
make_link_to
(
cast_node
.
node_find_pin
(
'execute'
))
ue
.
compile_blueprint
(
bp_foo
)
Back
|
FazBrowse Home
|
New Git URL