aboutsummaryrefslogtreecommitdiff
path: root/src/crepe
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-22 17:28:28 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-22 17:28:28 +0100
commit1499363d85abedbdb571e33801b821f4dfabc638 (patch)
tree32799f2e966c7c39808eb29cca85736742600c60 /src/crepe
parent610461763977597c5df213d272a514730dd2364e (diff)
more documentation
Diffstat (limited to 'src/crepe')
-rw-r--r--src/crepe/api/Script.h7
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;