├── ProjectSettings ├── ProjectVersion.txt ├── TagManager.asset ├── AudioManager.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── TimeManager.asset ├── DynamicsManager.asset ├── EditorSettings.asset ├── NetworkManager.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── GraphicsSettings.asset ├── Physics2DSettings.asset ├── ClusterInputManager.asset ├── EditorBuildSettings.asset └── UnityConnectSettings.asset ├── Assets ├── Plugins.meta ├── Cube.prefab ├── TiltBrush.unity ├── UnityARKitScene.unity.meta ├── checker_large UV.gif ├── TemplateSystem.prefab ├── Models │ ├── Characters │ │ ├── Player.fbx │ │ ├── Materials │ │ │ ├── GunMaterial.mat │ │ │ └── GunMaterial.mat.meta │ │ └── Materials.meta │ └── Characters.meta ├── Textures │ ├── PlayerDiffuse.png │ ├── PlayerNormals.png │ ├── PlayerOcclusion.png │ ├── PlayerSpecular.tif │ ├── PlayerDiffuse.png.meta │ ├── PlayerNormals.png.meta │ ├── PlayerSpecular.tif.meta │ └── PlayerOcclusion.png.meta ├── HSVPicker │ ├── PickerTest.unity.meta │ ├── Editor.meta │ ├── Events │ │ ├── HSVChangedEvent.cs │ │ ├── ColorChangedEvent.cs │ │ ├── ColorChangedEvent.cs.meta │ │ └── HSVChangedEvent.cs.meta │ ├── Enums │ │ ├── ColorValues.cs │ │ └── ColorValues.cs.meta │ ├── Picker 2.0.prefab.meta │ ├── UI │ │ ├── ColorPicker.cs.meta │ │ ├── HexColorField.cs.meta │ │ ├── ColorImage.cs.meta │ │ ├── ColorLabel.cs.meta │ │ ├── ColorPresets.cs.meta │ │ ├── ColorSlider.cs.meta │ │ ├── SVBoxSlider.cs.meta │ │ ├── ColorSliderImage.cs.meta │ │ ├── ColorImage.cs │ │ ├── ColorPresets.cs │ │ ├── ColorLabel.cs │ │ ├── ColorSlider.cs │ │ ├── SVBoxSlider.cs │ │ ├── HexColorField.cs │ │ ├── ColorPicker.cs │ │ └── ColorSliderImage.cs │ ├── Other │ │ ├── ColorPickerTester.cs.meta │ │ ├── TiltWindow.cs.meta │ │ ├── ColorPickerTester.cs │ │ └── TiltWindow.cs │ ├── UtilityScripts │ │ ├── HSVUtil.cs.meta │ │ ├── BoxSlider.cs.meta │ │ └── HSVUtil.cs │ ├── UI.meta │ ├── Enums.meta │ ├── Events.meta │ ├── Other.meta │ ├── UtilityScripts.meta │ └── Editor │ │ ├── BoxSliderEditor.cs.meta │ │ └── BoxSliderEditor.cs ├── Textures.meta ├── Materials │ ├── PlayerMaterial.mat.meta │ ├── BallMaterial.mat.meta │ ├── 2000px-Checkerboard_pattern.svg.mat.meta │ ├── 2000px-Checkerboard_patternUV.svg.mat.meta │ ├── BallMaterial.mat │ ├── 2000px-Checkerboard_patternUV.svg.mat │ ├── 2000px-Checkerboard_pattern.svg.mat │ └── PlayerMaterial.mat ├── Plugins │ ├── iOS │ │ ├── UnityARKit │ │ │ ├── Editor.meta │ │ │ ├── Textures │ │ │ │ ├── debugPlaneTile.png │ │ │ │ └── debugPlaneTile.png.meta │ │ │ ├── NativeInterface │ │ │ │ ├── ARPoint.cs │ │ │ │ ├── ARLightEstimate.cs │ │ │ │ ├── ARRect.cs │ │ │ │ ├── ARSize.cs │ │ │ │ ├── ARPlaneAnchorAlignment.cs │ │ │ │ ├── ARTextureHandles.cs │ │ │ │ ├── ARRect.cs.meta │ │ │ │ ├── ARSize.cs.meta │ │ │ │ ├── ARAnchor.cs.meta │ │ │ │ ├── ARCamera.cs.meta │ │ │ │ ├── ARErrorCode.cs.meta │ │ │ │ ├── ARFrame.cs.meta │ │ │ │ ├── ARPoint.cs.meta │ │ │ │ ├── ARAnchor.cs │ │ │ │ ├── ARHitTestResult.cs.meta │ │ │ │ ├── ARLightEstimate.cs.meta │ │ │ │ ├── ARPlaneAnchor.cs.meta │ │ │ │ ├── ARTextureHandles.cs.meta │ │ │ │ ├── ARTrackingState.cs.meta │ │ │ │ ├── ARHitTestResultType.cs.meta │ │ │ │ ├── ARTrackingQuality.cs.meta │ │ │ │ ├── ARTrackingStateReason.cs.meta │ │ │ │ ├── ARPlaneAnchorAlignment.cs.meta │ │ │ │ ├── UnityARSessionNativeInterface.cs.meta │ │ │ │ ├── ARTrackingState.cs │ │ │ │ ├── ARTrackingQuality.cs │ │ │ │ ├── ARTrackingStateReason.cs │ │ │ │ ├── ARErrorCode.cs │ │ │ │ ├── ARPlaneAnchor.cs │ │ │ │ ├── ARSessionNative.mm.meta │ │ │ │ ├── ARFrame.cs │ │ │ │ ├── ARHitTestResultType.cs │ │ │ │ ├── ARHitTestResult.cs │ │ │ │ └── ARCamera.cs │ │ │ ├── ARPlaneAnchorGameObject.cs │ │ │ ├── Materials.meta │ │ │ ├── Prefabs.meta │ │ │ ├── Shaders.meta │ │ │ ├── Textures.meta │ │ │ ├── Utility.meta │ │ │ ├── NativeInterface.meta │ │ │ ├── Shaders │ │ │ │ ├── YUVShader.shader.meta │ │ │ │ ├── MobileARShadow.shader.meta │ │ │ │ ├── YUVShader.shader │ │ │ │ └── MobileARShadow.shader │ │ │ ├── Materials │ │ │ │ ├── XColor.mat.meta │ │ │ │ ├── YColor.mat.meta │ │ │ │ ├── ZColor.mat.meta │ │ │ │ ├── YUVMaterial.mat.meta │ │ │ │ ├── PointCloudMaterial.mat.meta │ │ │ │ ├── debugPlaneMaterial.mat.meta │ │ │ │ ├── shadowPlaneMaterial.mat.meta │ │ │ │ ├── PointCloudParticleMaterial.mat.meta │ │ │ │ ├── XColor.mat │ │ │ │ ├── ZColor.mat │ │ │ │ ├── YColor.mat │ │ │ │ ├── shadowPlaneMaterial.mat │ │ │ │ ├── PointCloudMaterial.mat │ │ │ │ ├── PointCloudParticleMaterial.mat │ │ │ │ ├── debugPlaneMaterial.mat │ │ │ │ └── YUVMaterial.mat │ │ │ ├── Prefabs │ │ │ │ ├── BallPrefab.prefab.meta │ │ │ │ ├── CollSphere.prefab.meta │ │ │ │ ├── ParticlePrefab.prefab.meta │ │ │ │ ├── PointCloudPrefab.prefab.meta │ │ │ │ ├── debugPlanePrefab.prefab.meta │ │ │ │ ├── shadowPlanePrefab.prefab.meta │ │ │ │ ├── ParticlePainterPrefab.prefab.meta │ │ │ │ ├── collisionPlanePrefab.prefab.meta │ │ │ │ ├── CollSphere.prefab │ │ │ │ ├── collisionPlanePrefab.prefab │ │ │ │ ├── PointCloudPrefab.prefab │ │ │ │ ├── BallPrefab.prefab │ │ │ │ ├── debugPlanePrefab.prefab │ │ │ │ └── shadowPlanePrefab.prefab │ │ │ ├── UnityARVideo.cs.meta │ │ │ ├── DontDestroyOnLoad.cs.meta │ │ │ ├── UnityARKitControl.cs.meta │ │ │ ├── AR3DOFCameraManager.cs.meta │ │ │ ├── UnityARCameraManager.cs.meta │ │ │ ├── UnityARCameraNearFar.cs.meta │ │ │ ├── UnityARGeneratePlane.cs.meta │ │ │ ├── UnityARHitTestExample.cs.meta │ │ │ ├── UnityPointCloudExample.cs.meta │ │ │ ├── Utility │ │ │ │ ├── UnityARUtility.cs.meta │ │ │ │ ├── UnityARMatrixOps.cs.meta │ │ │ │ ├── UnityARAnchorManager.cs.meta │ │ │ │ ├── UnityARMatrixOps.cs │ │ │ │ ├── UnityARUtility.cs │ │ │ │ └── UnityARAnchorManager.cs │ │ │ ├── ARPlaneAnchorGameObject.cs.meta │ │ │ ├── PointCloudParticleExample.cs.meta │ │ │ ├── Editor │ │ │ │ ├── UnityARBuildPostprocessor.cs.meta │ │ │ │ └── UnityARBuildPostprocessor.cs │ │ │ ├── DontDestroyOnLoad.cs │ │ │ ├── UnityARCameraNearFar.cs │ │ │ ├── UnityARGeneratePlane.cs │ │ │ ├── UnityPointCloudExample.cs │ │ │ ├── PointCloudParticleExample.cs │ │ │ ├── UnityARCameraManager.cs │ │ │ ├── UnityARHitTestExample.cs │ │ │ ├── AR3DOFCameraManager.cs │ │ │ ├── UnityARKitControl.cs │ │ │ └── UnityARVideo.cs │ │ └── UnityARKit.meta │ └── iOS.meta ├── Models.meta ├── TiltBrush.unity.meta ├── UnityARBallz.unity.meta ├── UnityARShadows.unity.meta ├── UnityParticlePainter.unity.meta ├── Examples.meta ├── HSVPicker.meta ├── Materials.meta ├── Cube.prefab.meta ├── Examples │ ├── InstancedSurfaceShader.shader.meta │ ├── Plane Physic Material.physicMaterial.meta │ ├── Ballz.cs.meta │ ├── BallMaker.cs.meta │ ├── BallMover.cs.meta │ ├── ModeSwitcher.cs.meta │ ├── Plane Physic Material.physicMaterial │ ├── Ballz.cs │ ├── ModeSwitcher.cs │ ├── InstancedSurfaceShader.shader │ ├── BallMaker.cs │ └── BallMover.cs ├── TemplateSystem.prefab.meta ├── PaintManager.cs.meta ├── ParticlePainter.cs.meta ├── UnityARAmbient.cs.meta ├── UnityARAmbient.cs ├── PaintManager.cs ├── checker_large UV.gif.meta └── ParticlePainter.cs └── .gitignore /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.6.1p1 2 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05a89afb32ff4cd48a0278f931aa903b 3 | -------------------------------------------------------------------------------- /Assets/Cube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Cube.prefab -------------------------------------------------------------------------------- /Assets/TiltBrush.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/TiltBrush.unity -------------------------------------------------------------------------------- /Assets/UnityARKitScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c159f2591a9b5c843b0a0442451f78f8 3 | -------------------------------------------------------------------------------- /Assets/checker_large UV.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/checker_large UV.gif -------------------------------------------------------------------------------- /Assets/TemplateSystem.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/TemplateSystem.prefab -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /Assets/Models/Characters/Player.fbx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Models/Characters/Player.fbx -------------------------------------------------------------------------------- /Assets/Textures/PlayerDiffuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Textures/PlayerDiffuse.png -------------------------------------------------------------------------------- /Assets/Textures/PlayerNormals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Textures/PlayerNormals.png -------------------------------------------------------------------------------- /Assets/Textures/PlayerOcclusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Textures/PlayerOcclusion.png -------------------------------------------------------------------------------- /Assets/Textures/PlayerSpecular.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Textures/PlayerSpecular.tif -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /Assets/HSVPicker/PickerTest.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce46c07f0028e314ab7767577ab5e7a6 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: add6e5fca69477444b121f7c695ceb8e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Materials/PlayerMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ea44298aa419344dbdcf87dd1a50533 3 | NativeFormatImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/HSVPicker/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a9e9df3c14e9034eb587348635c8f09 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Models/Characters.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2db6ed60f35771478d3b31828b24fe8 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Models/Characters/Materials/GunMaterial.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Models/Characters/Materials/GunMaterial.mat -------------------------------------------------------------------------------- /Assets/Plugins/iOS/UnityARKit/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 085eeda524261654b88f97ea61b33090 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Models.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7f1c84e523876664083649b7a985a6f4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | -------------------------------------------------------------------------------- /Assets/Plugins/iOS/UnityARKit/Textures/debugPlaneTile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FusedVR/ARKitTiltBrush/HEAD/Assets/Plugins/iOS/UnityARKit/Textures/debugPlaneTile.png -------------------------------------------------------------------------------- /Assets/HSVPicker/Events/HSVChangedEvent.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.Events; 3 | 4 | public class HSVChangedEvent : UnityEvent 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/TiltBrush.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d839b5d4d54464822bbecf3da94c60de 3 | timeCreated: 1497595010 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/Models/Characters/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67d12c973f1d44064857c75ef4d56982 3 | folderAsset: yes 4 | timeCreated: 1497594999 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Cube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2404dea11f3004e9baed20839e8ac39f 3 | timeCreated: 1497596546 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/TemplateSystem.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f054752af5eb14a5e88bd42f25968b99 3 | timeCreated: 1497600576 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 100100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/Models/Characters/Materials/GunMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7865b581696e4a2394308486b77c467 3 | timeCreated: 1497594999 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: 2100000 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/PaintManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee43d95f2d0a44294b4ed19ad0f626cb 3 | timeCreated: 1497595900 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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Unity generated # 2 | # =============== # 3 | [Tt]emp/ 4 | [Oo]bj/ 5 | [Bb]uild 6 | /[Bb]uilds/ 7 | /[Ll]ibrary/ 8 | sysinfo.txt 9 | *.stackdump 10 | /Assets/AssetStoreTools* 11 | *.apk 12 | *.unitypackage 13 | 14 | # ===================================== # 15 | # Visual Studio / MonoDevelop generated # 16 | # ===================================== # 17 | [Ee]xported[Oo]bj/ 18 | .vs/ 19 | /*.userprefs 20 | /*.csproj 21 | /*.pidb 22 | *.pidb.meta 23 | /*.suo 24 | /*.sln* 25 | /*.user 26 | /*.unityproj 27 | /*.booproj 28 | .consulo/ 29 | /*.tmp 30 | /*.svd 31 | 32 | # ============ # 33 | # OS generated # 34 | # ============ # 35 | .DS_Store* 36 | ._* 37 | .Spotlight-V100 38 | .Trashes 39 | Icon? 40 | ehthumbs.db 41 | [Tt]humbs.db 42 | [Dd]esktop.ini 43 | Corridor/Library/ShaderCache/ 44 | Corridor/Library/metadata/ 45 | -------------------------------------------------------------------------------- /Assets/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/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/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/UnityARAmbient.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.InteropServices; 2 | using UnityEngine.XR.iOS; 3 | 4 | namespace UnityEngine.XR.iOS 5 | { 6 | public class UnityARAmbient : MonoBehaviour 7 | { 8 | 9 | private Light l; 10 | private UnityARSessionNativeInterface m_Session; 11 | 12 | public void Start() 13 | { 14 | #if !UNITY_EDITOR 15 | l = GetComponent(); 16 | m_Session = UnityARSessionNativeInterface.GetARSessionNativeInterface (); 17 | #endif 18 | } 19 | #if !UNITY_EDITOR 20 | public void Update() 21 | { 22 | // Convert ARKit intensity to Unity intensity 23 | // ARKit ambient intensity ranges 0-2000 24 | // Unity ambient intensity ranges 0-8 (for over-bright lights) 25 | float newai = m_Session.GetARAmbientIntensity(); 26 | l.intensity = newai / 1000.0f; 27 | } 28 | #endif 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/Plugins/iOS/UnityARKit/UnityARGeneratePlane.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace UnityEngine.XR.iOS 5 | { 6 | public class UnityARGeneratePlane : MonoBehaviour 7 | { 8 | public GameObject planePrefab; 9 | private UnityARAnchorManager unityARAnchorManager; 10 | 11 | // Use this for initialization 12 | void Start () { 13 | unityARAnchorManager = new UnityARAnchorManager(); 14 | UnityARUtility.InitializePlanePrefab (planePrefab); 15 | } 16 | 17 | void OnDestroy() 18 | { 19 | unityARAnchorManager.Destroy (); 20 | } 21 | 22 | void OnGUI() 23 | { 24 | List arpags = unityARAnchorManager.GetCurrentPlaneAnchors (); 25 | if (arpags.Count >= 1) { 26 | //ARPlaneAnchor ap = arpags [0].planeAnchor; 27 | //GUI.Box (new Rect (100, 100, 800, 60), string.Format ("Center: x:{0}, y:{1}, z:{2}", ap.center.x, ap.center.y, ap.center.z)); 28 | //GUI.Box(new Rect(100, 200, 800, 60), string.Format ("Extent: x:{0}, y:{1}, z:{2}", ap.extent.x, ap.extent.y, ap.extent.z)); 29 | } 30 | } 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/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/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/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/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/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/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/Plugins/iOS/UnityARKit/PointCloudParticleExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class PointCloudParticleExample : MonoBehaviour { 7 | public ParticleSystem pointCloudParticlePrefab; 8 | public int maxPointsToShow; 9 | public float particleSize = 1.0f; 10 | private Vector3[] m_PointCloudData; 11 | private bool frameUpdated = false; 12 | private ParticleSystem currentPS; 13 | private ParticleSystem.Particle [] particles; 14 | 15 | // Use this for initialization 16 | void Start () { 17 | UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; 18 | currentPS = Instantiate (pointCloudParticlePrefab); 19 | frameUpdated = false; 20 | } 21 | 22 | public void ARFrameUpdated(UnityARCamera camera) 23 | { 24 | m_PointCloudData = camera.pointCloudData; 25 | frameUpdated = true; 26 | } 27 | 28 | // Update is called once per frame 29 | void Update () { 30 | if (frameUpdated) { 31 | if (m_PointCloudData != null && m_PointCloudData.Length > 0) { 32 | int numParticles = Mathf.Min (m_PointCloudData.Length, maxPointsToShow); 33 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[numParticles]; 34 | int index = 0; 35 | foreach (Vector3 currentPoint in m_PointCloudData) { 36 | particles [index].position = currentPoint; 37 | particles [index].startColor = new Color (1.0f, 1.0f, 1.0f); 38 | particles [index].startSize = particleSize; 39 | index++; 40 | } 41 | currentPS.SetParticles (particles, numParticles); 42 | } else { 43 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[1]; 44 | particles [0].startSize = 0.0f; 45 | currentPS.SetParticles (particles, 1); 46 | } 47 | frameUpdated = false; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/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/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/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/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/Plugins/iOS/UnityARKit/UnityARCameraManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class UnityARCameraManager : MonoBehaviour { 7 | 8 | public Camera m_camera; 9 | private UnityARSessionNativeInterface m_session; 10 | private Material savedClearMaterial; 11 | 12 | // Use this for initialization 13 | void Start () { 14 | #if !UNITY_EDITOR 15 | Application.targetFrameRate = 60; 16 | m_session = UnityARSessionNativeInterface.GetARSessionNativeInterface(); 17 | ARKitWorldTackingSessionConfiguration config = new ARKitWorldTackingSessionConfiguration(); 18 | config.planeDetection = UnityARPlaneDetection.Horizontal; 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/Plugins/iOS/UnityARKit/UnityARHitTestExample.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace UnityEngine.XR.iOS 5 | { 6 | public class UnityARHitTestExample : MonoBehaviour 7 | { 8 | public Transform m_HitTransform; 9 | 10 | bool HitTestWithResultType (ARPoint point, ARHitTestResultType resultTypes) 11 | { 12 | List hitResults = UnityARSessionNativeInterface.GetARSessionNativeInterface ().HitTest (point, resultTypes); 13 | if (hitResults.Count > 0) { 14 | foreach (var hitResult in hitResults) { 15 | Debug.Log ("Got hit!"); 16 | m_HitTransform.position = UnityARMatrixOps.GetPosition (hitResult.worldTransform); 17 | m_HitTransform.rotation = UnityARMatrixOps.GetRotation (hitResult.worldTransform); 18 | 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)); 19 | return true; 20 | } 21 | } 22 | return false; 23 | } 24 | 25 | // Update is called once per frame 26 | void Update () { 27 | if (Input.touchCount > 0 && m_HitTransform != null) 28 | { 29 | var touch = Input.GetTouch(0); 30 | if (touch.phase == TouchPhase.Began) 31 | { 32 | var screenPosition = Camera.main.ScreenToViewportPoint(touch.position); 33 | ARPoint point = new ARPoint { 34 | x = screenPosition.x, 35 | y = screenPosition.y 36 | }; 37 | 38 | // prioritize reults types 39 | ARHitTestResultType[] resultTypes = { 40 | ARHitTestResultType.ARHitTestResultTypeExistingPlaneUsingExtent, 41 | // if you want to use infinite planes use this: 42 | //ARHitTestResultType.ARHitTestResultTypeExistingPlane, 43 | ARHitTestResultType.ARHitTestResultTypeHorizontalPlane, 44 | ARHitTestResultType.ARHitTestResultTypeFeaturePoint 45 | }; 46 | 47 | foreach (ARHitTestResultType resultType in resultTypes) 48 | { 49 | if (HitTestWithResultType (point, resultType)) 50 | { 51 | return; 52 | } 53 | } 54 | } 55 | } 56 | } 57 | 58 | 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/PaintManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.XR.iOS; 5 | 6 | public class PaintManager : MonoBehaviour { 7 | public ParticleSystem particleSystemTemplate; 8 | 9 | private bool newPaintVertices; 10 | private bool paintingOn; 11 | private Color paintColor; 12 | private Vector3 previousPosition; 13 | 14 | private List particleSystemList; // Stores all particle systems 15 | private List currVertices; // Stores current camera positions to paint 16 | private ParticleSystem ps; // Stores current particle system 17 | 18 | void OnEnable() { 19 | UnityARSessionNativeInterface.ARFrameUpdatedEvent += ARFrameUpdated; 20 | } 21 | 22 | void OnDestroy() { 23 | UnityARSessionNativeInterface.ARFrameUpdatedEvent -= ARFrameUpdated; 24 | } 25 | 26 | // Use this for initialization 27 | void Start () { 28 | paintingOn = false; 29 | newPaintVertices = false; 30 | particleSystemList = new List (); 31 | ps = Instantiate (particleSystemTemplate); 32 | currVertices = new List (); 33 | paintColor = Color.green; 34 | } 35 | 36 | // Update is called once per frame 37 | void Update () { 38 | if (paintingOn && newPaintVertices) { 39 | if (currVertices.Count > 0) { 40 | ParticleSystem.Particle[] particles = new ParticleSystem.Particle[currVertices.Count]; 41 | int index = 0; 42 | foreach(Vector3 vtx in currVertices) { 43 | particles[index].position = vtx; 44 | particles[index].color = paintColor; 45 | particles[index].size = 0.1f; 46 | index++; 47 | } 48 | ps.SetParticles(particles, currVertices.Count); 49 | newPaintVertices = false; 50 | } 51 | } 52 | } 53 | 54 | public void TogglePaint() { 55 | paintingOn = !paintingOn; 56 | } 57 | 58 | public void RandomizeColor() { 59 | if (ps.particleCount > 0) { 60 | SaveParticleSystem (); 61 | } 62 | paintColor = Random.ColorHSV (); 63 | } 64 | 65 | public void Reset() { 66 | foreach (ParticleSystem p in particleSystemList) { 67 | Destroy (p); 68 | } 69 | particleSystemList = new List (); 70 | 71 | Destroy (ps); 72 | ps = Instantiate (particleSystemTemplate); 73 | currVertices = new List (); 74 | } 75 | 76 | private void SaveParticleSystem() { 77 | particleSystemList.Add (ps); 78 | ps = Instantiate (particleSystemTemplate); 79 | currVertices = new List (); 80 | } 81 | 82 | private void ARFrameUpdated(UnityARCamera arCamera) { 83 | Vector3 paintPosition = GetCameraPosition(arCamera) + (Camera.main.transform.forward * 0.2f); 84 | if (Vector3.Distance(paintPosition, previousPosition) > 0.025f) { 85 | if (paintingOn)currVertices.Add (paintPosition); 86 | previousPosition = paintPosition; 87 | newPaintVertices = true; 88 | } 89 | } 90 | 91 | private Vector3 GetCameraPosition(UnityARCamera cam) { 92 | Matrix4x4 matrix = new Matrix4x4 (); 93 | matrix.SetColumn (3, cam.worldTransform.column3); 94 | return UnityARMatrixOps.GetPosition (matrix); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /Assets/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/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/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/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/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/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/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/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/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/Plugins/iOS/UnityARKit/UnityARVideo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using UnityEngine; 4 | using UnityEngine.Rendering; 5 | 6 | namespace UnityEngine.XR.iOS 7 | { 8 | 9 | public class UnityARVideo : MonoBehaviour 10 | { 11 | public Material m_ClearMaterial; 12 | 13 | private CommandBuffer m_VideoCommandBuffer; 14 | private Texture2D _videoTextureY; 15 | private Texture2D _videoTextureCbCr; 16 | 17 | private UnityARSessionNativeInterface m_Session; 18 | 19 | 20 | #if !UNITY_EDITOR 21 | private bool bCommandBufferInitialized; 22 | 23 | public void Start() 24 | { 25 | m_Session = UnityARSessionNativeInterface.GetARSessionNativeInterface (); 26 | bCommandBufferInitialized = false; 27 | } 28 | 29 | void InitializeCommandBuffer() 30 | { 31 | m_VideoCommandBuffer = new CommandBuffer(); 32 | m_VideoCommandBuffer.Blit(null, BuiltinRenderTextureType.CurrentActive, m_ClearMaterial); 33 | GetComponent().AddCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer); 34 | bCommandBufferInitialized = true; 35 | 36 | } 37 | 38 | void OnDestroy() 39 | { 40 | GetComponent().RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer); 41 | } 42 | 43 | public void OnPreRender() 44 | { 45 | ARTextureHandles handles = m_Session.GetARVideoTextureHandles(); 46 | if (handles.textureY == System.IntPtr.Zero || handles.textureCbCr == System.IntPtr.Zero) 47 | { 48 | return; 49 | } 50 | 51 | if (!bCommandBufferInitialized) { 52 | InitializeCommandBuffer (); 53 | } 54 | 55 | Resolution currentResolution = Screen.currentResolution; 56 | 57 | // Texture Y 58 | _videoTextureY = Texture2D.CreateExternalTexture(currentResolution.width, currentResolution.height, 59 | TextureFormat.R8, false, false, (System.IntPtr)handles.textureY); 60 | _videoTextureY.filterMode = FilterMode.Bilinear; 61 | _videoTextureY.wrapMode = TextureWrapMode.Repeat; 62 | _videoTextureY.UpdateExternalTexture(handles.textureY); 63 | 64 | // Texture CbCr 65 | _videoTextureCbCr = Texture2D.CreateExternalTexture(currentResolution.width, currentResolution.height, 66 | TextureFormat.RG16, false, false, (System.IntPtr)handles.textureCbCr); 67 | _videoTextureCbCr.filterMode = FilterMode.Bilinear; 68 | _videoTextureCbCr.wrapMode = TextureWrapMode.Repeat; 69 | _videoTextureCbCr.UpdateExternalTexture(handles.textureCbCr); 70 | 71 | m_ClearMaterial.SetTexture("_textureY", _videoTextureY); 72 | m_ClearMaterial.SetTexture("_textureCbCr", _videoTextureCbCr); 73 | int isPortrait = 0; 74 | 75 | float rotation = 0; 76 | if (Screen.orientation == ScreenOrientation.Portrait) { 77 | rotation = -90; 78 | isPortrait = 1; 79 | } 80 | else if (Screen.orientation == ScreenOrientation.PortraitUpsideDown) { 81 | rotation = 90; 82 | isPortrait = 1; 83 | } 84 | else if (Screen.orientation == ScreenOrientation.LandscapeRight) { 85 | rotation = -180; 86 | } 87 | Matrix4x4 m = Matrix4x4.TRS (Vector3.zero, Quaternion.Euler(0.0f, 0.0f, rotation), Vector3.one); 88 | m_ClearMaterial.SetMatrix("_TextureRotation", m); 89 | m_ClearMaterial.SetFloat("_texCoordScale", m_Session.GetARYUVTexCoordScale()); 90 | m_ClearMaterial.SetInt("_isPortrait", isPortrait); 91 | } 92 | #else 93 | public void Start() 94 | { 95 | m_VideoCommandBuffer = new CommandBuffer(); 96 | m_VideoCommandBuffer.Blit(null, BuiltinRenderTextureType.CurrentActive, m_ClearMaterial); 97 | GetComponent().AddCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer); 98 | } 99 | 100 | void OnDestroy() 101 | { 102 | GetComponent().RemoveCommandBuffer(CameraEvent.BeforeForwardOpaque, m_VideoCommandBuffer); 103 | } 104 | 105 | #endif 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /Assets/Plugins/iOS/UnityARKit/Prefabs/debugPlanePrefab.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 | - component: {fileID: 23522069187022562} 25 | - component: {fileID: 65567926102939020} 26 | m_Layer: 0 27 | m_Name: Plane 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!1 &1372998203143648 34 | GameObject: 35 | m_ObjectHideFlags: 0 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | serializedVersion: 5 39 | m_Component: 40 | - component: {fileID: 4787822665528772} 41 | m_Layer: 0 42 | m_Name: debugPlanePrefab 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!4 &4459804331441636 49 | Transform: 50 | m_ObjectHideFlags: 1 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | m_GameObject: {fileID: 1243282721867180} 54 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 55 | m_LocalPosition: {x: 0, y: 0, z: 0} 56 | m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} 57 | m_Children: [] 58 | m_Father: {fileID: 4787822665528772} 59 | m_RootOrder: 0 60 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 61 | --- !u!4 &4787822665528772 62 | Transform: 63 | m_ObjectHideFlags: 1 64 | m_PrefabParentObject: {fileID: 0} 65 | m_PrefabInternal: {fileID: 100100000} 66 | m_GameObject: {fileID: 1372998203143648} 67 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 68 | m_LocalPosition: {x: 0, y: 0, z: 0} 69 | m_LocalScale: {x: 1, y: 1, z: 1} 70 | m_Children: 71 | - {fileID: 4459804331441636} 72 | m_Father: {fileID: 0} 73 | m_RootOrder: 0 74 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 75 | --- !u!23 &23522069187022562 76 | MeshRenderer: 77 | m_ObjectHideFlags: 1 78 | m_PrefabParentObject: {fileID: 0} 79 | m_PrefabInternal: {fileID: 100100000} 80 | m_GameObject: {fileID: 1243282721867180} 81 | m_Enabled: 1 82 | m_CastShadows: 1 83 | m_ReceiveShadows: 1 84 | m_MotionVectors: 1 85 | m_LightProbeUsage: 1 86 | m_ReflectionProbeUsage: 1 87 | m_Materials: 88 | - {fileID: 2100000, guid: b36939cf153274ec29fbf2f10d0a49d7, type: 2} 89 | m_StaticBatchInfo: 90 | firstSubMesh: 0 91 | subMeshCount: 0 92 | m_StaticBatchRoot: {fileID: 0} 93 | m_ProbeAnchor: {fileID: 0} 94 | m_LightProbeVolumeOverride: {fileID: 0} 95 | m_ScaleInLightmap: 1 96 | m_PreserveUVs: 1 97 | m_IgnoreNormalsForChartDetection: 0 98 | m_ImportantGI: 0 99 | m_SelectedEditorRenderState: 3 100 | m_MinimumChartSize: 4 101 | m_AutoUVMaxDistance: 0.5 102 | m_AutoUVMaxAngle: 89 103 | m_LightmapParameters: {fileID: 0} 104 | m_SortingLayerID: 0 105 | m_SortingLayer: 0 106 | m_SortingOrder: 0 107 | --- !u!33 &33784412182206160 108 | MeshFilter: 109 | m_ObjectHideFlags: 1 110 | m_PrefabParentObject: {fileID: 0} 111 | m_PrefabInternal: {fileID: 100100000} 112 | m_GameObject: {fileID: 1243282721867180} 113 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 114 | --- !u!64 &64007261467877126 115 | MeshCollider: 116 | m_ObjectHideFlags: 1 117 | m_PrefabParentObject: {fileID: 0} 118 | m_PrefabInternal: {fileID: 100100000} 119 | m_GameObject: {fileID: 1243282721867180} 120 | m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} 121 | m_IsTrigger: 0 122 | m_Enabled: 1 123 | serializedVersion: 2 124 | m_Convex: 0 125 | m_InflateMesh: 0 126 | m_SkinWidth: 0.01 127 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 128 | --- !u!65 &65567926102939020 129 | BoxCollider: 130 | m_ObjectHideFlags: 1 131 | m_PrefabParentObject: {fileID: 0} 132 | m_PrefabInternal: {fileID: 100100000} 133 | m_GameObject: {fileID: 1243282721867180} 134 | m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} 135 | m_IsTrigger: 0 136 | m_Enabled: 1 137 | serializedVersion: 2 138 | m_Size: {x: 10, y: 0.1, z: 10} 139 | m_Center: {x: 0, y: 0, z: 0} 140 | -------------------------------------------------------------------------------- /Assets/Plugins/iOS/UnityARKit/Prefabs/shadowPlanePrefab.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: 1983520619281468} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1835668619836898 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: 4301351458783932} 22 | - component: {fileID: 33801103126895618} 23 | - component: {fileID: 64514493211635788} 24 | - component: {fileID: 23308608047570514} 25 | - component: {fileID: 65158357074468436} 26 | m_Layer: 0 27 | m_Name: Plane 28 | m_TagString: Untagged 29 | m_Icon: {fileID: 0} 30 | m_NavMeshLayer: 0 31 | m_StaticEditorFlags: 0 32 | m_IsActive: 1 33 | --- !u!1 &1983520619281468 34 | GameObject: 35 | m_ObjectHideFlags: 0 36 | m_PrefabParentObject: {fileID: 0} 37 | m_PrefabInternal: {fileID: 100100000} 38 | serializedVersion: 5 39 | m_Component: 40 | - component: {fileID: 4023412880410692} 41 | m_Layer: 0 42 | m_Name: shadowPlanePrefab 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!4 &4023412880410692 49 | Transform: 50 | m_ObjectHideFlags: 1 51 | m_PrefabParentObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | m_GameObject: {fileID: 1983520619281468} 54 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 55 | m_LocalPosition: {x: 0, y: -0.173, z: 1.058} 56 | m_LocalScale: {x: 1, y: 1, z: 1} 57 | m_Children: 58 | - {fileID: 4301351458783932} 59 | m_Father: {fileID: 0} 60 | m_RootOrder: 0 61 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 62 | --- !u!4 &4301351458783932 63 | Transform: 64 | m_ObjectHideFlags: 1 65 | m_PrefabParentObject: {fileID: 0} 66 | m_PrefabInternal: {fileID: 100100000} 67 | m_GameObject: {fileID: 1835668619836898} 68 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 69 | m_LocalPosition: {x: 0, y: 0, z: 0} 70 | m_LocalScale: {x: 0.1, y: 0.1, z: 0.1} 71 | m_Children: [] 72 | m_Father: {fileID: 4023412880410692} 73 | m_RootOrder: 0 74 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 75 | --- !u!23 &23308608047570514 76 | MeshRenderer: 77 | m_ObjectHideFlags: 1 78 | m_PrefabParentObject: {fileID: 0} 79 | m_PrefabInternal: {fileID: 100100000} 80 | m_GameObject: {fileID: 1835668619836898} 81 | m_Enabled: 1 82 | m_CastShadows: 0 83 | m_ReceiveShadows: 1 84 | m_MotionVectors: 1 85 | m_LightProbeUsage: 1 86 | m_ReflectionProbeUsage: 1 87 | m_Materials: 88 | - {fileID: 2100000, guid: 16f11da3beeaf498f8526286a295a38e, type: 2} 89 | m_StaticBatchInfo: 90 | firstSubMesh: 0 91 | subMeshCount: 0 92 | m_StaticBatchRoot: {fileID: 0} 93 | m_ProbeAnchor: {fileID: 0} 94 | m_LightProbeVolumeOverride: {fileID: 0} 95 | m_ScaleInLightmap: 1 96 | m_PreserveUVs: 1 97 | m_IgnoreNormalsForChartDetection: 0 98 | m_ImportantGI: 0 99 | m_SelectedEditorRenderState: 3 100 | m_MinimumChartSize: 4 101 | m_AutoUVMaxDistance: 0.5 102 | m_AutoUVMaxAngle: 89 103 | m_LightmapParameters: {fileID: 0} 104 | m_SortingLayerID: 0 105 | m_SortingLayer: 0 106 | m_SortingOrder: 0 107 | --- !u!33 &33801103126895618 108 | MeshFilter: 109 | m_ObjectHideFlags: 1 110 | m_PrefabParentObject: {fileID: 0} 111 | m_PrefabInternal: {fileID: 100100000} 112 | m_GameObject: {fileID: 1835668619836898} 113 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 114 | --- !u!64 &64514493211635788 115 | MeshCollider: 116 | m_ObjectHideFlags: 1 117 | m_PrefabParentObject: {fileID: 0} 118 | m_PrefabInternal: {fileID: 100100000} 119 | m_GameObject: {fileID: 1835668619836898} 120 | m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} 121 | m_IsTrigger: 0 122 | m_Enabled: 1 123 | serializedVersion: 2 124 | m_Convex: 0 125 | m_InflateMesh: 0 126 | m_SkinWidth: 0.01 127 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} 128 | --- !u!65 &65158357074468436 129 | BoxCollider: 130 | m_ObjectHideFlags: 1 131 | m_PrefabParentObject: {fileID: 0} 132 | m_PrefabInternal: {fileID: 100100000} 133 | m_GameObject: {fileID: 1835668619836898} 134 | m_Material: {fileID: 13400000, guid: beba2f308446f43da8e82c54f30f93b5, type: 2} 135 | m_IsTrigger: 0 136 | m_Enabled: 1 137 | serializedVersion: 2 138 | m_Size: {x: 10, y: 0.1, z: 10} 139 | m_Center: {x: 0, y: 0, z: 0} 140 | -------------------------------------------------------------------------------- /Assets/Materials/PlayerMaterial.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 4 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: PlayerMaterial 10 | m_Shader: {fileID: 45, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: _LIGHTMAPPING_DYNAMIC_LIGHTMAPS _LIGHTMAPPING_REALTIME _NORMALMAP 12 | _SPECGLOSSMAP _UVSEC_UV1 13 | m_CustomRenderQueue: -1 14 | m_SavedProperties: 15 | serializedVersion: 2 16 | m_TexEnvs: 17 | data: 18 | first: 19 | name: _MainTex 20 | second: 21 | m_Texture: {fileID: 2800000, guid: a3cc890ba79fb47449fb51893aa9b363, type: 3} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | data: 25 | first: 26 | name: _BumpMap 27 | second: 28 | m_Texture: {fileID: 2800000, guid: d98be175031405b4fb3f6a5f459a22e4, type: 3} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | data: 32 | first: 33 | name: _DetailNormalMap 34 | second: 35 | m_Texture: {fileID: 0} 36 | m_Scale: {x: 1, y: 1} 37 | m_Offset: {x: 0, y: 0} 38 | data: 39 | first: 40 | name: _EmissionMap 41 | second: 42 | m_Texture: {fileID: 0} 43 | m_Scale: {x: 1, y: 1} 44 | m_Offset: {x: 0, y: 0} 45 | data: 46 | first: 47 | name: _ParallaxMap 48 | second: 49 | m_Texture: {fileID: 0} 50 | m_Scale: {x: 1, y: 1} 51 | m_Offset: {x: 0, y: 0} 52 | data: 53 | first: 54 | name: _Occlusion 55 | second: 56 | m_Texture: {fileID: 2800000, guid: 6ae2af98f5c9f0243806bfb6ccbbdd19, type: 3} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | data: 60 | first: 61 | name: _SpecGlossMap 62 | second: 63 | m_Texture: {fileID: 2800000, guid: bc9b1c6383841ea4f9e532a49c651ff6, type: 3} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | data: 67 | first: 68 | name: _DetailMask 69 | second: 70 | m_Texture: {fileID: 0} 71 | m_Scale: {x: 1, y: 1} 72 | m_Offset: {x: 0, y: 0} 73 | data: 74 | first: 75 | name: _DetailAlbedoMap 76 | second: 77 | m_Texture: {fileID: 0} 78 | m_Scale: {x: 1, y: 1} 79 | m_Offset: {x: 0, y: 0} 80 | data: 81 | first: 82 | name: _OcclusionMap 83 | second: 84 | m_Texture: {fileID: 2800000, guid: 6ae2af98f5c9f0243806bfb6ccbbdd19, type: 3} 85 | m_Scale: {x: 1, y: 1} 86 | m_Offset: {x: 0, y: 0} 87 | m_Floats: 88 | data: 89 | first: 90 | name: _Shininess 91 | second: .115098767 92 | data: 93 | first: 94 | name: _AlphaTestRef 95 | second: .5 96 | data: 97 | first: 98 | name: _Lightmapping 99 | second: 1 100 | data: 101 | first: 102 | name: _SrcBlend 103 | second: 1 104 | data: 105 | first: 106 | name: _DstBlend 107 | second: 0 108 | data: 109 | first: 110 | name: _Parallax 111 | second: .0199999996 112 | data: 113 | first: 114 | name: _ZWrite 115 | second: 1 116 | data: 117 | first: 118 | name: _Glossiness 119 | second: 0 120 | data: 121 | first: 122 | name: _BumpScale 123 | second: 1 124 | data: 125 | first: 126 | name: _OcclusionStrength 127 | second: .600000024 128 | data: 129 | first: 130 | name: _DetailNormalMapScale 131 | second: 1 132 | data: 133 | first: 134 | name: _UVSec 135 | second: 0 136 | data: 137 | first: 138 | name: _Mode 139 | second: 0 140 | data: 141 | first: 142 | name: _EmissionScaleUI 143 | second: 1 144 | m_Colors: 145 | data: 146 | first: 147 | name: _EmissionColor 148 | second: {r: 0, g: 0, b: 0, a: .99999994} 149 | data: 150 | first: 151 | name: _Color 152 | second: {r: 1, g: 1, b: 1, a: 1} 153 | data: 154 | first: 155 | name: _SpecColor 156 | second: {r: .25, g: .213235289, b: .213235289, a: 1} 157 | data: 158 | first: 159 | name: _SpecularColor 160 | second: {r: .200000003, g: .200000003, b: .200000003, a: 1} 161 | data: 162 | first: 163 | name: _EmissionColorUI 164 | second: {r: 0, g: 0, b: 0, a: 1} 165 | data: 166 | first: 167 | name: _EmissionColorWithMapUI 168 | second: {r: 1, g: 1, b: 1, a: 1} 169 | -------------------------------------------------------------------------------- /Assets/HSVPicker/UtilityScripts/HSVUtil.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System; 5 | 6 | 7 | 8 | #region ColorUtilities 9 | 10 | public static class HSVUtil 11 | { 12 | 13 | public static HsvColor ConvertRgbToHsv(Color color) 14 | { 15 | return ConvertRgbToHsv((int)(color.r * 255), (int)(color.g * 255), (int)(color.b * 255)); 16 | } 17 | 18 | //Converts an RGB color to an HSV color. 19 | public static HsvColor ConvertRgbToHsv(double r, double b, double g) 20 | { 21 | double delta, min; 22 | double h = 0, s, v; 23 | 24 | min = Math.Min(Math.Min(r, g), b); 25 | v = Math.Max(Math.Max(r, g), b); 26 | delta = v - min; 27 | 28 | if (v == 0.0) 29 | s = 0; 30 | else 31 | s = delta / v; 32 | 33 | if (s == 0) 34 | h = 360; 35 | else 36 | { 37 | if (r == v) 38 | h = (g - b) / delta; 39 | else if (g == v) 40 | h = 2 + (b - r) / delta; 41 | else if (b == v) 42 | h = 4 + (r - g) / delta; 43 | 44 | h *= 60; 45 | if (h <= 0.0) 46 | h += 360; 47 | } 48 | 49 | HsvColor hsvColor = new HsvColor(); 50 | hsvColor.H = 360 - h; 51 | hsvColor.S = s; 52 | hsvColor.V = v / 255; 53 | 54 | return hsvColor; 55 | 56 | } 57 | 58 | // Converts an HSV color to an RGB color. 59 | public static Color ConvertHsvToRgb(double h, double s, double v, float alpha) 60 | { 61 | 62 | double r = 0, g = 0, b = 0; 63 | 64 | if (s == 0) 65 | { 66 | r = v; 67 | g = v; 68 | b = v; 69 | } 70 | 71 | else 72 | { 73 | int i; 74 | double f, p, q, t; 75 | 76 | 77 | if (h == 360) 78 | h = 0; 79 | else 80 | h = h / 60; 81 | 82 | i = (int)(h); 83 | f = h - i; 84 | 85 | p = v * (1.0 - s); 86 | q = v * (1.0 - (s * f)); 87 | t = v * (1.0 - (s * (1.0f - f))); 88 | 89 | 90 | switch (i) 91 | { 92 | case 0: 93 | r = v; 94 | g = t; 95 | b = p; 96 | break; 97 | 98 | case 1: 99 | r = q; 100 | g = v; 101 | b = p; 102 | break; 103 | 104 | case 2: 105 | r = p; 106 | g = v; 107 | b = t; 108 | break; 109 | 110 | case 3: 111 | r = p; 112 | g = q; 113 | b = v; 114 | break; 115 | 116 | case 4: 117 | r = t; 118 | g = p; 119 | b = v; 120 | break; 121 | 122 | default: 123 | r = v; 124 | g = p; 125 | b = q; 126 | break; 127 | } 128 | 129 | } 130 | 131 | return new Color((float)r, (float)g, (float)b, alpha); 132 | 133 | } 134 | } 135 | 136 | 137 | #endregion ColorUtilities 138 | 139 | 140 | // Describes a color in terms of 141 | // Hue, Saturation, and Value (brightness) 142 | #region HsvColor 143 | public struct HsvColor 144 | { 145 | /// 146 | /// The Hue, ranges between 0 and 360 147 | /// 148 | public double H; 149 | 150 | /// 151 | /// The saturation, ranges between 0 and 1 152 | /// 153 | public double S; 154 | 155 | // The value (brightness), ranges between 0 and 1 156 | public double V; 157 | 158 | public float normalizedH 159 | { 160 | get 161 | { 162 | return (float)H / 360f; 163 | } 164 | 165 | set 166 | { 167 | H = (double)value * 360; 168 | } 169 | } 170 | 171 | public float normalizedS 172 | { 173 | get 174 | { 175 | return (float)S; 176 | } 177 | set 178 | { 179 | S = (double)value; 180 | } 181 | } 182 | 183 | public float normalizedV 184 | { 185 | get 186 | { 187 | return (float)V; 188 | } 189 | set 190 | { 191 | V = (double)value; 192 | } 193 | } 194 | 195 | public HsvColor(double h, double s, double v) 196 | { 197 | this.H = h; 198 | this.S = s; 199 | this.V = v; 200 | } 201 | 202 | public override string ToString() 203 | { 204 | return "{" + H.ToString("f2") + "," + S.ToString("f2") + "," + V.ToString("f2") + "}"; 205 | } 206 | } 207 | #endregion HsvColor 208 | 209 | 210 | 211 | 212 | -------------------------------------------------------------------------------- /Assets/HSVPicker/UI/ColorPicker.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using UnityEngine.UI; 4 | using UnityEngine.Events; 5 | 6 | public class ColorPicker : MonoBehaviour 7 | { 8 | private float _hue = 0; 9 | private float _saturation = 0; 10 | private float _brightness = 0; 11 | 12 | private float _red = 0; 13 | private float _green = 0; 14 | private float _blue = 0; 15 | 16 | private float _alpha = 1; 17 | 18 | public ColorChangedEvent onValueChanged = new ColorChangedEvent(); 19 | public HSVChangedEvent onHSVChanged = new HSVChangedEvent(); 20 | 21 | public Color CurrentColor 22 | { 23 | get 24 | { 25 | return new Color(_red, _green, _blue, _alpha); 26 | } 27 | set 28 | { 29 | if (CurrentColor == value) 30 | return; 31 | 32 | _red = value.r; 33 | _green = value.g; 34 | _blue = value.b; 35 | _alpha = value.a; 36 | 37 | RGBChanged(); 38 | 39 | SendChangedEvent(); 40 | } 41 | } 42 | 43 | private void Start() 44 | { 45 | SendChangedEvent(); 46 | } 47 | 48 | public float H 49 | { 50 | get 51 | { 52 | return _hue; 53 | } 54 | set 55 | { 56 | if (_hue == value) 57 | return; 58 | 59 | _hue = value; 60 | 61 | HSVChanged(); 62 | 63 | SendChangedEvent(); 64 | } 65 | } 66 | 67 | public float S 68 | { 69 | get 70 | { 71 | return _saturation; 72 | } 73 | set 74 | { 75 | if (_saturation == value) 76 | return; 77 | 78 | _saturation = value; 79 | 80 | HSVChanged(); 81 | 82 | SendChangedEvent(); 83 | } 84 | } 85 | 86 | public float V 87 | { 88 | get 89 | { 90 | return _brightness; 91 | } 92 | set 93 | { 94 | if (_brightness == value) 95 | return; 96 | 97 | _brightness = value; 98 | 99 | HSVChanged(); 100 | 101 | SendChangedEvent(); 102 | } 103 | } 104 | 105 | public float R 106 | { 107 | get 108 | { 109 | return _red; 110 | } 111 | set 112 | { 113 | if (_red == value) 114 | return; 115 | 116 | _red = value; 117 | 118 | RGBChanged(); 119 | 120 | SendChangedEvent(); 121 | } 122 | } 123 | 124 | public float G 125 | { 126 | get 127 | { 128 | return _green; 129 | } 130 | set 131 | { 132 | if (_green == value) 133 | return; 134 | 135 | _green = value; 136 | 137 | RGBChanged(); 138 | 139 | SendChangedEvent(); 140 | } 141 | } 142 | 143 | public float B 144 | { 145 | get 146 | { 147 | return _blue; 148 | } 149 | set 150 | { 151 | if (_blue == value) 152 | return; 153 | 154 | _blue = value; 155 | 156 | RGBChanged(); 157 | 158 | SendChangedEvent(); 159 | } 160 | } 161 | 162 | private float A 163 | { 164 | get 165 | { 166 | return _alpha; 167 | } 168 | set 169 | { 170 | if (_alpha == value) 171 | return; 172 | 173 | _alpha = value; 174 | 175 | SendChangedEvent(); 176 | } 177 | } 178 | 179 | private void RGBChanged() 180 | { 181 | HsvColor color = HSVUtil.ConvertRgbToHsv(CurrentColor); 182 | 183 | _hue = color.normalizedH; 184 | _saturation = color.normalizedS; 185 | _brightness = color.normalizedV; 186 | } 187 | 188 | private void HSVChanged() 189 | { 190 | Color color = HSVUtil.ConvertHsvToRgb(_hue * 360, _saturation, _brightness, _alpha); 191 | 192 | _red = color.r; 193 | _green = color.g; 194 | _blue = color.b; 195 | } 196 | 197 | private void SendChangedEvent() 198 | { 199 | onValueChanged.Invoke(CurrentColor); 200 | onHSVChanged.Invoke(_hue, _saturation, _brightness); 201 | } 202 | 203 | public void AssignColor(ColorValues type, float value) 204 | { 205 | switch (type) 206 | { 207 | case ColorValues.R: 208 | R = value; 209 | break; 210 | case ColorValues.G: 211 | G = value; 212 | break; 213 | case ColorValues.B: 214 | B = value; 215 | break; 216 | case ColorValues.A: 217 | A = value; 218 | break; 219 | case ColorValues.Hue: 220 | H = value; 221 | break; 222 | case ColorValues.Saturation: 223 | S = value; 224 | break; 225 | case ColorValues.Value: 226 | V = value; 227 | break; 228 | default: 229 | break; 230 | } 231 | } 232 | 233 | public float GetValue(ColorValues type) 234 | { 235 | switch (type) 236 | { 237 | case ColorValues.R: 238 | return R; 239 | case ColorValues.G: 240 | return G; 241 | case ColorValues.B: 242 | return B; 243 | case ColorValues.A: 244 | return A; 245 | case ColorValues.Hue: 246 | return H; 247 | case ColorValues.Saturation: 248 | return S; 249 | case ColorValues.Value: 250 | return V; 251 | default: 252 | throw new System.NotImplementedException(""); 253 | } 254 | } 255 | } 256 | -------------------------------------------------------------------------------- /Assets/HSVPicker/UI/ColorSliderImage.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | [RequireComponent(typeof(RawImage)), ExecuteInEditMode()] 6 | public class ColorSliderImage : MonoBehaviour 7 | { 8 | public ColorPicker picker; 9 | 10 | /// 11 | /// Which value this slider can edit. 12 | /// 13 | public ColorValues type; 14 | 15 | public Slider.Direction direction; 16 | 17 | private RawImage image; 18 | 19 | private RectTransform rectTransform 20 | { 21 | get 22 | { 23 | return transform as RectTransform; 24 | } 25 | } 26 | 27 | private void Awake() 28 | { 29 | image = GetComponent(); 30 | 31 | RegenerateTexture(); 32 | } 33 | 34 | private void OnEnable() 35 | { 36 | if (picker != null && Application.isPlaying) 37 | { 38 | picker.onValueChanged.AddListener(ColorChanged); 39 | picker.onHSVChanged.AddListener(HSVChanged); 40 | } 41 | } 42 | 43 | private void OnDisable() 44 | { 45 | if (picker != null) 46 | { 47 | picker.onValueChanged.RemoveListener(ColorChanged); 48 | picker.onHSVChanged.RemoveListener(HSVChanged); 49 | } 50 | } 51 | 52 | private void OnDestroy() 53 | { 54 | if (image.texture != null) 55 | DestroyImmediate(image.texture); 56 | } 57 | 58 | #if UNITY_EDITOR 59 | private void OnValidate() 60 | { 61 | image = GetComponent(); 62 | RegenerateTexture(); 63 | } 64 | #endif 65 | 66 | private void ColorChanged(Color newColor) 67 | { 68 | switch (type) 69 | { 70 | case ColorValues.R: 71 | case ColorValues.G: 72 | case ColorValues.B: 73 | case ColorValues.Saturation: 74 | case ColorValues.Value: 75 | RegenerateTexture(); 76 | break; 77 | case ColorValues.A: 78 | case ColorValues.Hue: 79 | default: 80 | break; 81 | } 82 | } 83 | 84 | private void HSVChanged(float hue, float saturation, float value) 85 | { 86 | switch (type) 87 | { 88 | case ColorValues.R: 89 | case ColorValues.G: 90 | case ColorValues.B: 91 | case ColorValues.Saturation: 92 | case ColorValues.Value: 93 | RegenerateTexture(); 94 | break; 95 | case ColorValues.A: 96 | case ColorValues.Hue: 97 | default: 98 | break; 99 | } 100 | } 101 | 102 | private void RegenerateTexture() 103 | { 104 | Color32 baseColor = picker != null ? picker.CurrentColor : Color.black; 105 | 106 | float h = picker != null ? picker.H : 0; 107 | float s = picker != null ? picker.S : 0; 108 | float v = picker != null ? picker.V : 0; 109 | 110 | Texture2D texture; 111 | Color32[] colors; 112 | 113 | bool vertical = direction == Slider.Direction.BottomToTop || direction == Slider.Direction.TopToBottom; 114 | bool inverted = direction == Slider.Direction.TopToBottom || direction == Slider.Direction.RightToLeft; 115 | 116 | int size; 117 | switch (type) 118 | { 119 | case ColorValues.R: 120 | case ColorValues.G: 121 | case ColorValues.B: 122 | case ColorValues.A: 123 | size = 255; 124 | break; 125 | case ColorValues.Hue: 126 | size = 360; 127 | break; 128 | case ColorValues.Saturation: 129 | case ColorValues.Value: 130 | size = 100; 131 | break; 132 | default: 133 | throw new System.NotImplementedException(""); 134 | } 135 | if (vertical) 136 | texture = new Texture2D(1, size); 137 | else 138 | texture = new Texture2D(size, 1); 139 | 140 | texture.hideFlags = HideFlags.DontSave; 141 | colors = new Color32[size]; 142 | 143 | switch (type) 144 | { 145 | case ColorValues.R: 146 | for (byte i = 0; i < size; i++) 147 | { 148 | colors[inverted ? size - 1 - i : i] = new Color32(i, baseColor.g, baseColor.b, 255); 149 | } 150 | break; 151 | case ColorValues.G: 152 | for (byte i = 0; i < size; i++) 153 | { 154 | colors[inverted ? size - 1 - i : i] = new Color32(baseColor.r, i, baseColor.b, 255); 155 | } 156 | break; 157 | case ColorValues.B: 158 | for (byte i = 0; i < size; i++) 159 | { 160 | colors[inverted ? size - 1 - i : i] = new Color32(baseColor.r, baseColor.g, i, 255); 161 | } 162 | break; 163 | case ColorValues.A: 164 | for (byte i = 0; i < size; i++) 165 | { 166 | colors[inverted ? size - 1 - i : i] = new Color32(i, i, i, 255); 167 | } 168 | break; 169 | case ColorValues.Hue: 170 | for (int i = 0; i < size; i++) 171 | { 172 | colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(i, 1, 1, 1); 173 | } 174 | break; 175 | case ColorValues.Saturation: 176 | for (int i = 0; i < size; i++) 177 | { 178 | colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(h * 360, (float)i / size, v, 1); 179 | } 180 | break; 181 | case ColorValues.Value: 182 | for (int i = 0; i < size; i++) 183 | { 184 | colors[inverted ? size - 1 - i : i] = HSVUtil.ConvertHsvToRgb(h * 360, s, (float)i / size, 1); 185 | } 186 | break; 187 | default: 188 | throw new System.NotImplementedException(""); 189 | } 190 | texture.SetPixels32(colors); 191 | texture.Apply(); 192 | 193 | if (image.texture != null) 194 | DestroyImmediate(image.texture); 195 | image.texture = texture; 196 | 197 | switch (direction) 198 | { 199 | case Slider.Direction.BottomToTop: 200 | case Slider.Direction.TopToBottom: 201 | image.uvRect = new Rect(0, 0, 2, 1); 202 | break; 203 | case Slider.Direction.LeftToRight: 204 | case Slider.Direction.RightToLeft: 205 | image.uvRect = new Rect(0, 0, 1, 2); 206 | break; 207 | default: 208 | break; 209 | } 210 | } 211 | 212 | } 213 | --------------------------------------------------------------------------------