| @ -0,0 +1,31 @@ | ||||
| #include "CSAssetTypeAction_CSBlueprint.h" | ||||
| #include "TypeGenerator/CSBlueprint.h" | ||||
|  | ||||
| UClass* FCSAssetTypeAction_CSBlueprint::GetSupportedClass() const | ||||
| { | ||||
| 	return UCSBlueprint::StaticClass(); | ||||
| } | ||||
|  | ||||
| #if ENGINE_MAJOR_VERSION * 100 + ENGINE_MINOR_VERSION < 505 | ||||
| void FCSAssetTypeAction_CSBlueprint::OpenAssetEditor(const TArray<UObject*>& InObjects, const EAssetTypeActivationOpenedMethod OpenedMethod, TSharedPtr<IToolkitHost> EditWithinLevelEditor) | ||||
| #else | ||||
| void FCSAssetTypeAction_CSBlueprint::OpenAssetEditor(const TArray<UObject*>& InObjects, TSharedPtr<class IToolkitHost> EditWithinLevelEditor) | ||||
| #endif | ||||
| { | ||||
| 	UCSBlueprint* Blueprint = Cast<UCSBlueprint>(InObjects[0]); | ||||
|  | ||||
| 	// TODO: Add support for opening the file in an external editor. | ||||
| 	// Currently Rider doesn't support opening files from the command line as it opens the file in every instance of Rider, even if I have specified the solution to open it in. | ||||
| 	// A ticket has been created to try to get it fixed. | ||||
| } | ||||
|  | ||||
| bool FCSAssetTypeAction_CSBlueprint::SupportsOpenedMethod(const EAssetTypeActivationOpenedMethod OpenedMethod) const | ||||
| { | ||||
| 	// Always return false for now. Same issue as above. | ||||
| 	return false; | ||||
| } | ||||
|  | ||||
| FText FCSAssetTypeAction_CSBlueprint::GetName() const | ||||
| { | ||||
| 	return FText::FromString(FString::Printf(TEXT("C# Class"))); | ||||
| } | ||||
| @ -0,0 +1,17 @@ | ||||
| #pragma once | ||||
| #include "AssetTypeActions/AssetTypeActions_Blueprint.h" | ||||
|  | ||||
| class FCSAssetTypeAction_CSBlueprint : public FAssetTypeActions_Blueprint | ||||
| { | ||||
| public: | ||||
| 	// IAssetTypeActions interface | ||||
| 	virtual UClass* GetSupportedClass() const override; | ||||
| #if ENGINE_MAJOR_VERSION * 100 + ENGINE_MINOR_VERSION < 505 | ||||
| 	virtual void OpenAssetEditor(const TArray<UObject*>& InObjects, const EAssetTypeActivationOpenedMethod OpenedMethod, TSharedPtr<IToolkitHost> EditWithinLevelEditor = TSharedPtr<IToolkitHost>()) override; | ||||
| #else | ||||
| 	virtual void OpenAssetEditor(const TArray<UObject*>& InObjects, TSharedPtr<class IToolkitHost> EditWithinLevelEditor = TSharedPtr<IToolkitHost>()) override; | ||||
| #endif | ||||
| 	virtual bool SupportsOpenedMethod(const EAssetTypeActivationOpenedMethod OpenedMethod) const override; | ||||
| 	virtual FText GetName() const override; | ||||
| 	// End of IAssetTypeActions interface | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user