diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphics/LightProbeGroup.cpp |
Diffstat (limited to 'Runtime/Graphics/LightProbeGroup.cpp')
-rw-r--r-- | Runtime/Graphics/LightProbeGroup.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
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<class T> 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 |