Lua向C#逻辑迁移 一期 #13

将整个插件代码上传
This commit is contained in:
2025-10-26 21:48:39 +08:00
parent 56994b3927
commit 648386cd73
785 changed files with 53683 additions and 2 deletions

View File

@ -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")));
}

View File

@ -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
};