Description

When an actor class sets the root component mobility to Static or Stationary, spawning an instance of the class (or child blueprint) during runtime will print a warning message in the output log of

"PIE:Warning: Warning Mobility of [ClassActor]: MyScene has to be 'Movable' if you'd like to move."

This is inconsistent with an actor blueprint where setting the root component mobility to non-movable does not print this warning on spawn.

Steps to Reproduce
  1. Open UE4 Editor
  2. Add class to project based on Actor (MyActor)
  3. Add the following to MyActor.h:
    	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Test)
    		USceneComponent* MyScene;
    
  4. Add the following to MyActor.cpp in the constructor:
    	MyScene = CreateDefaultSubobject<USceneComponent>(TEXT("MyScene"));
    	RootComponent = MyScene;
    	MyScene->SetMobility(EComponentMobility::Stationary);
    
  5. Compile
  6. Add new blueprint based on PlayerController (MyPCBP)
  7. Add key press event node and Spawn Actor from Class node
  8. Set Class to MyActor
  9. Drag off from Spawn Transform node and create Make Transform node
  10. Add blueprint based on GameMode
  11. Set Default Player Controller to MyPCBP
  12. PIE
  13. Press bound key press button

Result:
Warning message is printed to the output

Expected:
1) Setting mobility in code does not print a message to mirror blueprints
2) Setting mobility in blueprints does print a message to mirror code.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

3
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay
Affects Versions4.13.24.14
CreatedOct 27, 2016
ResolvedNov 21, 2016
UpdatedApr 27, 2018