Re: How to add icon for C++ entity?

#2
In GamePlugin.h you have a couple of methods to register entity. Usually you would use RegisterEntityWithDefaultComponent(const char *name). So if you don't want to implement your own register method, we'll use already existing.
Inside RegisterEntityWithDefaultComponent method find line:

Code: Select all

clsDesc.sName = name;
Now add this underneath :

Code: Select all

clsDesc.editorClassInfo.sIcon = "path to your icon"
And I know that this would give all registered entities the same icon, but u can use the name of entity to actually choose the right one.
i.e.

Code: Select all

clsDesc.editorClassinfo.sIcon = "Objects/Icons/" + name;
Cryengine tutorial videos on my Youtube channel! Check it out !
https://www.youtube.com/user/MusicForLifePL20

Who is online

Users browsing this forum: No registered users and 3 guests