diff --git a/cocos/renderer/CCMaterial.cpp b/cocos/renderer/CCMaterial.cpp index 06a618b957..dfd60b66e4 100644 --- a/cocos/renderer/CCMaterial.cpp +++ b/cocos/renderer/CCMaterial.cpp @@ -442,6 +442,10 @@ Material* Material::clone() const for (const auto& technique: _techniques) { auto t = technique->clone(); + t->_parent = material; + for (ssize_t i = 0; i < t->getPassCount(); i++) { + t->getPassByIndex(i)->_parent = t; + } material->_techniques.pushBack(t); }