I just don’t know.
Here is the important (i think) part of log:
D:\BuildFarm\buildmachine_++depot+UE4-Rocket+Beta6\Engine\Source\Developer\MessageLog\Private\Model\MessageLogListingModel.cpp(70):
Fatal error: Critical Error
SceneComponent
/Game/Maps/UEDPIE_0_Example_Map.TheWorld:PersistentLevel.Ability1_C_1.DefaultSceneRoot
Object from PIE level still
referenced. Shortest path from root:
SceneComponent
/Game/Maps/UEDPIE_0_Example_Map.TheWorld:PersistentLevel.Ability1_C_1.DefaultSceneRoot
[target] Ability1_C
/Game/Maps/UEDPIE_0_Example_Map.TheWorld:PersistentLevel.Ability1_C_1
(ObjectProperty
/Game/Blueprints/Ability1.Ability1_C:DefaultSceneRoot)
MyCharacter2_C
/Game/Maps/UEDPIE_0_Example_Map.TheWorld:PersistentLevel.MyCharacter2_C_0
(ObjectProperty
/Game/Blueprints/MyCharacter2.MyCharacter2_C:CallFunc_BeginSpawningActorFromBlueprint_ReturnValue_11218291414BF58BB3904D90EF49316F)
EffectTest_C
/Game/Blueprints/EffectTest.Default__EffectTest_C
(ObjectProperty
/Script/RPG.RPGEffectBase:CausedBy)
Blueprint
/Game/Blueprints/EffectTest.EffectTest
(root) (standalone) (ClassProperty
/Script/Engine.BlueprintCore:GeneratedClass)
This happen while I close game window in editor.
From what I understand it complains that there still referenced object inside world. It didn’t happen before, only after I added my FTimerManager to the code. So my first though was it was the case, so I just removed all traces of it from code and it still happen. It was clearly not an issue.
Here is all relevant code:
RPGEffectManagerComponent:
void URPGEffectManagerComponent::AddEffect()
{
//NewEffect->SelfRemove();
EffectsList.Add(NewEffect);
}
UCLASS(meta=(BlueprintSpawnableComponent))
class URPGEffectManagerComponent : public UActorComponent
{
GENERATED_UCLASS_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=EffectList)
TArray EffectsList;
URPGEffectBase* NewEffect;
void AddEffect();
};
Blueprint function for adding:
void URPGEffectBPLibrary::ApplyEffect(AActor* effectTarget, AActor* causedBy, TSubclassOf appiledEffect)
{
ARPGCharacter* GC = Cast(effectTarget);
if(GC)
{
if(appiledEffect)
{
//static ConstructorHelpers::FObjectFinder spawnEffect (appiledEffect.Class);
//GC->EffectManager->EffectsList.Add(appiledEffect.GetDefaultObject());
//appiledEffect->effectManager = GC->EffectManager;
URPGEffectBase* effect = appiledEffect.GetDefaultObject();
effect->AffectedTarget = effectTarget;
effect->CausedBy = causedBy;
GC->EffectManager->NewEffect = effect;
GC->EffectManager->AddEffect();
}
}
}
I assume I should delete all references while closing my PIE mode.
Two questions:
- Where exactly should I destroy them ?
- Is there any reason why it worked before and now after reverting the state when it worked it doesn’t work. Ok. it’s bit convoluted and I don’t really expect straight answer in any case (;.
Full log in attachment.link text