Unravel Engine C++ Reference
Loading...
Searching...
No Matches
id_component.h
Go to the documentation of this file.
1#pragma once
2#include <engine/engine_export.h>
3
4#include <string>
5#include <uuid/uuid.h>
6
7namespace unravel
8{
9template<typename T>
11{
13 {
14 id = generate_uuid();
15 }
16
18 {
19 if(id.is_nil())
20 {
21 id = generate_uuid();
22 }
23 }
27 hpp::uuid id;
28};
33struct id_component : public id_component_base<id_component>
34{
35
36};
37
38} // namespace unravel
auto generate_uuid() -> hpp::uuid
Definition uuid.cpp:25
hpp::uuid id
The unique identifier for the entity.
Component that provides a unique identifier (UUID) for an entity.