├── .gitignore ├── Assets ├── ARKitPluginOriginal.meta ├── ARKitPluginOriginal │ ├── Examples.meta │ ├── Examples │ │ ├── BallMaker.cs │ │ ├── BallMaker.cs.meta │ │ ├── BallMover.cs │ │ ├── BallMover.cs.meta │ │ ├── Ballz.cs │ │ ├── Ballz.cs.meta │ │ ├── InstancedSurfaceShader.shader │ │ ├── InstancedSurfaceShader.shader.meta │ │ ├── ModeSwitcher.cs │ │ ├── ModeSwitcher.cs.meta │ │ ├── Plane Physic Material.physicMaterial │ │ └── Plane Physic Material.physicMaterial.meta │ ├── HSVPicker.meta │ ├── HSVPicker │ │ ├── Editor.meta │ │ ├── Editor │ │ │ ├── BoxSliderEditor.cs │ │ │ └── BoxSliderEditor.cs.meta │ │ ├── Enums.meta │ │ ├── Enums │ │ │ ├── ColorValues.cs │ │ │ └── ColorValues.cs.meta │ │ ├── Events.meta │ │ ├── Events │ │ │ ├── ColorChangedEvent.cs │ │ │ ├── ColorChangedEvent.cs.meta │ │ │ ├── HSVChangedEvent.cs │ │ │ └── HSVChangedEvent.cs.meta │ │ ├── Other.meta │ │ ├── Other │ │ │ ├── ColorPickerTester.cs │ │ │ ├── ColorPickerTester.cs.meta │ │ │ ├── TiltWindow.cs │ │ │ └── TiltWindow.cs.meta │ │ ├── Picker 2.0.prefab │ │ ├── Picker 2.0.prefab.meta │ │ ├── PickerTest.unity │ │ ├── PickerTest.unity.meta │ │ ├── UI.meta │ │ ├── UI │ │ │ ├── ColorImage.cs │ │ │ ├── ColorImage.cs.meta │ │ │ ├── ColorLabel.cs │ │ │ ├── ColorLabel.cs.meta │ │ │ ├── ColorPicker.cs │ │ │ ├── ColorPicker.cs.meta │ │ │ ├── ColorPresets.cs │ │ │ ├── ColorPresets.cs.meta │ │ │ ├── ColorSlider.cs │ │ │ ├── ColorSlider.cs.meta │ │ │ ├── ColorSliderImage.cs │ │ │ ├── ColorSliderImage.cs.meta │ │ │ ├── HexColorField.cs │ │ │ ├── HexColorField.cs.meta │ │ │ ├── SVBoxSlider.cs │ │ │ └── SVBoxSlider.cs.meta │ │ ├── UtilityScripts.meta │ │ └── UtilityScripts │ │ │ ├── BoxSlider.cs │ │ │ ├── BoxSlider.cs.meta │ │ │ ├── HSVUtil.cs │ │ │ └── HSVUtil.cs.meta │ ├── Materials.meta │ ├── Materials │ │ ├── 2000px-Checkerboard_pattern.svg.mat │ │ ├── 2000px-Checkerboard_pattern.svg.mat.meta │ │ ├── 2000px-Checkerboard_patternUV.svg.mat │ │ ├── 2000px-Checkerboard_patternUV.svg.mat.meta │ │ ├── BallMaterial.mat │ │ ├── BallMaterial.mat.meta │ │ ├── PlayerMaterial.mat │ │ └── PlayerMaterial.mat.meta │ ├── Models.meta │ ├── Models │ │ ├── Characters.meta │ │ └── Characters │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── GunMaterial.mat │ │ │ └── GunMaterial.mat.meta │ │ │ ├── Player.fbx │ │ │ └── Player.fbx.meta │ ├── ParticlePainter.cs │ ├── ParticlePainter.cs.meta │ ├── Plugins.meta │ ├── Plugins │ │ ├── iOS.meta │ │ └── iOS │ │ │ ├── UnityARKit.meta │ │ │ └── UnityARKit │ │ │ ├── AR3DOFCameraManager.cs │ │ │ ├── AR3DOFCameraManager.cs.meta │ │ │ ├── ARPlaneAnchorGameObject.cs │ │ │ ├── ARPlaneAnchorGameObject.cs.meta │ │ │ ├── DontDestroyOnLoad.cs │ │ │ ├── DontDestroyOnLoad.cs.meta │ │ │ ├── Editor.meta │ │ │ ├── Editor │ │ │ ├── UnityARBuildPostprocessor.cs │ │ │ └── UnityARBuildPostprocessor.cs.meta │ │ │ ├── Materials.meta │ │ │ ├── Materials │ │ │ ├── PointCloudMaterial.mat │ │ │ ├── PointCloudMaterial.mat.meta │ │ │ ├── PointCloudParticleMaterial.mat │ │ │ ├── PointCloudParticleMaterial.mat.meta │ │ │ ├── XColor.mat │ │ │ ├── XColor.mat.meta │ │ │ ├── YColor.mat │ │ │ ├── YColor.mat.meta │ │ │ ├── YUVMaterial.mat │ │ │ ├── YUVMaterial.mat.meta │ │ │ ├── ZColor.mat │ │ │ ├── ZColor.mat.meta │ │ │ ├── debugPlaneMaterial.mat │ │ │ ├── debugPlaneMaterial.mat.meta │ │ │ ├── shadowPlaneMaterial.mat │ │ │ └── shadowPlaneMaterial.mat.meta │ │ │ ├── NativeInterface.meta │ │ │ ├── NativeInterface │ │ │ ├── ARAnchor.cs │ │ │ ├── ARAnchor.cs.meta │ │ │ ├── ARCamera.cs │ │ │ ├── ARCamera.cs.meta │ │ │ ├── ARErrorCode.cs │ │ │ ├── ARErrorCode.cs.meta │ │ │ ├── ARFrame.cs │ │ │ ├── ARFrame.cs.meta │ │ │ ├── ARHitTestResult.cs │ │ │ ├── ARHitTestResult.cs.meta │ │ │ ├── ARHitTestResultType.cs │ │ │ ├── ARHitTestResultType.cs.meta │ │ │ ├── ARLightEstimate.cs │ │ │ ├── ARLightEstimate.cs.meta │ │ │ ├── ARPlaneAnchor.cs │ │ │ ├── ARPlaneAnchor.cs.meta │ │ │ ├── ARPlaneAnchorAlignment.cs │ │ │ ├── ARPlaneAnchorAlignment.cs.meta │ │ │ ├── ARPoint.cs │ │ │ ├── ARPoint.cs.meta │ │ │ ├── ARRect.cs │ │ │ ├── ARRect.cs.meta │ │ │ ├── ARSessionNative.mm │ │ │ ├── ARSessionNative.mm.meta │ │ │ ├── ARSize.cs │ │ │ ├── ARSize.cs.meta │ │ │ ├── ARTextureHandles.cs │ │ │ ├── ARTextureHandles.cs.meta │ │ │ ├── ARTrackingQuality.cs │ │ │ ├── ARTrackingQuality.cs.meta │ │ │ ├── ARTrackingState.cs │ │ │ ├── ARTrackingState.cs.meta │ │ │ ├── ARTrackingStateReason.cs │ │ │ ├── ARTrackingStateReason.cs.meta │ │ │ ├── UnityARSessionNativeInterface.cs │ │ │ └── UnityARSessionNativeInterface.cs.meta │ │ │ ├── PointCloudParticleExample.cs │ │ │ ├── PointCloudParticleExample.cs.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Prefabs │ │ │ ├── BallPrefab.prefab │ │ │ ├── BallPrefab.prefab.meta │ │ │ ├── CollSphere.prefab │ │ │ ├── CollSphere.prefab.meta │ │ │ ├── ParticlePainterPrefab.prefab │ │ │ ├── ParticlePainterPrefab.prefab.meta │ │ │ ├── ParticlePrefab.prefab │ │ │ ├── ParticlePrefab.prefab.meta │ │ │ ├── PointCloudPrefab.prefab │ │ │ ├── PointCloudPrefab.prefab.meta │ │ │ ├── collisionPlanePrefab.prefab │ │ │ ├── collisionPlanePrefab.prefab.meta │ │ │ ├── debugPlanePrefab.prefab │ │ │ ├── debugPlanePrefab.prefab.meta │ │ │ ├── shadowPlanePrefab.prefab │ │ │ └── shadowPlanePrefab.prefab.meta │ │ │ ├── Shaders.meta │ │ │ ├── Shaders │ │ │ ├── MobileARShadow.shader │ │ │ ├── MobileARShadow.shader.meta │ │ │ ├── YUVShader.shader │ │ │ └── YUVShader.shader.meta │ │ │ ├── Textures.meta │ │ │ ├── Textures │ │ │ ├── debugPlaneTile.png │ │ │ └── debugPlaneTile.png.meta │ │ │ ├── UnityARCameraManager.cs │ │ │ ├── UnityARCameraManager.cs.meta │ │ │ ├── UnityARCameraNearFar.cs │ │ │ ├── UnityARCameraNearFar.cs.meta │ │ │ ├── UnityARGeneratePlane.cs │ │ │ ├── UnityARGeneratePlane.cs.meta │ │ │ ├── UnityARHitTestExample.cs │ │ │ ├── UnityARHitTestExample.cs.meta │ │ │ ├── UnityARKitControl.cs │ │ │ ├── UnityARKitControl.cs.meta │ │ │ ├── UnityARVideo.cs │ │ │ ├── UnityARVideo.cs.meta │ │ │ ├── UnityPointCloudExample.cs │ │ │ ├── UnityPointCloudExample.cs.meta │ │ │ ├── Utility.meta │ │ │ └── Utility │ │ │ ├── UnityARAnchorManager.cs │ │ │ ├── UnityARAnchorManager.cs.meta │ │ │ ├── UnityARMatrixOps.cs │ │ │ ├── UnityARMatrixOps.cs.meta │ │ │ ├── UnityARUtility.cs │ │ │ └── UnityARUtility.cs.meta │ ├── Textures.meta │ ├── Textures │ │ ├── PlayerDiffuse.png │ │ ├── PlayerDiffuse.png.meta │ │ ├── PlayerNormals.png │ │ ├── PlayerNormals.png.meta │ │ ├── PlayerOcclusion.png │ │ ├── PlayerOcclusion.png.meta │ │ ├── PlayerSpecular.tif │ │ └── PlayerSpecular.tif.meta │ ├── UnityARAmbient.cs │ ├── UnityARAmbient.cs.meta │ ├── UnityARBallz.unity │ ├── UnityARBallz.unity.meta │ ├── UnityARKitScene.unity │ ├── UnityARKitScene.unity.meta │ ├── UnityARShadows.unity │ ├── UnityARShadows.unity.meta │ ├── UnityParticlePainter.unity │ ├── UnityParticlePainter.unity.meta │ ├── checker_large UV.gif │ └── checker_large UV.gif.meta ├── Samples.meta └── Samples │ ├── Prefabs.meta │ ├── Prefabs │ ├── Debug.prefab │ ├── Debug.prefab.meta │ ├── Environment.prefab │ ├── Environment.prefab.meta │ ├── GeneratePlanes.prefab │ └── GeneratePlanes.prefab.meta │ ├── Scenes.meta │ ├── Scenes │ ├── 00_Menu.unity │ ├── 00_Menu.unity.meta │ ├── 01_PositionalTrackingVR.unity │ ├── 01_PositionalTrackingVR.unity.meta │ ├── 02_PositionalTrackingAR.unity │ ├── 02_PositionalTrackingAR.unity.meta │ ├── 03_PlaneDetection.unity │ ├── 03_PlaneDetection.unity.meta │ ├── 04_PointCloud.unity │ ├── 04_PointCloud.unity.meta │ ├── 05_HitTest.unity │ ├── 05_HitTest.unity.meta │ ├── 06_Intensity.unity │ └── 06_Intensity.unity.meta │ ├── Scripts.meta │ └── Scripts │ ├── Debug.meta │ ├── Debug │ ├── IntensityDisplay.cs │ ├── IntensityDisplay.cs.meta │ ├── PositionDisplay.cs │ ├── PositionDisplay.cs.meta │ ├── Random3DObject.cs │ └── Random3DObject.cs.meta │ ├── Launcher.cs │ └── Launcher.cs.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md ├── UnityArkitPlugin_README.md ├── UnityArkitPlugin_SCENES.txt └── UnityArkitPlugin_TUTORIAL.txt /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | /.vscode/ 8 | 9 | # Autogenerated VS/MD solution and project files 10 | ExportedObj/ 11 | *.csproj 12 | *.unityproj 13 | *.sln 14 | *.suo 15 | *.tmp 16 | *.user 17 | *.userprefs 18 | *.pidb 19 | *.booproj 20 | *.svd 21 | 22 | 23 | # Unity3D generated meta files 24 | *.pidb.meta 25 | 26 | # Unity3D Generated File On Crash Reports 27 | sysinfo.txt 28 | 29 | # Builds 30 | *.apk 31 | *.unitypackage 32 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 206042a374502420a88acb2c6075935a 3 | folderAsset: yes 4 | timeCreated: 1497710033 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a143135f16d634fa9ba945abac98f63c 3 | folderAsset: yes 4 | timeCreated: 1496972798 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/BallMaker.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class BallMaker : MonoBehaviour { 7 | 8 | public GameObject ballPrefab; 9 | public float createHeight; 10 | private MaterialPropertyBlock props; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | props = new MaterialPropertyBlock (); 15 | 16 | } 17 | 18 | void CreateBall(Vector3 atPosition) 19 | { 20 | GameObject ballGO = Instantiate (ballPrefab, atPosition, Quaternion.identity); 21 | 22 | 23 | float r = Random.Range(0.0f, 1.0f); 24 | float g = Random.Range(0.0f, 1.0f); 25 | float b = Random.Range(0.0f, 1.0f); 26 | 27 | props.SetColor("_InstanceColor", new Color(r, g, b)); 28 | 29 | MeshRenderer renderer = ballGO.GetComponent(); 30 | renderer.SetPropertyBlock(props); 31 | 32 | } 33 | 34 | // Update is called once per frame 35 | void Update () { 36 | if (Input.touchCount > 0 ) 37 | { 38 | var touch = Input.GetTouch(0); 39 | if (touch.phase == TouchPhase.Began) 40 | { 41 | var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); 42 | ARPoint point = new ARPoint { 43 | x = screenPosition.x, 44 | y = screenPosition.y 45 | }; 46 | 47 | List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, 48 | ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); 49 | if (hitResults.Count > 0) { 50 | foreach (var hitResult in hitResults) { 51 | Vector3 position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); 52 | CreateBall (new Vector3 (position.x, position.y + createHeight, position.z)); 53 | break; 54 | } 55 | } 56 | 57 | } 58 | } 59 | 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/BallMaker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8d14a82591ec4fcabb481f075ffeb53 3 | timeCreated: 1496972819 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/ARKitPluginOriginal/Examples/BallMover.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class BallMover : MonoBehaviour { 7 | 8 | public GameObject collBallPrefab; 9 | private GameObject collBallGO; 10 | 11 | // Use this for initialization 12 | void Start () { 13 | 14 | } 15 | 16 | void CreateMoveBall( Vector3 explodePosition) 17 | { 18 | collBallGO = Instantiate (collBallPrefab, explodePosition, Quaternion.identity); 19 | } 20 | 21 | // Update is called once per frame 22 | void Update () { 23 | if (Input.touchCount > 0 ) 24 | { 25 | var touch = Input.GetTouch(0); 26 | if (touch.phase == TouchPhase.Began) { 27 | var screenPosition = Camera.main.ScreenToViewportPoint (touch.position); 28 | ARPoint point = new ARPoint { 29 | x = screenPosition.x, 30 | y = screenPosition.y 31 | }; 32 | 33 | List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, 34 | ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); 35 | if (hitResults.Count > 0) { 36 | foreach (var hitResult in hitResults) { 37 | Vector3 position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); 38 | CreateMoveBall (position); 39 | break; 40 | } 41 | } 42 | 43 | } else if (touch.phase == TouchPhase.Moved && collBallGO != null) { 44 | var screenPosition = Camera.main.ScreenToViewportPoint (touch.position); 45 | ARPoint point = new ARPoint { 46 | x = screenPosition.x, 47 | y = screenPosition.y 48 | }; 49 | 50 | List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, 51 | ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent); 52 | if (hitResults.Count > 0) { 53 | foreach (var hitResult in hitResults) { 54 | Vector3 position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); 55 | collBallGO.transform.position = Vector3.MoveTowards (collBallGO.transform.position, position, 0.05f); 56 | break; 57 | } 58 | } 59 | } else if (touch.phase != TouchPhase.Stationary) { //ended or cancelled 60 | Destroy(collBallGO); 61 | collBallGO = null; 62 | 63 | } 64 | } 65 | 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/BallMover.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d7f6cc13442cf445295719af5da92de8 3 | timeCreated: 1496974880 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/ARKitPluginOriginal/Examples/Ballz.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class Ballz : MonoBehaviour { 6 | 7 | public float yDistanceThreshold; 8 | 9 | private float startingY; 10 | 11 | // Use this for initialization 12 | void Start () { 13 | startingY = transform.position.y; 14 | } 15 | 16 | // Update is called once per frame 17 | void Update () { 18 | 19 | if (Mathf.Abs (startingY - transform.position.y) > yDistanceThreshold) { 20 | Destroy (gameObject); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/Ballz.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a2b4127da4fa4302b8db592636b3d55 3 | timeCreated: 1496967378 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/ARKitPluginOriginal/Examples/InstancedSurfaceShader.shader: -------------------------------------------------------------------------------- 1 | Shader "Custom/InstancedSurfaceShader" { 2 | Properties { 3 | _Color ("Color", Color) = (1,1,1,1) 4 | _MainTex ("Albedo (RGB)", 2D) = "white" {} 5 | _Glossiness ("Smoothness", Range(0,1)) = 0.5 6 | _Metallic ("Metallic", Range(0,1)) = 0.0 7 | } 8 | SubShader { 9 | Tags { "RenderType"="Opaque" } 10 | LOD 200 11 | 12 | CGPROGRAM 13 | // Physically based Standard lighting model, and enable shadows on all light types 14 | #pragma surface surf Standard fullforwardshadows 15 | 16 | // Use shader model 3.0 target, to get nicer looking lighting 17 | #pragma target 3.0 18 | 19 | sampler2D _MainTex; 20 | 21 | struct Input { 22 | float2 uv_MainTex; 23 | }; 24 | 25 | half _Glossiness; 26 | half _Metallic; 27 | fixed4 _Color; 28 | 29 | // Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. 30 | // See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. 31 | // #pragma instancing_options assumeuniformscaling 32 | UNITY_INSTANCING_CBUFFER_START(Props) 33 | // put more per-instance properties here 34 | UNITY_DEFINE_INSTANCED_PROP (fixed4, _InstanceColor) 35 | UNITY_INSTANCING_CBUFFER_END 36 | 37 | void surf (Input IN, inout SurfaceOutputStandard o) { 38 | // Albedo comes from a texture tinted by color 39 | fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * UNITY_ACCESS_INSTANCED_PROP (_InstanceColor); 40 | o.Albedo = c.rgb; 41 | // Metallic and smoothness come from slider variables 42 | o.Metallic = _Metallic; 43 | o.Smoothness = _Glossiness; 44 | o.Alpha = c.a; 45 | } 46 | ENDCG 47 | } 48 | FallBack "Diffuse" 49 | } 50 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/InstancedSurfaceShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aef340cb91e534f40870ff658a7aecee 3 | timeCreated: 1496974206 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/ModeSwitcher.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class ModeSwitcher : MonoBehaviour { 6 | 7 | public GameObject ballMake; 8 | public GameObject ballMove; 9 | 10 | private int appMode = 0; 11 | // Use this for initialization 12 | void Start () { 13 | 14 | } 15 | 16 | // Update is called once per frame 17 | void Update () { 18 | 19 | } 20 | 21 | void EnableBallCreation(bool enable) 22 | { 23 | ballMake.SetActive (enable); 24 | ballMove.SetActive (!enable); 25 | 26 | } 27 | 28 | void OnGUI() 29 | { 30 | string modeString = appMode == 0 ? "MAKE" : "BREAK"; 31 | if (GUI.Button(new Rect(Screen.width -150.0f, 0.0f, 150.0f, 100.0f), modeString)) 32 | { 33 | appMode = (appMode + 1) % 2; 34 | EnableBallCreation (appMode == 0); 35 | } 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/ModeSwitcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b892a4b0455dd4e378c69c09e1d48df4 3 | timeCreated: 1496987845 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/ARKitPluginOriginal/Examples/Plane Physic Material.physicMaterial: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!134 &13400000 4 | PhysicMaterial: 5 | m_ObjectHideFlags: 0 6 | m_PrefabParentObject: {fileID: 0} 7 | m_PrefabInternal: {fileID: 0} 8 | m_Name: Plane Physic Material 9 | dynamicFriction: 0.5 10 | staticFriction: 0.5 11 | bounciness: 0.1 12 | frictionCombine: 0 13 | bounceCombine: 0 14 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Examples/Plane Physic Material.physicMaterial.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: beba2f308446f43da8e82c54f30f93b5 3 | timeCreated: 1496984011 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 13400000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42ca15f1893ea4df79823e4a752e0032 3 | folderAsset: yes 4 | timeCreated: 1494022978 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a9e9df3c14e9034eb587348635c8f09 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Editor/BoxSliderEditor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | using UnityEngine.UI; 4 | 5 | namespace UnityEditor.UI 6 | { 7 | [CustomEditor(typeof(BoxSlider), true)] 8 | [CanEditMultipleObjects] 9 | public class BoxSliderEditor : SelectableEditor 10 | { 11 | 12 | SerializedProperty m_HandleRect; 13 | SerializedProperty m_MinValue; 14 | SerializedProperty m_MaxValue; 15 | SerializedProperty m_WholeNumbers; 16 | SerializedProperty m_Value; 17 | SerializedProperty m_ValueY; 18 | SerializedProperty m_OnValueChanged; 19 | 20 | protected override void OnEnable() 21 | { 22 | base.OnEnable(); 23 | m_HandleRect = serializedObject.FindProperty("m_HandleRect"); 24 | 25 | m_MinValue = serializedObject.FindProperty("m_MinValue"); 26 | m_MaxValue = serializedObject.FindProperty("m_MaxValue"); 27 | m_WholeNumbers = serializedObject.FindProperty("m_WholeNumbers"); 28 | m_Value = serializedObject.FindProperty("m_Value"); 29 | m_ValueY = serializedObject.FindProperty("m_ValueY"); 30 | m_OnValueChanged = serializedObject.FindProperty("m_OnValueChanged"); 31 | } 32 | 33 | public override void OnInspectorGUI() 34 | { 35 | base.OnInspectorGUI(); 36 | EditorGUILayout.Space(); 37 | 38 | serializedObject.Update(); 39 | 40 | EditorGUILayout.PropertyField(m_HandleRect); 41 | 42 | if (m_HandleRect.objectReferenceValue != null) 43 | { 44 | EditorGUI.BeginChangeCheck(); 45 | 46 | 47 | EditorGUILayout.PropertyField(m_MinValue); 48 | EditorGUILayout.PropertyField(m_MaxValue); 49 | EditorGUILayout.PropertyField(m_WholeNumbers); 50 | EditorGUILayout.Slider(m_Value, m_MinValue.floatValue, m_MaxValue.floatValue); 51 | EditorGUILayout.Slider(m_ValueY, m_MinValue.floatValue, m_MaxValue.floatValue); 52 | 53 | // Draw the event notification options 54 | EditorGUILayout.Space(); 55 | EditorGUILayout.PropertyField(m_OnValueChanged); 56 | } 57 | else 58 | { 59 | EditorGUILayout.HelpBox("Specify a RectTransform for the slider fill or the slider handle or both. Each must have a parent RectTransform that it can slide within.", MessageType.Info); 60 | } 61 | 62 | serializedObject.ApplyModifiedProperties(); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Editor/BoxSliderEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8701e045b26e51f4eb345f2ccb3c13f5 3 | timeCreated: 1426804458 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Enums.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5d3904d3d18ddd544820bd8518990fee 3 | folderAsset: yes 4 | timeCreated: 1442586617 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Enums/ColorValues.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public enum ColorValues 4 | { 5 | R, 6 | G, 7 | B, 8 | A, 9 | 10 | Hue, 11 | Saturation, 12 | Value 13 | } 14 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Enums/ColorValues.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 859a1720e083e504cb68917f781e87c7 3 | timeCreated: 1442586608 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Events.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bb0d49c64210014e9a24ed9345928c2 3 | folderAsset: yes 4 | timeCreated: 1442747310 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Events/ColorChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using UnityEngine.Events; 4 | 5 | [Serializable] 6 | public class ColorChangedEvent : UnityEvent 7 | { 8 | 9 | } -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Events/ColorChangedEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff46fbecea7739f4690e4285c88f53c5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Events/HSVChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | public class HSVChangedEvent : UnityEvent 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Events/HSVChangedEvent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d95ce8fba3dbbf4eb14411412169b88 3 | timeCreated: 1442747317 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Other.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 304681ea793fc054aa8ed2beab28d0b1 3 | folderAsset: yes 4 | timeCreated: 1442751317 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Other/ColorPickerTester.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class ColorPickerTester : MonoBehaviour 5 | { 6 | 7 | public new Renderer renderer; 8 | public ColorPicker picker; 9 | 10 | // Use this for initialization 11 | void Start () 12 | { 13 | picker.onValueChanged.AddListener(color => 14 | { 15 | renderer.material.color = color; 16 | }); 17 | renderer.material.color = picker.CurrentColor; 18 | } 19 | 20 | // Update is called once per frame 21 | void Update () { 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Other/ColorPickerTester.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06851a815227e5044b0e3c1bf9b3a282 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Other/TiltWindow.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class TiltWindow : MonoBehaviour 4 | { 5 | public Vector2 range = new Vector2(5f, 3f); 6 | 7 | Transform mTrans; 8 | Quaternion mStart; 9 | Vector2 mRot = Vector2.zero; 10 | 11 | void Start () 12 | { 13 | mTrans = transform; 14 | mStart = mTrans.localRotation; 15 | } 16 | 17 | void Update () 18 | { 19 | Vector3 pos = Input.mousePosition; 20 | 21 | float halfWidth = Screen.width * 0.5f; 22 | float halfHeight = Screen.height * 0.5f; 23 | float x = Mathf.Clamp((pos.x - halfWidth) / halfWidth, -1f, 1f); 24 | float y = Mathf.Clamp((pos.y - halfHeight) / halfHeight, -1f, 1f); 25 | mRot = Vector2.Lerp(mRot, new Vector2(x, y), Time.deltaTime * 5f); 26 | 27 | mTrans.localRotation = mStart * Quaternion.Euler(-mRot.y * range.y, mRot.x * range.x, 0f); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/Other/TiltWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2aa04a3e088320429a06194a3483daa 3 | timeCreated: 1426051352 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/ARKitPluginOriginal/HSVPicker/Picker 2.0.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 916ee089a0d7b63419075f91e1c657ec 3 | timeCreated: 1442747914 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/PickerTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce46c07f0028e314ab7767577ab5e7a6 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b5fe4e314cbd9944bcaa93e814e9bd5 3 | folderAsset: yes 4 | timeCreated: 1442586536 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorImage.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | [RequireComponent(typeof(Image))] 6 | public class ColorImage : MonoBehaviour 7 | { 8 | public ColorPicker picker; 9 | 10 | private Image image; 11 | 12 | private void Awake() 13 | { 14 | image = GetComponent(); 15 | picker.onValueChanged.AddListener(ColorChanged); 16 | } 17 | 18 | private void OnDestroy() 19 | { 20 | picker.onValueChanged.RemoveListener(ColorChanged); 21 | } 22 | 23 | private void ColorChanged(Color newColor) 24 | { 25 | image.color = newColor; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6bca58eb07ad66b498a2f158bcb13225 3 | timeCreated: 1442675622 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorLabel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System; 4 | 5 | [RequireComponent(typeof(Text))] 6 | public class ColorLabel : MonoBehaviour 7 | { 8 | public ColorPicker picker; 9 | 10 | public ColorValues type; 11 | 12 | public string prefix = "R: "; 13 | public float minValue = 0; 14 | public float maxValue = 255; 15 | 16 | public int precision = 0; 17 | 18 | private Text label; 19 | 20 | private void Awake() 21 | { 22 | label = GetComponent(); 23 | 24 | } 25 | 26 | private void OnEnable() 27 | { 28 | if (Application.isPlaying && picker != null) 29 | { 30 | picker.onValueChanged.AddListener(ColorChanged); 31 | picker.onHSVChanged.AddListener(HSVChanged); 32 | } 33 | } 34 | 35 | private void OnDestroy() 36 | { 37 | if (picker != null) 38 | { 39 | picker.onValueChanged.RemoveListener(ColorChanged); 40 | picker.onHSVChanged.RemoveListener(HSVChanged); 41 | } 42 | } 43 | 44 | #if UNITY_EDITOR 45 | private void OnValidate() 46 | { 47 | label = GetComponent(); 48 | UpdateValue(); 49 | } 50 | #endif 51 | 52 | private void ColorChanged(Color color) 53 | { 54 | UpdateValue(); 55 | } 56 | 57 | private void HSVChanged(float hue, float sateration, float value) 58 | { 59 | UpdateValue(); 60 | } 61 | 62 | private void UpdateValue() 63 | { 64 | if (picker == null) 65 | { 66 | label.text = prefix + "-"; 67 | } 68 | else 69 | { 70 | float value = minValue + (picker.GetValue(type) * (maxValue - minValue)); 71 | 72 | label.text = prefix + ConvertToDisplayString(value); 73 | } 74 | } 75 | 76 | private string ConvertToDisplayString(float value) 77 | { 78 | if (precision > 0) 79 | return value.ToString("f " + precision); 80 | else 81 | return Mathf.FloorToInt(value).ToString(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorLabel.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b10e832a32d2d14facd8a3f489ee8d6 3 | timeCreated: 1442587803 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorPicker.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8262e4a8322117f4da079921eaa72834 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorPresets.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | 4 | public class ColorPresets : MonoBehaviour 5 | { 6 | public ColorPicker picker; 7 | public GameObject[] presets; 8 | public Image createPresetImage; 9 | 10 | void Awake() 11 | { 12 | // picker.onHSVChanged.AddListener(HSVChanged); 13 | picker.onValueChanged.AddListener(ColorChanged); 14 | } 15 | 16 | public void CreatePresetButton() 17 | { 18 | for (var i = 0; i < presets.Length; i++) 19 | { 20 | if (!presets[i].activeSelf) 21 | { 22 | presets[i].SetActive(true); 23 | presets[i].GetComponent().color = picker.CurrentColor; 24 | break; 25 | } 26 | } 27 | } 28 | 29 | public void PresetSelect(Image sender) 30 | { 31 | picker.CurrentColor = sender.color; 32 | } 33 | 34 | // Not working, it seems ConvertHsvToRgb() is broken. It doesn't work when fed 35 | // input h, s, v as shown below. 36 | // private void HSVChanged(float h, float s, float v) 37 | // { 38 | // createPresetImage.color = HSVUtil.ConvertHsvToRgb(h, s, v, 1); 39 | // } 40 | private void ColorChanged(Color color) 41 | { 42 | createPresetImage.color = color; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorPresets.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0923373e76e77402c9c53a2f1250ad3e 3 | timeCreated: 1456875791 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/ARKitPluginOriginal/HSVPicker/UI/ColorSlider.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System; 4 | 5 | /// 6 | /// Displays one of the color values of aColorPicker 7 | /// 8 | [RequireComponent(typeof(Slider))] 9 | public class ColorSlider : MonoBehaviour 10 | { 11 | public ColorPicker hsvpicker; 12 | 13 | /// 14 | /// Which value this slider can edit. 15 | /// 16 | public ColorValues type; 17 | 18 | private Slider slider; 19 | 20 | private bool listen = true; 21 | 22 | private void Awake() 23 | { 24 | slider = GetComponent(); 25 | 26 | hsvpicker.onValueChanged.AddListener(ColorChanged); 27 | hsvpicker.onHSVChanged.AddListener(HSVChanged); 28 | slider.onValueChanged.AddListener(SliderChanged); 29 | } 30 | 31 | private void OnDestroy() 32 | { 33 | hsvpicker.onValueChanged.RemoveListener(ColorChanged); 34 | hsvpicker.onHSVChanged.RemoveListener(HSVChanged); 35 | slider.onValueChanged.RemoveListener(SliderChanged); 36 | } 37 | 38 | private void ColorChanged(Color newColor) 39 | { 40 | listen = false; 41 | switch (type) 42 | { 43 | case ColorValues.R: 44 | slider.normalizedValue = newColor.r; 45 | break; 46 | case ColorValues.G: 47 | slider.normalizedValue = newColor.g; 48 | break; 49 | case ColorValues.B: 50 | slider.normalizedValue = newColor.b; 51 | break; 52 | case ColorValues.A: 53 | slider.normalizedValue = newColor.a; 54 | break; 55 | default: 56 | break; 57 | } 58 | } 59 | 60 | private void HSVChanged(float hue, float saturation, float value) 61 | { 62 | listen = false; 63 | switch (type) 64 | { 65 | case ColorValues.Hue: 66 | slider.normalizedValue = hue; //1 - hue; 67 | break; 68 | case ColorValues.Saturation: 69 | slider.normalizedValue = saturation; 70 | break; 71 | case ColorValues.Value: 72 | slider.normalizedValue = value; 73 | break; 74 | default: 75 | break; 76 | } 77 | } 78 | 79 | private void SliderChanged(float newValue) 80 | { 81 | if (listen) 82 | { 83 | newValue = slider.normalizedValue; 84 | //if (type == ColorValues.Hue) 85 | // newValue = 1 - newValue; 86 | 87 | hsvpicker.AssignColor(type, newValue); 88 | } 89 | listen = true; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorSlider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c600592efa0cf25479655321bf4fb08a 3 | timeCreated: 1442586558 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/ColorSliderImage.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ca76dd9ad6eb204c9b0481aece34497 3 | timeCreated: 1442682013 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/HexColorField.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using UnityEngine.UI; 4 | using System.Text; 5 | using System.Globalization; 6 | 7 | [RequireComponent(typeof(InputField))] 8 | public class HexColorField : MonoBehaviour 9 | { 10 | public ColorPicker hsvpicker; 11 | 12 | public bool displayAlpha; 13 | 14 | private InputField hexInputField; 15 | 16 | private const string hexRegex = "^#?(?:[0-9a-fA-F]{3,4}){1,2}$"; 17 | 18 | private void Awake() 19 | { 20 | hexInputField = GetComponent(); 21 | 22 | // Add listeners to keep text (and color) up to date 23 | hexInputField.onEndEdit.AddListener(UpdateColor); 24 | hsvpicker.onValueChanged.AddListener(UpdateHex); 25 | } 26 | 27 | private void OnDestroy() 28 | { 29 | hexInputField.onValueChanged.RemoveListener(UpdateColor); 30 | hsvpicker.onValueChanged.RemoveListener(UpdateHex); 31 | } 32 | 33 | private void UpdateHex(Color newColor) 34 | { 35 | hexInputField.text = ColorToHex(newColor); 36 | } 37 | 38 | private void UpdateColor(string newHex) 39 | { 40 | Color32 color; 41 | if (HexToColor(newHex, out color)) 42 | hsvpicker.CurrentColor = color; 43 | else 44 | Debug.Log("hex value is in the wrong format, valid formats are: #RGB, #RGBA, #RRGGBB and #RRGGBBAA (# is optional)"); 45 | } 46 | 47 | private string ColorToHex(Color32 color) 48 | { 49 | if (displayAlpha) 50 | return string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", color.r, color.g, color.b, color.a); 51 | else 52 | return string.Format("#{0:X2}{1:X2}{2:X2}", color.r, color.g, color.b); 53 | } 54 | 55 | public static bool HexToColor(string hex, out Color32 color) 56 | { 57 | // Check if this is a valid hex string (# is optional) 58 | if (System.Text.RegularExpressions.Regex.IsMatch(hex, hexRegex)) 59 | { 60 | int startIndex = hex.StartsWith("#") ? 1 : 0; 61 | 62 | if (hex.Length == startIndex + 8) //#RRGGBBAA 63 | { 64 | color = new Color32(byte.Parse(hex.Substring(startIndex, 2), NumberStyles.AllowHexSpecifier), 65 | byte.Parse(hex.Substring(startIndex + 2, 2), NumberStyles.AllowHexSpecifier), 66 | byte.Parse(hex.Substring(startIndex + 4, 2), NumberStyles.AllowHexSpecifier), 67 | byte.Parse(hex.Substring(startIndex + 6, 2), NumberStyles.AllowHexSpecifier)); 68 | } 69 | else if (hex.Length == startIndex + 6) //#RRGGBB 70 | { 71 | color = new Color32(byte.Parse(hex.Substring(startIndex, 2), NumberStyles.AllowHexSpecifier), 72 | byte.Parse(hex.Substring(startIndex + 2, 2), NumberStyles.AllowHexSpecifier), 73 | byte.Parse(hex.Substring(startIndex + 4, 2), NumberStyles.AllowHexSpecifier), 74 | 255); 75 | } 76 | else if (hex.Length == startIndex + 4) //#RGBA 77 | { 78 | color = new Color32(byte.Parse("" + hex[startIndex] + hex[startIndex], NumberStyles.AllowHexSpecifier), 79 | byte.Parse("" + hex[startIndex + 1] + hex[startIndex + 1], NumberStyles.AllowHexSpecifier), 80 | byte.Parse("" + hex[startIndex + 2] + hex[startIndex + 2], NumberStyles.AllowHexSpecifier), 81 | byte.Parse("" + hex[startIndex + 3] + hex[startIndex + 3], NumberStyles.AllowHexSpecifier)); 82 | } 83 | else //#RGB 84 | { 85 | color = new Color32(byte.Parse("" + hex[startIndex] + hex[startIndex], NumberStyles.AllowHexSpecifier), 86 | byte.Parse("" + hex[startIndex + 1] + hex[startIndex + 1], NumberStyles.AllowHexSpecifier), 87 | byte.Parse("" + hex[startIndex + 2] + hex[startIndex + 2], NumberStyles.AllowHexSpecifier), 88 | 255); 89 | } 90 | return true; 91 | } 92 | else 93 | { 94 | color = new Color32(); 95 | return false; 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/HexColorField.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d85c534b3c1560544b09d0996dfeba84 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/SVBoxSlider.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | [RequireComponent(typeof(BoxSlider), typeof(RawImage)), ExecuteInEditMode()] 6 | public class SVBoxSlider : MonoBehaviour 7 | { 8 | public ColorPicker picker; 9 | 10 | private BoxSlider slider; 11 | private RawImage image; 12 | 13 | private float lastH = -1; 14 | private bool listen = true; 15 | 16 | public RectTransform rectTransform 17 | { 18 | get 19 | { 20 | return transform as RectTransform; 21 | } 22 | } 23 | 24 | private void Awake() 25 | { 26 | slider = GetComponent(); 27 | image = GetComponent(); 28 | 29 | RegenerateSVTexture(); 30 | } 31 | 32 | private void OnEnable() 33 | { 34 | if (Application.isPlaying && picker != null) 35 | { 36 | slider.onValueChanged.AddListener(SliderChanged); 37 | picker.onHSVChanged.AddListener(HSVChanged); 38 | } 39 | } 40 | 41 | private void OnDisable() 42 | { 43 | if (picker != null) 44 | { 45 | slider.onValueChanged.RemoveListener(SliderChanged); 46 | picker.onHSVChanged.RemoveListener(HSVChanged); 47 | } 48 | } 49 | 50 | private void OnDestroy() 51 | { 52 | if (image.texture != null) 53 | DestroyImmediate(image.texture); 54 | } 55 | 56 | #if UNITY_EDITOR 57 | private void OnValidate() 58 | { 59 | image = GetComponent(); 60 | RegenerateSVTexture(); 61 | } 62 | #endif 63 | 64 | private void SliderChanged(float saturation, float value) 65 | { 66 | if (listen) 67 | { 68 | picker.AssignColor(ColorValues.Saturation, saturation); 69 | picker.AssignColor(ColorValues.Value, value); 70 | } 71 | listen = true; 72 | } 73 | 74 | private void HSVChanged(float h, float s, float v) 75 | { 76 | if (lastH != h) 77 | { 78 | lastH = h; 79 | RegenerateSVTexture(); 80 | } 81 | 82 | if (s != slider.normalizedValue) 83 | { 84 | listen = false; 85 | slider.normalizedValue = s; 86 | } 87 | 88 | if (v != slider.normalizedValueY) 89 | { 90 | listen = false; 91 | slider.normalizedValueY = v; 92 | } 93 | } 94 | 95 | private void RegenerateSVTexture() 96 | { 97 | double h = picker != null ? picker.H * 360 : 0; 98 | 99 | if (image.texture != null) 100 | DestroyImmediate(image.texture); 101 | 102 | Texture2D texture = new Texture2D(100, 100); 103 | texture.hideFlags = HideFlags.DontSave; 104 | 105 | for (int s = 0; s < 100; s++) 106 | { 107 | Color32[] colors = new Color32[100]; 108 | for (int v = 0; v < 100; v++) 109 | { 110 | colors[v] = HSVUtil.ConvertHsvToRgb(h, (float)s / 100, (float)v / 100, 1); 111 | } 112 | texture.SetPixels32(s, 0, 1, 100, colors); 113 | } 114 | texture.Apply(); 115 | 116 | image.texture = texture; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UI/SVBoxSlider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e4240873631f724496efec97d7151b3 3 | timeCreated: 1442650713 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UtilityScripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2b33138f525222146865861432dbe845 3 | folderAsset: yes 4 | timeCreated: 1426051345 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UtilityScripts/BoxSlider.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37c44bc94a9a7f241b5b552f3ff89458 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/HSVPicker/UtilityScripts/HSVUtil.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f3189246d7fc204faba7a1e9c08e0af 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f97a11a66bf894d0ea9d78ecae1fb271 3 | folderAsset: yes 4 | timeCreated: 1492534937 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/2000px-Checkerboard_pattern.svg.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: 2000px-Checkerboard_pattern.svg 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _textureCbCr: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - _textureY: 61 | m_Texture: {fileID: 0} 62 | m_Scale: {x: 1, y: 1} 63 | m_Offset: {x: 0, y: 0} 64 | m_Floats: 65 | - _BumpScale: 1 66 | - _Cutoff: 0.5 67 | - _DetailNormalMapScale: 1 68 | - _DstBlend: 0 69 | - _GlossMapScale: 1 70 | - _Glossiness: 0.5 71 | - _GlossyReflections: 1 72 | - _Metallic: 0 73 | - _Mode: 0 74 | - _OcclusionStrength: 1 75 | - _Parallax: 0.02 76 | - _SmoothnessTextureChannel: 0 77 | - _SpecularHighlights: 1 78 | - _SrcBlend: 1 79 | - _UVSec: 0 80 | - _ZWrite: 1 81 | m_Colors: 82 | - _Color: {r: 1, g: 1, b: 1, a: 1} 83 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 84 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/2000px-Checkerboard_pattern.svg.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48f9ec19142bd7e4c9f2441ab5799cca 3 | timeCreated: 1489779706 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/2000px-Checkerboard_patternUV.svg.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: 2000px-Checkerboard_patternUV.svg 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 2800000, guid: 70976333360a046c1bcf8dc7cb1f593c, type: 3} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 1, g: 1, b: 1, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/2000px-Checkerboard_patternUV.svg.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66fbc43c67b564bb4a4c2c2dcd6c1970 3 | timeCreated: 1489779706 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/BallMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: BallMaterial 10 | m_Shader: {fileID: 4800000, guid: aef340cb91e534f40870ff658a7aecee, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 1 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 10904, guid: 0000000000000000f000000000000000, type: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.635 63 | - _GlossyReflections: 1 64 | - _Metallic: 0.2 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 0.9044118, g: 0.13300176, b: 0.13300176, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/BallMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5e394a942fae453583e8e6009ee49a1 3 | timeCreated: 1496972319 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Materials/PlayerMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ea44298aa419344dbdcf87dd1a50533 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f1c84e523876664083649b7a985a6f4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Models/Characters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2db6ed60f35771478d3b31828b24fe8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Models/Characters/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac51e0d83920b4880ab0880b6c858bae 3 | folderAsset: yes 4 | timeCreated: 1497674503 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Models/Characters/Materials/GunMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: GunMaterial 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 1, g: 1, b: 1, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Models/Characters/Materials/GunMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 626b3b44100284bd5a4fdc6298a0d899 3 | timeCreated: 1497674503 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Models/Characters/Player.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/Models/Characters/Player.fbx -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/ParticlePainter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class ParticlePainter : MonoBehaviour { 7 | public ParticleSystem painterParticlePrefab; 8 | public float minDistanceThreshold; 9 | public float maxDistanceThreshold; 10 | private bool frameUpdated = false; 11 | public float particleSize = .1f; 12 | public float penDistance = 0.2f; 13 | public ColorPicker colorPicker; 14 | private ParticleSystem currentPS; 15 | private ParticleSystem.Particle [] particles; 16 | private Vector3 previousPosition = Vector3.zero; //camera starts from origin 17 | private List currentPaintVertices; 18 | private Color currentColor = Color.white; 19 | private List paintSystems; 20 | private int paintMode = 0; //0 = off, 1 = pick color, 2 = paint 21 | 22 | // Use this for initialization 23 | void Start () { 24 | UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; 25 | currentPS = Instantiate (painterParticlePrefab); 26 | currentPaintVertices = new List (); 27 | paintSystems = new List (); 28 | frameUpdated = false; 29 | colorPicker.onValueChanged.AddListener( newColor => currentColor = newColor); 30 | colorPicker.gameObject.SetActive (false); 31 | } 32 | 33 | public void ARFrameUpdated(UnityARCamera camera) 34 | { 35 | Matrix4x4 matrix = new Matrix4x4(); 36 | matrix.SetColumn(3, camera.worldTransform.column3); 37 | 38 | Vector3 currentPositon = UnityARMatrixOps.GetPosition(matrix) + (Camera.main.transform.forward * penDistance); 39 | if (Vector3.Distance (currentPositon, previousPosition) > minDistanceThreshold) { 40 | if (paintMode == 2) currentPaintVertices.Add (currentPositon); 41 | frameUpdated = true; 42 | previousPosition = currentPositon; 43 | } 44 | } 45 | 46 | void OnGUI() 47 | { 48 | string modeString = paintMode == 0 ? "OFF" : (paintMode == 1 ? "PICK" : "PAINT"); 49 | if (GUI.Button(new Rect(Screen.width -100.0f, 0.0f, 100.0f, 50.0f), modeString)) 50 | { 51 | paintMode = (paintMode + 1) % 3; 52 | colorPicker.gameObject.SetActive (paintMode == 1); 53 | if (paintMode == 2) 54 | RestartPainting (); 55 | } 56 | 57 | } 58 | 59 | void RestartPainting() 60 | { 61 | paintSystems.Add (currentPS); 62 | currentPS = Instantiate (painterParticlePrefab); 63 | currentPaintVertices = new List (); 64 | } 65 | 66 | // Update is called once per frame 67 | void Update () { 68 | if (frameUpdated && paintMode == 2) { 69 | if ( currentPaintVertices.Count > 0) { 70 | int numParticles = currentPaintVertices.Count; 71 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[numParticles]; 72 | int index = 0; 73 | foreach (Vector3 currentPoint in currentPaintVertices) { 74 | particles [index].position = currentPoint; 75 | particles [index].startColor = currentColor; 76 | particles [index].startSize = particleSize; 77 | index++; 78 | } 79 | currentPS.SetParticles (particles, numParticles); 80 | } else { 81 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[1]; 82 | particles [0].startSize = 0.0f; 83 | currentPS.SetParticles (particles, 1); 84 | } 85 | frameUpdated = false; 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/ParticlePainter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3a20b380ef854b22b8541736614c00e 3 | timeCreated: 1494016368 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/ARKitPluginOriginal/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05a89afb32ff4cd48a0278f931aa903b 3 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20ca1a77fe0cf4e049dac6d2a8afd62e 3 | folderAsset: yes 4 | timeCreated: 1492036260 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8fd2eea89786441a84b5c25c1d48982 3 | folderAsset: yes 4 | timeCreated: 1492103332 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/AR3DOFCameraManager.cs: -------------------------------------------------------------------------------- 1 |  2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | using UnityEngine.XR.iOS; 6 | 7 | public class AR3DOFCameraManager : MonoBehaviour { 8 | 9 | public Camera m_camera; 10 | private UnityARSessionNativeInterface m_session; 11 | private Material savedClearMaterial; 12 | 13 | // Use this for initialization 14 | void Start () { 15 | #if !UNITY_EDITOR 16 | Application.targetFrameRate = 60; 17 | m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); 18 | ARKitSessionConfiguration config = new ARKitSessionConfiguration(); 19 | config.alignment = UnityARAlignment.UnityARAlignmentGravity; 20 | config.getPointCloudData = true; 21 | config.enableLightEstimation = true; 22 | m_session.RunWithConfig(config); 23 | 24 | if (m_camera == null) { 25 | m_camera = Camera.main; 26 | } 27 | #endif 28 | } 29 | 30 | public void SetCamera(Camera newCamera) 31 | { 32 | if (m_camera != null) { 33 | UnityARVideo oldARVideo = m_camera.gameObject.GetComponent (); 34 | if (oldARVideo != null) { 35 | savedClearMaterial = oldARVideo.m_ClearMaterial; 36 | Destroy (oldARVideo); 37 | } 38 | } 39 | SetupNewCamera (newCamera); 40 | } 41 | 42 | private void SetupNewCamera(Camera newCamera) 43 | { 44 | m_camera = newCamera; 45 | 46 | if (m_camera != null) { 47 | UnityARVideo unityARVideo = m_camera.gameObject.GetComponent (); 48 | if (unityARVideo != null) { 49 | savedClearMaterial = unityARVideo.m_ClearMaterial; 50 | Destroy (unityARVideo); 51 | } 52 | unityARVideo = m_camera.gameObject.AddComponent (); 53 | unityARVideo.m_ClearMaterial = savedClearMaterial; 54 | } 55 | } 56 | 57 | // Update is called once per frame 58 | 59 | #if !UNITY_EDITOR 60 | void Update () { 61 | 62 | if (m_camera != null) 63 | { 64 | // JUST WORKS! 65 | Matrix4x4 matrix = m_session.GetCameraPose(); 66 | m_camera.transform.localPosition = UnityARMatrixOps.GetPosition(matrix); 67 | m_camera.transform.localRotation = UnityARMatrixOps.GetRotation (matrix); 68 | m_camera.projectionMatrix = m_session.GetCameraProjection (); 69 | } 70 | 71 | } 72 | #endif 73 | 74 | } 75 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/AR3DOFCameraManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ff614c6973544218b2c1e3036b8de0a 3 | timeCreated: 1494626284 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/ARPlaneAnchorGameObject.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public class ARPlaneAnchorGameObject 6 | { 7 | public GameObject gameObject; 8 | public ARPlaneAnchor planeAnchor; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/ARPlaneAnchorGameObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a07258b16ace4bf1a395aa0a80f2135 3 | timeCreated: 1493059957 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/DontDestroyOnLoad.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class DontDestroyOnLoad : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | DontDestroyOnLoad (gameObject); 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/DontDestroyOnLoad.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 562a9fe49bfc2418099790a804f22711 3 | timeCreated: 1493408595 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 085eeda524261654b88f97ea61b33090 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using UnityEditor.Callbacks; 4 | using System.IO; 5 | 6 | public class UnityARBuildPostprocessor 7 | { 8 | // Build postprocessor. Currently only needed on: 9 | // - iOS: no dynamic libraries, so plugin source files have to be copied into Xcode project 10 | [PostProcessBuild] 11 | public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) 12 | { 13 | if (target == BuildTarget.iOS) 14 | OnPostprocessBuildIOS(pathToBuiltProject); 15 | } 16 | 17 | private static void OnPostprocessBuildIOS(string pathToBuiltProject) 18 | { 19 | // We use UnityEditor.iOS.Xcode API which only exists in iOS editor module 20 | #if UNITY_IOS 21 | 22 | string projPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj"; 23 | 24 | UnityEditor.iOS.Xcode.PBXProject proj = new UnityEditor.iOS.Xcode.PBXProject(); 25 | proj.ReadFromString(File.ReadAllText(projPath)); 26 | proj.AddFrameworkToProject(proj.TargetGuidByName("Unity-iPhone"), "ARKit.framework", false); 27 | string target = proj.TargetGuidByName("Unity-iPhone"); 28 | Directory.CreateDirectory(Path.Combine(pathToBuiltProject, "Libraries/Unity")); 29 | 30 | string[] filesToCopy = new string[] 31 | { 32 | 33 | }; 34 | 35 | for(int i = 0 ; i < filesToCopy.Length ; ++i) 36 | { 37 | var srcPath = Path.Combine("../PluginSource/source", filesToCopy[i]); 38 | var dstLocalPath = "Libraries/" + filesToCopy[i]; 39 | var dstPath = Path.Combine(pathToBuiltProject, dstLocalPath); 40 | File.Copy(srcPath, dstPath, true); 41 | proj.AddFileToBuild(target, proj.AddFile(dstLocalPath, dstLocalPath)); 42 | } 43 | 44 | File.WriteAllText(projPath, proj.WriteToString()); 45 | #endif // #if UNITY_IOS 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Editor/UnityARBuildPostprocessor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a56f8b807c15f4cf3a44275a5e5f89f3 3 | timeCreated: 1492795428 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b97b0ebd5e0d84160a0b477bf246c1e1 3 | folderAsset: yes 4 | timeCreated: 1492792741 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/PointCloudMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: PointCloudMaterial 10 | m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 10305, guid: 0000000000000000f000000000000000, type: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.797 63 | - _GlossyReflections: 1 64 | - _InvFade: 2.2 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 0, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | - _TintColor: {r: 1, g: 1, b: 0, a: 0.5} 78 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/PointCloudMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a044f7471feb4bd4be40dcec09eae05 3 | timeCreated: 1493918099 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/PointCloudParticleMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: PointCloudParticleMaterial 10 | m_Shader: {fileID: 200, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.797 63 | - _GlossyReflections: 1 64 | - _InvFade: 2.2 65 | - _Metallic: 0 66 | - _Mode: 0 67 | - _OcclusionStrength: 1 68 | - _Parallax: 0.02 69 | - _SmoothnessTextureChannel: 0 70 | - _SpecularHighlights: 1 71 | - _SrcBlend: 1 72 | - _UVSec: 0 73 | - _ZWrite: 1 74 | m_Colors: 75 | - _Color: {r: 1, g: 1, b: 0, a: 1} 76 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 77 | - _TintColor: {r: 1, g: 1, b: 0, a: 0.5} 78 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/PointCloudParticleMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7cffc03fadd142ea81401e16399833e 3 | timeCreated: 1493918099 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/XColor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: XColor 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 1, g: 0, b: 0.06206894, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/XColor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aaae8be92ba59487a9946818d7a2017f 3 | timeCreated: 1493855225 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/YColor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: YColor 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 0.19463666, g: 0.88235295, b: 0.31320846, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/YColor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fa2e9e7c08844dd4a8d581610839228 3 | timeCreated: 1493855225 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: YUVMaterial 10 | m_Shader: {fileID: 4800000, guid: ef7b8eec959eb4f1e9fa97bc86273848, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _textureCbCr: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 2, y: 2} 59 | m_Offset: {x: -1, y: -1} 60 | - _textureCrCb: 61 | m_Texture: {fileID: 0} 62 | m_Scale: {x: 1, y: 1} 63 | m_Offset: {x: 0, y: 0} 64 | - _textureY: 65 | m_Texture: {fileID: 0} 66 | m_Scale: {x: 2, y: 2} 67 | m_Offset: {x: -1, y: -1} 68 | m_Floats: 69 | - _BumpScale: 1 70 | - _Cutoff: 0.5 71 | - _DetailNormalMapScale: 1 72 | - _DstBlend: 0 73 | - _GlossMapScale: 1 74 | - _Glossiness: 0.5 75 | - _GlossyReflections: 1 76 | - _Metallic: 0 77 | - _Mode: 0 78 | - _OcclusionStrength: 1 79 | - _Parallax: 0.02 80 | - _SmoothnessTextureChannel: 0 81 | - _SpecularHighlights: 1 82 | - _SrcBlend: 1 83 | - _UVSec: 0 84 | - _ZWrite: 1 85 | - _texCoordScale: 1 86 | m_Colors: 87 | - _Color: {r: 1, g: 1, b: 1, a: 1} 88 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 89 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/YUVMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1d9352050a75486f878ab19fa578f16 3 | timeCreated: 1492641356 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/ZColor.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: ZColor 10 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 0, g: 0.13103437, b: 1, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/ZColor.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d55ccb0db00e54a1696c1e96094d706d 3 | timeCreated: 1493855225 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/debugPlaneMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: debugPlaneMaterial 10 | m_Shader: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _ALPHATEST_ON 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _AlphaTex: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _BumpMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailAlbedoMap: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailMask: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _DetailNormalMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _EmissionMap: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MainTex: 45 | m_Texture: {fileID: 2800000, guid: 5db0892a9f35841a1aafa4d2f617eaf3, type: 3} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _MetallicGlossMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _OcclusionMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | - _ParallaxMap: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | m_Floats: 61 | - PixelSnap: 0 62 | - _BumpScale: 1 63 | - _Cutoff: 0.5 64 | - _DetailNormalMapScale: 1 65 | - _DstBlend: 0 66 | - _EnableExternalAlpha: 0 67 | - _GlossMapScale: 1 68 | - _Glossiness: 0.5 69 | - _GlossyReflections: 1 70 | - _MaskingAlphaCutoff: 0 71 | - _Metallic: 0 72 | - _Mode: 1 73 | - _OcclusionStrength: 1 74 | - _Parallax: 0.02 75 | - _SmoothnessTextureChannel: 0 76 | - _SpecularHighlights: 1 77 | - _SrcBlend: 1 78 | - _UVSec: 0 79 | - _ZWrite: 1 80 | m_Colors: 81 | - _Color: {r: 1, g: 1, b: 1, a: 1} 82 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 83 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/debugPlaneMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b36939cf153274ec29fbf2f10d0a49d7 3 | timeCreated: 1492715747 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/shadowPlaneMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: shadowPlaneMaterial 10 | m_Shader: {fileID: 4800000, guid: abcf973b8dc974208a882fe4b8c6b73f, type: 3} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 4 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _BumpMap: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - _DetailAlbedoMap: 25 | m_Texture: {fileID: 0} 26 | m_Scale: {x: 1, y: 1} 27 | m_Offset: {x: 0, y: 0} 28 | - _DetailMask: 29 | m_Texture: {fileID: 0} 30 | m_Scale: {x: 1, y: 1} 31 | m_Offset: {x: 0, y: 0} 32 | - _DetailNormalMap: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - _EmissionMap: 37 | m_Texture: {fileID: 0} 38 | m_Scale: {x: 1, y: 1} 39 | m_Offset: {x: 0, y: 0} 40 | - _MainTex: 41 | m_Texture: {fileID: 0} 42 | m_Scale: {x: 1, y: 1} 43 | m_Offset: {x: 0, y: 0} 44 | - _MetallicGlossMap: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - _OcclusionMap: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | - _ParallaxMap: 53 | m_Texture: {fileID: 0} 54 | m_Scale: {x: 1, y: 1} 55 | m_Offset: {x: 0, y: 0} 56 | m_Floats: 57 | - _BumpScale: 1 58 | - _Cutoff: 0.5 59 | - _DetailNormalMapScale: 1 60 | - _DstBlend: 0 61 | - _GlossMapScale: 1 62 | - _Glossiness: 0.5 63 | - _GlossyReflections: 1 64 | - _Metallic: 0 65 | - _Mode: 0 66 | - _OcclusionStrength: 1 67 | - _Parallax: 0.02 68 | - _SmoothnessTextureChannel: 0 69 | - _SpecularHighlights: 1 70 | - _SrcBlend: 1 71 | - _UVSec: 0 72 | - _ZWrite: 1 73 | m_Colors: 74 | - _Color: {r: 1, g: 1, b: 1, a: 1} 75 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 76 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Materials/shadowPlaneMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16f11da3beeaf498f8526286a295a38e 3 | timeCreated: 1497288096 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6930a53974b964a77bb66c8a01551eaa 3 | folderAsset: yes 4 | timeCreated: 1492795798 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARAnchor 6 | { 7 | public string identifier; 8 | 9 | /** 10 | The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. 11 | */ 12 | public Matrix4x4 transform; 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARAnchor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79ff8feee38c24e158252a971d93a42a 3 | timeCreated: 1492118050 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace UnityEngine.XR.iOS 6 | { 7 | public struct ARCamera 8 | { 9 | /** 10 | The transformation matrix that defines the camera's rotation and translation in world coordinates. 11 | */ 12 | 13 | public Matrix4x4 worldTransform; 14 | 15 | /** 16 | The camera's orientation defined as Euler angles. 17 | 18 | @dicussion The order of components in this vector matches the axes of rotation: 19 | 1. Pitch (the x component) is the rotation about the node's x-axis (in radians) 20 | 2. Yaw (the y component) is the rotation about the node's y-axis (in radians) 21 | 3. Roll (the z component) is the rotation about the node's z-axis (in radians) 22 | ARKit applies these rotations in the reverse order of the components: 23 | 1. first roll 24 | 2. then yaw 25 | 3. then pitch 26 | */ 27 | 28 | public Vector3 eulerAngles; 29 | 30 | public ARTrackingQuality trackingQuality; 31 | 32 | /** 33 | The camera intrinsics. 34 | @discussion The matrix has the following contents: 35 | fx 0 px 36 | 0 fy py 37 | 0 0 1 38 | fx and fy are the focal length in pixels. 39 | px and py are the coordinates of the principal point in pixels. 40 | The origin is at the center of the upper-left pixel. 41 | */ 42 | 43 | public Vector3 intrinsics_row1; 44 | public Vector3 intrinsics_row2; 45 | public Vector3 intrinsics_row3; 46 | 47 | public ARSize imageResolution; 48 | 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7914788e42e54a09ac79ed2629dfb48 3 | timeCreated: 1492103364 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public enum ARErrorCode : long 6 | { 7 | /** Unsupported session configuration. */ 8 | ARErrorCodeUnsupportedConfiguration = 100, 9 | 10 | /** A sensor required to run the session is not available. */ 11 | ARErrorCodeSensorUnavailable = 101, 12 | 13 | /** A sensor failed to provide the required input. */ 14 | ARErrorCodeSensorFailed = 102, 15 | 16 | /** World tracking has encountered a fatal error. */ 17 | ARErrorCodeWorldTrackingFailed = 200, 18 | 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARErrorCode.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 094318df5b9084291abdf9a768914ab7 3 | timeCreated: 1492118622 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARFrame 6 | { 7 | /** 8 | A timestamp identifying the frame. 9 | */ 10 | public double timestamp; 11 | 12 | /** 13 | The frame's captured image. 14 | */ 15 | public IntPtr capturedImage; 16 | 17 | /** 18 | The camera used to capture the frame's image. 19 | @discussion The camera provides the device's position and orientation as well as camera parameters. 20 | */ 21 | public ARCamera camera; 22 | 23 | /** 24 | A list of anchors in the scene. 25 | */ 26 | //List anchors; 27 | 28 | /** 29 | A light estimate representing the light in the scene. 30 | @discussion Returns nil if there is no light estimation. 31 | */ 32 | ARLightEstimate lightEstimate; 33 | 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARFrame.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8b915b5e16c84740b940efc7a7e2821 3 | timeCreated: 1492118050 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARHitTestResult 6 | { 7 | /** 8 | The type of the hit-test result. 9 | */ 10 | public ARHitTestResultType type; 11 | 12 | /** 13 | The distance from the camera to the intersection in meters. 14 | */ 15 | public double distance; 16 | 17 | /** 18 | The transformation matrix that defines the intersection's rotation, translation and scale 19 | relative to the anchor or nearest feature point. 20 | */ 21 | public Matrix4x4 localTransform; 22 | 23 | /** 24 | The transformation matrix that defines the intersection's rotation, translation and scale 25 | relative to the world. 26 | */ 27 | public Matrix4x4 worldTransform; 28 | 29 | /** 30 | The anchor that the hit-test intersected. 31 | */ 32 | public string anchorIdentifier; 33 | 34 | /** 35 | True if the test represents a valid hit test. Data is undefined otherwise. 36 | */ 37 | public bool isValid; 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResult.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 048b3fa7b70bb49689905314375cd7c3 3 | timeCreated: 1492121726 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | [Flags] 6 | public enum ARHitTestResultType : long 7 | { 8 | /** Result type from intersecting the nearest feature point. */ 9 | ARHitTestResultTypeFeaturePoint = (1 << 0), 10 | 11 | /** Result type from detecting and intersecting a new horizontal plane. */ 12 | ARHitTestResultTypeHorizontalPlane = (1 << 1), 13 | 14 | /** Result type from detecting and intersecting a new vertical plane. */ 15 | ARHitTestResultTypeVerticalPlane = (1 << 2), 16 | 17 | /** Result type from intersecting with an existing plane anchor. */ 18 | ARHitTestResultTypeExistingPlane = (1 << 3), 19 | 20 | /** Result type from intersecting with an existing plane anchor, taking into account the plane's extent. */ 21 | ARHitTestResultTypeExistingPlaneUsingExtent = ( 1 << 4) 22 | 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARHitTestResultType.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d70fc085339c436b848c46340250a29 3 | timeCreated: 1492121726 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARLightEstimate 6 | { 7 | public double ambientIntensity; 8 | } 9 | } 10 | 11 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARLightEstimate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c1f2e6c89195544de943f77cd419d81d 3 | timeCreated: 1492118050 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARPlaneAnchor 6 | { 7 | 8 | public string identifier; 9 | 10 | /** 11 | The transformation matrix that defines the anchor's rotation, translation and scale in world coordinates. 12 | */ 13 | public Matrix4x4 transform; 14 | 15 | /** 16 | The alignment of the plane. 17 | */ 18 | 19 | public ARPlaneAnchorAlignment alignment; 20 | 21 | /** 22 | The center of the plane in the anchor’s coordinate space. 23 | */ 24 | 25 | public Vector3 center; 26 | 27 | /** 28 | The extent of the plane in the anchor’s coordinate space. 29 | */ 30 | public Vector3 extent; 31 | 32 | 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4a7917e69c7bc43ad8879cc6d58266fc 3 | timeCreated: 1492119200 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public enum ARPlaneAnchorAlignment : long 6 | { 7 | /** A plane that is horizontal with respect to gravity. */ 8 | ARPlaneAnchorAlignmentHorizontal 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARPlaneAnchorAlignment.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8d5557085c2d4e3e8ac43f5694ea8c8 3 | timeCreated: 1492119200 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARPoint 6 | { 7 | public double x; 8 | public double y; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARPoint.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91d28e0ba93314b2298e88a73bf448d3 3 | timeCreated: 1492119200 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARRect 6 | { 7 | public ARPoint origin; 8 | public ARSize size; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARRect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b78ac1873b934b6497aa4404b460655 3 | timeCreated: 1492120116 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARSessionNative.mm.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ecd21425b31a46ef9abc90a0516e9a1 3 | timeCreated: 1492108287 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | iPhone: iOS 28 | second: 29 | enabled: 1 30 | settings: {} 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARSize 6 | { 7 | public double width; 8 | public double height; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARSize.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c72e6d3d39c0b495ba3d40c3cbd3a8ca 3 | timeCreated: 1492114222 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public struct ARTextureHandles 6 | { 7 | // Native (Metal) texture handles for the device camera buffer 8 | public IntPtr textureY; 9 | public IntPtr textureCbCr; 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTextureHandles.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 223ca11cf486046fe9c3740ee69b7a27 3 | timeCreated: 1493064086 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public enum ARTrackingQuality : long 6 | { 7 | /** The tracking quality is not available. */ 8 | ARTrackingQualityNotAvailable, 9 | 10 | /** The tracking quality is limited, relying only on the device's motion. */ 11 | ARTrackingQualityLimited, 12 | 13 | /** The tracking quality is poor. */ 14 | ARTrackingQualityPoor, 15 | 16 | /** The tracking quality is good. */ 17 | ARTrackingQualityGood 18 | 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingQuality.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70419166c9be04782bc37a66aa7ead0a 3 | timeCreated: 1492114222 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public enum ARTrackingState 6 | { 7 | /** Tracking is not available. */ 8 | ARTrackingStateNotAvailable, 9 | 10 | /** Tracking is limited. See tracking reason for details. */ 11 | ARTrackingStateLimited, 12 | 13 | /** Tracking is Normal. */ 14 | ARTrackingStateNormal, 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingState.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c8e21e94c4944a7eb5202db41d4bce0 3 | timeCreated: 1493767524 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public enum ARTrackingStateReason 6 | { 7 | /** Tracking is not limited. */ 8 | ARTrackingStateReasonNone, 9 | 10 | /** Tracking is limited due to a excessive motion of the camera. */ 11 | ARTrackingStateReasonExcessiveMotion, 12 | 13 | /** Tracking is limited due to a lack of features visible to the camera. */ 14 | ARTrackingStateReasonInsufficientFeatures, 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/ARTrackingStateReason.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b76c532f89f25411ca5c1d82cd7a5367 3 | timeCreated: 1493767524 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/NativeInterface/UnityARSessionNativeInterface.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43900ad1460304627a359bed956a451d 3 | timeCreated: 1492795428 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/PointCloudParticleExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | /// 7 | /// ポイントクラウドの位置にパーティクルを出す 8 | /// 9 | public class PointCloudParticleExample : MonoBehaviour { 10 | public ParticleSystem pointCloudParticlePrefab; 11 | public int maxPointsToShow; 12 | public float particleSize = 1.0f; 13 | private Vector3[] m_PointCloudData; 14 | private bool frameUpdated = false; 15 | private ParticleSystem currentPS; 16 | private ParticleSystem.Particle [] particles; 17 | 18 | // Use this for initialization 19 | void Start () { 20 | // ARFrame(ARKitの処理単位となるフレーム。Unityのフレームとは別なので頻度やタイミングも異なる) 21 | UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; 22 | currentPS = Instantiate (pointCloudParticlePrefab); 23 | frameUpdated = false; 24 | } 25 | 26 | public void ARFrameUpdated(UnityARCamera camera) 27 | { 28 | // ポイントクラウドを取得 29 | m_PointCloudData = camera.pointCloudData; 30 | // ARKitのフレームとUnityのフレームは異なるので、ARKit側が更新された時にのみUnityのUpdate()で処理するようフラグを立てる 31 | frameUpdated = true; 32 | } 33 | 34 | // Update is called once per frame 35 | void Update () { 36 | if (frameUpdated) { 37 | if (m_PointCloudData != null && m_PointCloudData.Length > 0) { 38 | int numParticles = Mathf.Min (m_PointCloudData.Length, maxPointsToShow); 39 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[numParticles]; 40 | int index = 0; 41 | // ポイントクラウドの位置にパーティクルを出す 42 | foreach (Vector3 currentPoint in m_PointCloudData) { 43 | particles [index].position = currentPoint; 44 | particles [index].startColor = new Color (1.0f, 1.0f, 1.0f); 45 | particles [index].startSize = particleSize; 46 | index++; 47 | } 48 | currentPS.SetParticles (particles, numParticles); 49 | } else { 50 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[1]; 51 | particles [0].startSize = 0.0f; 52 | currentPS.SetParticles (particles, 1); 53 | } 54 | frameUpdated = false; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/PointCloudParticleExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec20d460fbb7e4f92b4d84a10da98cd9 3 | timeCreated: 1494006942 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89956a1e1c98d49de8bf53800b483902 3 | folderAsset: yes 4 | timeCreated: 1492715679 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/BallPrefab.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1154719652421038} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1154719652421038 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4284708646823142} 22 | - component: {fileID: 33846996785084984} 23 | - component: {fileID: 135626873687639864} 24 | - component: {fileID: 23727198747687476} 25 | - component: {fileID: 54261416861304404} 26 | m_Layer: 0 27 | m_Name: BallPrefab 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!4 &4284708646823142 34 | Transform: 35 | m_ObjectHideFlags: 1 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | m_GameObject: {fileID: 1154719652421038} 39 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 40 | m_LocalPosition: {x: 0, y: 0, z: 0} 41 | m_LocalScale: {x: 0.03, y: 0.03, z: 0.03} 42 | m_Children: [] 43 | m_Father: {fileID: 0} 44 | m_RootOrder: 0 45 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 46 | --- !u!23 &23727198747687476 47 | MeshRenderer: 48 | m_ObjectHideFlags: 1 49 | m_PrefabParentObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1154719652421038} 52 | m_Enabled: 1 53 | m_CastShadows: 1 54 | m_ReceiveShadows: 1 55 | m_MotionVectors: 1 56 | m_LightProbeUsage: 0 57 | m_ReflectionProbeUsage: 0 58 | m_Materials: 59 | - {fileID: 2100000, guid: f5e394a942fae453583e8e6009ee49a1, type: 2} 60 | m_StaticBatchInfo: 61 | firstSubMesh: 0 62 | subMeshCount: 0 63 | m_StaticBatchRoot: {fileID: 0} 64 | m_ProbeAnchor: {fileID: 0} 65 | m_LightProbeVolumeOverride: {fileID: 0} 66 | m_ScaleInLightmap: 1 67 | m_PreserveUVs: 1 68 | m_IgnoreNormalsForChartDetection: 0 69 | m_ImportantGI: 0 70 | m_SelectedEditorRenderState: 3 71 | m_MinimumChartSize: 4 72 | m_AutoUVMaxDistance: 0.5 73 | m_AutoUVMaxAngle: 89 74 | m_LightmapParameters: {fileID: 0} 75 | m_SortingLayerID: 0 76 | m_SortingLayer: 0 77 | m_SortingOrder: 0 78 | --- !u!33 &33846996785084984 79 | MeshFilter: 80 | m_ObjectHideFlags: 1 81 | m_PrefabParentObject: {fileID: 0} 82 | m_PrefabInternal: {fileID: 100100000} 83 | m_GameObject: {fileID: 1154719652421038} 84 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 85 | --- !u!54 &54261416861304404 86 | Rigidbody: 87 | m_ObjectHideFlags: 1 88 | m_PrefabParentObject: {fileID: 0} 89 | m_PrefabInternal: {fileID: 100100000} 90 | m_GameObject: {fileID: 1154719652421038} 91 | serializedVersion: 2 92 | m_Mass: 0.01 93 | m_Drag: 0 94 | m_AngularDrag: 0.05 95 | m_UseGravity: 1 96 | m_IsKinematic: 0 97 | m_Interpolate: 0 98 | m_Constraints: 0 99 | m_CollisionDetection: 1 100 | --- !u!135 &135626873687639864 101 | SphereCollider: 102 | m_ObjectHideFlags: 1 103 | m_PrefabParentObject: {fileID: 0} 104 | m_PrefabInternal: {fileID: 100100000} 105 | m_GameObject: {fileID: 1154719652421038} 106 | m_Material: {fileID: 0} 107 | m_IsTrigger: 0 108 | m_Enabled: 1 109 | serializedVersion: 2 110 | m_Radius: 0.5 111 | m_Center: {x: 0, y: 0, z: 0} 112 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/BallPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e11b49885a57845e3b22a6355928ed72 3 | timeCreated: 1496972639 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/CollSphere.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1054048126866664} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1054048126866664 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4813142357266462} 22 | - component: {fileID: 33999288727854204} 23 | - component: {fileID: 135561595105751414} 24 | m_Layer: 0 25 | m_Name: CollSphere 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4813142357266462 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1054048126866664} 37 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 0.07, y: 0.07, z: 0.07} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 44 | --- !u!33 &33999288727854204 45 | MeshFilter: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1054048126866664} 50 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 51 | --- !u!135 &135561595105751414 52 | SphereCollider: 53 | m_ObjectHideFlags: 1 54 | m_PrefabParentObject: {fileID: 0} 55 | m_PrefabInternal: {fileID: 100100000} 56 | m_GameObject: {fileID: 1054048126866664} 57 | m_Material: {fileID: 0} 58 | m_IsTrigger: 0 59 | m_Enabled: 1 60 | serializedVersion: 2 61 | m_Radius: 0.5 62 | m_Center: {x: 0, y: 0, z: 0} 63 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/CollSphere.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 772733b9aeeb7481ea21ab0986f34715 3 | timeCreated: 1496987653 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/ParticlePainterPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 200646a121c9c46f69245ca2c1b789ee 3 | timeCreated: 1494016471 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/ParticlePrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87db9decf4b3e4cb8bf3eea22ccd37f5 3 | timeCreated: 1494009634 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/PointCloudPrefab.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1845574417345784} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1845574417345784 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4456704908116418} 22 | - component: {fileID: 33975515242258592} 23 | - component: {fileID: 135719125020529502} 24 | - component: {fileID: 23860415727414328} 25 | m_Layer: 0 26 | m_Name: PointCloudPrefab 27 | m_TagString: Untagged 28 | m_Icon: {fileID: 0} 29 | m_NavMeshLayer: 0 30 | m_StaticEditorFlags: 0 31 | m_IsActive: 1 32 | --- !u!4 &4456704908116418 33 | Transform: 34 | m_ObjectHideFlags: 1 35 | m_PrefabParentObject: {fileID: 0} 36 | m_PrefabInternal: {fileID: 100100000} 37 | m_GameObject: {fileID: 1845574417345784} 38 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 39 | m_LocalPosition: {x: 0, y: 0, z: 0} 40 | m_LocalScale: {x: 0.005, y: 0.005, z: 0.005} 41 | m_Children: [] 42 | m_Father: {fileID: 0} 43 | m_RootOrder: 0 44 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 45 | --- !u!23 &23860415727414328 46 | MeshRenderer: 47 | m_ObjectHideFlags: 1 48 | m_PrefabParentObject: {fileID: 0} 49 | m_PrefabInternal: {fileID: 100100000} 50 | m_GameObject: {fileID: 1845574417345784} 51 | m_Enabled: 1 52 | m_CastShadows: 1 53 | m_ReceiveShadows: 1 54 | m_MotionVectors: 1 55 | m_LightProbeUsage: 1 56 | m_ReflectionProbeUsage: 1 57 | m_Materials: 58 | - {fileID: 2100000, guid: 3a044f7471feb4bd4be40dcec09eae05, type: 2} 59 | m_StaticBatchInfo: 60 | firstSubMesh: 0 61 | subMeshCount: 0 62 | m_StaticBatchRoot: {fileID: 0} 63 | m_ProbeAnchor: {fileID: 0} 64 | m_LightProbeVolumeOverride: {fileID: 0} 65 | m_ScaleInLightmap: 1 66 | m_PreserveUVs: 1 67 | m_IgnoreNormalsForChartDetection: 0 68 | m_ImportantGI: 0 69 | m_SelectedEditorRenderState: 3 70 | m_MinimumChartSize: 4 71 | m_AutoUVMaxDistance: 0.5 72 | m_AutoUVMaxAngle: 89 73 | m_LightmapParameters: {fileID: 0} 74 | m_SortingLayerID: 0 75 | m_SortingLayer: 0 76 | m_SortingOrder: 0 77 | --- !u!33 &33975515242258592 78 | MeshFilter: 79 | m_ObjectHideFlags: 1 80 | m_PrefabParentObject: {fileID: 0} 81 | m_PrefabInternal: {fileID: 100100000} 82 | m_GameObject: {fileID: 1845574417345784} 83 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} 84 | --- !u!135 &135719125020529502 85 | SphereCollider: 86 | m_ObjectHideFlags: 1 87 | m_PrefabParentObject: {fileID: 0} 88 | m_PrefabInternal: {fileID: 100100000} 89 | m_GameObject: {fileID: 1845574417345784} 90 | m_Material: {fileID: 0} 91 | m_IsTrigger: 0 92 | m_Enabled: 1 93 | serializedVersion: 2 94 | m_Radius: 0.5 95 | m_Center: {x: 0, y: 0, z: 0} 96 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/PointCloudPrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02d2a544d8d594d30b790e76398d0873 3 | timeCreated: 1493917937 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/collisionPlanePrefab.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1372998203143648} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1243282721867180 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4459804331441636} 22 | - component: {fileID: 33784412182206160} 23 | - component: {fileID: 64007261467877126} 24 | m_Layer: 0 25 | m_Name: Plane 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1372998203143648 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 5 37 | m_Component: 38 | - component: {fileID: 4787822665528772} 39 | m_Layer: 0 40 | m_Name: collisionPlanePrefab 41 | m_TagString: Untagged 42 | m_Icon: {fileID: 0} 43 | m_NavMeshLayer: 0 44 | m_StaticEditorFlags: 0 45 | m_IsActive: 1 46 | --- !u!4 &4459804331441636 47 | Transform: 48 | m_ObjectHideFlags: 1 49 | m_PrefabParentObject: {fileID: 0} 50 | m_PrefabInternal: {fileID: 100100000} 51 | m_GameObject: {fileID: 1243282721867180} 52 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 53 | m_LocalPosition: {x: 0, y: 0, z: 0} 54 | m_LocalScale: {x: 0.125, y: 0.125, z: 0.125} 55 | m_Children: [] 56 | m_Father: {fileID: 4787822665528772} 57 | m_RootOrder: 0 58 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 59 | --- !u!4 &4787822665528772 60 | Transform: 61 | m_ObjectHideFlags: 1 62 | m_PrefabParentObject: {fileID: 0} 63 | m_PrefabInternal: {fileID: 100100000} 64 | m_GameObject: {fileID: 1372998203143648} 65 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 66 | m_LocalPosition: {x: 0, y: 0, z: 0} 67 | m_LocalScale: {x: 1, y: 1, z: 1} 68 | m_Children: 69 | - {fileID: 4459804331441636} 70 | m_Father: {fileID: 0} 71 | m_RootOrder: 0 72 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 73 | --- !u!33 &33784412182206160 74 | MeshFilter: 75 | m_ObjectHideFlags: 1 76 | m_PrefabParentObject: {fileID: 0} 77 | m_PrefabInternal: {fileID: 100100000} 78 | m_GameObject: {fileID: 1243282721867180} 79 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 80 | --- !u!64 &64007261467877126 81 | MeshCollider: 82 | m_ObjectHideFlags: 1 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | m_GameObject: {fileID: 1243282721867180} 86 | m_Material: {fileID: 0} 87 | m_IsTrigger: 0 88 | m_Enabled: 1 89 | serializedVersion: 2 90 | m_Convex: 0 91 | m_InflateMesh: 0 92 | m_SkinWidth: 0.01 93 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 94 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/collisionPlanePrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 813dd14a7826b4795823dd39ac4cc050 3 | timeCreated: 1492718811 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/debugPlanePrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f879aaf3eeb0c467eb22cbaf08dc97a4 3 | timeCreated: 1492718811 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Prefabs/shadowPlanePrefab.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 696855730620a483c9ae4c242e312b28 3 | timeCreated: 1497394239 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9e3cccf742844401a584fdd294d0607 3 | folderAsset: yes 4 | timeCreated: 1492634328 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Shaders/MobileARShadow.shader: -------------------------------------------------------------------------------- 1 | //This is based on a shader from https://alastaira.wordpress.com/2014/12/30/adding-shadows-to-a-unity-vertexfragment-shader-in-7-easy-steps/ 2 | 3 | Shader "Custom/MobileARShadow" 4 | { 5 | SubShader { 6 | Pass { 7 | 8 | // 1.) This will be the base forward rendering pass in which ambient, vertex, and 9 | // main directional light will be applied. Additional lights will need additional passes 10 | // using the "ForwardAdd" lightmode. 11 | // see: http://docs.unity3d.com/Manual/SL-PassTags.html 12 | Tags { "LightMode" = "ForwardBase" "RenderType"="Opaque" "Queue"="Geometry+1" "ForceNoShadowCasting"="True" } 13 | LOD 150 14 | Blend Zero SrcColor 15 | ZWrite On 16 | 17 | CGPROGRAM 18 | 19 | #pragma vertex vert 20 | #pragma fragment frag 21 | #include "UnityCG.cginc" 22 | 23 | // 2.) This matches the "forward base" of the LightMode tag to ensure the shader compiles 24 | // properly for the forward bass pass. As with the LightMode tag, for any additional lights 25 | // this would be changed from _fwdbase to _fwdadd. 26 | #pragma multi_compile_fwdbase 27 | 28 | // 3.) Reference the Unity library that includes all the lighting shadow macros 29 | #include "AutoLight.cginc" 30 | 31 | 32 | struct v2f 33 | { 34 | float4 pos : SV_POSITION; 35 | 36 | // 4.) The LIGHTING_COORDS macro (defined in AutoLight.cginc) defines the parameters needed to sample 37 | // the shadow map. The (0,1) specifies which unused TEXCOORD semantics to hold the sampled values - 38 | // As I'm not using any texcoords in this shader, I can use TEXCOORD0 and TEXCOORD1 for the shadow 39 | // sampling. If I was already using TEXCOORD for UV coordinates, say, I could specify 40 | // LIGHTING_COORDS(1,2) instead to use TEXCOORD1 and TEXCOORD2. 41 | LIGHTING_COORDS(0,1) 42 | }; 43 | 44 | 45 | v2f vert(appdata_base v) { 46 | v2f o; 47 | o.pos = UnityObjectToClipPos (v.vertex); 48 | 49 | // 5.) The TRANSFER_VERTEX_TO_FRAGMENT macro populates the chosen LIGHTING_COORDS in the v2f structure 50 | // with appropriate values to sample from the shadow/lighting map 51 | TRANSFER_VERTEX_TO_FRAGMENT(o); 52 | 53 | return o; 54 | } 55 | 56 | fixed4 frag(v2f i) : COLOR { 57 | 58 | // 6.) The LIGHT_ATTENUATION samples the shadowmap (using the coordinates calculated by TRANSFER_VERTEX_TO_FRAGMENT 59 | // and stored in the structure defined by LIGHTING_COORDS), and returns the value as a float. 60 | float attenuation = LIGHT_ATTENUATION(i); 61 | return fixed4(1.0,1.0,1.0,1.0) * attenuation; 62 | } 63 | 64 | ENDCG 65 | } 66 | } 67 | 68 | // 7.) To receive or cast a shadow, shaders must implement the appropriate "Shadow Collector" or "Shadow Caster" pass. 69 | // Although we haven't explicitly done so in this shader, if these passes are missing they will be read from a fallback 70 | // shader instead, so specify one here to import the collector/caster passes used in that fallback. 71 | Fallback "VertexLit" 72 | 73 | } -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Shaders/MobileARShadow.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abcf973b8dc974208a882fe4b8c6b73f 3 | timeCreated: 1497394336 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader: -------------------------------------------------------------------------------- 1 | Shader "Unlit/ARCameraShader" 2 | { 3 | Properties 4 | { 5 | _textureY ("TextureY", 2D) = "white" {} 6 | _textureCbCr ("TextureCbCr", 2D) = "black" {} 7 | _texCoordScale ("Texture Coordinate Scale", float) = 1.0 8 | _isPortrait ("Device Orientation", Int) = 0 9 | } 10 | SubShader 11 | { 12 | Tags { "RenderType"="Opaque" } 13 | LOD 100 14 | 15 | Pass 16 | { 17 | ZWrite Off 18 | CGPROGRAM 19 | #pragma vertex vert 20 | #pragma fragment frag 21 | 22 | #include "UnityCG.cginc" 23 | 24 | uniform float _texCoordScale; 25 | uniform int _isPortrait; 26 | float4x4 _TextureRotation; 27 | 28 | struct Vertex 29 | { 30 | float4 position : POSITION; 31 | float2 texcoord : TEXCOORD0; 32 | }; 33 | 34 | struct TexCoordInOut 35 | { 36 | float4 position : SV_POSITION; 37 | float2 texcoord : TEXCOORD0; 38 | }; 39 | 40 | TexCoordInOut vert (Vertex vertex) 41 | { 42 | TexCoordInOut o; 43 | o.position = UnityObjectToClipPos(vertex.position); 44 | if (_isPortrait == 1) 45 | { 46 | o.texcoord = float2(vertex.texcoord.x, -(vertex.texcoord.y - 0.5f) * _texCoordScale + 0.5f); 47 | } 48 | else 49 | { 50 | o.texcoord = float2((vertex.texcoord.x - 0.5f) * _texCoordScale + 0.5f, -vertex.texcoord.y); 51 | } 52 | o.texcoord = mul(_TextureRotation, float4(o.texcoord,0,1)).xy; 53 | 54 | return o; 55 | } 56 | 57 | // samplers 58 | sampler2D _textureY; 59 | sampler2D _textureCbCr; 60 | 61 | fixed4 frag (TexCoordInOut i) : SV_Target 62 | { 63 | // sample the texture 64 | float2 texcoord = i.texcoord; 65 | float y = tex2D(_textureY, texcoord).r; 66 | float4 ycbcr = float4(y, tex2D(_textureCbCr, texcoord).rg, 1.0); 67 | 68 | const float4x4 ycbcrToRGBTransform = float4x4( 69 | float4(1.0, +0.0000, +1.4020, -0.7010), 70 | float4(1.0, -0.3441, -0.7141, +0.5291), 71 | float4(1.0, +1.7720, +0.0000, -0.8860), 72 | float4(0.0, +0.0000, +0.0000, +1.0000) 73 | ); 74 | 75 | return mul(ycbcrToRGBTransform, ycbcr); 76 | } 77 | ENDCG 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Shaders/YUVShader.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef7b8eec959eb4f1e9fa97bc86273848 3 | timeCreated: 1492634375 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e91ae238bfa1f46bb888a95633863510 3 | folderAsset: yes 4 | timeCreated: 1492718667 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Textures/debugPlaneTile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Textures/debugPlaneTile.png -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Textures/debugPlaneTile.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5db0892a9f35841a1aafa4d2f617eaf3 3 | timeCreated: 1492718703 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapsPreserveCoverage: 0 16 | alphaTestReferenceValue: 0.5 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | serializedVersion: 2 33 | filterMode: -1 34 | aniso: -1 35 | mipBias: -1 36 | wrapU: -1 37 | wrapV: -1 38 | wrapW: -1 39 | nPOTScale: 1 40 | lightmap: 0 41 | compressionQuality: 50 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaUsage: 1 50 | alphaIsTransparency: 0 51 | spriteTessellationDetail: -1 52 | textureType: 0 53 | textureShape: 1 54 | maxTextureSizeSet: 0 55 | compressionQualitySet: 0 56 | textureFormatSet: 0 57 | platformSettings: 58 | - buildTarget: DefaultTexturePlatform 59 | maxTextureSize: 2048 60 | textureFormat: -1 61 | textureCompression: 1 62 | compressionQuality: 50 63 | crunchedCompression: 0 64 | allowsAlphaSplitting: 0 65 | overridden: 0 66 | spriteSheet: 67 | serializedVersion: 2 68 | sprites: [] 69 | outline: [] 70 | physicsShape: [] 71 | spritePackingTag: 72 | userData: 73 | assetBundleName: 74 | assetBundleVariant: 75 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARCameraManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 462d46d2423bb4f738d2497a397b1590 3 | timeCreated: 1493058653 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARCameraNearFar.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | [RequireComponent(typeof(Camera))] 7 | public class UnityARCameraNearFar : MonoBehaviour { 8 | 9 | private Camera attachedCamera; 10 | private float currentNearZ; 11 | private float currentFarZ; 12 | 13 | // Use this for initialization 14 | void Start () { 15 | attachedCamera = GetComponent (); 16 | UpdateCameraClipPlanes (); 17 | } 18 | 19 | void UpdateCameraClipPlanes() 20 | { 21 | currentNearZ = attachedCamera.nearClipPlane; 22 | currentFarZ = attachedCamera.farClipPlane; 23 | UnityARSessionNativeInterface.GetARSessionNativeInterface ().SetCameraClipPlanes (currentNearZ, currentFarZ); 24 | } 25 | 26 | // Update is called once per frame 27 | void Update () { 28 | if (currentNearZ != attachedCamera.nearClipPlane || currentFarZ != attachedCamera.farClipPlane) { 29 | UpdateCameraClipPlanes (); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARCameraNearFar.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce437cef046e841aabd6070890e79d41 3 | timeCreated: 1496930896 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARGeneratePlane.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text; 3 | using System.Collections.Generic; 4 | 5 | namespace UnityEngine.XR.iOS 6 | { 7 | public class UnityARGeneratePlane : MonoBehaviour 8 | { 9 | [Tooltip("検出した平面情報から生成するPrefab。設定しない場合空のGameObjectのみ作られる")] 10 | public GameObject planePrefab; 11 | 12 | [Tooltip("検出した全ての平面情報をデバッグ表示するか")] 13 | public bool displayPositions; 14 | 15 | private UnityARAnchorManager unityARAnchorManager; 16 | 17 | void Start() 18 | { 19 | // UnityARAnchorManagerが平面(正確にはARAnchor)の追加/更新/削除の都度、UnityARUtilityを呼び出す 20 | unityARAnchorManager = new UnityARAnchorManager(); 21 | // 平面の追加の際にここで設定したPrefabが作られる 22 | UnityARUtility.InitializePlanePrefab(planePrefab); 23 | } 24 | 25 | void OnDestroy() 26 | { 27 | unityARAnchorManager.Destroy(); 28 | } 29 | 30 | // デバッグ用 31 | void OnGUI() 32 | { 33 | if (displayPositions) 34 | { 35 | var sb = new StringBuilder(); 36 | foreach(var arpag in unityARAnchorManager.GetCurrentPlaneAnchors()) 37 | { 38 | var ap = arpag.planeAnchor; 39 | sb.AppendFormat("Center: x:{0}, y:{1}, z:{2} - ", ap.center.x, ap.center.y, ap.center.z); 40 | sb.AppendFormat("Extent: x:{0}, y:{1}, z:{2}\n", ap.extent.x, ap.extent.y, ap.extent.z); 41 | } 42 | GUI.Label(new Rect(10, 40, 800, 500), sb.ToString()); 43 | } 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARGeneratePlane.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31cac8edf84834043ac167deaeba16a9 3 | timeCreated: 1493058396 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARHitTestExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace UnityEngine.XR.iOS 5 | { 6 | /// 7 | /// 画面がタップされたらその位置でARKitのHitTest(AR空間との当たり判定)を行い、当たった位置にm_HitTransformを移動する(回転も合わせる) 8 | /// 9 | public class UnityARHitTestExample : MonoBehaviour 10 | { 11 | [Tooltip("当たった場所に移動するオブジェクト")] 12 | public Transform m_HitTransform; 13 | 14 | bool HitTestWithResultType (ARPoint point, ARHitTestResultType resultTypes) 15 | { 16 | // HitTest実行 17 | List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, resultTypes); 18 | if (hitResults.Count > 0) { 19 | foreach (var hitResult in hitResults) { 20 | Debug.Log ("Got hit!"); 21 | m_HitTransform.position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); 22 | m_HitTransform.rotation = UnityARMatrixOps.GetRotation (hitResult.worldTransform); 23 | Debug.Log (string.Format ("x:{0:0.######} y:{1:0.######} z:{2:0.######}", m_HitTransform.position.x, m_HitTransform.position.y, m_HitTransform.position.z)); 24 | return true; 25 | } 26 | } 27 | return false; 28 | } 29 | 30 | // Update is called once per frame 31 | void Update () { 32 | if (Input.touchCount > 0 && m_HitTransform != null) 33 | { 34 | var touch = Input.GetTouch(0); 35 | // タップされた 36 | if (touch.phase == TouchPhase.Began) 37 | { 38 | var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); 39 | ARPoint point = new ARPoint { 40 | x = screenPosition.x, 41 | y = screenPosition.y 42 | }; 43 | 44 | // HitTestの対象を指定する。 45 | // https://developer.apple.com/documentation/arkit/arhittestresult.resulttype 46 | ARHitTestResultType[] resultTypes = { 47 | // 検出済み平面 48 | ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent, 49 | 50 | // 検出済み平面を延長した面 51 | //ARHitTestResultType.ARHitTestResultTypeExistingPlane, 52 | 53 | // 垂直面(検出済み平面と無関係に推測したもの) 54 | ARHitTestResultType.ARHitTestResultTypeHorizontalPlane, 55 | 56 | // 特徴点(ポイントクラウドで使われているものと思われる) 57 | ARHitTestResultType.ARHitTestResultTypeFeaturePoint 58 | }; 59 | 60 | foreach (ARHitTestResultType resultType in resultTypes) 61 | { 62 | if (HitTestWithResultType (point, resultType)) 63 | { 64 | return; 65 | } 66 | } 67 | } 68 | } 69 | } 70 | 71 | 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARHitTestExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6941ec02ead994c9b848d640887441f1 3 | timeCreated: 1492806244 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARKitControl.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace UnityEngine.XR.iOS 6 | { 7 | public class UnityARKitControl : MonoBehaviour { 8 | 9 | UnityARSessionRunOption [] runOptions = new UnityARSessionRunOption[4]; 10 | UnityARAlignment [] alignmentOptions = new UnityARAlignment[3]; 11 | UnityARPlaneDetection [] planeOptions = new UnityARPlaneDetection[4]; 12 | 13 | int currentOptionIndex = 0; 14 | int currentAlignmentIndex = 0; 15 | int currentPlaneIndex = 0; 16 | 17 | // Use this for initialization 18 | void Start () { 19 | runOptions [0] = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors | UnityARSessionRunOption.ARSessionRunOptionResetTracking; 20 | runOptions [1] = UnityARSessionRunOption.ARSessionRunOptionResetTracking; 21 | runOptions [2] = UnityARSessionRunOption.ARSessionRunOptionRemoveExistingAnchors; 22 | runOptions [3] = 0; 23 | 24 | alignmentOptions [0] = UnityARAlignment.UnityARAlignmentCamera; 25 | alignmentOptions [1] = UnityARAlignment.UnityARAlignmentGravity; 26 | alignmentOptions [2] = UnityARAlignment.UnityARAlignmentGravityAndHeading; 27 | 28 | planeOptions [0] = UnityARPlaneDetection.Horizontal; 29 | planeOptions [1] = UnityARPlaneDetection.None; 30 | 31 | } 32 | 33 | // Update is called once per frame 34 | void Update () { 35 | 36 | } 37 | 38 | void OnGUI() 39 | { 40 | if (GUI.Button (new Rect (100, 100, 200, 50), "Stop")) { 41 | UnityARSessionNativeInterface.GetARSessionNativeInterface ().Pause (); 42 | } 43 | 44 | if (GUI.Button (new Rect (300, 100, 200, 50), "Start")) { 45 | ARKitWorldTackingSessionConfiguration sessionConfig = new ARKitWorldTackingSessionConfiguration (alignmentOptions [currentAlignmentIndex], planeOptions[currentPlaneIndex]); 46 | UnityARSessionNativeInterface.GetARSessionNativeInterface ().RunWithConfigAndOptions (sessionConfig, runOptions[currentOptionIndex]); 47 | } 48 | 49 | 50 | if (GUI.Button (new Rect (100, 300, 200, 100), "Start Non-WT Session")) { 51 | ARKitSessionConfiguration sessionConfig = new ARKitSessionConfiguration (alignmentOptions [currentAlignmentIndex], true, true); 52 | UnityARSessionNativeInterface.GetARSessionNativeInterface ().RunWithConfig (sessionConfig); 53 | } 54 | 55 | 56 | string runOptionStr = (currentOptionIndex == 0 ? "Full" : (currentOptionIndex == 1 ? "Tracking" : (currentOptionIndex == 2 ? "Anchors" : "None"))); 57 | if (GUI.Button (new Rect (100, 200, 150, 50), "RunOption:" + runOptionStr)) { 58 | currentOptionIndex = (currentOptionIndex + 1) % 4; 59 | } 60 | 61 | string alignmentOptionStr = (currentAlignmentIndex == 0 ? "Camera" : (currentAlignmentIndex == 1 ? "Gravity" : "GravityAndHeading")); 62 | if (GUI.Button (new Rect (300, 200, 150, 50), "AlignOption:" + alignmentOptionStr)) { 63 | currentAlignmentIndex = (currentAlignmentIndex + 1) % 3; 64 | } 65 | 66 | string planeOptionStr = (currentPlaneIndex == 0 ? "Both" : (currentPlaneIndex == 1 ? "Horizontal" : (currentPlaneIndex == 2 ? "Vertical" : "None"))); 67 | if (GUI.Button (new Rect (500, 200, 150, 50), "PlaneOption:" + planeOptionStr)) { 68 | currentPlaneIndex = (currentPlaneIndex + 1) % 4; 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARKitControl.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4977b930c0f8843c8b8a101ba5bf3c8f 3 | timeCreated: 1493240142 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityARVideo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b58ecea7a196242dd879c814ac05084c 3 | timeCreated: 1492796577 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityPointCloudExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using UnityEngine.XR.iOS; 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | using System.Runtime.InteropServices; 7 | 8 | public class UnityPointCloudExample : MonoBehaviour 9 | { 10 | public uint numPointsToShow = 100; 11 | public GameObject PointCloudPrefab = null; 12 | private List pointCloudObjects; 13 | private Vector3[] m_PointCloudData; 14 | 15 | public void Start() 16 | { 17 | UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; 18 | if (PointCloudPrefab != null) 19 | { 20 | pointCloudObjects = new List (); 21 | for (int i =0; i < numPointsToShow; i++) 22 | { 23 | pointCloudObjects.Add (Instantiate (PointCloudPrefab)); 24 | } 25 | } 26 | } 27 | 28 | public void ARFrameUpdated(UnityARCamera camera) 29 | { 30 | m_PointCloudData = camera.pointCloudData; 31 | } 32 | 33 | public void Update() 34 | { 35 | if (PointCloudPrefab != null && m_PointCloudData != null) 36 | { 37 | for (int count = 0; count < Math.Min (m_PointCloudData.Length, numPointsToShow); count++) 38 | { 39 | Vector4 vert = m_PointCloudData [count]; 40 | GameObject point = pointCloudObjects [count]; 41 | point.transform.position = new Vector3(vert.x, vert.y, vert.z); 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/UnityPointCloudExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5ab0fdfbf2334e8dbbcdda6ceada7e3 3 | timeCreated: 1493835634 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0d3c230228c3e4ba4b8de56da4f82e2e 3 | folderAsset: yes 4 | timeCreated: 1492534108 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility/UnityARAnchorManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | 5 | namespace UnityEngine.XR.iOS 6 | { 7 | public class UnityARAnchorManager 8 | { 9 | 10 | 11 | private Dictionary planeAnchorMap; 12 | 13 | 14 | public UnityARAnchorManager () 15 | { 16 | planeAnchorMap = new Dictionary (); 17 | UnityARSessionNativeInterface.ARAnchorAddedEvent += AddAnchor; 18 | UnityARSessionNativeInterface.ARAnchorUpdatedEvent += UpdateAnchor; 19 | UnityARSessionNativeInterface.ARAnchorRemovedEvent += RemoveAnchor; 20 | 21 | } 22 | 23 | 24 | public void AddAnchor(ARPlaneAnchor arPlaneAnchor) 25 | { 26 | GameObject go = UnityARUtility.CreatePlaneInScene (arPlaneAnchor); 27 | go.AddComponent (); //this is so these GOs persist across scene loads 28 | ARPlaneAnchorGameObject arpag = new ARPlaneAnchorGameObject (); 29 | arpag.planeAnchor = arPlaneAnchor; 30 | arpag.gameObject = go; 31 | planeAnchorMap.Add (arPlaneAnchor.identifier, arpag); 32 | } 33 | 34 | public void RemoveAnchor(ARPlaneAnchor arPlaneAnchor) 35 | { 36 | if (planeAnchorMap.ContainsKey (arPlaneAnchor.identifier)) { 37 | ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; 38 | GameObject.Destroy (arpag.gameObject); 39 | planeAnchorMap.Remove (arPlaneAnchor.identifier); 40 | } 41 | } 42 | 43 | public void UpdateAnchor(ARPlaneAnchor arPlaneAnchor) 44 | { 45 | if (planeAnchorMap.ContainsKey (arPlaneAnchor.identifier)) { 46 | ARPlaneAnchorGameObject arpag = planeAnchorMap [arPlaneAnchor.identifier]; 47 | UnityARUtility.UpdatePlaneWithAnchorTransform (arpag.gameObject, arPlaneAnchor); 48 | arpag.planeAnchor = arPlaneAnchor; 49 | planeAnchorMap [arPlaneAnchor.identifier] = arpag; 50 | } 51 | } 52 | 53 | public void Destroy() 54 | { 55 | foreach (ARPlaneAnchorGameObject arpag in GetCurrentPlaneAnchors()) { 56 | GameObject.Destroy (arpag.gameObject); 57 | } 58 | 59 | planeAnchorMap.Clear (); 60 | } 61 | 62 | public List GetCurrentPlaneAnchors() 63 | { 64 | return planeAnchorMap.Values.ToList (); 65 | } 66 | } 67 | } 68 | 69 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility/UnityARAnchorManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00b197bb73412448e9a5e14be146aaeb 3 | timeCreated: 1492557010 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility/UnityARMatrixOps.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace UnityEngine.XR.iOS 4 | { 5 | public class UnityARMatrixOps 6 | { 7 | 8 | public static Vector3 GetPosition(Matrix4x4 matrix) 9 | { 10 | // Convert from ARKit's right-handed coordinate 11 | // system to Unity's left-handed 12 | Vector3 position = matrix.GetColumn(3); 13 | position.z = -position.z; 14 | 15 | return position; 16 | } 17 | 18 | public static Quaternion GetRotation(Matrix4x4 matrix) 19 | { 20 | // Convert from ARKit's right-handed coordinate 21 | // system to Unity's left-handed 22 | Quaternion rotation = QuaternionFromMatrix(matrix); 23 | rotation.z = -rotation.z; 24 | rotation.w = -rotation.w; 25 | 26 | return rotation; 27 | } 28 | 29 | 30 | static Quaternion QuaternionFromMatrix(Matrix4x4 m) { 31 | // Adapted from: http://www.euclideanspace.com/maths/geometry/rotations/conversions/matrixToQuaternion/index.htm 32 | Quaternion q = new Quaternion(); 33 | q.w = Mathf.Sqrt( Mathf.Max( 0, 1 + m[0,0] + m[1,1] + m[2,2] ) ) / 2; 34 | q.x = Mathf.Sqrt( Mathf.Max( 0, 1 + m[0,0] - m[1,1] - m[2,2] ) ) / 2; 35 | q.y = Mathf.Sqrt( Mathf.Max( 0, 1 - m[0,0] + m[1,1] - m[2,2] ) ) / 2; 36 | q.z = Mathf.Sqrt( Mathf.Max( 0, 1 - m[0,0] - m[1,1] + m[2,2] ) ) / 2; 37 | q.x *= Mathf.Sign( q.x * ( m[2,1] - m[1,2] ) ); 38 | q.y *= Mathf.Sign( q.y * ( m[0,2] - m[2,0] ) ); 39 | q.z *= Mathf.Sign( q.z * ( m[1,0] - m[0,1] ) ); 40 | return q; 41 | } 42 | 43 | } 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility/UnityARMatrixOps.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37808a86538754725a15d36128fd2afc 3 | timeCreated: 1492800582 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/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility/UnityARUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | 4 | namespace UnityEngine.XR.iOS 5 | { 6 | public class UnityARUtility 7 | { 8 | private MeshCollider meshCollider; //declared to avoid code stripping of class 9 | private MeshFilter meshFilter; //declared to avoid code stripping of class 10 | private static GameObject planePrefab = null; 11 | 12 | public static void InitializePlanePrefab(GameObject go) 13 | { 14 | planePrefab = go; 15 | } 16 | 17 | public static GameObject CreatePlaneInScene(ARPlaneAnchor arPlaneAnchor) 18 | { 19 | GameObject plane; 20 | if (planePrefab != null) { 21 | plane = GameObject.Instantiate(planePrefab); 22 | } else { 23 | plane = new GameObject (); //put in a blank gameObject to get at least a transform to manipulate 24 | } 25 | 26 | plane.name = arPlaneAnchor.identifier; 27 | 28 | return UpdatePlaneWithAnchorTransform(plane, arPlaneAnchor); 29 | 30 | } 31 | 32 | public static GameObject UpdatePlaneWithAnchorTransform(GameObject plane, ARPlaneAnchor arPlaneAnchor) 33 | { 34 | 35 | //do coordinate conversion from ARKit to Unity 36 | plane.transform.position = UnityARMatrixOps.GetPosition (arPlaneAnchor.transform); 37 | plane.transform.rotation = UnityARMatrixOps.GetRotation (arPlaneAnchor.transform); 38 | 39 | MeshFilter mf = plane.GetComponentInChildren (); 40 | 41 | if (mf != null) { 42 | //since our plane mesh is actually 10mx10m in the world, we scale it here by 0.1f 43 | mf.gameObject.transform.localScale = new Vector3(arPlaneAnchor.extent.x * 0.1f ,arPlaneAnchor.extent.y * 0.1f ,arPlaneAnchor.extent.z * 0.1f ); 44 | 45 | //convert our center position to unity coords 46 | mf.gameObject.transform.localPosition = new Vector3(arPlaneAnchor.center.x,arPlaneAnchor.center.y, -arPlaneAnchor.center.z); 47 | } 48 | 49 | return plane; 50 | } 51 | 52 | 53 | 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Plugins/iOS/UnityARKit/Utility/UnityARUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9736aad5d8518481ab7e8d1d0b0e6e36 3 | timeCreated: 1492800582 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/ARKitPluginOriginal/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: add6e5fca69477444b121f7c695ceb8e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerDiffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/Textures/PlayerDiffuse.png -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerDiffuse.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3cc890ba79fb47449fb51893aa9b363 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerNormals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/Textures/PlayerNormals.png -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerNormals.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d98be175031405b4fb3f6a5f459a22e4 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 1 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: 1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerOcclusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/Textures/PlayerOcclusion.png -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerOcclusion.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ae2af98f5c9f0243806bfb6ccbbdd19 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 1024 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerSpecular.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/Textures/PlayerSpecular.tif -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/Textures/PlayerSpecular.tif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc9b1c6383841ea4f9e532a49c651ff6 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 1 9 | linearTexture: 0 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | cubemapConvolution: 0 24 | cubemapConvolutionSteps: 8 25 | cubemapConvolutionExponent: 1.5 26 | seamlessCubemap: 0 27 | textureFormat: -1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: -1 34 | nPOTScale: 1 35 | lightmap: 0 36 | rGBM: 0 37 | compressionQuality: 50 38 | spriteMode: 0 39 | spriteExtrude: 1 40 | spriteMeshType: 1 41 | alignment: 0 42 | spritePivot: {x: .5, y: .5} 43 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 44 | spritePixelsToUnits: 100 45 | alphaIsTransparency: 0 46 | textureType: -1 47 | buildTargetSettings: [] 48 | spriteSheet: 49 | sprites: [] 50 | spritePackingTag: 51 | userData: 52 | assetBundleName: 53 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/UnityARAmbient.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using UnityEngine.XR.iOS; 3 | 4 | namespace UnityEngine.XR.iOS 5 | { 6 | /// 7 | /// ARKitが推測した周囲の明るさをLightのIntensityに反映させる 8 | /// 9 | public class UnityARAmbient : MonoBehaviour 10 | { 11 | [Tooltip("現実空間の明るさを反映させるライト")] 12 | [SerializeField] 13 | Light l; 14 | private UnityARSessionNativeInterface m_Session; 15 | 16 | public void Start() 17 | { 18 | #if !UNITY_EDITOR 19 | m_Session = UnityARSessionNativeInterface.GetARSessionNativeInterface (); 20 | #endif 21 | } 22 | #if !UNITY_EDITOR 23 | public void Update() 24 | { 25 | // ARKitの明度をUnityの明度に変換する 26 | // ARKitの明度範囲 0-2000 27 | // Unityの明度範囲 0-8 (for over-bright lights) 28 | float newai = m_Session.GetARAmbientIntensity(); 29 | l.intensity = newai / 1000.0f; 30 | } 31 | #endif 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/UnityARAmbient.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5587c957048494a2f96db36e0995449e 3 | timeCreated: 1492805300 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/ARKitPluginOriginal/UnityARBallz.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75972bcfc855b486593ec2ec68da0b81 3 | timeCreated: 1496964608 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/UnityARKitScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c159f2591a9b5c843b0a0442451f78f8 3 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/UnityARShadows.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 14d17ec7304f440b48e6b953ba7a5895 3 | timeCreated: 1497467387 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/UnityParticlePainter.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0327f0aa0142146c291df8203b848257 3 | timeCreated: 1494021616 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/checker_large UV.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arumani/UnityARKitPlugin-samples/23af9f64eeb3b0e4e4ae972470dd691f96c086cb/Assets/ARKitPluginOriginal/checker_large UV.gif -------------------------------------------------------------------------------- /Assets/ARKitPluginOriginal/checker_large UV.gif.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70976333360a046c1bcf8dc7cb1f593c 3 | timeCreated: 1489788026 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | serializedVersion: 2 31 | filterMode: -1 32 | aniso: -1 33 | mipBias: -1 34 | wrapU: -1 35 | wrapV: -1 36 | wrapW: -1 37 | nPOTScale: 1 38 | lightmap: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: 0.5, y: 0.5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaUsage: 0 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: 0 51 | textureShape: 1 52 | maxTextureSizeSet: 0 53 | compressionQualitySet: 0 54 | textureFormatSet: 0 55 | platformSettings: 56 | - buildTarget: DefaultTexturePlatform 57 | maxTextureSize: 256 58 | textureFormat: -1 59 | textureCompression: 0 60 | compressionQuality: 50 61 | crunchedCompression: 0 62 | allowsAlphaSplitting: 0 63 | overridden: 0 64 | - buildTarget: Standalone 65 | maxTextureSize: 256 66 | textureFormat: -1 67 | textureCompression: 0 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | - buildTarget: iPhone 73 | maxTextureSize: 256 74 | textureFormat: -1 75 | textureCompression: 0 76 | compressionQuality: 50 77 | crunchedCompression: 0 78 | allowsAlphaSplitting: 0 79 | overridden: 0 80 | - buildTarget: tvOS 81 | maxTextureSize: 256 82 | textureFormat: -1 83 | textureCompression: 0 84 | compressionQuality: 50 85 | crunchedCompression: 0 86 | allowsAlphaSplitting: 0 87 | overridden: 0 88 | - buildTarget: Android 89 | maxTextureSize: 256 90 | textureFormat: 4 91 | textureCompression: 0 92 | compressionQuality: 50 93 | crunchedCompression: 0 94 | allowsAlphaSplitting: 0 95 | overridden: 1 96 | - buildTarget: WebGL 97 | maxTextureSize: 256 98 | textureFormat: -1 99 | textureCompression: 0 100 | compressionQuality: 50 101 | crunchedCompression: 0 102 | allowsAlphaSplitting: 0 103 | overridden: 0 104 | spriteSheet: 105 | serializedVersion: 2 106 | sprites: [] 107 | outline: [] 108 | physicsShape: [] 109 | spritePackingTag: 110 | userData: 111 | assetBundleName: 112 | assetBundleVariant: 113 | -------------------------------------------------------------------------------- /Assets/Samples.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d685d24a8a5214dfc8f3c45b95f8d131 3 | folderAsset: yes 4 | timeCreated: 1497710661 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c32c14a92a7d8454190e624e101afe3e 3 | folderAsset: yes 4 | timeCreated: 1497715474 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Prefabs/Debug.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1840902345255668} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1840902345255668 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4725965494444892} 22 | - component: {fileID: 114693712381717292} 23 | m_Layer: 0 24 | m_Name: Debug 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4725965494444892 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1840902345255668} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114693712381717292 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1840902345255668} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: a778cf2ceb9d449e9835cb7f977a7f01, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | targets: 55 | - label: Camera 56 | transform: {fileID: 0} 57 | -------------------------------------------------------------------------------- /Assets/Samples/Prefabs/Debug.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64f268249805b4901918c801a9bcce64 3 | timeCreated: 1498366719 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Prefabs/Environment.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5fb1acaafa264240af916c5f5947e22 3 | timeCreated: 1497715492 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Prefabs/GeneratePlanes.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1473907812233370} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1473907812233370 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 5 20 | m_Component: 21 | - component: {fileID: 4824890199368820} 22 | - component: {fileID: 114793299028075100} 23 | m_Layer: 0 24 | m_Name: GeneratePlanes 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4824890199368820 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1473907812233370} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_Children: [] 40 | m_Father: {fileID: 0} 41 | m_RootOrder: 0 42 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 43 | --- !u!114 &114793299028075100 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1473907812233370} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 31cac8edf84834043ac167deaeba16a9, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | planePrefab: {fileID: 1372998203143648, guid: f879aaf3eeb0c467eb22cbaf08dc97a4, 55 | type: 2} 56 | displayPositions: 1 57 | -------------------------------------------------------------------------------- /Assets/Samples/Prefabs/GeneratePlanes.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9de56c4d1867d46fc8c6fc14391ab46f 3 | timeCreated: 1498370080 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de64b542802f4414da3f9a3b71f85b3b 3 | folderAsset: yes 4 | timeCreated: 1497710671 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes/00_Menu.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f49b8098e65e84929b6837e2668697ef 3 | timeCreated: 1498370141 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes/01_PositionalTrackingVR.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d49062bcef0441989d9b4577132ed1e 3 | timeCreated: 1497710762 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes/02_PositionalTrackingAR.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6be3ab962d538435b9769cc2f9f3b370 3 | timeCreated: 1497710762 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes/03_PlaneDetection.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e86617e2fa22441a1bf50096fa68a006 3 | ` -------------------------------------------------------------------------------- /Assets/Samples/Scenes/04_PointCloud.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18cb2898acc824109ab86723633a71c0 3 | timeCreated: 1497710762 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes/05_HitTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e5d22ac25afc45449c61ecc6469f95f 3 | timeCreated: 1497710762 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Samples/Scenes/06_Intensity.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8af42a271aac94b089310d02d6b7d65c 3 | timeCreated: 1497710762 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8be06cd5d5a0a4c4a9d76c60af4b4bd5 3 | folderAsset: yes 4 | timeCreated: 1497710677 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e51238fa6bfcf4d9ebd2ad46a27335b4 3 | folderAsset: yes 4 | timeCreated: 1497712914 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug/IntensityDisplay.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class IntensityDisplay : MonoBehaviour 7 | { 8 | GUIStyle guiStyle; 9 | UnityARSessionNativeInterface m_Session; 10 | 11 | void Start() 12 | { 13 | guiStyle = new GUIStyle(); 14 | guiStyle.fontSize = 20; 15 | #if !UNITY_EDITOR 16 | m_Session = UnityARSessionNativeInterface.GetARSessionNativeInterface (); 17 | #endif 18 | } 19 | 20 | 21 | void OnGUI() 22 | { 23 | #if !UNITY_EDITOR 24 | float newai = m_Session.GetARAmbientIntensity(); 25 | GUI.Label(new Rect(10, 40, 400, 80), "Intensity " + (newai / 1000.0f), guiStyle); 26 | #endif 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug/IntensityDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfca3294ffdf440e6bbf3a9060e6c879 3 | timeCreated: 1498390943 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug/PositionDisplay.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using UnityEngine; 5 | using UnityEngine.SceneManagement; 6 | 7 | /// 8 | /// デバッグ用にUnity上の座標を表示する 9 | /// 10 | public class PositionDisplay : MonoBehaviour 11 | { 12 | [System.Serializable] 13 | public class Target 14 | { 15 | public string label; 16 | public Transform transform; 17 | } 18 | 19 | [SerializeField] 20 | Target[] targets; 21 | 22 | IEnumerator Start() 23 | { 24 | enabled = false; 25 | // 誤タップ防止 26 | yield return new WaitForSeconds(0.5f); 27 | enabled = true; 28 | } 29 | 30 | void OnGUI() 31 | { 32 | GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height)); 33 | GUILayout.BeginHorizontal(); 34 | 35 | if (targets != null) 36 | { 37 | var sb = new StringBuilder(); 38 | foreach (var t in targets) 39 | { 40 | sb.AppendFormat(t.label + " " + t.transform.position + "\n"); 41 | } 42 | var labelGuiStyle = new GUIStyle(); 43 | labelGuiStyle.fontSize = 16; 44 | GUI.Label(new Rect(10, 10, 400, (targets.Length * 18 + 10)), sb.ToString(), labelGuiStyle); 45 | } 46 | 47 | GUILayout.FlexibleSpace(); 48 | 49 | var buttonGuiStyle = GUI.skin.button; 50 | buttonGuiStyle.fontSize = 22; 51 | if (GUILayout.Button("Return to Menu", buttonGuiStyle)) 52 | { 53 | SceneManager.LoadScene("00_Menu"); 54 | } 55 | 56 | GUILayout.EndHorizontal(); 57 | GUILayout.EndArea(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug/PositionDisplay.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a778cf2ceb9d449e9835cb7f977a7f01 3 | timeCreated: 1497712954 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug/Random3DObject.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | /// 4 | /// ランダムにプリミティブ型の3Dオブジェクトを作って配置する 5 | /// 6 | public class Random3DObject : MonoBehaviour 7 | { 8 | 9 | [SerializeField] 10 | Transform centerPositionObject; 11 | 12 | [SerializeField] 13 | float maxLengthFromCenter; 14 | 15 | [SerializeField] 16 | float maxSize; 17 | 18 | [SerializeField] 19 | int numberOfObjects; 20 | 21 | [SerializeField] 22 | PrimitiveType[] primitiveTypes; 23 | 24 | void Start() 25 | { 26 | var systemRandom = new System.Random(); 27 | 28 | for (int i = 0; i < numberOfObjects; i++) 29 | { 30 | var pos = Random.insideUnitSphere * maxLengthFromCenter; 31 | var primitiveType = primitiveTypes[systemRandom.Next(primitiveTypes.Length)]; 32 | 33 | var go = GameObject.CreatePrimitive(primitiveType); 34 | go.transform.parent = transform; 35 | go.transform.position = centerPositionObject.transform.position + pos; 36 | go.transform.localScale = Vector3.one * Random.Range(0.01f, maxSize); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Debug/Random3DObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6cb193f3d81841c4b00fa41a4627356 3 | timeCreated: 1497714083 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Launcher.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.SceneManagement; 3 | using System.Collections; 4 | 5 | public class Launcher : MonoBehaviour 6 | { 7 | [SerializeField] 8 | string[] sceneNames; 9 | 10 | IEnumerator Start() 11 | { 12 | enabled = false; 13 | // 誤タップ防止 14 | yield return new WaitForSeconds(0.5f); 15 | enabled = true; 16 | } 17 | 18 | void OnGUI() 19 | { 20 | var guiStyle = GUI.skin.button; 21 | guiStyle.fontSize = 36; 22 | 23 | GUILayout.BeginArea(new Rect(0, 0, Screen.width, Screen.height)); 24 | GUILayout.BeginHorizontal(); 25 | GUILayout.FlexibleSpace(); 26 | GUILayout.BeginVertical(); 27 | 28 | foreach (var sceneName in sceneNames) 29 | { 30 | if (GUILayout.Button(sceneName, guiStyle)) 31 | { 32 | SceneManager.LoadScene(sceneName); 33 | } 34 | } 35 | 36 | GUILayout.EndVertical(); 37 | GUILayout.EndHorizontal(); 38 | GUILayout.EndArea(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Samples/Scripts/Launcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20b63314a71c44a8fa3113f1dd7d5ab8 3 | timeCreated: 1498370310 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017, Unity Technologies 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 13 | all 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 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Samples/Scenes/00_Menu.unity 10 | guid: f49b8098e65e84929b6837e2668697ef 11 | - enabled: 1 12 | path: Assets/Samples/Scenes/01_PositionalTrackingVR.unity 13 | guid: 1d49062bcef0441989d9b4577132ed1e 14 | - enabled: 1 15 | path: Assets/Samples/Scenes/02_PositionalTrackingAR.unity 16 | guid: 6be3ab962d538435b9769cc2f9f3b370 17 | - enabled: 1 18 | path: Assets/Samples/Scenes/03_PlaneDetection.unity 19 | guid: e86617e2fa22441a1bf50096fa68a006 20 | - enabled: 1 21 | path: Assets/Samples/Scenes/04_PointCloud.unity 22 | guid: 00000000000000000000000000000000 23 | - enabled: 1 24 | path: Assets/Samples/Scenes/05_HitTest.unity 25 | guid: 00000000000000000000000000000000 26 | - enabled: 1 27 | path: Assets/Samples/Scenes/06_Intensity.unity 28 | guid: 00000000000000000000000000000000 29 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | m_DefaultBehaviorMode: 0 12 | m_SpritePackerMode: 2 13 | m_SpritePackerPaddingPower: 1 14 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 15 | m_ProjectGenerationRootNamespace: 16 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_CustomRenderPipeline: {fileID: 0} 43 | m_TransparencySortMode: 0 44 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 45 | m_DefaultRenderingPath: 1 46 | m_DefaultMobileRenderingPath: 1 47 | m_TierSettings: [] 48 | m_LightmapStripping: 0 49 | m_FogStripping: 0 50 | m_InstancingStripping: 0 51 | m_LightmapKeepPlain: 1 52 | m_LightmapKeepDirCombined: 1 53 | m_LightmapKeepDynamicPlain: 1 54 | m_LightmapKeepDynamicDirCombined: 1 55 | m_LightmapKeepShadowMask: 1 56 | m_LightmapKeepSubtractive: 1 57 | m_FogKeepLinear: 1 58 | m_FogKeepExp: 1 59 | m_FogKeepExp2: 1 60 | m_AlbedoSwatchInfos: [] 61 | m_LightsUseLinearIntensity: 0 62 | m_LightsUseColorTemperature: 0 63 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_MinPenetrationForPenalty: 0.01 17 | m_BaumgarteScale: 0.2 18 | m_BaumgarteTimeOfImpactScale: 0.75 19 | m_TimeToSleep: 0.5 20 | m_LinearSleepTolerance: 0.01 21 | m_AngularSleepTolerance: 2 22 | m_QueriesHitTriggers: 1 23 | m_QueriesStartInColliders: 1 24 | m_ChangeStopsCallbacks: 0 25 | m_AlwaysShowColliders: 0 26 | m_ShowColliderSleep: 1 27 | m_ShowColliderContacts: 0 28 | m_ContactArrowScale: 0.2 29 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 30 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 31 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 32 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 33 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.6.1p2 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 0 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Good 11 | pixelLightCount: 2 12 | shadows: 1 13 | shadowResolution: 1 14 | shadowProjection: 0 15 | shadowCascades: 2 16 | shadowDistance: 20 17 | shadowNearPlaneOffset: 2 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | blendWeights: 2 21 | textureQuality: 0 22 | anisotropicTextures: 1 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 1 26 | realtimeReflectionProbes: 1 27 | billboardsFaceCameraPosition: 1 28 | vSyncCount: 1 29 | lodBias: 1 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 256 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | m_PerPlatformDefaultQuality: 36 | Android: 0 37 | FlashPlayer: 0 38 | GLES Emulation: 0 39 | PS3: 0 40 | Standalone: 0 41 | Web: 0 42 | Wii: 0 43 | XBOX360: 0 44 | iPhone: 0 45 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | tags: 6 | - 7 | Builtin Layer 0: Default 8 | Builtin Layer 1: TransparentFX 9 | Builtin Layer 2: Ignore Raycast 10 | Builtin Layer 3: 11 | Builtin Layer 4: Water 12 | Builtin Layer 5: 13 | Builtin Layer 6: 14 | Builtin Layer 7: 15 | User Layer 8: 16 | User Layer 9: 17 | User Layer 10: 18 | User Layer 11: 19 | User Layer 12: 20 | User Layer 13: 21 | User Layer 14: 22 | User Layer 15: 23 | User Layer 16: 24 | User Layer 17: 25 | User Layer 18: 26 | User Layer 19: 27 | User Layer 20: 28 | User Layer 21: 29 | User Layer 22: 30 | User Layer 23: 31 | User Layer 24: 32 | User Layer 25: 33 | User Layer 26: 34 | User Layer 27: 35 | User Layer 28: 36 | User Layer 29: 37 | User Layer 30: 38 | User Layer 31: 39 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | CrashReportingSettings: 11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 12 | m_Enabled: 0 13 | UnityPurchasingSettings: 14 | m_Enabled: 0 15 | m_TestMode: 0 16 | UnityAnalyticsSettings: 17 | m_Enabled: 0 18 | m_InitializeOnStartup: 1 19 | m_TestMode: 0 20 | m_TestEventUrl: 21 | m_TestConfigUrl: 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # このレポジトリについて 2 | 3 | [Unity ARKit Plugin](https://bitbucket.org/Unity-Technologies/unity-arkit-plugin)を元に、機能ごとのミニマム構成に絞ったシーンを作り、スクリプトにコメントを追加したものです。 4 | 5 | Pluginのサンプルで機能は全てカバーされてはいるのですが、複数機能が混じっていて若干分かり難く感じたため、機能単体でそれぞれ何をしているか理解できるようにする意図で作っています。 6 | 7 | - Unity ARKit Pluginに含まれていたファイルは Assets/ARKitPluginOriginal に移動しました(サンプルシーンがルートに置いてあるなど、今回作ったものと混同しそうだったため)。 8 | - 元のPluginのスクリプトは以下の部分のみ手を加えました 9 | - サンプルシーンで利用したスクリプトのみ、日本語コメントやリファレンスへのリンクを追加 10 | - コンポーネントの設定をInspectorから行えるように変更 11 | - 元にしたPluginのバージョンは、本プロジェクト作成時点での最新コミット 1d588da (2017/6/15)です。 12 | 13 | # ARKitについて 14 | 15 | ## ARKit全般 16 | 17 | - [AppleのARKitポータル](https://developer.apple.com/arkit/) 18 | - [Unity ARKit Pluginレポジトリ](https://bitbucket.org/Unity-Technologies/unity-arkit-plugin) 19 | - [アップルの「ARKit」を徹底解説、技術よりも戦略がすごい(西田宗千佳)](http://japanese.engadget.com/2017/06/21/arkit/) 20 | - [ARKitができる事、できない事](http://qiita.com/arumani/items/6efad65a17e2eafde5a1) 21 | 22 | ## 開発環境の作り方 23 | 24 | - [UnityでiOSのARKitを動かす手順](http://qiita.com/arumani/items/aac7372a171e441e1f16) 25 | - [Unityで「ARKit」を使ってみよう](https://tech.sge.cyberagent.co.jp/gameengine/unity/arkit/) 26 | 27 | # 各シーンの説明 28 | 29 | Samples/Scenes 以下に含まれる各シーンの説明です 30 | 各シーンで特にARKitの機能を使っているクラスやオブジェクトについて、都度説明をいれています。 31 | 32 | ## 01_PositionalTrackingVR 33 | 34 | 通常の3Dゲーム(カメラ映像が無く全てCGで構成された3D空間)のMain CameraをARKitのポジショントラッキングで移動/回転できるようにするサンプルです。 35 | 36 | ### UnityARCameraManager 37 | 38 | - ARKitを初期化する(初期化内容はInspectorで設定できるよう変更しました) 39 | - 端末カメラの3D空間上での位置と回転を取得し、Unity上のCameraに反映させる 40 | 41 | ### UnityARCameraNearFar(Main Cameraに追加) 42 | 43 | - このコンポーネントを追加しない場合、カメラのNearクリップ/Farクリップがプラグインの内部処理によってに0.01 / 30.0 に設定されてしまいます。このコンポーネントを追加すると、追加したカメラのNear/Farの値が使われるようになり、Unity上で意図したクリッピングになります。 44 | 45 | ## 02_PositionalTrackingAR 46 | 47 | ARの基本形として、カメラ映像の中にARで3Dオブジェクトが重なり、ポジトラで移動できるだけのものです。01シーンとの違いは、Main Cameraの背景がSkybox → Depth Onlyになった点と、同オブジェクトにUnityARVideoを追加した点です。 48 | 49 | ### UnityARVideo 50 | 51 | - このコンポーネントをCameraオブジェクトにつけると、そのCameraの背景としてARKitによるカメラ画像が表示されます 52 | - Clear MaterialにYUVMaterialを設定します 53 | 54 | ## 03_PlaneDetection 55 | 56 | 水平面(床や机など)の検出を行います。検出した平面が枠で示されます。 57 | 58 | ### GeneratePlanes 59 | 60 | - UnityARAnchorManagerを生成し、検出した平面を可視化するPrefabを設定する 61 | 62 | ### UnityARAnchorManager 63 | 64 | - ARKitの平面検出/更新/削除イベントを受信する 65 | - 検出/更新の場合は上記で設定したPrefabを作り、削除であればそれを削除する 66 | 67 | ## 04_PointCloud 68 | 69 | ポイントクラウド(3次元の点座標情報)を取得し、点の位置にパーティクルを表示するサンプルです。 70 | 71 | ### PointCloudParticle 72 | 73 | - ARKitのフレーム更新を受け取る 74 | - フレーム情報からポイントクラウドを取得 75 | - 各ポイントの座標に点(Particle)を表示する 76 | 77 | ## 05_HitTest 78 | 79 | 画面をタップすると、3D空間上のその位置にCubeを移動します。 80 | 81 | ### UnityARHitTestExample 82 | 83 | - 画面のタップ位置をHitTestを行う座標に変換する 84 | - タップ位置から当たり判定を実行する 85 | 86 | ## 06_Intensity 87 | 88 | 周囲の明るさを推定し、Directional Lightに反映するサンプルです。 89 | 90 | ### UnityARAmbient 91 | - ARKitから受け取った明るさ情報をUnity用に変換し、ライトに反映する 92 | 93 | -------------------------------------------------------------------------------- /UnityArkitPlugin_SCENES.txt: -------------------------------------------------------------------------------- 1 | Example Scenes in Project: 2 | 3 | UnityARKitScene.unity: This scene is a "minimal" scene that shows most of the ARKit functionality 4 | 5 | It has a GameObject (GO) called ARCameraManager which has the script UnityARCameraManager.cs, and has a reference to the Main Camera in the scene. On startup, this script initializes the ARKit and updates the camera position, rotation and projectionMatrix based on the information updated per frame by the ARKit. 6 | 7 | The Main Camera has a script on it called UnityARVideo.cs, which updates the live video using a reference to a YUVMaterial which contains a shader to carry out the rendering of the video. 8 | 9 | There is a GO called RandomCube that is the checkerboard cube in the scene that is placed at 1 unit in the z direction from the origin of the scene. Since our tracking begins with the Main Camera position and rotation set at the origin, when you startup the scene you should be able to see a checkered cube 1 meter straight in front of you. 10 | 11 | There is a GO called GeneratePlanes which has UnityARGeneratePlane script which on it which references a prefab to display the generated planes. The script hooks into the horizontal plane detection and update events that ARKit signals so that every new plane detected gets a corresponding instance of the prefab placed in the world. It uses some utility scripts to keep track of the planes detected and to generate the instances. As you scan the scene, this GO should generate an instance of the prefab you have referenced from it each time ARKit detects a plane, and it will update the extents and orientation of the prefab instance based on the plane update events. 12 | 13 | There is a GO called HitCube which has a script called UnityARHitTestExample which references the parent transform. The script does a ARKit hit test whenever a touch is detected on the screen, and the resulting position of the hit test result is used to place the parent transform of the cube. When running the scene, touching on the screen would move the HitCube to where your touch intersected a plane, or if a plane was not hit, the nearest feature point. 14 | 15 | There is a GO called PointCloudParticleExample which has a script of the same name, which gets the point cloud data from ARKit, and displays a particle per point data in the cloud. This shows in the scene as little yellow dots. 16 | 17 | The Directional Light in the scene has a UnityARAmbient script on it, which uses ARKit light estimation value to change the intensity of the light. So if you go into a dark room, the objects in the scene will be lit with a less bright light than if you were in daylight. 18 | 19 | 20 | UnityParticlePainter.unity: This scene is a sample that allows you to paint particles into your scene to augment your surroundings. 21 | 22 | The UnityARCameraManager script is setup the same as way as in the minimal scene. 23 | The main script used to implement the painting functionality is ParticlePainter.cs. The way it works: it has three modes of painting through which you can cycle as many times as you want using the button on the top right. The first mode is "OFF", which allows you to navigate through the scene using the phone so that you can examine your artistic masterpiece. The second mode is "PICK", which brings up a color picker from which you can pick the color of the paint you will use. The third mode is "PAINT", which allows you to move the phone around and cause the app to leave particles of the picked color behind in the world. This will continuously generate particles that as long as you move more than a certain threshold distance. After you have painted, or if you want to start a new section of paint or a new color, press the button again the required number of times to get to the mode you need. 24 | 25 | There is some external source for HSVPicker that was used for this example: https://github.com/judah4/HSV-Color-Picker-Unity 26 | 27 | --------------------------------------------------------------------------------