File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -35,3 +35,46 @@ world = ue.get_editor_world()
3535for actor in find_all_actors_with_tag(world, ' foo' ):
3636 print (actor)
3737```
38+
39+ Eventually you can use the blueprint api:
40+
41+ ```python
42+ import unreal_engine as ue
43+ from unreal_engine.classes import GameplayStatics
44+
45+ world = ue.get_editor_world()
46+
47+ # blueprint ufunctions returns a tuple (as UFunctions can returns multiple values)
48+ actors, = GameplayStatics.GetAllActorsWithTag(world, ' one' )
49+ for actor in actors:
50+ print (actor)
51+ ```
52+
53+ # # Tagging Components
54+
55+ You can tag components too using the property ' ComponentTags' :
56+
57+ ```python
58+ your_component.ComponentTags = [' one' , ' two' , ' three' ]
59+ ```
60+
61+ Fast- check of tag availability can be done with the component_has_tag() function:
62+
63+ ```python
64+ if your_component.component_has_tag(' one' ):
65+ print (' yes' )
66+ ```
67+
68+ While you can get the list of actor' s component tagged with the specific value:
69+
70+ ```python
71+ component_list = your_actor.get_components_by_tag(' two' )
72+ ```
73+
74+ The function can take an optional argument specifying which classes of ActorComponent must be taken into account:
75+
76+ ```python
77+ from unreal_engine.classes import SceneComponent
78+ # search all the components children of the class SceneComponent and tagged with 'two'
79+ component_list = your_actor.get_components_by_tag(' two' , SceneComponent)
80+ ```
You can’t perform that action at this time.
0 commit comments