From 5fbbfa57297ae5e8313f6e90e740e6ca5232e638 Mon Sep 17 00:00:00 2001 From: Theunis Johannes Botha Date: Tue, 10 Apr 2018 16:03:18 +0200 Subject: [PATCH] README.md --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 19403ba..fdb053c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ -### Custom Code +#R3 Custom Code +###### + +Almost every entity you create will have some 'Custom Code' component. + +Custom Code components have a property which define the WHEN they get executed ('ex. on entity_loaded' event), and also the WHAT happens. + +They are created explicitly in the editor and the code can be modified 'on the fly' using the editor. + +Everytime you save a custom code component, the R3 api will create a GIT commit and push to this repository, to a javascript file which has exactly the same ID as the custom code component. + +This is useful in case you accidentally overwrite the custom code component with some bad code or you simply want to investigate your code components from a more convenient location such as github. + +Every time you save an entity, and this entity has a custom code component, it will 'PUSH' the current branch to the remote. + +So in short, from the editor, if you select the __custom code component__ and hit 'save' : +* commit to this repository + +if you select the __entity__ which happens to have a custom code component and hit 'save' : +* commit to this repository and push to remote -Stores all custom code versions