第一次提交

This commit is contained in:
不明不惑
2026-03-03 01:23:02 +08:00
commit 3e434877e8
1053 changed files with 102411 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#include "GCS_ActorOwnedObject.h"
#include "GameFramework/Actor.h"
UWorld* UGCS_ActorOwnedObject::GetWorld() const
{
// To Make sure the outer is Valid and can be used
if (!HasAnyFlags(RF_ClassDefaultObject) && !GetOuter()->HasAnyFlags(RF_BeginDestroyed) && !GetOuter()->IsUnreachable())
{
//Attempt to get the world
AActor* Outer = GetTypedOuter<AActor>();
if (Outer != nullptr)
{
return Outer->GetWorld();
}
}
return nullptr;
}