From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Graphics/LightProbeGroup.cpp | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Runtime/Graphics/LightProbeGroup.cpp (limited to 'Runtime/Graphics/LightProbeGroup.cpp') diff --git a/Runtime/Graphics/LightProbeGroup.cpp b/Runtime/Graphics/LightProbeGroup.cpp new file mode 100644 index 0000000..1b19bcb --- /dev/null +++ b/Runtime/Graphics/LightProbeGroup.cpp @@ -0,0 +1,50 @@ +#include "UnityPrefix.h" +#include "LightProbeGroup.h" +#include "Configuration/UnityConfigure.h" +#include "Runtime/Serialize/TransferFunctions/SerializeTransfer.h" + +using namespace std; + +#if UNITY_EDITOR +static LightProbeGroupList gAllLightProbeGroups; +#endif + +LightProbeGroup::LightProbeGroup (MemLabelId label, ObjectCreationMode mode) +: Super(label, mode) +#if UNITY_EDITOR + , m_LightProbeGroupNode (this) +#endif +{ +} + +LightProbeGroup::~LightProbeGroup () +{ +} + +IMPLEMENT_CLASS (LightProbeGroup) +IMPLEMENT_OBJECT_SERIALIZE (LightProbeGroup) + +template inline +void LightProbeGroup::Transfer (T& transfer) +{ + Super::Transfer (transfer); + + TRANSFER_EDITOR_ONLY (m_SourcePositions); +} + +#if UNITY_EDITOR +void LightProbeGroup::AddToManager () +{ + gAllLightProbeGroups.push_back (m_LightProbeGroupNode); +} + +void LightProbeGroup::RemoveFromManager () +{ + m_LightProbeGroupNode.RemoveFromList (); +} + +LightProbeGroupList& GetLightProbeGroups () +{ + return gAllLightProbeGroups; +} +#endif -- cgit v1.1-26-g67d0