diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-25 18:11:32 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-25 18:11:32 +0100 |
commit | 92e3fbda73128e65a31b3760b3fa4bd0147debe3 (patch) | |
tree | 40a2c43f0de4a0557074c69d1f8eafb5d7b61d3e /src/crepe/api/Script.h | |
parent | d038f192c7dcb453c9fc19082cd1b642c8f70fc8 (diff) | |
parent | be5ccbe24086d5d4fb407f268c649dcbc36eda6b (diff) |
merge `master`
Diffstat (limited to 'src/crepe/api/Script.h')
-rw-r--r-- | src/crepe/api/Script.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/crepe/api/Script.h b/src/crepe/api/Script.h index f0b9c73..a0870cb 100644 --- a/src/crepe/api/Script.h +++ b/src/crepe/api/Script.h @@ -22,6 +22,10 @@ class ComponentManager; * \info Additional *events* (like Unity's OnDisable and OnEnable) should be implemented as * member or lambda methods in derivative user script classes and registered in \c init(). * + * \warning Concrete scripts are allowed do create a custom constructor, but the utility + * functions should not be called inside the constructor as they rely on late references that + * are only available after the constructor returns. + * * \see feature_script */ class Script { @@ -63,8 +67,7 @@ protected: * * \returns Reference to component * - * \throws std::runtime_error if this game object does not have a component matching type \c - * T + * \throws std::runtime_error if this game object does not have a component with type \c T */ template <typename T> T & get_component() const; |