Either I do not understand things completely or here is somethind wrong.
So I try to use ALightWeightInstanceManager for my project. I dynamically create actors, move them to HISM componet and back, its ok.
But simpliest interaction with outer code which resolve FActorInstanceHandle give me check assertion in void FActorInstanceHandle::SetCachedActor(AActor* InActor) const
So for example getting and actor for HitResult calling the
AActor* FActorInstanceHandle::FetchActor() const
{
AActor* FetchedActor = GetCachedActor();
if (FetchedActor != nullptr)
{
return FetchedActor;
}
if (ManagerInterface.IsValid())
{
FetchedActor = ManagerInterface->FindOrCreateActor(*this);
SetCachedActor(FetchedActor);
}
return FetchedActor;
}
And here FindOrCreateActor creates my LWI actor and filling handle’s cached actor. I’ve checked GitHub, it’s there for 3 years. All the code written intently to fill CachedActor inside FindOrCreateActor
But the very next call, SetCachedActor(FetchedActor) hit the
void FActorInstanceHandle::SetCachedActor(AActor* InActor) const
{
check(IsActorValid() == false);
ReferenceObject = InActor;
}
and obviously IsActorValid() == true here.
Is it an error or I’m doing and getting something wrong?