{"action":"opened","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/7046","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/7046/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/7046/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/7046/events","html_url":"https://github.com/godotengine/godot/issues/7046","id":187514553,"number":7046,"title":"[Custom Module] Bind method fails to add BOOL property on the editor","user":{"login":"FEDE0D","id":6296184,"avatar_url":"https://avatars.githubusercontent.com/u/6296184?v=3","gravatar_id":"","url":"https://api.github.com/users/FEDE0D","html_url":"https://github.com/FEDE0D","followers_url":"https://api.github.com/users/FEDE0D/followers","following_url":"https://api.github.com/users/FEDE0D/following{/other_user}","gists_url":"https://api.github.com/users/FEDE0D/gists{/gist_id}","starred_url":"https://api.github.com/users/FEDE0D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FEDE0D/subscriptions","organizations_url":"https://api.github.com/users/FEDE0D/orgs","repos_url":"https://api.github.com/users/FEDE0D/repos","events_url":"https://api.github.com/users/FEDE0D/events{/privacy}","received_events_url":"https://api.github.com/users/FEDE0D/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-05T18:33:28Z","updated_at":"2016-11-05T18:33:28Z","closed_at":null,"body":"**Operating system or device - Godot version:**\r\nLinux Mint 15\r\nGodot master branch\r\n\r\n**Issue description** (what happened, and what was expected):\r\nThe scene with the custom node fails to load.\r\n\r\n**Steps to reproduce:**\r\nCompile the module and run Godot. Create a scene using the new node. When the scene is played, it crashes and returns to the editor.\r\nIf the BOOL declaration is moved to the bottom of the other properties, the scene works fine.\r\n\r\n**Example code (fails)**\r\n`void StateMachine::_bind_methods() {\r\n\r\n\tObjectTypeDB::bind_method(_MD(\"set_state\",\"state\"),&StateMachine::set_state);\r\n\tObjectTypeDB::bind_method(_MD(\"get_state\"),&StateMachine::get_state);\r\n\r\n\tObjectTypeDB::bind_method(_MD(\"set_target\",\"target\"),&StateMachine::set_target);\r\n\tObjectTypeDB::bind_method(_MD(\"get_target\"),&StateMachine::get_target);\r\n\r\n\tObjectTypeDB::bind_method(_MD(\"set_enabled\", \"enabled\"),&StateMachine::set_enabled);\r\n\tObjectTypeDB::bind_method(_MD(\"is_enabled\"),&StateMachine::is_enabled);\r\n\r\n\tADD_PROPERTY( PropertyInfo( Variant::BOOL, \"enabled\"), _SCS(\"set_enabled\"), _SCS(\"is_enabled\"));\r\n\tADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, \"state/state\"), _SCS(\"set_state\"), _SCS(\"get_state\"));\r\n\tADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, \"target/target\"), _SCS(\"set_target\"), _SCS(\"get_target\"));\r\n\r\n}`\r\n\r\n**Example code (works)**\r\n`void StateMachine::_bind_methods() {\r\n\r\n\tObjectTypeDB::bind_method(_MD(\"set_state\",\"state\"),&StateMachine::set_state);\r\n\tObjectTypeDB::bind_method(_MD(\"get_state\"),&StateMachine::get_state);\r\n\r\n\tObjectTypeDB::bind_method(_MD(\"set_target\",\"target\"),&StateMachine::set_target);\r\n\tObjectTypeDB::bind_method(_MD(\"get_target\"),&StateMachine::get_target);\r\n\r\n\tObjectTypeDB::bind_method(_MD(\"set_enabled\", \"enabled\"),&StateMachine::set_enabled);\r\n\tObjectTypeDB::bind_method(_MD(\"is_enabled\"),&StateMachine::is_enabled);\r\n\r\n\tADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, \"state/state\"), _SCS(\"set_state\"), _SCS(\"get_state\"));\r\n\tADD_PROPERTY( PropertyInfo( Variant::NODE_PATH, \"target/target\"), _SCS(\"set_target\"), _SCS(\"get_target\"));\r\n\tADD_PROPERTY( PropertyInfo( Variant::BOOL, \"enabled\"), _SCS(\"set_enabled\"), _SCS(\"is_enabled\")); // <- just moved to the bottom\r\n}`"}}
{"actor":{"display_login":"FEDE0D"}}