Skip to content
Snippets Groups Projects
Select Git revision
  • b0060790008e0b64eb3239143e842953a9a74675
  • 5.4 default protected
  • 5.5
  • dev/5.5
  • dev/5.4
  • dev/5.3_downgrade
  • feature/experimenttime_hack
  • 5.3 protected
  • _IntenSelect5.3
  • IntenSelect5.3
  • 4.27 protected
  • 4.26 protected
  • 5.0 protected
  • 4.22 protected
  • 4.21 protected
  • UE5.4-2024.1
  • UE5.4-2024.1-rc1
  • UE5.3-2023.1-rc3
  • UE5.3-2023.1-rc2
  • UE5.3-2023.1-rc
20 results

DisplayClusterExtensionsEditor.cpp

Blame
  • user avatar
    Kamil Karwacki authored and Simon Oehrl committed
    initial commit, this feature will extend the pawn to be able to grab Actors which implement the Grabable interface, the default grabbing behavior can be extended by adding a GrabbingBehaviorComponent
    aaf32e49
    History
    DisplayClusterExtensionsEditor.cpp 1.48 KiB
    #include "DisplayClusterExtensionsEditor.h"
    
    #include "ComponentVisualizers.h"
    #include "GrabbingBehaviorOnLineVisualizer.h"
    #include "GrabbingBehaviorPlaneVisualizer.h"
    
    #include "GrabbingBehaviorOnPlaneComponent.h"
    #include "GrabbingBehaviorOnLineComponent.h"
    
    #include "UnrealEdGlobals.h"
    #include "Editor/UnrealEdEngine.h"
    
    IMPLEMENT_GAME_MODULE(FDisplayClusterExtensionsEditorModule, DisplayClusterExtensionsEditor);
    
    #define LOCTEXT_NAMESPACE "DisplayClusterExtensionsEdito"
    
    void FDisplayClusterExtensionsEditorModule::StartupModule()
    {
    	if (GUnrealEd != NULL)
    	{
    		TSharedPtr<FComponentVisualizer> LineVisualizer = MakeShareable(new FGrabbingBehaviorOnLineVisualizer());
    
    		if (LineVisualizer.IsValid())
    		{
    			GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName(), LineVisualizer);
    			LineVisualizer->OnRegister();
    		}
    
    		TSharedPtr<FComponentVisualizer> PlaneVisualizer = MakeShareable(new FGrabbingBehaviorPlaneVisualizer());
    		
    		if (PlaneVisualizer.IsValid())
    		{
    			GUnrealEd->RegisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName(), PlaneVisualizer);
    			PlaneVisualizer->OnRegister();
    		}
    	}
    }
    
    void FDisplayClusterExtensionsEditorModule::ShutdownModule()
    {
    	if (GUnrealEd != NULL)
    	{
    		GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnLineComponent::StaticClass()->GetFName());
    		GUnrealEd->UnregisterComponentVisualizer(UGrabbingBehaviorOnPlaneComponent::StaticClass()->GetFName());
    	}
    }
    
    #undef LOCTEXT_NAMESPACE