diff --git a/Gems/ScriptCanvasDiagnosticLibrary/CMakeLists.txt b/Gems/ScriptCanvasDiagnosticLibrary/CMakeLists.txt deleted file mode 100644 index 20a680bce9..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# -# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -# its licensors. -# -# For complete copyright and license terms please see the LICENSE at the root of this -# distribution (the "License"). All use of this software is governed by the License, -# or, if provided, by the license below or the license accompanying this file. Do not -# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# - -add_subdirectory(Code) diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/CMakeLists.txt b/Gems/ScriptCanvasDiagnosticLibrary/Code/CMakeLists.txt deleted file mode 100644 index 4593768464..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -# -# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -# its licensors. -# -# For complete copyright and license terms please see the LICENSE at the root of this -# distribution (the "License"). All use of this software is governed by the License, -# or, if provided, by the license below or the license accompanying this file. Do not -# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# - -ly_add_target( - NAME ScriptCanvasDiagnosticLibrary.Static STATIC - NAMESPACE Gem - FILES_CMAKE - scriptcanvasdiagnosticlibrary_common_files.cmake - scriptcanvasdiagnosticlibrary_autogen_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - . - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - AZ::AzCore - Gem::ScriptCanvas - Legacy::CryCommon - AUTOGEN_RULES - *.ScriptCanvasGrammar.xml,ScriptCanvasGrammar_Header.jinja,$path/$fileprefix.generated.h - *.ScriptCanvasGrammar.xml,ScriptCanvasGrammar_Source.jinja,$path/$fileprefix.generated.cpp - *.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Header.jinja,$path/$fileprefix.generated.h - *.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Source.jinja,$path/$fileprefix.generated.cpp -) - -ly_add_target( - NAME ScriptCanvasDiagnosticLibrary ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE} - NAMESPACE Gem - FILES_CMAKE - scriptcanvasdiagnosticlibrary_shared_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Source - PUBLIC - Include - BUILD_DEPENDENCIES - PRIVATE - Gem::ScriptCanvasDiagnosticLibrary.Static -) diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Include/ScriptCanvasDiagnosticLibrary/DebugDrawBus.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Include/ScriptCanvasDiagnosticLibrary/DebugDrawBus.h deleted file mode 100644 index d32e0ea1d5..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Include/ScriptCanvasDiagnosticLibrary/DebugDrawBus.h +++ /dev/null @@ -1,45 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include -#include - -struct IRenderer; - -namespace ScriptCanvasDiagnostics -{ - class DebugDrawRequests : public AZ::EBusTraits - { - public: - - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = void*; - - virtual void OnDebugDraw(IRenderer*) = 0; - }; - - using DebugDrawBus = AZ::EBus; - - class SystemRequests : public AZ::EBusTraits - { - public: - - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - - virtual bool IsEditor() = 0; - }; - - using SystemRequestBus = AZ::EBus; -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Include/ScriptCanvasDiagnosticLibrary/ScriptCanvasDiagnosticLibraryGem.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Include/ScriptCanvasDiagnosticLibrary/ScriptCanvasDiagnosticLibraryGem.h deleted file mode 100644 index f86446228e..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Include/ScriptCanvasDiagnosticLibrary/ScriptCanvasDiagnosticLibraryGem.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include -#include - -namespace ScriptCanvasDiagnostics -{ - class Module - : public AZ::Module - { - public: - AZ_RTTI(Module, "{4855DE9C-9804-4CE5-BA32-B0123356F48E}", AZ::Module); - - Module(); - - AZ::ComponentTypeList GetRequiredSystemComponents() const override; - }; -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/Debug.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/Debug.h deleted file mode 100644 index 75ba9ebcca..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/Debug.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Libraries - { - struct Debug : public Library::LibraryDefinition - { - AZ_RTTI(Debug, "{3E28E41D-F4C9-4542-A08F-2B1F5DAA9509}", Library::LibraryDefinition); - - static void Reflect(AZ::ReflectContext*); - static void InitNodeRegistry(NodeRegistry& nodeRegistry); - static AZStd::vector GetComponentDescriptors(); - }; - } -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DebugLibraryDefinition.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DebugLibraryDefinition.cpp deleted file mode 100644 index 26eac9cbf8..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DebugLibraryDefinition.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#include "precompiled.h" -#include "DebugLibraryDefinition.h" -#include "DrawText.h" -#include "DrawTextNodeable.h" -#include - -namespace ScriptCanvas -{ - namespace Libraries - { - void Debug::Reflect(AZ::ReflectContext* reflection) - { - AZ::SerializeContext* serializeContext = azrtti_cast(reflection); - if (serializeContext) - { - serializeContext->Class() - ->Version(1) - ; - - AZ::EditContext* editContext = serializeContext->GetEditContext(); - if (editContext) - { - editContext->Class("Debug", "")-> - ClassElement(AZ::Edit::ClassElements::EditorData, "")-> - Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/ScriptCanvas/Debug.png") - ; - } - } - } - - void Debug::InitNodeRegistry(NodeRegistry& nodeRegistry) - { - Library::AddNodeToRegistry(nodeRegistry); - //Library::AddNodeToRegistry(nodeRegistry); - } - - AZStd::vector Debug::GetComponentDescriptors() - { - return AZStd::vector({ - Nodes::Debug::DrawTextNode::CreateDescriptor(), - // Nodes::DrawTextNodeableNode::CreateDescriptor(), - }); - } - } -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DebugLibraryDefinition.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DebugLibraryDefinition.h deleted file mode 100644 index 75ba9ebcca..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DebugLibraryDefinition.h +++ /dev/null @@ -1,30 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include - -namespace ScriptCanvas -{ - namespace Libraries - { - struct Debug : public Library::LibraryDefinition - { - AZ_RTTI(Debug, "{3E28E41D-F4C9-4542-A08F-2B1F5DAA9509}", Library::LibraryDefinition); - - static void Reflect(AZ::ReflectContext*); - static void InitNodeRegistry(NodeRegistry& nodeRegistry); - static AZStd::vector GetComponentDescriptors(); - }; - } -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.ScriptCanvasGrammar.xml b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.ScriptCanvasGrammar.xml deleted file mode 100644 index dd21d22ca7..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.ScriptCanvasGrammar.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.cpp deleted file mode 100644 index 6e04ad5850..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#include "precompiled.h" -#include "DrawText.h" - -#include -#include - -#include -#include -#include - -#include - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Debug - { - void DrawTextNode::OnInputSignal(const SlotId& slotId) - { - if (slotId == GetSlotId("Show")) - { - ScriptCanvasDiagnostics::DebugDrawBus::Handler::BusConnect(this); - - m_duration = DrawTextNodeProperty::GetDuration(this); - if (m_duration > 0.f && !AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusConnect(); - } - } - else if (slotId == GetSlotId("Hide")) - { - AZ::TickBus::Handler::BusDisconnect(); - ScriptCanvasDiagnostics::DebugDrawBus::Handler::BusDisconnect(); - } - - SignalOutput(GetSlotId("Out")); - - } - - void DrawTextNode::OnInputChanged(const Datum&, const SlotId& slotId) - { - ScriptCanvas::SlotId textSlotId = DrawTextNodeProperty::GetTextSlotId(this); - if (slotId == textSlotId) - { - m_text = DrawTextNodeProperty::GetText(this); - } - } - - void DrawTextNode::OnTick(float deltaTime, AZ::ScriptTimePoint) - { - m_duration -= deltaTime; - if (m_duration <= 0.f) - { - ScriptCanvasDiagnostics::DebugDrawBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - } - - void DrawTextNode::OnDebugDraw(IRenderer* renderer) - { - if (!renderer) - { - return; - } - - if (m_text.empty()) - { - m_text = DrawTextNodeProperty::GetText(this); - } - - if (m_text.empty()) - { - return; - } - - bool editorOnly = DrawTextNodeProperty::GetEditorOnly(this); - - bool isEditor = false; - ScriptCanvasDiagnostics::SystemRequestBus::BroadcastResult(isEditor, &ScriptCanvasDiagnostics::SystemRequests::IsEditor); - - if (editorOnly && !isEditor) - { - return; - } - - AZ::Vector2 position = DrawTextNodeProperty::GetPosition(this); - - // Get correct coordinates - float x = position.GetX(); - float y = position.GetY(); - - if (x < 1.f || y < 1.f) - { - int screenX, screenY, screenWidth, screenHeight; - renderer->GetViewport(&screenX, &screenY, &screenWidth, &screenHeight); - if (x < 1.f) - { - x *= (float)screenWidth; - } - if (y < 1.f) - { - y *= (float)screenHeight; - } - } - - SDrawTextInfo ti; - ti.xscale = ti.yscale = DrawTextNodeProperty::GetScale(this); - ti.flags = eDrawText_2D | eDrawText_FixedSize; - - const AZ::Color& color = DrawTextNodeProperty::GetColor(this); - ti.color[0] = color.GetR(); - ti.color[1] = color.GetG(); - ti.color[2] = color.GetB(); - ti.color[3] = color.GetA(); - - ti.flags |= DrawTextNodeProperty::GetCentered(this) ? eDrawText_Center | eDrawText_CenterV : 0; - - renderer->DrawTextQueued(Vec3(x, y, 0.5f), ti, m_text.c_str()); - } - } - } -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.h deleted file mode 100644 index 43684bef5b..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawText.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include - -#include - -#include - -#include -#include - -#include - -struct IRenderer; - -namespace AZ -{ - class Color; - class Vector2; -} - -namespace ScriptCanvas -{ - namespace Nodes - { - namespace Debug - { - //! Uses the DebugDrawBus to display on-screen debug text - class DrawTextNode - : public Node - , ScriptCanvasDiagnostics::DebugDrawBus::Handler - , AZ::TickBus::Handler - { - - public: - - SCRIPTCANVAS_NODE(DrawTextNode); - - // DebugDrawBus... - void OnDebugDraw(IRenderer*) override; - // - - protected: - - void OnInputSignal(const SlotId& slotId) override; - void OnInputChanged(const Datum& input, const SlotId& slotID) override; - - void OnTick(float deltaTime, AZ::ScriptTimePoint) override; - - private: - - AZStd::string m_text; - float m_duration; - - }; - } - } -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawTextNodeable.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawTextNodeable.cpp deleted file mode 100644 index 17a5f3ea79..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawTextNodeable.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#include "precompiled.h" -#include "DrawTextNodeable.h" - -#if 0 - -#include -#include -#include - -#include -#include -#include - -#include - -namespace ScriptCanvas -{ - namespace Nodeables - { - namespace Debug - { - DrawTextNodeable::DrawTextNodeable() - { - ScriptCanvasDiagnostics::SystemRequestBus::BroadcastResult(m_isEditor, &ScriptCanvasDiagnostics::SystemRequests::IsEditor); - } - - DrawTextNodeable::~DrawTextNodeable() - { - Hide(); - } - - void DrawTextNodeable::OnDeactivate() - { - Hide(); - } - - void DrawTextNodeable::Show(AZStd::string text, AZ::Vector2 position, AZ::Color color, float duration, float scale, Data::BooleanType centered, Data::BooleanType editorOnly) - { - if (text.empty()) - { - return; - } - - if (editorOnly && !m_isEditor) - { - return; - } - - ScriptCanvasDiagnostics::DebugDrawBus::Handler::BusConnect(this); - - m_text = text; - m_position = position; - m_color = color; - m_duration = duration; - m_scale = scale; - m_centered = centered; - m_editorOnly = editorOnly; - - if (m_duration > 0.f && !AZ::TickBus::Handler::BusIsConnected()) - { - AZ::TickBus::Handler::BusConnect(); - } - } - - void DrawTextNodeable::Hide() - { - AZ::TickBus::Handler::BusDisconnect(); - ScriptCanvasDiagnostics::DebugDrawBus::Handler::BusDisconnect(); - } - - void DrawTextNodeable::OnTick(float deltaTime, AZ::ScriptTimePoint) - { - m_duration -= deltaTime; - if (m_duration <= 0.f) - { - ScriptCanvasDiagnostics::DebugDrawBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } - } - - void DrawTextNodeable::OnDebugDraw(IRenderer* renderer) - { - if (!renderer) - { - return; - } - - // Get correct coordinates - float x = m_position.GetX(); - float y = m_position.GetY(); - - if (x < 1.f || y < 1.f) - { - int screenX, screenY, screenWidth, screenHeight; - renderer->GetViewport(&screenX, &screenY, &screenWidth, &screenHeight); - if (x < 1.f) - { - x *= (float)screenWidth; - } - if (y < 1.f) - { - y *= (float)screenHeight; - } - } - - SDrawTextInfo ti; - ti.xscale = ti.yscale = m_scale; - ti.flags = eDrawText_2D | eDrawText_FixedSize; - - ti.color[0] = m_color.GetR(); - ti.color[1] = m_color.GetG(); - ti.color[2] = m_color.GetB(); - ti.color[3] = m_color.GetA(); - - ti.flags |= m_centered ? eDrawText_Center | eDrawText_CenterV : 0; - - renderer->DrawTextQueued(Vec3(x, y, 0.5f), ti, m_text.c_str()); - } - } - } -} - -#include - - -#endif diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawTextNodeable.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawTextNodeable.h deleted file mode 100644 index 48d9e8f74b..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/DrawTextNodeable.h +++ /dev/null @@ -1,91 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include - -#include -#include -#include - -#include -#if 0 -#include - -struct IRenderer; - -namespace AZ -{ - class Color; - class Vector2; -} - -namespace ScriptCanvas -{ - namespace Nodeables - { - namespace Debug - { - class DrawTextNodeable - : public ScriptCanvas::Nodeable - , public ScriptCanvasDiagnostics::DebugDrawBus::Handler - , public AZ::TickBus::Handler - { - NodeDefinition(DrawTextNodeable, "Draw Text", "Displays text on the viewport.", - NodeTags::Icon("Editor/Icons/ScriptCanvas/DrawTextNode.png"), - NodeTags::Category("Utilities/Debug"), - NodeTags::Version(0) - ); - - public: - DrawTextNodeable(); - virtual ~DrawTextNodeable(); - - // TickBus - void OnTick(float deltaTime, AZ::ScriptTimePoint) override; - - // DebugDrawBus - void OnDebugDraw(IRenderer*) override; - - InputMethod("Show", "Shows the debug text on the viewport") - void Show(AZStd::string text, AZ::Vector2 position, AZ::Color color, float duration, float scale, Data::BooleanType centered, Data::BooleanType editorOnly); - DataInput(AZStd::string, "Text", "", "The text to display on screen.", SlotTags::DisplayGroup("Show")); - DataInput(AZ::Vector2, "Position", AZ::Vector2(20.f, 20.f), "Position of the text on-screen in normalized coordinates [0-1].", SlotTags::DisplayGroup("Show")); - DataInput(AZ::Color, "Color", AZ::Color(1.f, 1.f, 1.f, 1.f), "Color of the text.", SlotTags::DisplayGroup("Show")); - DataInput(float, "Duration", 0.f, "If greater than zero, the text will disappear after this duration (in seconds).", SlotTags::DisplayGroup("Show")); - DataInput(float, "Scale", 1.f, "Scales the font size of the text.", SlotTags::DisplayGroup("Show")); - DataInput(Data::BooleanType, "Centered", false, "Centers the text around the specfied coordinates.", SlotTags::DisplayGroup("Show")); - DataInput(Data::BooleanType, "Editor Only", false, "Only displays this text if the game is being run in-editor, not on launchers.", SlotTags::DisplayGroup("Show")); - - InputMethod("Hide", "Removed the debug text from the viewport") - void Hide(); - - protected: - void OnDeactivate() override; - - private: - AZStd::string m_text; - AZ::Vector2 m_position; - AZ::Color m_color; - float m_duration; - float m_scale; - bool m_centered; - bool m_editorOnly; - - bool m_isEditor = false; - - }; - } - } -} -#endif diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticLibraryGem.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticLibraryGem.cpp deleted file mode 100644 index 6c13e99077..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticLibraryGem.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#include "precompiled.h" - -#include -#include - -#include -#include - -#include "DebugLibraryDefinition.h" - -namespace ScriptCanvasDiagnostics -{ - Module::Module() - : AZ::Module() - { - m_descriptors.insert(m_descriptors.end(), { - ScriptCanvasDiagnostics::SystemComponent::CreateDescriptor(), - }); - - AZStd::vector componentDescriptors(ScriptCanvas::Libraries::Debug::GetComponentDescriptors()); - m_descriptors.insert(m_descriptors.end(), componentDescriptors.begin(), componentDescriptors.end()); - } - - AZ::ComponentTypeList Module::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList({ ScriptCanvasDiagnostics::SystemComponent::RTTI_Type() }); - } -} - -// DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM -// The first parameter should be GemName_GemIdLower -// The second should be the fully qualified name of the class above -AZ_DECLARE_MODULE_CLASS(Gem_ScriptCanvasDiagnosticLibrary, ScriptCanvasDiagnostics::Module) - diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticSystemComponent.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticSystemComponent.cpp deleted file mode 100644 index c1323e1450..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticSystemComponent.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#include "precompiled.h" - -#include "ScriptCanvasDiagnosticSystemComponent.h" - -#include -#include -#include "DebugLibraryDefinition.h" - -namespace ScriptCanvasDiagnostics -{ - void SystemComponent::Init() - { - AZ::EnvironmentVariable nodeRegistryVariable = AZ::Environment::FindVariable(ScriptCanvas::s_nodeRegistryName); - if (nodeRegistryVariable) - { - ScriptCanvas::NodeRegistry& nodeRegistry = nodeRegistryVariable.Get(); - ScriptCanvas::Libraries::Debug::InitNodeRegistry(nodeRegistry); - } - } - - SystemComponent::~SystemComponent() - { - } - - void SystemComponent::Activate() - { - SystemRequestBus::Handler::BusConnect(); - CrySystemEventBus::Handler::BusConnect(); - } - - void SystemComponent::Deactivate() - { - CrySystemEventBus::Handler::BusDisconnect(); - SystemRequestBus::Handler::BusDisconnect(); - } - - void SystemComponent::OnDebugDraw() - { - DebugDrawBus::Broadcast(&DebugDrawRequests::OnDebugDraw, m_system->GetIRenderer()); - } - - void SystemComponent::OnCrySystemShutdown([[maybe_unused]] ISystem& system) - { - m_system->GetIRenderer()->RemoveRenderDebugListener(this); - } - - void SystemComponent::OnCrySystemInitialized(ISystem& system, [[maybe_unused]] const SSystemInitParams& systemInitParams) - { - m_system = &system; - AZ_Assert(m_system->GetIRenderer(), "ScriptCanvasDiagnostics requires IRenderer"); - - m_system->GetIRenderer()->AddRenderDebugListener(this); - } - - bool SystemComponent::IsEditor() - { - return m_system && m_system->GetGlobalEnvironment() && m_system->GetGlobalEnvironment()->IsEditor(); - } - - void SystemComponent::Reflect(AZ::ReflectContext* context) - { - ScriptCanvas::Libraries::Debug::Reflect(context); - if (auto serialize = azrtti_cast(context)) - { - serialize->Class() - ->Version(0) - ; - - if (AZ::EditContext* ec = serialize->GetEditContext()) - { - ec->Class("Script Canvas Diagnostic", "Script Canvas Diagnostic System Component") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->Attribute(AZ::Edit::Attributes::Category, "Scripting") - ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System", 0xc94d118b)) - ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ; - } - } - } -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticSystemComponent.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticSystemComponent.h deleted file mode 100644 index 86b1f91978..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/ScriptCanvasDiagnosticSystemComponent.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include - -#include -#include - -#include - - -struct ISystem; - -namespace ScriptCanvasDiagnostics -{ - class SystemComponent - : public AZ::Component - , public IRenderDebugListener - , private CrySystemEventBus::Handler - , private SystemRequestBus::Handler - { - public: - AZ_COMPONENT(SystemComponent, "{6A90B0E7-EB47-48B5-910D-4881E429AC9D}"); - - static void Reflect(AZ::ReflectContext* context); - - SystemComponent() = default; - ~SystemComponent() override; - void Init() override; - - void Activate() override; - void Deactivate() override; - - // IRenderDebugListener - void OnDebugDraw() override; - - // SystemRequestBus - bool IsEditor() override; - - private: - - ISystem * m_system; - - // CrySystemEventBus - void OnCrySystemInitialized(ISystem& system, const SSystemInitParams& systemInitParams) override; - void OnCrySystemShutdown(ISystem& system) override; - - }; -} diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/precompiled.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/precompiled.cpp deleted file mode 100644 index 07c726331b..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/precompiled.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#include "precompiled.h" \ No newline at end of file diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/precompiled.h b/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/precompiled.h deleted file mode 100644 index 084566c0ca..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Source/precompiled.h +++ /dev/null @@ -1,28 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ - -#pragma once - -#include -#include -#include -#include -#include -#include - -#if !defined(SCRIPTCANVASDIAGNOSTICSLIBRARY_EDITOR) - -#include - -#else - -#endif \ No newline at end of file diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/Tests/ScriptCanvasDiagnosticLibraryTest.cpp b/Gems/ScriptCanvasDiagnosticLibrary/Code/Tests/ScriptCanvasDiagnosticLibraryTest.cpp deleted file mode 100644 index da45b187f8..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/Tests/ScriptCanvasDiagnosticLibraryTest.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* -* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -* its licensors. -* -* For complete copyright and license terms please see the LICENSE at the root of this -* distribution (the "License"). All use of this software is governed by the License, -* or, if provided, by the license below or the license accompanying this file. Do not -* remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* -*/ -#include "precompiled.h" - -#include - -class ScriptCanvasDiagnosticLibraryTest - : public ::testing::Test -{ -protected: - static void SetUpTestCase() - { - } - - static void TearDownTestCase() - { - } - - void SetUp() override - { - } - - void TearDown() override - { - } - -}; - -TEST_F(ScriptCanvasDiagnosticLibraryTest, Sanity_Pass) -{ - EXPECT_TRUE(true); -} - - -AZ_UNIT_TEST_HOOK(); \ No newline at end of file diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_autogen_files.cmake b/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_autogen_files.cmake deleted file mode 100644 index 90cda4aa60..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_autogen_files.cmake +++ /dev/null @@ -1,19 +0,0 @@ -# -# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -# its licensors. -# -# For complete copyright and license terms please see the LICENSE at the root of this -# distribution (the "License"). All use of this software is governed by the License, -# or, if provided, by the license below or the license accompanying this file. Do not -# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# - -set(FILES - ${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Header.jinja - ${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasGrammar_Source.jinja - ${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Header.jinja - ${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvasNodeable_Source.jinja - ${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvas_Macros.jinja - ${LY_ROOT_FOLDER}/Gems/ScriptCanvas/Code/Include/ScriptCanvas/AutoGen/ScriptCanvas_Nodeable_Macros.jinja -) diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_common_files.cmake b/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_common_files.cmake deleted file mode 100644 index af3d823a02..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_common_files.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# -# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -# its licensors. -# -# For complete copyright and license terms please see the LICENSE at the root of this -# distribution (the "License"). All use of this software is governed by the License, -# or, if provided, by the license below or the license accompanying this file. Do not -# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# - -set(FILES - Source/precompiled.cpp - Source/precompiled.h - Include/ScriptCanvasDiagnosticLibrary/ScriptCanvasDiagnosticLibraryGem.h - Include/ScriptCanvasDiagnosticLibrary/DebugDrawBus.h - Source/ScriptCanvasDiagnosticSystemComponent.h - Source/ScriptCanvasDiagnosticSystemComponent.cpp - Source/DebugLibraryDefinition.h - Source/DebugLibraryDefinition.cpp - Source/DrawText.h - Source/DrawText.cpp - Source/DrawText.ScriptCanvasGrammar.xml -) diff --git a/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_shared_files.cmake b/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_shared_files.cmake deleted file mode 100644 index 9f251cd671..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/Code/scriptcanvasdiagnosticlibrary_shared_files.cmake +++ /dev/null @@ -1,14 +0,0 @@ -# -# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or -# its licensors. -# -# For complete copyright and license terms please see the LICENSE at the root of this -# distribution (the "License"). All use of this software is governed by the License, -# or, if provided, by the license below or the license accompanying this file. Do not -# remove or modify any license notices. This file is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# - -set(FILES - Source/ScriptCanvasDiagnosticLibraryGem.cpp -) diff --git a/Gems/ScriptCanvasDiagnosticLibrary/gem.json b/Gems/ScriptCanvasDiagnosticLibrary/gem.json deleted file mode 100644 index bbcef8940f..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/gem.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "gem_name": "ScriptCanvasDiagnosticLibrary", - "GemFormatVersion": 3, - "Uuid": "d969b997bb7f4342ba0b3eedc378025d", - "Name": "ScriptCanvasDiagnosticLibrary", - "DisplayName": "Script Canvas Diagnostic Library", - "Version": "0.1.0", - "LinkType": "Dynamic", - "Summary": "The Script Canvas Diagnostic Library comes with a library of diagnostic nodes for use in Script Canvas such as logging, debug text, etc.", - "Tags": ["Scripting", "Game"], - "IconPath": "preview.png", - "Dependencies" : [ - { - "Uuid": "869a0d0ec11a45c299917d45c81555e6", - "VersionConstraints": [ ">=0.1.0" ], - "_comment": "ScriptCanvasGem" - }, - { - "Uuid" : "ff06785f7145416b9d46fde39098cb0c", - "VersionConstraints" : [">=0.1.0"], - "_comment" : "LmbrCentral" - } - ] -} - diff --git a/Gems/ScriptCanvasDiagnosticLibrary/preview.png b/Gems/ScriptCanvasDiagnosticLibrary/preview.png deleted file mode 100644 index 0e448c0d14..0000000000 --- a/Gems/ScriptCanvasDiagnosticLibrary/preview.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fdc5300d82075d21dd7085290e0ccd0926141f50598ec93a40171c84c10ae1f6 -size 2180