SOLVED! Thanks to everyone for help! mknmknmknjk, I looked into that function, but It didn't work out, I have learned something new though.
As savi said there is something called "flags" in entity decription. So.. I actualy managed to hide it from the editor AND create new classes for the editor to make it look tidy and so on! That's what you do :
GamePlugin.h - find that line.
Code: Select all
template<class T>
static void RegisterEntityWithDefaultComponent(const char *name)
{
IEntityClassRegistry::SEntityClassDesc clsDesc;
clsDesc.sName = name;
static CObjectCreator<T> _creator;
gEnv->pGameFramework->GetIGameObjectSystem()->RegisterExtension(name, &_creator, &clsDesc);
}
Now there is a couple of thing you can do. You can hide all of your entities which are using that method :
Code: Select all
template<class T>
static void RegisterEntityWithDefaultComponent(const char *name)
{
IEntityClassRegistry::SEntityClassDesc clsDesc;
clsDesc.sName = name;
clsDesc.flags= ECLF_INVISIBLE;
static CObjectCreator<T> _creator;
gEnv->pGameFramework->GetIGameObjectSystem()->RegisterExtension(name, &_creator, &clsDesc);
}
And all entities using that method to register will be hidden. I did it a little bit different though.
In my game I have a few different types of entities and I wanted to manage them nicely inside of the editor, some put in different category or maybe hide some of them. In order to do that you need to create new method inside of CObjectCreator struct.
Code: Select all
template<class T>
static void RegisterMyTypeOfEntity(const char *name)
{
IEntityClassRegistry::SEntityClassDesc clsDesc;
clsDesc.sName = name;
clsDesc.editorClassInfo.sCategory = "MyEntityCategory"; //<-- this name will be seen inside of editor as different folder//
clsDesc.flags = ECLF_INVISIBLE; //Obviously you can completely hide from the editor this type of entities//
static CObjectCreator<T> _creator;
gEnv->pGameFramework->GetIGameObjectSystem()->RegisterExtension(name, &_creator, &clsDesc);
}
You can create as many categories as you need. I am very happy I found that! And thanks everyone for the hints!
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20