Implemented the DefaultProject Template default constructor and destructor

The System Component now implements a constructor/destructor which is used to initialize/de-initialize the `${SanitizedCppName}Interface` instance
main
lumberyard-employee-dm 5 years ago committed by GitHub
parent 054dd39e5b
commit 0aba7911a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,6 +58,22 @@ namespace ${SanitizedCppName}
{
AZ_UNUSED(dependent);
}
${SanitizedCppName}SystemComponent::${SanitizedCppName}SystemComponent()
{
if (${SanitizedCppName}Interface::Get() == nullptr)
{
${SanitizedCppName}Interface::Register(this);
}
}
${SanitizedCppName}SystemComponent::~${SanitizedCppName}SystemComponent()
{
if (${SanitizedCppName}Interface::Get() == this)
{
${SanitizedCppName}Interface::Unregister(this);
}
}
void ${SanitizedCppName}SystemComponent::Init()
{

Loading…
Cancel
Save