Ok I have banged my head long enough. This is the easiest thing to do in most programs. Parenting one mesh to another or in Unreals case one Actor to another.
Goal: I want to animate a ton of cubs with maya or c4d then bring them in and add trees to every cube and parent them to the cubes so they move around (parented to the cubes)
I set this up but i get all kinds of error in the “attach_to_actor” it wants an actor and I am giving it one. I am not sure what I am doing wrong. How do you call and actor?
slowTaskDisplayText = “Spawing actors in the level”
#global editor utility base allows you to use stuf in content browser
selectedAssets = MyEditorUtility().get_selected_assets()
selectedActors = MyEditorUtility().get_selection_set()
for i in selectedActors:
newSpawn = unreal.EditorLevelLibrary.spawn_actor_from_object(selectedAssets,unreal.Vector(0.0,0.0,0.0),unreal.Rotator(0.0,0.0, 15)) unreal.Actor.attach_to_actor(i, unreal.Name(i), unreal.AttachmentRule.SNAP_TO_TARGET, unreal.AttachmentRule.SNAP_TO_TARGET, unreal.AttachmentRule.SNAP_TO_TARGET, False)