Initial check-in of in-memory prefab creation helpers for Dynamic Vegetation tests
Signed-off-by: jckand-amzn <jckand@amazon.com>
This commit is contained in:
+3
-1
@@ -132,6 +132,7 @@ class EditorEntity:
|
||||
|
||||
def __init__(self, id: azlmbr.entity.EntityId):
|
||||
self.id: azlmbr.entity.EntityId = id
|
||||
self.components: List[EditorComponent] = []
|
||||
|
||||
# Creation functions
|
||||
@classmethod
|
||||
@@ -258,6 +259,7 @@ class EditorEntity:
|
||||
:return: Component object of newly added component.
|
||||
"""
|
||||
component = self.add_components([component_name])[0]
|
||||
self.components.append(component)
|
||||
return component
|
||||
|
||||
def add_components(self, component_names: list) -> List[EditorComponent]:
|
||||
@@ -279,7 +281,7 @@ class EditorEntity:
|
||||
), f"Failure: Could not add component: '{new_comp.get_component_name()}' to entity: '{self.get_name()}'"
|
||||
new_comp.id = add_component_outcome.GetValue()[0]
|
||||
components.append(new_comp)
|
||||
|
||||
self.components.append(new_comp)
|
||||
return components
|
||||
|
||||
def get_components_of_type(self, component_names: list) -> List[EditorComponent]:
|
||||
|
||||
Reference in New Issue
Block a user