Problem writing a SpawnPoint in a blank project

#1
Hello, I started just recently using CryEngine and I'm stuck writing the spawn point class and I can't find an answer to my problem.
(both the header and the source are took from one of the sample projects, the "Isometric Pathfinding")
If I write my header like this it compiles, but when I put it in game it will be ignored (the source file is the same of the original)

Code: Select all

class CSpawnPoint : public CGameObjectExtensionHelper<CSpawnPoint, ISimpleExtension>
{
#pragma once

#include "Entities/Helpers/ISimpleExtension.h"

public:
   virtual ~CSpawnPoint() {}

   void SpawnEntity(IEntity &otherEntity);
};


and if I write it like this (same of the sample projects)

Code: Select all

class CSpawnPoint : public ISimpleExtension
{
#pragma once

#include "Entities/Helpers/ISimpleExtension.h"

public:
   virtual ~CSpawnPoint() {}

   void SpawnEntity(IEntity &otherEntity);
};


I get two errors
1. Error C3861 'SetExtensionId': identifier not found
2. Error C2039 'SetExtensionId': is not a member of 'CSpawnPoint'

My question is, why in the samples the previous code compiles and if I write it in a blank project it gives me errors and I have to add

Code: Select all

CGameObjectExtensionHelper<CSpawnPoint, ISimpleExtension>

instead of simply this?

Code: Select all

ISimpleExtension


Thanks in advance, Michele.

Who is online

Users browsing this forum: No registered users and 2 guests