Sign in to follow this  
photo

ComponentBase Class wrong macros name

Recommended Posts

Dear support,

This doc (maybe others as well) has wrong macro name, making a search on real one unsuccessful:
https://developer.unigine.com/en/docs/2.11/api/library/common/logic/component_system/cpp/class.componentbase

COMPONENT_INIT(function_name, order);
COMPONENT_UPDATEASYNCTHREAD(function_name, order);
COMPONENT_UPDATESYNCTHREAD(function_name, order);
COMPONENT_UPDATE(function_name, order);
COMPONENT_POSTUPDATE(function_name, order);
COMPONENT_UPDATEPHYSICS(function_name, order);
COMPONENT_SWAP(function_name, order);
COMPONENT_SHUTDOWN(function_name, order);
COMPONENT_DESTROYRENDERRESOURCES(function_name, order);

Where in SDK 2.11 ComponentSystem.h:

#define COMPONENT_INIT(NAME, ...)						COMPONENT_METHOD(Init, NAME, ##__VA_ARGS__)
#define COMPONENT_UPDATE_ASYNC_THREAD(NAME, ...)		COMPONENT_METHOD(UpdateAsyncThread, NAME, ##__VA_ARGS__)
#define COMPONENT_UPDATE_SYNC_THREAD(NAME, ...)			COMPONENT_METHOD(UpdateSyncThread, NAME, ##__VA_ARGS__)
#define COMPONENT_UPDATE(NAME, ...)						COMPONENT_METHOD(Update, NAME, ##__VA_ARGS__)
#define COMPONENT_POST_UPDATE(NAME, ...)				COMPONENT_METHOD(PostUpdate, NAME, ##__VA_ARGS__)
#define COMPONENT_UPDATE_PHYSICS(NAME, ...)				COMPONENT_METHOD(UpdatePhysics, NAME, ##__VA_ARGS__)
#define COMPONENT_SWAP(NAME, ...)						COMPONENT_METHOD(Swap, NAME, ##__VA_ARGS__)
#define COMPONENT_SHUTDOWN(NAME, ...)					COMPONENT_METHOD(Shutdown, NAME, ##__VA_ARGS__)
#define COMPONENT_DESTROY_RENDER_RESOURCES(NAME, ...)	COMPONENT_METHOD(DestroyRenderResources, NAME, ##__VA_ARGS__)

Typically a search on "COMPONENT_POST_UPDATE" gives no result, whereas COMPONENT_POSTUPDATE does.
It's not really important, simply annoying for new dev trying to find out how to implement components..

Kind regards,
Charles

  • Like 1

Share this post


Link to post

Hi Charles,

Thank you very much for reporting. Our documentation team will fix this.

Regards,
Vsevolod

Share this post


Link to post
Sign in to follow this