Finality Engine
Loading...
Searching...
No Matches
ScriptableComponent.h File Reference

Defines native script ownership, lifecycle and Inspector field annotations. More...

#include <memory>
#include <vector>
#include <functional>
#include <entt.hpp>
#include <Core/Core.h>
#include <string>
#include <map>
#include <variant>
#include <glm/glm.hpp>
#include <Assets/AssetRegistry.h>
#include "ScriptableComponent.inl"

Go to the source code of this file.

Classes

struct  FINALITY::ScriptAssetReference
 Typed Inspector asset reference stored as a registry reference or path. More...
struct  FINALITY::ScriptStorage
 Attached native script instances and their authored property values for one entity. More...
struct  FINALITY::ScriptStorage::ScriptInstance
 Script instance state and its module lease; keeps native code alive while the instance exists. More...
class  FINALITY::ScriptableComponent

Namespaces

namespace  FINALITY

Macros

#define FISerializeField   friend struct ::FINALITY::ScriptFieldAccess;

Typedefs

using FINALITY::ScriptValue = std::variant<bool, int, float, std::string, glm::vec3, ScriptAssetReference>

Detailed Description

Defines native script ownership, lifecycle and Inspector field annotations.

Scene binds each attached script to its entity and controls its callbacks. Public mutable supported fields are exposed automatically. FISerializeField opts private fields into generated access; it does not convert arbitrary unsupported C++ types into Inspector values.

Usage
Override the needed lifecycle callbacks. Initial activation runs Awake, OnEnable and Start. Re-enabling repeats OnEnable; active destruction dispatches OnDisable before OnDestroy. Use GetEntity for scene operations.

Definition in file ScriptableComponent.h.

Macro Definition Documentation

◆ FISerializeField

#define FISerializeField   friend struct ::FINALITY::ScriptFieldAccess;

Definition at line 27 of file ScriptableComponent.h.