{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/443","repository_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity","labels_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/443/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/443/comments","events_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/443/events","html_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/443","id":198292562,"number":443,"title":"Wrapping code in #if UNITY_WSA for cross-platform support per #387","user":{"login":"yoDon","id":1760705,"avatar_url":"https://avatars.githubusercontent.com/u/1760705?v=3","gravatar_id":"","url":"https://api.github.com/users/yoDon","html_url":"https://github.com/yoDon","followers_url":"https://api.github.com/users/yoDon/followers","following_url":"https://api.github.com/users/yoDon/following{/other_user}","gists_url":"https://api.github.com/users/yoDon/gists{/gist_id}","starred_url":"https://api.github.com/users/yoDon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yoDon/subscriptions","organizations_url":"https://api.github.com/users/yoDon/orgs","repos_url":"https://api.github.com/users/yoDon/repos","events_url":"https://api.github.com/users/yoDon/events{/privacy}","received_events_url":"https://api.github.com/users/yoDon/received_events","type":"User","site_admin":false},"labels":[{"id":334429503,"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/labels/cla-signed","name":"cla-signed","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2017-01-02T03:05:00Z","updated_at":"2017-01-04T19:03:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/pulls/443","html_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/443","diff_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/443.diff","patch_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/443.patch"},"body":"See https://github.com/Microsoft/HoloToolkit-Unity/issues/387\r\n\r\nPrior to this PR, including HoloToolkit-Unity in a cross-platform Unity project would break all non-Windows Store (UNITY_WSA) platforms. This commit wraps the toolkit code in #if UNITY_WSA blocks to allow inclusion in cross-platform projects. There are a huge number of files in the project so this PR undoubtedly #if's out code that could safely be included in other platforms but at least it no longer takes down other platforms when included in projects. \r\n\r\nThere are zero functional changes in this PR other than wrapping code in #if UNITY_WSA blocks and changing a couple #if UNITY_METRO's to #if UNITY_WSA (UNITY_METRO is a deprecated #define for the code paths now referred to as UNITY_WSA).\r\n\r\nAs part of adding these changes, I started out by adding all the #if/#endif pairs at the top and bottom of the files, which led me to spot and correct a number of files that were missing standard Microsoft copyright comment blocks. After making that first pass at doing the outermost wrapping of the code, I realized that the #if's needed to be moved inside the MonoBehaviour class definitions so behaviors added to GameObjects in the editor would remain visible and connected to the objects when the build platform changed. Moving the #if's inside the MonoBehaviour class definitions forced many/most of the misc. classes in the project to be treated the same way (because they were involved as interfaces or generics in the MonoBehaviour-derived class declarations). This led me to do a pass moving all the #if UNITY_WSA's just inside the class definitions for all the classes. And *that* led to a final pass where a few of the classes needed hand-tweaked inner exclusions to prevent missing interface members and contained structs/classes from breaking the build. \r\n\r\nThere was a large set of files that were auto-generated using SWIG (https://github.com/Microsoft/HoloToolkit-Unity/search?utf8=%E2%9C%93&q=swig). These files contained a standard banner heading indicating they were auto-generated and should not be modified directly, so I didn't. Fortunately their presence doesn't appear to impact the cross-platform compatibility of the toolkit.\r\n\r\nAt this point the modified Toolkit can be included in cross-platform projects without breaking the build."},"comment":{"url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/comments/270456662","html_url":"https://github.com/Microsoft/HoloToolkit-Unity/pull/443#issuecomment-270456662","issue_url":"https://api.github.com/repos/Microsoft/HoloToolkit-Unity/issues/443","id":270456662,"user":{"login":"HodgsonSDAS","id":13334553,"avatar_url":"https://avatars.githubusercontent.com/u/13334553?v=3","gravatar_id":"","url":"https://api.github.com/users/HodgsonSDAS","html_url":"https://github.com/HodgsonSDAS","followers_url":"https://api.github.com/users/HodgsonSDAS/followers","following_url":"https://api.github.com/users/HodgsonSDAS/following{/other_user}","gists_url":"https://api.github.com/users/HodgsonSDAS/gists{/gist_id}","starred_url":"https://api.github.com/users/HodgsonSDAS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HodgsonSDAS/subscriptions","organizations_url":"https://api.github.com/users/HodgsonSDAS/orgs","repos_url":"https://api.github.com/users/HodgsonSDAS/repos","events_url":"https://api.github.com/users/HodgsonSDAS/events{/privacy}","received_events_url":"https://api.github.com/users/HodgsonSDAS/received_events","type":"User","site_admin":false},"created_at":"2017-01-04T19:03:36Z","updated_at":"2017-01-04T19:03:36Z","body":"I'm really interested in the delta from the HTP-5.4.0f3 editor and the 5.5.0f3 that broke the existing cross platform support.\r\n\r\nThis project used to be cross platform until Unity changed the way they handle UWP/METRO"}}
{"actor":{"display_login":"HodgsonSDAS"}}