{"action":"created","issue":{"url":"https://api.github.com/repos/evasiongames/gameflow/issues/52","repository_url":"https://api.github.com/repos/evasiongames/gameflow","labels_url":"https://api.github.com/repos/evasiongames/gameflow/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/evasiongames/gameflow/issues/52/comments","events_url":"https://api.github.com/repos/evasiongames/gameflow/issues/52/events","html_url":"https://github.com/evasiongames/gameflow/issues/52","id":357524356,"node_id":"MDU6SXNzdWUzNTc1MjQzNTY=","number":52,"title":"Trouble running snippets in editmode","user":{"login":"Flavelius","id":8841352,"node_id":"MDQ6VXNlcjg4NDEzNTI=","avatar_url":"https://avatars2.githubusercontent.com/u/8841352?v=4","gravatar_id":"","url":"https://api.github.com/users/Flavelius","html_url":"https://github.com/Flavelius","followers_url":"https://api.github.com/users/Flavelius/followers","following_url":"https://api.github.com/users/Flavelius/following{/other_user}","gists_url":"https://api.github.com/users/Flavelius/gists{/gist_id}","starred_url":"https://api.github.com/users/Flavelius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flavelius/subscriptions","organizations_url":"https://api.github.com/users/Flavelius/orgs","repos_url":"https://api.github.com/users/Flavelius/repos","events_url":"https://api.github.com/users/Flavelius/events{/privacy}","received_events_url":"https://api.github.com/users/Flavelius/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-06T07:13:22Z","updated_at":"2018-09-06T10:33:01Z","closed_at":"2018-09-06T07:22:21Z","author_association":"NONE","body":"Hi, as the other issue states, this really needs some tutorials or documentation.\r\nI'm trying to run a program in editmode, but can't quite figure out how to. \r\nAfter some time exploring i found that one of the rightclick menus has an 'execute' entry that seems to do that.\r\nIt seems, officially, that macros are meant to be used that way, but they only allow 'call method' as action which is not very useful. \r\nWhen i create a program and change the type to macro afterwards (not sure if intended, but it's possible..) it seems to work, but only the first time.\r\nhitting the hotkey for the second time repeats the program infinitely (bug?). (I used the 03-Log Message example scene program to test this)\r\n\r\nEdit: this even happens if i don't set the type to macro and use the execute context menu\r\nEdit 2: and it cannot be stopped, apart from destroying the gameobject or the component\r\nEdit 3: My bad, looks like this is related to the break condition. The points about the inabillity to stop loops or the need to convert to macro otherwise are still valid though\r\n\r\nEdit4: Sorry, i just noticed that i had filtered out most actions in the macro-action-add-dialog..\r\nthe ability to stop loops/execution manually would still be nice though"},"comment":{"url":"https://api.github.com/repos/evasiongames/gameflow/issues/comments/419046205","html_url":"https://github.com/evasiongames/gameflow/issues/52#issuecomment-419046205","issue_url":"https://api.github.com/repos/evasiongames/gameflow/issues/52","id":419046205,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTA0NjIwNQ==","user":{"login":"evasiongames","id":7121057,"node_id":"MDQ6VXNlcjcxMjEwNTc=","avatar_url":"https://avatars1.githubusercontent.com/u/7121057?v=4","gravatar_id":"","url":"https://api.github.com/users/evasiongames","html_url":"https://github.com/evasiongames","followers_url":"https://api.github.com/users/evasiongames/followers","following_url":"https://api.github.com/users/evasiongames/following{/other_user}","gists_url":"https://api.github.com/users/evasiongames/gists{/gist_id}","starred_url":"https://api.github.com/users/evasiongames/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evasiongames/subscriptions","organizations_url":"https://api.github.com/users/evasiongames/orgs","repos_url":"https://api.github.com/users/evasiongames/repos","events_url":"https://api.github.com/users/evasiongames/events{/privacy}","received_events_url":"https://api.github.com/users/evasiongames/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T10:33:01Z","updated_at":"2018-09-06T10:33:01Z","author_association":"OWNER","body":"Not really a bug. The problem is that Example 03 (Log Message) was not created to be executed in Edit mode and because of that it assumes an initial value of zero for the <Counter> variable.\r\n\r\nSo, what's happening? After the first execution, the value of the variable will be 3 because in Edit mode value are not restored like in Play mode. So, the next time you execute, the program will enter an infinite loop because the If Variable Value (Is Equal to 3) will never be matched as first thing in the Loop is an Increment Variable Value action which makes it 4.\r\n\r\nSo how do you fix it? Just insert a Set Variable Value as first action in the program to set the value of <Counter> to zero. That way you will avoid the infinite loop.\r\n\r\n> the ability to stop loops/execution manually would still be nice though\r\n\r\nAgreed. I will add an issue for that and do my best to have it available in the next update.\r\n"}}
{"actor":{"display_login":"evasiongames"}}