Fix this file encoding bullshit hopefully once and for all and get a commit where the state machine asset can be opened without crashing the editor
This commit is contained in:
parent
965322a4ae
commit
1627d08314
BIN
SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset
(Stored with Git LFS)
BIN
SwordNGun/Content/Characters/Protagonist/BP_NewProtag.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset
(Stored with Git LFS)
Normal file
BIN
SwordNGun/Content/Characters/Protagonist/BP_Protagonist.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset
(Stored with Git LFS)
BIN
SwordNGun/Content/Core/GameModes/BP_TestGameMode.uasset
(Stored with Git LFS)
Binary file not shown.
@ -1,91 +1,91 @@
|
||||
#include "States/SNGStateMachineEditor.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "SNGStateMachineEditor"
|
||||
|
||||
const FName SNGStateMachineEditorAppName = FName(TEXT("SNGStateMachineEditorAppName"));
|
||||
|
||||
void FSNGStateMachineEditor::RegisterTabSpawners(const TSharedRef<FTabManager>& InTabManager)
|
||||
{
|
||||
/*
|
||||
WorkspaceMenuCategory = TabManager->AddLocalWorkspaceMenuCategory(LOCTEXT("WorkspaceMenu_SNGStateMachineEditor", "SNG State Machine Editor"));
|
||||
TSharedRef<FWorkspaceItem> WorkspaceMenuCatRef = WorkspaceMenuCategory.ToSharedRef();
|
||||
FAssetEditorToolkit::RegisterTabSpawners(TabManager);
|
||||
TabManager->RegisterTabSpawner(GraphCanvasTabId, )
|
||||
.SetDisplayName(LOCTEXT("GraphCanvasTab", "Graph"))
|
||||
.SetGroup(WorkspaceMenuCategoryRef)
|
||||
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "GraphEditor.EventGraph_16x"));
|
||||
|
||||
TabManager->RegisterTabSpawner(PropertiesTabId, FOnSpawnTab::CreateSP(this, &FSoundSubmixEditor::SpawnTab_Properties))
|
||||
.SetDisplayName(LOCTEXT("PropertiesTab", "Details"))
|
||||
.SetGroup(WorkspaceMenuCategoryRef)
|
||||
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Details"));\
|
||||
*/
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::UnregisterTabSpawners(const TSharedRef<FTabManager>& InTabManager)
|
||||
{
|
||||
IStateMachineEditor::UnregisterTabSpawners(InTabManager);
|
||||
}
|
||||
|
||||
FText FSNGStateMachineEditor::GetBaseToolkitName() const
|
||||
{
|
||||
return LOCTEXT("SNGStateMachineEditorAppLabel", "SNG State Machine Editor");
|
||||
}
|
||||
|
||||
FText FSNGStateMachineEditor::GetToolkitName() const
|
||||
{
|
||||
const bool bDirtyState = StateMachineEdited->GetOutermost()->IsDirty();
|
||||
|
||||
/*
|
||||
FFormatNamedArguments Args;
|
||||
Args.Add(TEXT("StateMachineName", FText::FromString(StateMachineEdited->GetName())));
|
||||
Args.Add(TEXT("DirtyState"), bDirtyState ? FText::FromString("*") : FText::GetEmpty());
|
||||
return FText::Format(LOCTEXT("SNGStateMachineEditorToolkitName", "{StateMachineName}{DirtyState}"), Args);
|
||||
*/
|
||||
return FText::FromString(StateMachineEdited->GetName());
|
||||
}
|
||||
|
||||
FText FSNGStateMachineEditor::GetToolkitToolTipText() const
|
||||
{
|
||||
return IStateMachineEditor::GetToolkitToolTipText();
|
||||
}
|
||||
|
||||
FLinearColor FSNGStateMachineEditor::GetWorldCentricTabColorScale() const
|
||||
{
|
||||
return FLinearColor::Blue;
|
||||
}
|
||||
|
||||
FString FSNGStateMachineEditor::GetWorldCentricTabPrefix() const
|
||||
{
|
||||
return FString("NOT IMPLEMENTED");
|
||||
}
|
||||
|
||||
FString FSNGStateMachineEditor::GetDocumentationLink() const
|
||||
{
|
||||
return IStateMachineEditor::GetDocumentationLink();
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::SaveAsset_Execute()
|
||||
{
|
||||
FAssetEditorToolkit::SaveAsset_Execute();
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::SaveAssetAs_Execute()
|
||||
{
|
||||
IStateMachineEditor::SaveAssetAs_Execute();
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::FocusWindow(UObject* ObjectToFocusOn)
|
||||
{
|
||||
BringToolkitToFront();
|
||||
//JumpToObject
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::InitStateMachineEditor(const EToolkitMode::Type Mode,
|
||||
const TSharedPtr<IToolkitHost>& InitToolkitHost, USNGStateMachine* StateMachine)
|
||||
{
|
||||
StateMachineEdited = StateMachine;
|
||||
//FAssetEditorToolkit::InitAssetEditor(Mode, InitToolkitHost, SNGStateMachineEditorAppName, , true, true, StateMachine);
|
||||
}
|
||||
|
||||
|
||||
#include "States/SNGStateMachineEditor.h"
|
||||
|
||||
#define LOCTEXT_NAMESPACE "SNGStateMachineEditor"
|
||||
|
||||
const FName SNGStateMachineEditorAppName = FName(TEXT("SNGStateMachineEditorAppName"));
|
||||
|
||||
void FSNGStateMachineEditor::RegisterTabSpawners(const TSharedRef<FTabManager>& InTabManager)
|
||||
{
|
||||
/*
|
||||
WorkspaceMenuCategory = TabManager->AddLocalWorkspaceMenuCategory(LOCTEXT("WorkspaceMenu_SNGStateMachineEditor", "SNG State Machine Editor"));
|
||||
TSharedRef<FWorkspaceItem> WorkspaceMenuCatRef = WorkspaceMenuCategory.ToSharedRef();
|
||||
FAssetEditorToolkit::RegisterTabSpawners(TabManager);
|
||||
TabManager->RegisterTabSpawner(GraphCanvasTabId, )
|
||||
.SetDisplayName(LOCTEXT("GraphCanvasTab", "Graph"))
|
||||
.SetGroup(WorkspaceMenuCategoryRef)
|
||||
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "GraphEditor.EventGraph_16x"));
|
||||
|
||||
TabManager->RegisterTabSpawner(PropertiesTabId, FOnSpawnTab::CreateSP(this, &FSoundSubmixEditor::SpawnTab_Properties))
|
||||
.SetDisplayName(LOCTEXT("PropertiesTab", "Details"))
|
||||
.SetGroup(WorkspaceMenuCategoryRef)
|
||||
.SetIcon(FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.Tabs.Details"));\
|
||||
*/
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::UnregisterTabSpawners(const TSharedRef<FTabManager>& InTabManager)
|
||||
{
|
||||
IStateMachineEditor::UnregisterTabSpawners(InTabManager);
|
||||
}
|
||||
|
||||
FText FSNGStateMachineEditor::GetBaseToolkitName() const
|
||||
{
|
||||
return LOCTEXT("SNGStateMachineEditorAppLabel", "SNG State Machine Editor");
|
||||
}
|
||||
|
||||
FText FSNGStateMachineEditor::GetToolkitName() const
|
||||
{
|
||||
const bool bDirtyState = StateMachineEdited->GetOutermost()->IsDirty();
|
||||
|
||||
/*
|
||||
FFormatNamedArguments Args;
|
||||
Args.Add(TEXT("StateMachineName", FText::FromString(StateMachineEdited->GetName())));
|
||||
Args.Add(TEXT("DirtyState"), bDirtyState ? FText::FromString("*") : FText::GetEmpty());
|
||||
return FText::Format(LOCTEXT("SNGStateMachineEditorToolkitName", "{StateMachineName}{DirtyState}"), Args);
|
||||
*/
|
||||
return FText::FromString(StateMachineEdited->GetName());
|
||||
}
|
||||
|
||||
FText FSNGStateMachineEditor::GetToolkitToolTipText() const
|
||||
{
|
||||
return IStateMachineEditor::GetToolkitToolTipText();
|
||||
}
|
||||
|
||||
FLinearColor FSNGStateMachineEditor::GetWorldCentricTabColorScale() const
|
||||
{
|
||||
return FLinearColor::Blue;
|
||||
}
|
||||
|
||||
FString FSNGStateMachineEditor::GetWorldCentricTabPrefix() const
|
||||
{
|
||||
return FString("NOT IMPLEMENTED");
|
||||
}
|
||||
|
||||
FString FSNGStateMachineEditor::GetDocumentationLink() const
|
||||
{
|
||||
return IStateMachineEditor::GetDocumentationLink();
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::SaveAsset_Execute()
|
||||
{
|
||||
FAssetEditorToolkit::SaveAsset_Execute();
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::SaveAssetAs_Execute()
|
||||
{
|
||||
IStateMachineEditor::SaveAssetAs_Execute();
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::FocusWindow(UObject* ObjectToFocusOn)
|
||||
{
|
||||
BringToolkitToFront();
|
||||
//JumpToObject
|
||||
}
|
||||
|
||||
void FSNGStateMachineEditor::InitStateMachineEditor(const EToolkitMode::Type Mode,
|
||||
const TSharedPtr<IToolkitHost>& InitToolkitHost, USNGStateMachine* StateMachine)
|
||||
{
|
||||
StateMachineEdited = StateMachine;
|
||||
//FAssetEditorToolkit::InitAssetEditor(Mode, InitToolkitHost, SNGStateMachineEditorAppName, , true, true, StateMachine);
|
||||
}
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
@ -1,43 +1,43 @@
|
||||
// Project Sword & Gun Copyright © 2021 Kevin Poretti
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "IStateMachineEditor.h"
|
||||
#include "States/SNGStateMachine.h"
|
||||
#include "Toolkits/SimpleAssetEditor.h"
|
||||
|
||||
class FSNGStateMachineEditor : public IStateMachineEditor
|
||||
{
|
||||
public:
|
||||
/** IToolkit Interface */
|
||||
virtual void RegisterTabSpawners(const TSharedRef<FTabManager>& InTabManager) override;
|
||||
virtual void UnregisterTabSpawners(const TSharedRef<FTabManager>& InTabManager) override;
|
||||
virtual FText GetBaseToolkitName() const override;
|
||||
virtual FText GetToolkitName() const override;
|
||||
virtual FName GetToolkitFName() const override { return FName(TEXT("SNGStateMachineEditor")); }
|
||||
virtual FText GetToolkitToolTipText() const override;
|
||||
virtual FLinearColor GetWorldCentricTabColorScale() const override;
|
||||
virtual FString GetWorldCentricTabPrefix() const override;
|
||||
|
||||
/** FAssetEditorToolkit interface */
|
||||
virtual FString GetDocumentationLink() const override;
|
||||
virtual bool CanSaveAsset() const override { return true; }
|
||||
virtual bool CanSaveAssetAs() const override { return true; }
|
||||
virtual void SaveAsset_Execute() override;
|
||||
virtual void SaveAssetAs_Execute() override;
|
||||
|
||||
/** IAssetEditorInstance interface */
|
||||
virtual void FocusWindow(UObject* ObjectToFocusOn = nullptr) override;
|
||||
|
||||
void InitStateMachineEditor(const EToolkitMode::Type Mode, const TSharedPtr<IToolkitHost>& InitToolkitHost, USNGStateMachine* StateMachine);
|
||||
|
||||
private:
|
||||
/** State machien being edited */
|
||||
USNGStateMachine* StateMachineEdited;
|
||||
|
||||
/** Graph Editor */
|
||||
TSharedPtr<SGraphEditor> GraphEditorView;
|
||||
|
||||
|
||||
};
|
||||
// Project Sword & Gun Copyright © 2021 Kevin Poretti
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "IStateMachineEditor.h"
|
||||
#include "States/SNGStateMachine.h"
|
||||
#include "Toolkits/SimpleAssetEditor.h"
|
||||
|
||||
class FSNGStateMachineEditor : public IStateMachineEditor
|
||||
{
|
||||
public:
|
||||
/** IToolkit Interface */
|
||||
virtual void RegisterTabSpawners(const TSharedRef<FTabManager>& InTabManager) override;
|
||||
virtual void UnregisterTabSpawners(const TSharedRef<FTabManager>& InTabManager) override;
|
||||
virtual FText GetBaseToolkitName() const override;
|
||||
virtual FText GetToolkitName() const override;
|
||||
virtual FName GetToolkitFName() const override { return FName(TEXT("SNGStateMachineEditor")); }
|
||||
virtual FText GetToolkitToolTipText() const override;
|
||||
virtual FLinearColor GetWorldCentricTabColorScale() const override;
|
||||
virtual FString GetWorldCentricTabPrefix() const override;
|
||||
|
||||
/** FAssetEditorToolkit interface */
|
||||
virtual FString GetDocumentationLink() const override;
|
||||
virtual bool CanSaveAsset() const override { return true; }
|
||||
virtual bool CanSaveAssetAs() const override { return true; }
|
||||
virtual void SaveAsset_Execute() override;
|
||||
virtual void SaveAssetAs_Execute() override;
|
||||
|
||||
/** IAssetEditorInstance interface */
|
||||
virtual void FocusWindow(UObject* ObjectToFocusOn = nullptr) override;
|
||||
|
||||
void InitStateMachineEditor(const EToolkitMode::Type Mode, const TSharedPtr<IToolkitHost>& InitToolkitHost, USNGStateMachine* StateMachine);
|
||||
|
||||
private:
|
||||
/** State machien being edited */
|
||||
USNGStateMachine* StateMachineEdited;
|
||||
|
||||
/** Graph Editor */
|
||||
TSharedPtr<SGraphEditor> GraphEditorView;
|
||||
|
||||
|
||||
};
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user