Skip to content
Snippets Groups Projects

Merges IntenSelect 5.3 into dev 5.3

Closed Timon Römer requested to merge _IntenSelect5.3 into dev/5.3

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 48 48 return 0;
    49 49 }
    50 50
    51 void URWTHVRUtilities::ShowErrorAndQuit(UWorld* WorldContext, const FString& Message)
    51 void URWTHVRUtilities::ShowEngineError(const FString& Message)
    • This is an API change that would break any project that uses this function. Very dangerous to just change, but tbh I would like to get rid of this function anyway as all it does is log some text.

    • Please register or sign in to reply
  • 42 // Set the component active based on the SetActiveOnStart flag
    43 SetActive(SetActiveOnStart, false);
    84 44 }
    85 45
    86 46 void UIntenSelectComponent::InitInputBindings()
    87 47 {
    88 const APawn* Pawn = Cast<APawn>(GetOwner());
    89 if (!Pawn)
    90 return;
    91 UEnhancedInputComponent* EI = Cast<UEnhancedInputComponent>(Pawn->InputComponent);
    48 // Get the player controller
    49 const APlayerController* PC = UGameplayStatics::GetPlayerController(GetWorld(), 0);
    50
    51 // Get the local player subsystem for enhanced input
    52 UEnhancedInputLocalPlayerSubsystem* Subsystem =
    53 ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PC->GetLocalPlayer());
    • Comment on lines -88 to +53

      There's a reason I changed this to get the InputComponent through the pawn this component is attached to instead of through GameplayStatics/GetLocalPlayer. This will potentially fail in multiplayer scenarios, as PC might be null or not the one you expect it to be.

    • Please register or sign in to reply
  • 96 UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
    64
    65 UE_LOG(LogTemp, Error, TEXT("%s"), *Message);
    66 // Deactivate
    67
    68 Super::SetActive(false, true);
    97 69 return;
    98 70 }
    99 71
    100 // Bind the actions
    101 EI->BindAction(InputClick, ETriggerEvent::Started, this, &UIntenSelectComponent::OnFireDown);
    102 EI->BindAction(InputClick, ETriggerEvent::Completed, this, &UIntenSelectComponent::OnFireUp);
    72 // Bind the actions for input events
    73 PEI->BindAction(InputClick, ETriggerEvent::Started, this, &UIntenSelectComponent::OnFireDown);
    74 PEI->BindAction(InputClick, ETriggerEvent::Completed, this, &UIntenSelectComponent::OnFireUp);
    103 75 }
    • Comment on lines 86 to 103

      This is what I thought we talked about: You're using a completely different initialization system than all the other input-able components. Please adjust it to the existing one!

    • Please register or sign in to reply
  • 115 90 }
    116 91 else
    117 92 {
    93 // Display an error message if the spline component creation fails
    118 94 const FString Message = "Error while spawning SplineComponent!";
    119 95 #if WITH_EDITOR
    120 96 const FText Title = FText::FromString(FString("ERROR"));
    121 97 FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(Message), Title);
    122 98 #endif
    123
    124 99 UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
  • 93 // Display an error message if the spline component creation fails
    118 94 const FString Message = "Error while spawning SplineComponent!";
    119 95 #if WITH_EDITOR
    120 96 const FText Title = FText::FromString(FString("ERROR"));
    121 97 FMessageDialog::Open(EAppMsgType::Ok, FText::FromString(Message), Title);
    122 98 #endif
    123
    124 99 UE_LOG(LogTemp, Error, TEXT("%s"), *Message)
    125 100 }
    126 101 }
    127 102
    128 103 void UIntenSelectComponent::InitSplineMeshComponent()
    129 104 {
    105 // Create a new spline mesh component
    130 106 SplineMeshComponent =
    131 107 NewObject<USplineMeshComponent>(this, USplineMeshComponent::StaticClass(), TEXT("SplineMeshComponent"));
  • 145 125 UE_LOG(LogTemp, Warning, TEXT("SplineMesh not set!"));
  • 154 135 UE_LOG(LogTemp, Warning, TEXT("SplineMesh material not set! Using default material instead."));
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading