├── .gitignore ├── Assets ├── UnityOpenSphericalCamera.meta └── UnityOpenSphericalCamera │ ├── Scripts.meta │ ├── Scripts │ ├── OSCController.cs │ └── OSCController.cs.meta │ ├── Thirdparty.meta │ ├── Thirdparty │ ├── LitJson.dll │ └── LitJson.dll.meta │ ├── _Demo.meta │ └── _Demo │ ├── Scenes.meta │ ├── Scenes │ ├── main.unity │ └── main.unity.meta │ ├── Scripts.meta │ └── Scripts │ ├── TakePictureManagerSample.cs │ └── TakePictureManagerSample.cs.meta ├── LICENSE.md ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | /Xcode*/ 8 | /Android/ 9 | 10 | # Autogenerated VS/MD solution and project files 11 | ExportedObj/ 12 | *.csproj 13 | *.unityproj 14 | *.sln 15 | *.suo 16 | *.tmp 17 | *.user 18 | *.userprefs 19 | *.pidb 20 | *.booproj 21 | *.svd 22 | *.apk 23 | 24 | 25 | # Unity3D generated meta files 26 | *.pidb.meta 27 | 28 | # Unity3D Generated File On Crash Reports 29 | sysinfo.txt 30 | 31 | # Mac File 32 | .DS_STORE 33 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 473c69123c5c5a244b3eb49b0e3cfdc4 3 | folderAsset: yes 4 | timeCreated: 1487609040 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dc415ec22e1fd74c8c6b995d823a205 3 | folderAsset: yes 4 | timeCreated: 1487609060 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/Scripts/OSCController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | using UnityEngine; 6 | using LitJson; 7 | 8 | namespace UnityOpenSphericalCamera 9 | { 10 | public class OSCController : MonoBehaviour 11 | { 12 | // Http adress 13 | private const string c_HttpHead = "http://"; 14 | private const string c_HttpPort = "80"; 15 | // Select OpenSphericalCamera IP 16 | // Gear360:192.168.107.1 / Bublcam:192.168.0.100 / RICOH THETA:192.168.1.1 17 | [SerializeField] 18 | private string m_IPAddress = "192.168.107.1"; 19 | 20 | // Set picture size 21 | // TODO: Auto set params 22 | [SerializeField] private int m_PictureWidth = 3840; 23 | [SerializeField] private int m_PictureHeight = 1920; 24 | 25 | private readonly float c_TimeOutSec = 5f; 26 | private readonly float c_LoadCheckLoopSec = 0.2f; 27 | 28 | public class ExecCommandResponse 29 | { 30 | public byte[] bytes; 31 | public string name; 32 | public string state; 33 | public string id; 34 | public Dictionary progress; 35 | public Dictionary results; 36 | } 37 | 38 | public class StatusResponse 39 | { 40 | public string name; 41 | public string state; 42 | public Dictionary progress; 43 | public Dictionary results; 44 | } 45 | 46 | public void GetInfo() 47 | { 48 | StartCoroutine(ExecGetInfoCoroutine((infoText)=> { Debug.Log(infoText); }, (errorText)=> { Debug.LogError(errorText); })); 49 | } 50 | 51 | public void ExecTakePictureAndLoadImage(Action success, Action error) 52 | { 53 | StartCoroutine(ExecTakePictureAndLoadImageCoroutine(success, error)); 54 | } 55 | 56 | private IEnumerator StartSessionCoroutine(Action success, Action error) 57 | { 58 | JsonData parameters = new JsonData(); 59 | parameters["timeout"] = 180; 60 | JsonData s_data = new JsonData(); 61 | s_data["name"] = "camera.startSession"; 62 | s_data["parameters"] = parameters; 63 | string s_postJsonStr = s_data.ToJson(); 64 | Debug.Log(s_postJsonStr); 65 | yield return StartCoroutine( 66 | ExecCommandCoroutine( 67 | s_postJsonStr, 68 | (response) => 69 | { 70 | success(response); 71 | }, 72 | (errorText)=> 73 | { 74 | error(errorText); 75 | } 76 | )); 77 | } 78 | 79 | private IEnumerator ExecTakePictureAndLoadImageCoroutine(Action success, Action error) 80 | { 81 | string sessionID = ""; 82 | string commandID = ""; 83 | string fileURI = ""; 84 | bool hasError = false; 85 | 86 | // Session start 87 | yield return StartCoroutine(StartSessionCoroutine((response)=> { 88 | // Set session id 89 | sessionID = response.results["sessionId"].ToString(); 90 | }, 91 | (errorText) => { 92 | Debug.LogError(errorText); 93 | hasError = true; 94 | } 95 | )); 96 | 97 | // Error check 98 | if (hasError) 99 | { 100 | yield break; 101 | } 102 | 103 | // Take picture 104 | yield return StartCoroutine( 105 | ExecTakePictureCommandCoroutine( 106 | sessionID, 107 | (response) => { 108 | commandID = response.id; 109 | }, 110 | (errorText)=> { 111 | Debug.LogError(errorText); 112 | hasError = true; 113 | } 114 | )); 115 | 116 | // Error check 117 | if (hasError) 118 | { 119 | yield break; 120 | } 121 | 122 | // Wait capture 123 | yield return StartCoroutine( 124 | ExecGetStatusCoroutine( 125 | commandID, 126 | (response) => { 127 | fileURI = response.results["fileUri"].ToString(); 128 | }, 129 | (errorText) => { 130 | Debug.LogError(errorText); 131 | hasError = true; 132 | } 133 | )); 134 | 135 | // Error check 136 | if (hasError) 137 | { 138 | yield break; 139 | } 140 | 141 | // Load image texture 142 | yield return StartCoroutine( 143 | GetImageCoroutine( 144 | fileURI, 145 | (texture) => { 146 | // Success load texture! 147 | success(texture); 148 | }, 149 | (errorText) => { 150 | Debug.LogError(errorText); 151 | hasError = true; 152 | } 153 | )); 154 | 155 | // Error check 156 | if (hasError) 157 | { 158 | yield break; 159 | } 160 | } 161 | 162 | private IEnumerator ExecTakePictureCommandCoroutine(string sessionID, Action success, Action error) 163 | { 164 | // Set POST params 165 | JsonData parameters = new JsonData(); 166 | parameters["sessionId"] = sessionID; 167 | JsonData data = new JsonData(); 168 | data["name"] = "camera.takePicture"; 169 | data["parameters"] = parameters; 170 | string postJsonStr = data.ToJson(); 171 | byte[] postBytes = Encoding.Default.GetBytes(postJsonStr); 172 | yield return StartCoroutine( 173 | ExecCommandCoroutine( 174 | postJsonStr, 175 | (response) => 176 | { 177 | success(response); 178 | }, 179 | (errorText) => 180 | { 181 | error(errorText); 182 | } 183 | )); 184 | } 185 | 186 | private IEnumerator ExecCommandCoroutine(string postJsonStr, Action success, Action error) 187 | { 188 | // Set URL 189 | string url = MakeAPIURL("/osc/commands/execute"); 190 | 191 | // Set header 192 | Dictionary header = new Dictionary(); 193 | header.Add("Content-Type", "application/json; charset=utf-8"); 194 | 195 | // Set POST params 196 | byte[] postBytes = Encoding.Default.GetBytes(postJsonStr); 197 | 198 | var timeOutSec = Time.realtimeSinceStartup + c_TimeOutSec; 199 | 200 | // Start download 201 | WWW www = new WWW(url, postBytes, header); 202 | while (!www.isDone && Time.realtimeSinceStartup < timeOutSec) 203 | { 204 | yield return 0; 205 | } 206 | 207 | // Timeout check 208 | if (!www.isDone) 209 | { 210 | www.Dispose(); 211 | www = null; 212 | error("connect time out"); 213 | yield break; 214 | } 215 | 216 | // Output data 217 | if (www.error == null) 218 | { 219 | // success 220 | ExecCommandResponse response = JsonMapper.ToObject(www.text); 221 | success(response); 222 | } 223 | else 224 | { 225 | // error 226 | error(www.error); 227 | } 228 | 229 | www.Dispose(); 230 | www = null; 231 | } 232 | 233 | private IEnumerator ExecGetStatusCoroutine(string commandID, Action success, Action error) 234 | { 235 | // Set URL 236 | string url = MakeAPIURL("/osc/commands/status"); 237 | 238 | // Set header 239 | Dictionary header = new Dictionary(); 240 | header.Add("Content-Type", "application/json; charset=utf-8"); 241 | 242 | // Set POST params 243 | JsonData data = new JsonData(); 244 | data["id"] = commandID; 245 | string postJsonStr = data.ToJson(); 246 | byte[] postBytes = Encoding.Default.GetBytes(postJsonStr); 247 | 248 | // Start download 249 | WWW www = new WWW(url, postBytes, header); 250 | yield return www; 251 | 252 | // Output data 253 | if (www.error == null) 254 | { 255 | StatusResponse response = JsonMapper.ToObject(www.text); 256 | if (response.progress != null) 257 | { 258 | // Restart load 259 | yield return new WaitForSeconds(c_LoadCheckLoopSec); 260 | yield return StartCoroutine(ExecGetStatusCoroutine(commandID, success, error)); 261 | } 262 | else 263 | { 264 | // Finish command 265 | success(response); 266 | } 267 | } 268 | else 269 | { 270 | error(www.error); 271 | } 272 | 273 | www.Dispose(); 274 | www = null; 275 | } 276 | 277 | private IEnumerator ExecGetInfoCoroutine(Action success, Action error) 278 | { 279 | // Make URL 280 | string url = MakeAPIURL("/osc/info"); 281 | 282 | // Post data 283 | WWW www = new WWW(url); 284 | yield return www; 285 | 286 | // Start download 287 | if (www.error == null) 288 | { 289 | success(www.text); 290 | } 291 | else 292 | { 293 | error(www.error); 294 | } 295 | 296 | www.Dispose(); 297 | www = null; 298 | } 299 | 300 | private IEnumerator GetImageCoroutine(string fileUri, Action success, Action error) 301 | { 302 | // Make URL 303 | string url = MakeAPIURL("/osc/commands/execute"); 304 | 305 | // Set header 306 | Dictionary header = new Dictionary(); 307 | header.Add("Content-Type", "application/json; charset=utf-8"); 308 | 309 | // Set POST params 310 | JsonData parameters = new JsonData(); 311 | parameters["fileUri"] = fileUri; 312 | Debug.Log(fileUri); 313 | JsonData data = new JsonData(); 314 | data["name"] = "camera.getImage"; 315 | data["parameters"] = parameters; 316 | string postJsonStr = data.ToJson(); 317 | byte[] postBytes = Encoding.Default.GetBytes(postJsonStr); 318 | 319 | // Post data 320 | WWW www = new WWW(url, postBytes, header); 321 | yield return www; 322 | 323 | // 結果出力 324 | if (www.error == null) 325 | { 326 | Texture2D texture = new Texture2D(m_PictureWidth, m_PictureHeight); 327 | texture.LoadImage(www.bytes); 328 | success(texture); 329 | } 330 | else 331 | { 332 | error(www.error); 333 | } 334 | } 335 | 336 | // Make URI 337 | private string MakeAPIURL(string command) 338 | { 339 | return string.Format("{0}{1}:{2}{3}", c_HttpHead, m_IPAddress, c_HttpPort, command); 340 | } 341 | } 342 | } -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/Scripts/OSCController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a7713de57387526499d413f21578d512 3 | timeCreated: 1487609211 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/Thirdparty.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 467f38cc08072b8499d6e6c6b573c5b3 3 | folderAsset: yes 4 | timeCreated: 1487610028 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/Thirdparty/LitJson.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/Assets/UnityOpenSphericalCamera/Thirdparty/LitJson.dll -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/Thirdparty/LitJson.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 50103e50d3e340d408d01130ddff9d71 3 | timeCreated: 1487610070 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | Any: 13 | enabled: 1 14 | settings: {} 15 | Editor: 16 | enabled: 0 17 | settings: 18 | DefaultValueInitialized: true 19 | WindowsStoreApps: 20 | enabled: 0 21 | settings: 22 | CPU: AnyCPU 23 | userData: 24 | assetBundleName: 25 | assetBundleVariant: 26 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc2c65ee93c1d79429faf2680f7ed6fa 3 | folderAsset: yes 4 | timeCreated: 1487609617 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0f2c191f3acdc945a6f66a91d730a4a 3 | folderAsset: yes 4 | timeCreated: 1487609064 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo/Scenes/main.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/Assets/UnityOpenSphericalCamera/_Demo/Scenes/main.unity -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo/Scenes/main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 662398e07992cf54990056be9086c55d 3 | timeCreated: 1487609116 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b49f3abba9e387d4d97b95301dfee2ea 3 | folderAsset: yes 4 | timeCreated: 1487613592 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo/Scripts/TakePictureManagerSample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | 6 | namespace UnityOpenSphericalCamera 7 | { 8 | public class TakePictureManagerSample : MonoBehaviour 9 | { 10 | [SerializeField] private RawImage m_TargetCaptureImage; 11 | 12 | private OSCController m_OSCController; 13 | 14 | void Start() 15 | { 16 | m_OSCController = FindObjectOfType(); 17 | } 18 | 19 | // Take capture 20 | public void OnClickTakePicture() 21 | { 22 | m_OSCController.ExecTakePictureAndLoadImage( 23 | (texture) => { 24 | m_TargetCaptureImage.texture = texture; 25 | Debug.Log("Finish take picture"); 26 | }, 27 | () => { 28 | Debug.LogError("Faild take picture."); 29 | } 30 | ); 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /Assets/UnityOpenSphericalCamera/_Demo/Scripts/TakePictureManagerSample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f72fe8a3470781648a306b6ebe074f1d 3 | timeCreated: 1487613618 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 noshipu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.1f1 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/noshipu/UnityOpenSphericalCamera/b39bfa5fffeb5dc4a9db8a9d2d7e49855a705f18/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityOpenSphericalCamera 2 | 3 | Support OSC API v1.0 on Unity. 4 | Take a picture and Load the texture. 5 | 6 | ![Alt Text](http://img.f.hatena.ne.jp/images/fotolife/n/noshipu/20170221/20170221035242.png) 7 | 8 | ## How to use 9 | 1. Add component "OSCController" 10 | 2. Set camera IP address. 11 | Gear360:192.168.107.1 / Bublcam:192.168.0.100 / RICOH THETA S or SC:192.168.1.1 12 | 3. Connect to camera by WiFi. 13 | 4. Call OSCController.ExecTakePictureAndLoadImage() 14 | 5. You can take a picture and load the image texture. 15 | 16 | Sample script is here! 17 | https://github.com/noshipu/UnityOpenSphericalCamera/blob/master/Assets/UnityOpenSphericalCamera/_Demo/Scripts/TakePictureManagerSample.cs 18 | 19 | ## Third party 20 | This project uses LitJson to read Json format. https://lbv.github.io/litjson/ Thank you very much. 21 | 22 | ## License 23 | MIT License 24 | Copyright (c) 2017 noshipu 25 | --------------------------------------------------------------------------------