Announcement

Collapse
No announcement yet.

How do I create a fresh actor or update existing actor with new components in c++/python

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I create a fresh actor or update existing actor with new components in c++/python

    I'm trying to understand better how to spawn actors in my editor. Is this the correct order for creating a fresh actor with components in level or adding a component to an existing actor in level with c++ :
    1. World->SpawnActor<AActor>(Class, Transform, SpawnParameters)
    2. Actor->PostSpawnInitialize(Transform, Actor, Pawn, bRemoteOwned, bNoFail, bDeferConstruction)
    3. Actor->PostActorCreated() or PostLoad()
    4. ActorComponent->OnComponentCreated()
    5. Actor->PreInitializeComponents()
    6. ActorComponent->InitializeComponent()
    7. Actor->PostInitializeComponents()
    8. OnActorSpawned() ??? ( Not sure what this is or if it is important )
    9. BeginPlay() ???
    If so could I UFunction these in a custom cpp and h files, compile them to make them callable in python?
Working...
X