{"action":"created","comment":{"url":"https://api.github.com/repos/spatialos/UnityGDK/pulls/comments/219086657","pull_request_review_id":157172861,"id":219086657,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTA4NjY1Nw==","diff_hunk":"@@ -75,20 +75,22 @@ private static void PreprocessPrefabs()\n         private static bool IsBehaviourEnabledInEditor(Object obj)\n         {\n             return !ReferenceEquals(obj, null)\n-                && EditorUtility.GetObjectEnabled(obj) == 1;\n+                   && EditorUtility.GetObjectEnabled(obj) == 1;\n         }\n \n-        private static bool DoesBehaviourRequireReadersOrWriters(Type targetType)\n+        private static bool DoesBehaviourNeedConditionalEnabling(Type targetType)\n         {\n-            return targetType\n-                .GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public)\n-                .Any(field => Attribute.IsDefined(field, typeof(RequireAttribute), false));\n+            return","path":"workers/unity/Packages/com.improbable.gdk.core/GameObjectRepresentation/Editor/Prefabs/PrefabPreprocessor.cs","position":14,"original_position":14,"commit_id":"92d979234dbcc666828ec1f51a12c31c6acc1842","original_commit_id":"92d979234dbcc666828ec1f51a12c31c6acc1842","user":{"login":"firtina-improbable","id":31209570,"node_id":"MDQ6VXNlcjMxMjA5NTcw","avatar_url":"https://avatars1.githubusercontent.com/u/31209570?v=4","gravatar_id":"","url":"https://api.github.com/users/firtina-improbable","html_url":"https://github.com/firtina-improbable","followers_url":"https://api.github.com/users/firtina-improbable/followers","following_url":"https://api.github.com/users/firtina-improbable/following{/other_user}","gists_url":"https://api.github.com/users/firtina-improbable/gists{/gist_id}","starred_url":"https://api.github.com/users/firtina-improbable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firtina-improbable/subscriptions","organizations_url":"https://api.github.com/users/firtina-improbable/orgs","repos_url":"https://api.github.com/users/firtina-improbable/repos","events_url":"https://api.github.com/users/firtina-improbable/events{/privacy}","received_events_url":"https://api.github.com/users/firtina-improbable/received_events","type":"User","site_admin":false},"body":"Good idea, will do","created_at":"2018-09-20T09:05:14Z","updated_at":"2018-09-20T09:05:14Z","html_url":"https://github.com/spatialos/UnityGDK/pull/366#discussion_r219086657","pull_request_url":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/spatialos/UnityGDK/pulls/comments/219086657"},"html":{"href":"https://github.com/spatialos/UnityGDK/pull/366#discussion_r219086657"},"pull_request":{"href":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366"}},"in_reply_to_id":219071089},"pull_request":{"url":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366","id":214647410,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NjQ3NDEw","html_url":"https://github.com/spatialos/UnityGDK/pull/366","diff_url":"https://github.com/spatialos/UnityGDK/pull/366.diff","patch_url":"https://github.com/spatialos/UnityGDK/pull/366.patch","issue_url":"https://api.github.com/repos/spatialos/UnityGDK/issues/366","number":366,"state":"closed","locked":false,"title":"Reimplement `WorkerType` attribute from SDK","user":{"login":"firtina-improbable","id":31209570,"node_id":"MDQ6VXNlcjMxMjA5NTcw","avatar_url":"https://avatars1.githubusercontent.com/u/31209570?v=4","gravatar_id":"","url":"https://api.github.com/users/firtina-improbable","html_url":"https://github.com/firtina-improbable","followers_url":"https://api.github.com/users/firtina-improbable/followers","following_url":"https://api.github.com/users/firtina-improbable/following{/other_user}","gists_url":"https://api.github.com/users/firtina-improbable/gists{/gist_id}","starred_url":"https://api.github.com/users/firtina-improbable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firtina-improbable/subscriptions","organizations_url":"https://api.github.com/users/firtina-improbable/orgs","repos_url":"https://api.github.com/users/firtina-improbable/repos","events_url":"https://api.github.com/users/firtina-improbable/events{/privacy}","received_events_url":"https://api.github.com/users/firtina-improbable/received_events","type":"User","site_admin":false},"body":"**Contributions**: We are not currently taking public contributions - see our [contributions](CONTRIBUTING.md) policy. However, we are accepting issues and we do want your [feedback](../README.md#give-us-feedback).\r\n\r\n-------\r\n\r\n#### Description\r\nThis is how it could look like if we want to consider re-adding the `WorkerType` attribute for MonoBehaviours.\r\n\r\nExample usage:\r\n\r\n```cs\r\nnamespace Assets.Gamelogic.Shaders\r\n{\r\n    // Enable this MonoBehaviour on client workers only\r\n    [WorkerType(WorkerUtils.UnityClient)]\r\n    public class ReapplyShaders : MonoBehaviour\r\n    {\r\n        private Renderer[] renderers;\r\n\r\n        private void Awake()\r\n        {\r\n            renderers = GetComponentsInChildren<Renderer>();\r\n        }\r\n\r\n        private void Start()\r\n        {\r\n            // ...\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n#### Tests\r\nTested locally on a port of Pirates.\r\n\r\n`MonoBehaviours` do get enabled/disabled depending on which worker type they are on even if they inject nothing. The prefab preprocessor correctly disables them along with other behaviours even if they inject nothing.\r\n\r\nAdded automated testing\r\n\r\n#### Documentation\r\nNeeds documentation","created_at":"2018-09-11T14:13:03Z","updated_at":"2018-09-20T09:05:14Z","closed_at":"2018-09-19T12:46:15Z","merged_at":"2018-09-19T12:46:14Z","merge_commit_sha":"4d832304ccf3f244714d079f97a924eac6ff204b","assignee":null,"assignees":[],"requested_reviewers":[{"login":"MPeti01","id":25401316,"node_id":"MDQ6VXNlcjI1NDAxMzE2","avatar_url":"https://avatars1.githubusercontent.com/u/25401316?v=4","gravatar_id":"","url":"https://api.github.com/users/MPeti01","html_url":"https://github.com/MPeti01","followers_url":"https://api.github.com/users/MPeti01/followers","following_url":"https://api.github.com/users/MPeti01/following{/other_user}","gists_url":"https://api.github.com/users/MPeti01/gists{/gist_id}","starred_url":"https://api.github.com/users/MPeti01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MPeti01/subscriptions","organizations_url":"https://api.github.com/users/MPeti01/orgs","repos_url":"https://api.github.com/users/MPeti01/repos","events_url":"https://api.github.com/users/MPeti01/events{/privacy}","received_events_url":"https://api.github.com/users/MPeti01/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":999940821,"node_id":"MDU6TGFiZWw5OTk5NDA4MjE=","url":"https://api.github.com/repos/spatialos/UnityGDK/labels/size/L","name":"size/L","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366/commits","review_comments_url":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366/comments","review_comment_url":"https://api.github.com/repos/spatialos/UnityGDK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spatialos/UnityGDK/issues/366/comments","statuses_url":"https://api.github.com/repos/spatialos/UnityGDK/statuses/92d979234dbcc666828ec1f51a12c31c6acc1842","head":{"label":"spatialos:feature/worker-type-attribute","ref":"feature/worker-type-attribute","sha":"92d979234dbcc666828ec1f51a12c31c6acc1842","user":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"repo":{"id":137235993,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyMzU5OTM=","name":"UnityGDK","full_name":"spatialos/UnityGDK","private":false,"owner":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spatialos/UnityGDK","description":"Unity GDK","fork":false,"url":"https://api.github.com/repos/spatialos/UnityGDK","forks_url":"https://api.github.com/repos/spatialos/UnityGDK/forks","keys_url":"https://api.github.com/repos/spatialos/UnityGDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spatialos/UnityGDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spatialos/UnityGDK/teams","hooks_url":"https://api.github.com/repos/spatialos/UnityGDK/hooks","issue_events_url":"https://api.github.com/repos/spatialos/UnityGDK/issues/events{/number}","events_url":"https://api.github.com/repos/spatialos/UnityGDK/events","assignees_url":"https://api.github.com/repos/spatialos/UnityGDK/assignees{/user}","branches_url":"https://api.github.com/repos/spatialos/UnityGDK/branches{/branch}","tags_url":"https://api.github.com/repos/spatialos/UnityGDK/tags","blobs_url":"https://api.github.com/repos/spatialos/UnityGDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spatialos/UnityGDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spatialos/UnityGDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/spatialos/UnityGDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spatialos/UnityGDK/statuses/{sha}","languages_url":"https://api.github.com/repos/spatialos/UnityGDK/languages","stargazers_url":"https://api.github.com/repos/spatialos/UnityGDK/stargazers","contributors_url":"https://api.github.com/repos/spatialos/UnityGDK/contributors","subscribers_url":"https://api.github.com/repos/spatialos/UnityGDK/subscribers","subscription_url":"https://api.github.com/repos/spatialos/UnityGDK/subscription","commits_url":"https://api.github.com/repos/spatialos/UnityGDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/spatialos/UnityGDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/spatialos/UnityGDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/spatialos/UnityGDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/spatialos/UnityGDK/contents/{+path}","compare_url":"https://api.github.com/repos/spatialos/UnityGDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spatialos/UnityGDK/merges","archive_url":"https://api.github.com/repos/spatialos/UnityGDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spatialos/UnityGDK/downloads","issues_url":"https://api.github.com/repos/spatialos/UnityGDK/issues{/number}","pulls_url":"https://api.github.com/repos/spatialos/UnityGDK/pulls{/number}","milestones_url":"https://api.github.com/repos/spatialos/UnityGDK/milestones{/number}","notifications_url":"https://api.github.com/repos/spatialos/UnityGDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spatialos/UnityGDK/labels{/name}","releases_url":"https://api.github.com/repos/spatialos/UnityGDK/releases{/id}","deployments_url":"https://api.github.com/repos/spatialos/UnityGDK/deployments","created_at":"2018-06-13T15:37:54Z","updated_at":"2018-09-19T17:51:12Z","pushed_at":"2018-09-19T18:38:01Z","git_url":"git://github.com/spatialos/UnityGDK.git","ssh_url":"git@github.com:spatialos/UnityGDK.git","clone_url":"https://github.com/spatialos/UnityGDK.git","svn_url":"https://github.com/spatialos/UnityGDK","homepage":null,"size":290906,"stargazers_count":87,"watchers_count":87,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":15,"watchers":87,"default_branch":"master"}},"base":{"label":"spatialos:master","ref":"master","sha":"609636948d5792f0d4fe757a706a90dab1042cc2","user":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"repo":{"id":137235993,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyMzU5OTM=","name":"UnityGDK","full_name":"spatialos/UnityGDK","private":false,"owner":{"login":"spatialos","id":23554165,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzNTU0MTY1","avatar_url":"https://avatars2.githubusercontent.com/u/23554165?v=4","gravatar_id":"","url":"https://api.github.com/users/spatialos","html_url":"https://github.com/spatialos","followers_url":"https://api.github.com/users/spatialos/followers","following_url":"https://api.github.com/users/spatialos/following{/other_user}","gists_url":"https://api.github.com/users/spatialos/gists{/gist_id}","starred_url":"https://api.github.com/users/spatialos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spatialos/subscriptions","organizations_url":"https://api.github.com/users/spatialos/orgs","repos_url":"https://api.github.com/users/spatialos/repos","events_url":"https://api.github.com/users/spatialos/events{/privacy}","received_events_url":"https://api.github.com/users/spatialos/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spatialos/UnityGDK","description":"Unity GDK","fork":false,"url":"https://api.github.com/repos/spatialos/UnityGDK","forks_url":"https://api.github.com/repos/spatialos/UnityGDK/forks","keys_url":"https://api.github.com/repos/spatialos/UnityGDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spatialos/UnityGDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spatialos/UnityGDK/teams","hooks_url":"https://api.github.com/repos/spatialos/UnityGDK/hooks","issue_events_url":"https://api.github.com/repos/spatialos/UnityGDK/issues/events{/number}","events_url":"https://api.github.com/repos/spatialos/UnityGDK/events","assignees_url":"https://api.github.com/repos/spatialos/UnityGDK/assignees{/user}","branches_url":"https://api.github.com/repos/spatialos/UnityGDK/branches{/branch}","tags_url":"https://api.github.com/repos/spatialos/UnityGDK/tags","blobs_url":"https://api.github.com/repos/spatialos/UnityGDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spatialos/UnityGDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spatialos/UnityGDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/spatialos/UnityGDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spatialos/UnityGDK/statuses/{sha}","languages_url":"https://api.github.com/repos/spatialos/UnityGDK/languages","stargazers_url":"https://api.github.com/repos/spatialos/UnityGDK/stargazers","contributors_url":"https://api.github.com/repos/spatialos/UnityGDK/contributors","subscribers_url":"https://api.github.com/repos/spatialos/UnityGDK/subscribers","subscription_url":"https://api.github.com/repos/spatialos/UnityGDK/subscription","commits_url":"https://api.github.com/repos/spatialos/UnityGDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/spatialos/UnityGDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/spatialos/UnityGDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/spatialos/UnityGDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/spatialos/UnityGDK/contents/{+path}","compare_url":"https://api.github.com/repos/spatialos/UnityGDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spatialos/UnityGDK/merges","archive_url":"https://api.github.com/repos/spatialos/UnityGDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spatialos/UnityGDK/downloads","issues_url":"https://api.github.com/repos/spatialos/UnityGDK/issues{/number}","pulls_url":"https://api.github.com/repos/spatialos/UnityGDK/pulls{/number}","milestones_url":"https://api.github.com/repos/spatialos/UnityGDK/milestones{/number}","notifications_url":"https://api.github.com/repos/spatialos/UnityGDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spatialos/UnityGDK/labels{/name}","releases_url":"https://api.github.com/repos/spatialos/UnityGDK/releases{/id}","deployments_url":"https://api.github.com/repos/spatialos/UnityGDK/deployments","created_at":"2018-06-13T15:37:54Z","updated_at":"2018-09-19T17:51:12Z","pushed_at":"2018-09-19T18:38:01Z","git_url":"git://github.com/spatialos/UnityGDK.git","ssh_url":"git@github.com:spatialos/UnityGDK.git","clone_url":"https://github.com/spatialos/UnityGDK.git","svn_url":"https://github.com/spatialos/UnityGDK","homepage":null,"size":290906,"stargazers_count":87,"watchers_count":87,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":15,"watchers":87,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366"},"html":{"href":"https://github.com/spatialos/UnityGDK/pull/366"},"issue":{"href":"https://api.github.com/repos/spatialos/UnityGDK/issues/366"},"comments":{"href":"https://api.github.com/repos/spatialos/UnityGDK/issues/366/comments"},"review_comments":{"href":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366/comments"},"review_comment":{"href":"https://api.github.com/repos/spatialos/UnityGDK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spatialos/UnityGDK/pulls/366/commits"},"statuses":{"href":"https://api.github.com/repos/spatialos/UnityGDK/statuses/92d979234dbcc666828ec1f51a12c31c6acc1842"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"firtina-improbable"}}