1//************************************ bs::framework - Copyright 2018 Marko Pintera **************************************//
2//*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********//
3#include "Private/RTTI/BsMaterialRTTI.h"
4#include "Material/BsMaterialParams.h"
5
6namespace bs
7{
8 void MaterialRTTI::onDeserializationEnded(IReflectable* obj, SerializationContext* context)
9 {
10 Material* material = static_cast<Material*>(obj);
11 material->initialize();
12
13 if(!mMatParams)
14 return;
15
16 material->initializeTechniques();
17
18 if (material->getNumTechniques() > 0)
19 material->setParams(mMatParams);
20 }
21
22 SPtr<IReflectable> MaterialRTTI::newRTTIObject()
23 {
24 return Material::createEmpty();
25 }
26}