// Fill out your copyright notice in the Description page of Project Settings.


#include "MyBlueprintFunctionLibrary.h"

void UMyBlueprintFunctionLibrary::UnregisterComponentFromOwner(UActorComponent* Component)
{
    if (Component)
    {
        Component->UnregisterComponent();
        Component->DestroyComponent();
    }
}

void UMyBlueprintFunctionLibrary::ClientTravel(APlayerController* PlayerController, FString LevelName, ETravelType TravelType)
{
    if (PlayerController)
    {
        PlayerController->ClientTravel(LevelName, TravelType);
    }
}

bool UMyBlueprintFunctionLibrary::IsActorOwnedByActor(AActor* Actor, AActor* OwningActor)
{
    if (Actor && OwningActor)
    {
        return Actor->IsOwnedBy(OwningActor);
    }
    return false;
}

