4#include "ViewContext.h"
6#include "MemoryContext.h"
8#include "EntityStore.h"
9#include "ExtensionRegistry.h"
10#include "Renderer/Renderer.h"
12#include "RenderFunctions.h"
13#include "ResourceFunctions.h"
15#include "Renderer/CustomRenderer/ImguiRenderer.h"
16#include "Renderer/InspectorGui/InspectorGuiRenderer.h"
18#include "Resources/ResourceStore.h"
19#include "Resources/Texture.h"
21#include "Components/Core/SceneComponent.h"
22#include "Components/Core/TransformComponent.h"
23#include "Systems/Core/DynamicComponentSystem.h"
24#include "Systems/Core/TransformSystem.h"
26#include "Services/Variables.h"
27#include "Utilities/Parsing.h"
29#include "Input/InputManager.h"
30#include "Input/InputDeviceType.h"
32#include "Serialization/AssetReader.h"
33#include "Serialization/AssetWriter.h"
34#include "Serialization/ModelWriter.h"
36#include "Rendering/IGraphicsDevice.h"
38#include "Foundation/Platform/WindowData.h"
39#include "Foundation/Logging/Logger.h"
40#include "Foundation/Logging/RedirectedLogger.h"
49 void entityError(
const char* method,
const EntityId entityId)
51 LOG_ERROR(logger,
"%s: Invalid entity id %zd.", method,
size_t(entityId));
55EntityId getNoInternalIdValue()
60void initializeStatic()
71BridgeContext* createContext(
const char ** variables,
const int count) {
72 return new Context(variables, count);
75CogsBool initializeContext(BridgeContext* ctx, BridgeView* defaultView, CogsBool initializeEngine) {
78 context->setDefaultView(view);
80 if (!context->createDevice()){
83 if (initializeEngine) {
85 context->
engine->checkAndUpdateResources();
90CogsBool updateContext(BridgeContext * ctx)
92 auto context =
static_cast<Context *
>(ctx);
96 return context->
engine->needsUpdate();
99void destroyContext(BridgeContext * ctx)
101 auto context =
static_cast<Context *
>(ctx);
103 auto device = context->device;
109 device->beginFrame();
115BridgeView* createView(BridgeContext* ctx,
void* windowData) {
120void destroyView(BridgeView* bv) {
123 view->getContext()->deleteView(view);
126CogsBool initializeView(BridgeView* bv, EntityId cameraId) {
131void setViewCamera(BridgeView* bv, EntityId cameraId) {
136EntityId getViewCamera(BridgeView* bv) {
140 return cameraEntity ? cameraEntity->getId() : NoEntity;
143BridgeContext* getViewContext(BridgeView* bv) {
146 return view->getContext();
149BridgeView* getDefaultView(BridgeContext* ctx) {
151 return context->getDefaultView();
154void * getSharedSurface(BridgeContext * ctx)
156 return static_cast<Context*
>(ctx)->sharedSurface;
159void setupContext(BridgeContext * ctx)
161 auto context =
static_cast<Context *
>(ctx);
163 context->
scene->setup(
true);
166void clearContext(BridgeContext * ctx)
168 auto context =
static_cast<Context *
>(ctx);
172void prependSearchPath(BridgeContext * ctx,
const char * path)
174 addSearchPath(ctx, path);
175 auto context =
static_cast<Context*
>(ctx);
176 context->
engine->setDirty();
179CogsBool loadScene(BridgeContext * ctx,
const char * filename,
int flags)
181 auto context =
static_cast<Context*
>(ctx);
182 CogsBool rv = readAsset(context, filename,
static_cast<AssetLoadFlags>(flags));
183 context->
engine->setDirty();
187CogsBool loadAsset(BridgeContext * ctx,
const char * filename, EntityId rootId,
int flags)
190 if ((loadFlags & AssetLoadFlags::ClearScene) == AssetLoadFlags::ClearScene) {
191 LOG_ERROR(logger,
"loadAsset: Invalid flag ClearScene - load Ignored");
195 auto context =
static_cast<Context*
>(ctx);
196 CogsBool rv = readAsset(context, filename, loadFlags, rootId == NoEntity ?
nullptr : context->
store->
getEntityPtr(rootId));
197 context->
engine->setDirty();
201CogsBool loadAssetFromString(BridgeContext * ctx,
const char* contents, EntityId rootId,
int flags)
204 if ((loadFlags & AssetLoadFlags::ClearScene) == AssetLoadFlags::ClearScene) {
205 LOG_ERROR(logger,
"loadAssetFromString: Invalid flag ClearScene - load Ignored");
209 auto context =
static_cast<Context*
>(ctx);
211 CogsBool rv = readAssetFromString(context, contents, loadFlags, rootId == NoEntity ?
nullptr : context->
store->
getEntityPtr(rootId));
212 context->
engine->setDirty();
216CogsBool writeAsset(BridgeContext * ctx,
const char * filename, EntityId rootId,
int flags)
218 auto context =
static_cast<Context*
>(ctx);
222CogsBool writeModel(BridgeContext * ctx,
const char * filename, EntityId rootId)
224 auto context =
static_cast<Context*
>(ctx);
228CogsBool loadPermutations(BridgeContext * ctx,
const char * name)
230 auto context =
static_cast<Context*
>(ctx);
232 context->
engine->setDirty();
236EntityId createEntity(BridgeContext * ctx,
const char * type)
238 auto context =
static_cast<Context *
>(ctx);
241 context->
engine->setDirty();
242 return entity->getId();
245void destroyEntity(BridgeContext * ctx, EntityId
id)
247 auto context =
static_cast<Context *
>(ctx);
251 context->
engine->setDirty();
254uint32_t getEntityStoreRevision(BridgeContext * ctx)
256 auto context =
static_cast<Context *
>(ctx);
260const char * getEntityName(BridgeContext * ctx, EntityId entityId)
262 auto context =
static_cast<Context *
>(ctx);
265 entityError(
"getEntityName", entityId);
269 return entity->getName().c_str();
272void setEntityName(BridgeContext * ctx, EntityId entityId,
const char * name)
274 auto context =
static_cast<Context *
>(ctx);
277 entityError(
"setEntityName", entityId);
281 if (entity->getName() != name) {
283 context->
engine->setDirty();
287EntityId getEntityParent(BridgeContext * ctx, EntityId entityId)
289 auto context =
static_cast<Context*
>(ctx);
293 entityError(
"getEntityParent", entityId);
298 return parent ? parent->
getId() : NoEntity;
301void addChildEntity(BridgeContext * ctx, EntityId parentId, EntityId childId)
303 auto context =
static_cast<Context *
>(ctx);
306 if (parent && child) {
308 context->
engine->setDirty();
311 if (!parent) entityError(
"addChildEntity(parentId)", parentId);
312 if (!child) entityError(
"addChildEntity(childId)", childId);
316void removeChildEntity(BridgeContext * ctx, EntityId parentId, EntityId childId)
318 auto context =
static_cast<Context *
>(ctx);
321 if (parent && child) {
323 context->
engine->setDirty();
326 if (!parent) entityError(
"removeChildEntity(parentId)", parentId);
327 if (!child) entityError(
"removeChildEntity(childId)", childId);
331void setEntityParent(BridgeContext* ctx, EntityId parentId, EntityId childId)
333 auto context =
static_cast<Context*
>(ctx);
335 if (child ==
nullptr) {
336 entityError(
"setEntityParent(childId)", childId);
340 if (newParent ==
nullptr && parentId != NoEntity) {
341 entityError(
"setEntityParent(parentId)", childId);
349void addComponent(BridgeContext * ctx, EntityId entityId, ComponentId componentId)
351 auto context =
static_cast<Context*
>(ctx);
354 entityError(
"addComponent", entityId);
359 context->
engine->setDirty();
362void removeComponent(BridgeContext * ctx, EntityId entityId, ComponentId componentId)
364 auto context =
static_cast<Context*
>(ctx);
367 entityError(
"removeComponent", entityId);
371 context->
store->removeComponent(entity, entity->getComponentHandle(componentId));
372 context->
engine->setDirty();
375int getChildren(BridgeContext * ctx, EntityId entityId, EntityId * ids,
int idCount)
377 auto context =
static_cast<Context*
>(ctx);
380 entityError(
"getChildren", entityId);
386 if (!sceneComponent) {
390 if (sceneComponent->children.size() >
static_cast<size_t>(idCount)) {
393 return -
static_cast<int>(sceneComponent->children.size());
397 for (
auto & c : sceneComponent->children) {
398 ids[index++] = c->getId();
401 return static_cast<int>(sceneComponent->children.size());
404int getEntitiesWithComponent(BridgeContext * ctx, ComponentId componentId, EntityId * ids,
int idCount)
406 auto context =
static_cast<Context*
>(ctx);
407 std::vector<EntityId> entities;
408 context->
store->getEntitiesWithComponent(entities, componentId);
409 if (
static_cast<size_t>(idCount) < entities.size()) {
410 return -
static_cast<int>(entities.size());
412 std::memcpy(ids, entities.data(),
sizeof(EntityId)*entities.size());
413 return static_cast<int>(entities.size());
417int getComponents(BridgeContext * ctx, EntityId entityId, ComponentId * ids)
419 auto context =
static_cast<Context*
>(ctx);
422 entityError(
"getComponents", entityId);
426 auto & components = entity->getComponents();
430 for (
auto& c : components) {
431 ids[index++] = c.resolve()->getTypeId();
435 return static_cast<int>(components.size());
438EntityId getEntityId(BridgeContext * ctx,
const char * name)
440 auto context =
static_cast<Context *
>(ctx);
444 return entity ? entity->getId() : NoEntity;
447EntityId getEntityFull(BridgeContext * ctx, EntityId rootId,
const char* name,
const int exactName )
449 auto context =
static_cast<Context*
>(ctx);
455 return entity? entity->getId() : NoEntity;
458const char * getEntityTemplate(BridgeContext * ctx, EntityId entityId)
460 auto context =
static_cast<Context*
>(ctx);
463 if (!entity)
return nullptr;
465 size_t templateId =
static_cast<const EntityData *
>(entity->getUserData())->templateId;
468 if (!definition)
return nullptr;
470 return definition->
name.c_str();
473int getNumComponents(BridgeContext* ctx, EntityId entityId)
475 auto context =
static_cast<Context*
>(ctx);
485int getComponentType(BridgeContext* ctx, EntityId entityId,
int componentNo)
487 auto context =
static_cast<Context*
>(ctx);
491 const size_t index =
static_cast<size_t>(componentNo);
492 if (index < components.size()) {
493 auto compPtr = components[index].resolve();
495 return compPtr->getTypeId();
500 return NoComponentId;
503void setLoggerLevel(
const char* level)
510void setLoggerCallback(LoggerCallback * callback)
513 if (!redirectedLogger) {
515 redirectedLogger->setLoggerCallback(callback);
518 else if (redirectedLogger){
519 redirectedLogger->setLoggerCallback(
nullptr);
521 if (!redirectedLogger->getFileLineLoggerCallback()) {
522 delete redirectedLogger;
523 redirectedLogger =
nullptr;
528void setFileLineLoggerCallback(FileLineLoggerCallback * callback)
531 if (!redirectedLogger) {
533 redirectedLogger->setFileLineLoggerCallback(callback);
536 else if (redirectedLogger){
537 redirectedLogger->setFileLineLoggerCallback(
nullptr);
539 if (!redirectedLogger->getLoggerCallback()) {
540 delete redirectedLogger;
541 redirectedLogger =
nullptr;
546void setUpdateCallback(BridgeContext * ctx, ::NeedsUpdateCallback* callback,
void* data)
548 auto context =
static_cast<Context*
>(ctx);
549 context->
engine->setNeedsUpdateCallback(callback, data);
552CogsBool needsUpdate(BridgeContext * ctx) {
554 return context->
engine->needsUpdate();
557void setVariable(BridgeContext * ctx,
const char * name,
const char * value)
559 auto context =
static_cast<Context *
>(ctx);
561 context->
engine->setDirty();
564void setBoolVariable(BridgeContext * ctx,
const char * name, CogsBool value)
566 auto context =
static_cast<Context *
>(ctx);
568 context->
engine->setDirty();
571void setIntVariable(BridgeContext * ctx,
const char * name,
int value)
573 auto context =
static_cast<Context *
>(ctx);
575 context->
engine->setDirty();
578void setFloatVariable(BridgeContext * ctx,
const char * name,
float value)
580 auto context =
static_cast<Context *
>(ctx);
582 context->
engine->setDirty();
585void setDoubleVariable(BridgeContext * ctx,
const char * name,
double value)
587 auto context =
static_cast<Context *
>(ctx);
589 context->
engine->setDirty();
592CogsBool hasVariable(BridgeContext* ctx,
const char* name)
594 auto context =
static_cast<Context*
>(ctx);
598char * getVariable(BridgeContext * ctx,
const char * name)
600 auto context =
static_cast<Context *
>(ctx);
601 return const_cast<char *
>(context->
variables->get(name,
nullptr));
604CogsBool getBoolVariable(BridgeContext * ctx,
const char * name)
606 auto context =
static_cast<Context *
>(ctx);
607 return context->
variables->get(name,
false);
610int getIntVariable(BridgeContext * ctx,
const char * name)
612 auto context =
static_cast<Context *
>(ctx);
616float getFloatVariable(BridgeContext * ctx,
const char * name)
618 auto context =
static_cast<Context *
>(ctx);
619 return context->
variables->get(name, 0.0f);
622double getDoubleVariable(BridgeContext * ctx,
const char * name)
624 auto context =
static_cast<Context *
>(ctx);
625 return context->
variables->get(name, 0.0);
628char * getVariableOrDefault(BridgeContext * ctx,
const char * name,
const char * defaultValue)
631 return const_cast<char *
>(context->
variables->get(name, defaultValue));
634CogsBool getBoolVariableOrDefault(BridgeContext * ctx,
const char * name, CogsBool defaultValue)
637 return context->
variables->get(name, defaultValue);
640int getIntVariableOrDefault(BridgeContext * ctx,
const char * name,
int defaultValue)
643 return context->
variables->get(name, defaultValue);
646float getFloatVariableOrDefault(BridgeContext * ctx,
const char * name,
float defaultValue)
649 return context->
variables->get(name, defaultValue);
652double getDoubleVariableOrDefault(BridgeContext * ctx,
const char * name,
double defaultValue)
655 return context->
variables->get(name, defaultValue);
658CogsBool eraseVariable(BridgeContext * ctx,
const char * name)
660 auto context =
static_cast<Context *
>(ctx);
661 context->
engine->setDirty();
666const void* loadExtensionModule(
const char * name)
671CogsBool checkExtension(
const char * name)
676void* getExtensionSymbol(
const char * extension,
const char* symbol)
682const char * getLicenseText(BridgeContext * ctx)
684 auto context =
static_cast<Context *
>(ctx);
686 static std::string text = context->
resourceStore->getResourceContentString(
"Licenses.md");
691void setPostSystemsUpdateCallback(BridgeContext* ctx, ::RenderCallback* callback)
693 static_cast<Context*
>(ctx)->callbacks.postSystemsUpdateCallback =
reinterpret_cast<Cogs::Core::RenderCallback*
>(callback);
696void setPreRenderCallback(BridgeContext* ctx, ::RenderCallback* callback)
698 static_cast<Context*
>(ctx)->callbacks.preRenderCallback =
reinterpret_cast<Cogs::Core::RenderCallback*
>(callback);
701void setPostRenderCallback(BridgeContext* ctx, ::RenderCallback* callback)
703 static_cast<Context*
>(ctx)->callbacks.postRenderCallback =
reinterpret_cast<Cogs::Core::RenderCallback*
>(callback);
706void setComponentNotifyCallback(BridgeContext* ctx, ::ComponentNotifyCallback* callback)
709 if (callback && context->callbacks.componentNotifyCallback) {
710 LOG_WARNING(logger,
"Replacing non-null componentNotifyCallback, set to null first to remove this message");
712 context->callbacks.componentNotifyCallback = callback;
716void registerDynamicType(BridgeContext * ctx,
const char * name,
size_t messageMask)
718 auto context =
static_cast<Context *
>(ctx);
719 context->dynamicComponentSystem->registerType(context, name, messageMask);
722void registerMessageCallback(BridgeContext * ctx, EntityId entityId, ComponentId componentId,
void * callback)
724 auto context =
static_cast<Context *
>(ctx);
727 entityError(
"registerMessageCallback", entityId);
735 dynamicComponent->messageCallback = callback;
738void registerUserData(BridgeContext * ctx, EntityId entityId, ComponentId componentId,
void * userData)
740 auto context =
static_cast<Context *
>(ctx);
743 entityError(
"registerUserData", entityId);
751 dynamicComponent->userData = userData;
754int getMessageId(BridgeContext * ctx,
const char * name)
756 auto context =
static_cast<Context *
>(ctx);
758 return static_cast<int>(context->dynamicComponentSystem->getMessageId(name));
761void addInputActionMapping(BridgeContext * ctx,
const char * name,
const char * device,
const char * action)
763 auto context =
static_cast<Context *
>(ctx);
765 context->getDefaultView()->
inputManager->addActionMapping(name, device, action);
769CogsBool getInputAction(BridgeContext * ctx,
const char * name)
771 auto context =
static_cast<Context *
>(ctx);
773 return context->getDefaultView()->
inputManager->getActionState(name) ? 1 : 0;
776void addInputAxisMapping(BridgeContext * ctx,
const char * name,
const char * device,
const char * axis,
float scale)
778 auto context =
static_cast<Context *
>(ctx);
780 context->getDefaultView()->
inputManager->addAxisMapping(name, device, axis, scale);
783float getInputAxis(BridgeContext * ctx,
const char * name)
785 auto context =
static_cast<Context *
>(ctx);
787 return context->getDefaultView()->
inputManager->getAxisValue(name);
790void gainedFocus(BridgeView* bv,
double timestamp_ms) {
795void lostFocus(BridgeView* bv,
double timestamp_ms) {
800void inputTriggerPointerPress(BridgeView* bv,
int pointerType, PointerId pointerId,
int button,
int x,
int y,
double timestamp_ms) {
801 Cogs::PointerType type =
static_cast<Cogs::PointerType
>(pointerType);
802 Cogs::MouseButton btn =
static_cast<Cogs::MouseButton
>(button);
804 viewContext->
inputManager->triggerPointerPress(type, pointerId, btn, {x, y}, timestamp_ms);
808void inputTriggerPointerRelease(BridgeView* bv,
int pointerType, PointerId pointerId,
int button,
int x,
int y,
double timestamp_ms) {
809 Cogs::PointerType type =
static_cast<Cogs::PointerType
>(pointerType);
810 Cogs::MouseButton btn =
static_cast<Cogs::MouseButton
>(button);
812 viewContext->
inputManager->triggerPointerRelease(type, pointerId, btn, {x, y}, timestamp_ms);
816void inputTriggerPointerMove(BridgeView* bv,
int pointerType, PointerId pointerId,
int x,
int y,
double timestamp_ms) {
817 Cogs::PointerType type =
static_cast<Cogs::PointerType
>(pointerType);
819 viewContext->
inputManager->triggerPointerMove(type, pointerId, {x, y}, timestamp_ms);
822void inputTriggerMouseWheel(BridgeView* bv,
int deltaValue,
double timestamp_ms) {
824 viewContext->
inputManager->triggerMouseWheel(deltaValue, timestamp_ms);
827void inputTriggerKeyDown(BridgeView* bv,
int key,
double timestamp_ms) {
829 viewContext->
inputManager->triggerKeyDown(
static_cast<Cogs::Key
>(key), timestamp_ms);
832void inputTriggerKeyUp(BridgeView* bv,
int key,
double timestamp_ms) {
834 viewContext->
inputManager->triggerKeyUp(
static_cast<Cogs::Key
>(key), timestamp_ms);
837void inputTriggerKeyChar(BridgeView* bv,
const char* ch,
double timestamp_ms) {
839 viewContext->
inputManager->triggerKeyChar(ch, timestamp_ms);
843CogsBool hasGuiInputFocus(BridgeView* ,
int inputDeviceTypes)
846 if (deviceTypes == None) {
847 LOG_WARNING_ONCE(logger,
"hasGuiInputFocus - no devices to check");
859void setClipboardCallbacks(GetClipboardTextFn getter, SetClipboardTextFn setter) {
860 ImguiRenderer::setClipboardCallbacks(getter, setter);
Container for components, providing composition of dynamic entities.
T * getComponent() const
Get a pointer to the first component implementing the given type in the entity.
constexpr size_t getId() const noexcept
Get the unique identifier of this entity.
void getComponents(ComponentCollection< T > &collection) const
Get all the components implementing the templated type.
A Context instance contains all the services, systems and runtime components needed to use Cogs.
static void cleanupStatic()
Perform static cleanup of the Context.
class IRenderer * renderer
Renderer.
static void initializeStatic()
Perform static initialization of the Context.
void clear()
Does clearing of context.
class EntityStore * store
Entity store.
std::unique_ptr< class Variables > variables
Variables service instance.
std::unique_ptr< class ResourceStore > resourceStore
ResourceStore service instance.
std::unique_ptr< class Engine > engine
Engine instance.
std::unique_ptr< class Scene > scene
Scene structure.
Base class for components implementing dynamic behavior.
EntityPtr getEntity(const StringView &name, bool logIfNotFound=true) const
Retrieve a reference to the shared entity pointer to the Entity with the given name.
ComponentModel::Component * addComponent(ComponentModel::Entity *entity, Reflection::TypeId typeId)
Add a component of the given type to the entity.
void addChild(ComponentModel::Entity *parent, const EntityPtr &entity)
Add a child to the given parent.
void renameEntity(ComponentModel::Entity *entityPtr, StringView name)
Rename the given entity.
const EntityDefinition * getEntityDefinition(const StringView &name) const
Fetch the entity definition with the given name from the store.
ComponentModel::Entity * getEntityPtr(const EntityId entityId)
Get a raw pointer to the entity with the given id.
void destroyEntity(const EntityId id)
Destroy the entity with the given id.
Cogs::ComponentModel::Entity * getEntityParent(const ComponentModel::Entity *entity) const
Gets the parent of the given entity.
void setEntityParent(ComponentModel::Entity *parent, ComponentModel::Entity *child)
Move Root entity to a parent: Equal to addChild(parent, child) + destroyEntity(child) Move Child enti...
EntityPtr createEntity(const StringView &name, const StringView &type, bool storeOwnership=true)
Create a new Entity.
void removeChild(ComponentModel::Entity *parent, const ComponentModel::Entity *entity)
Remove the parent-child relationship between parent and entity.
EntityPtr findEntity(const StringView &name, const ComponentModel::Entity *root=nullptr, EntityFind findOptions=EntityFind::Default) const
Finds an entity with the given name.
uint32_t getRevision() const
Returns a number that changes every time an entity is created or destroyed.
static bool hasExtension(const StringView &key, bool silent=false)
Check if an extension with the given key is present in this build.
static const void * loadExtensionModule(const std::string &path, void **modulehandle=nullptr, ExtensionModuleLoadResult *result=nullptr)
Load the extension module with the given name.
static void * getExtensionSymbol(const char *extension, const char *name)
Retrieves the address of a symbol in the extension module.
virtual EnginePermutations & getEnginePermutations()=0
Get the reference to the EnginePermutations structure.
static bool isUsingMouse()
Tests whether any ImGui control is being interacted with, or if the mouse is over an ImGui window or ...
static bool isUsingKeyboard()
Tests whether any ImGui control is currently accepting text input.
Contains information on how the entity behaves in the scene.
Cogs::Core::EntityPtr getCamera() const
Gets view camera. The camera must be valid when rendering a frame in the view.
void setCamera(const Cogs::Core::EntityPtr &renderCamera)
Sets or updates the camera of this ViewContext instance.
std::unique_ptr< class InputManager > inputManager
bool initialize(const Cogs::Core::EntityPtr &renderCamera)
Initialises the standard components in this ViewContext instance.
static void setDefaultMinimumCategory(Category category)
Sets the default minimum category for all future consumers.
Log implementation class.
RedirectedLogger is a message consumer that forwards any incoming message to the callback functions r...
Provides a weakly referenced view over the contents of a string.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
EntityFind
Options to findEntity/getEntityFull.
@ MaxFlag
Do not go beyond this flag. Used as bounding value.
@ PartialNameMatch
Search for the first entity that partially contains the specified name.
AssetWriteFlags
Flags that control serialization of assets.
AssetLoadFlags
Asset and Scene loading flags. May be combined with resource loading flags.
constexpr Log getLogger(const char(&name)[LEN]) noexcept
Category COGSFOUNDATION_API parseCategoryString(const StringView category)
Utility function that takes a loglevel name as a string and returns the corresponding log level enum ...
void COGSFOUNDATION_API updateLoggerCategory(Category category)
Category
Logging categories used to filter log messages.
Holds extra housekeeping data for an Entity instance.
Defines how to construct entities of a certain type by a list of components to instantiate and defaul...