├── AllowUnsafeCode.png ├── Assets ├── NatCorderWithOpenCVForUnityExample.meta └── NatCorderWithOpenCVForUnityExample │ ├── NatCorderWithOpenCVForUnityExample.cs │ ├── NatCorderWithOpenCVForUnityExample.cs.meta │ ├── NatCorderWithOpenCVForUnityExample.unity │ ├── NatCorderWithOpenCVForUnityExample.unity.meta │ ├── Scripts.meta │ ├── Scripts │ ├── Utils.meta │ └── Utils │ │ ├── FpsMonitor.cs │ │ ├── FpsMonitor.cs.meta │ │ ├── RuntimePermissionHelper.cs │ │ └── RuntimePermissionHelper.cs.meta │ ├── ShowLicense.cs │ ├── ShowLicense.cs.meta │ ├── ShowLicense.unity │ ├── ShowLicense.unity.meta │ ├── ShowSystemInfo.cs │ ├── ShowSystemInfo.cs.meta │ ├── ShowSystemInfo.unity │ ├── ShowSystemInfo.unity.meta │ ├── VideoRecordingExample.meta │ ├── VideoRecordingExample │ ├── ComicFilter.cs │ ├── ComicFilter.cs.meta │ ├── ExampleMaterial.mat │ ├── ExampleMaterial.mat.meta │ ├── VideoRecordingExample.cs │ ├── VideoRecordingExample.cs.meta │ ├── VideoRecordingExample.unity │ └── VideoRecordingExample.unity.meta │ ├── link.xml │ └── link.xml.meta ├── README.md ├── Use_UnsafeCode.png └── screenshot01.jpg /AllowUnsafeCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnoxSoftware/NatCorderWithOpenCVForUnityExample/376c97969a38f60f10e861d970f398053f2ffa29/AllowUnsafeCode.png -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a1dae2b9ff08e64d98543720f55a76b 3 | folderAsset: yes 4 | timeCreated: 1530717696 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/NatCorderWithOpenCVForUnityExample.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | using UnityEngine.SceneManagement; 4 | using UnityEngine.UI; 5 | 6 | namespace NatCorderWithOpenCVForUnityExample 7 | { 8 | public class NatCorderWithOpenCVForUnityExample : MonoBehaviour 9 | { 10 | public static string GetNatCorderVersion() 11 | { 12 | return "1.8.2"; 13 | } 14 | 15 | public Text exampleTitle; 16 | public Text versionInfo; 17 | public ScrollRect scrollRect; 18 | private static float verticalNormalizedPosition = 1f; 19 | 20 | void Awake() 21 | { 22 | QualitySettings.vSyncCount = 0; 23 | Application.targetFrameRate = 60; 24 | } 25 | 26 | // Use this for initialization 27 | IEnumerator Start() 28 | { 29 | exampleTitle.text = "NatCorderWithOpenCVForUnity Example " + Application.version; 30 | 31 | versionInfo.text = "NatCorder " + GetNatCorderVersion(); 32 | versionInfo.text += " / " + OpenCVForUnity.CoreModule.Core.NATIVE_LIBRARY_NAME + " " + OpenCVForUnity.UnityUtils.Utils.getVersion() + " (" + OpenCVForUnity.CoreModule.Core.VERSION + ")"; 33 | versionInfo.text += " / UnityEditor " + Application.unityVersion; 34 | versionInfo.text += " / "; 35 | 36 | #if UNITY_EDITOR 37 | versionInfo.text += "Editor"; 38 | #elif UNITY_STANDALONE_WIN 39 | versionInfo.text += "Windows"; 40 | #elif UNITY_STANDALONE_OSX 41 | versionInfo.text += "Mac OSX"; 42 | #elif UNITY_STANDALONE_LINUX 43 | versionInfo.text += "Linux"; 44 | #elif UNITY_ANDROID 45 | versionInfo.text += "Android"; 46 | #elif UNITY_IOS 47 | versionInfo.text += "iOS"; 48 | #elif UNITY_WSA 49 | versionInfo.text += "WSA"; 50 | #elif UNITY_WEBGL 51 | versionInfo.text += "WebGL"; 52 | #endif 53 | versionInfo.text += " "; 54 | #if ENABLE_MONO 55 | versionInfo.text += "Mono"; 56 | #elif ENABLE_IL2CPP 57 | versionInfo.text += "IL2CPP"; 58 | #elif ENABLE_DOTNET 59 | versionInfo.text += ".NET"; 60 | #endif 61 | 62 | scrollRect.verticalNormalizedPosition = verticalNormalizedPosition; 63 | 64 | 65 | #if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR 66 | RuntimePermissionHelper runtimePermissionHelper = GetComponent(); 67 | yield return runtimePermissionHelper.hasUserAuthorizedCameraPermission(); 68 | yield return runtimePermissionHelper.hasUserAuthorizedMicrophonePermission(); 69 | yield return runtimePermissionHelper.hasUserAuthorizedExternalStorageWritePermission(); 70 | #endif 71 | 72 | yield break; 73 | } 74 | 75 | // Update is called once per frame 76 | void Update() 77 | { 78 | 79 | } 80 | 81 | public void OnScrollRectValueChanged() 82 | { 83 | verticalNormalizedPosition = scrollRect.verticalNormalizedPosition; 84 | } 85 | 86 | 87 | public void OnShowSystemInfoButtonClick() 88 | { 89 | SceneManager.LoadScene("ShowSystemInfo"); 90 | } 91 | 92 | public void OnShowLicenseButtonClick() 93 | { 94 | SceneManager.LoadScene("ShowLicense"); 95 | } 96 | 97 | public void OnVideoRecordingExampleButtonClick() 98 | { 99 | SceneManager.LoadScene("VideoRecordingExample"); 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/NatCorderWithOpenCVForUnityExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46c33a679f1c6954d9aee95271cf36ff 3 | timeCreated: 1530717697 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/NatCorderWithOpenCVForUnityExample/NatCorderWithOpenCVForUnityExample.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 24 | m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 25 | m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &4 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 1 59 | m_BakeResolution: 50 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 0 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 0 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 0 102 | --- !u!196 &5 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666666 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &10792473 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 10792474} 133 | - component: {fileID: 10792478} 134 | - component: {fileID: 10792477} 135 | - component: {fileID: 10792476} 136 | - component: {fileID: 10792475} 137 | m_Layer: 5 138 | m_Name: ShowLicenseButton 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!224 &10792474 145 | RectTransform: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 10792473} 151 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 152 | m_LocalPosition: {x: 0, y: 0, z: 0} 153 | m_LocalScale: {x: 1, y: 1, z: 1} 154 | m_Children: 155 | - {fileID: 1209172880} 156 | m_Father: {fileID: 1558850095} 157 | m_RootOrder: 0 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | m_AnchorMin: {x: 0, y: 0} 160 | m_AnchorMax: {x: 0, y: 0} 161 | m_AnchoredPosition: {x: 0, y: 0} 162 | m_SizeDelta: {x: 0, y: 0} 163 | m_Pivot: {x: 0.5, y: 0.5} 164 | --- !u!114 &10792475 165 | MonoBehaviour: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 10792473} 171 | m_Enabled: 1 172 | m_EditorHideFlags: 0 173 | m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} 174 | m_Name: 175 | m_EditorClassIdentifier: 176 | m_IgnoreLayout: 0 177 | m_MinWidth: -1 178 | m_MinHeight: -1 179 | m_PreferredWidth: 250 180 | m_PreferredHeight: 40 181 | m_FlexibleWidth: -1 182 | m_FlexibleHeight: -1 183 | m_LayoutPriority: 1 184 | --- !u!114 &10792476 185 | MonoBehaviour: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | m_GameObject: {fileID: 10792473} 191 | m_Enabled: 1 192 | m_EditorHideFlags: 0 193 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 194 | m_Name: 195 | m_EditorClassIdentifier: 196 | m_Navigation: 197 | m_Mode: 3 198 | m_SelectOnUp: {fileID: 0} 199 | m_SelectOnDown: {fileID: 0} 200 | m_SelectOnLeft: {fileID: 0} 201 | m_SelectOnRight: {fileID: 0} 202 | m_Transition: 1 203 | m_Colors: 204 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 205 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 206 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 207 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 208 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 209 | m_ColorMultiplier: 1 210 | m_FadeDuration: 0.1 211 | m_SpriteState: 212 | m_HighlightedSprite: {fileID: 0} 213 | m_PressedSprite: {fileID: 0} 214 | m_SelectedSprite: {fileID: 0} 215 | m_DisabledSprite: {fileID: 0} 216 | m_AnimationTriggers: 217 | m_NormalTrigger: Normal 218 | m_HighlightedTrigger: Highlighted 219 | m_PressedTrigger: Pressed 220 | m_SelectedTrigger: Highlighted 221 | m_DisabledTrigger: Disabled 222 | m_Interactable: 1 223 | m_TargetGraphic: {fileID: 10792477} 224 | m_OnClick: 225 | m_PersistentCalls: 226 | m_Calls: 227 | - m_Target: {fileID: 1124998460} 228 | m_MethodName: OnShowLicenseButtonClick 229 | m_Mode: 1 230 | m_Arguments: 231 | m_ObjectArgument: {fileID: 0} 232 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 233 | m_IntArgument: 0 234 | m_FloatArgument: 0 235 | m_StringArgument: 236 | m_BoolArgument: 0 237 | m_CallState: 2 238 | --- !u!114 &10792477 239 | MonoBehaviour: 240 | m_ObjectHideFlags: 0 241 | m_CorrespondingSourceObject: {fileID: 0} 242 | m_PrefabInstance: {fileID: 0} 243 | m_PrefabAsset: {fileID: 0} 244 | m_GameObject: {fileID: 10792473} 245 | m_Enabled: 1 246 | m_EditorHideFlags: 0 247 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 248 | m_Name: 249 | m_EditorClassIdentifier: 250 | m_Material: {fileID: 0} 251 | m_Color: {r: 1, g: 1, b: 1, a: 1} 252 | m_RaycastTarget: 1 253 | m_Maskable: 1 254 | m_OnCullStateChanged: 255 | m_PersistentCalls: 256 | m_Calls: [] 257 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 258 | m_Type: 1 259 | m_PreserveAspect: 0 260 | m_FillCenter: 1 261 | m_FillMethod: 4 262 | m_FillAmount: 1 263 | m_FillClockwise: 1 264 | m_FillOrigin: 0 265 | m_UseSpriteMesh: 0 266 | m_PixelsPerUnitMultiplier: 1 267 | --- !u!222 &10792478 268 | CanvasRenderer: 269 | m_ObjectHideFlags: 0 270 | m_CorrespondingSourceObject: {fileID: 0} 271 | m_PrefabInstance: {fileID: 0} 272 | m_PrefabAsset: {fileID: 0} 273 | m_GameObject: {fileID: 10792473} 274 | m_CullTransparentMesh: 0 275 | --- !u!1 &265521582 276 | GameObject: 277 | m_ObjectHideFlags: 0 278 | m_CorrespondingSourceObject: {fileID: 0} 279 | m_PrefabInstance: {fileID: 0} 280 | m_PrefabAsset: {fileID: 0} 281 | serializedVersion: 6 282 | m_Component: 283 | - component: {fileID: 265521583} 284 | - component: {fileID: 265521585} 285 | - component: {fileID: 265521584} 286 | m_Layer: 5 287 | m_Name: Text 288 | m_TagString: Untagged 289 | m_Icon: {fileID: 0} 290 | m_NavMeshLayer: 0 291 | m_StaticEditorFlags: 0 292 | m_IsActive: 1 293 | --- !u!224 &265521583 294 | RectTransform: 295 | m_ObjectHideFlags: 0 296 | m_CorrespondingSourceObject: {fileID: 0} 297 | m_PrefabInstance: {fileID: 0} 298 | m_PrefabAsset: {fileID: 0} 299 | m_GameObject: {fileID: 265521582} 300 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 301 | m_LocalPosition: {x: 0, y: 0, z: 0} 302 | m_LocalScale: {x: 1, y: 1, z: 1} 303 | m_Children: [] 304 | m_Father: {fileID: 1791960685} 305 | m_RootOrder: 0 306 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 307 | m_AnchorMin: {x: 0, y: 0} 308 | m_AnchorMax: {x: 1, y: 1} 309 | m_AnchoredPosition: {x: 0, y: 0} 310 | m_SizeDelta: {x: 0, y: 0} 311 | m_Pivot: {x: 0.5, y: 0.5} 312 | --- !u!114 &265521584 313 | MonoBehaviour: 314 | m_ObjectHideFlags: 0 315 | m_CorrespondingSourceObject: {fileID: 0} 316 | m_PrefabInstance: {fileID: 0} 317 | m_PrefabAsset: {fileID: 0} 318 | m_GameObject: {fileID: 265521582} 319 | m_Enabled: 1 320 | m_EditorHideFlags: 0 321 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 322 | m_Name: 323 | m_EditorClassIdentifier: 324 | m_Material: {fileID: 0} 325 | m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1} 326 | m_RaycastTarget: 1 327 | m_Maskable: 1 328 | m_OnCullStateChanged: 329 | m_PersistentCalls: 330 | m_Calls: [] 331 | m_FontData: 332 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 333 | m_FontSize: 14 334 | m_FontStyle: 0 335 | m_BestFit: 0 336 | m_MinSize: 10 337 | m_MaxSize: 40 338 | m_Alignment: 4 339 | m_AlignByGeometry: 0 340 | m_RichText: 1 341 | m_HorizontalOverflow: 0 342 | m_VerticalOverflow: 0 343 | m_LineSpacing: 1 344 | m_Text: Video Recording Example 345 | --- !u!222 &265521585 346 | CanvasRenderer: 347 | m_ObjectHideFlags: 0 348 | m_CorrespondingSourceObject: {fileID: 0} 349 | m_PrefabInstance: {fileID: 0} 350 | m_PrefabAsset: {fileID: 0} 351 | m_GameObject: {fileID: 265521582} 352 | m_CullTransparentMesh: 0 353 | --- !u!1 &296877742 354 | GameObject: 355 | m_ObjectHideFlags: 0 356 | m_CorrespondingSourceObject: {fileID: 0} 357 | m_PrefabInstance: {fileID: 0} 358 | m_PrefabAsset: {fileID: 0} 359 | serializedVersion: 6 360 | m_Component: 361 | - component: {fileID: 296877743} 362 | - component: {fileID: 296877747} 363 | - component: {fileID: 296877746} 364 | - component: {fileID: 296877745} 365 | - component: {fileID: 296877744} 366 | m_Layer: 0 367 | m_Name: ScrollView 368 | m_TagString: Untagged 369 | m_Icon: {fileID: 0} 370 | m_NavMeshLayer: 0 371 | m_StaticEditorFlags: 0 372 | m_IsActive: 1 373 | --- !u!224 &296877743 374 | RectTransform: 375 | m_ObjectHideFlags: 0 376 | m_CorrespondingSourceObject: {fileID: 0} 377 | m_PrefabInstance: {fileID: 0} 378 | m_PrefabAsset: {fileID: 0} 379 | m_GameObject: {fileID: 296877742} 380 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 381 | m_LocalPosition: {x: 0, y: 0, z: 0} 382 | m_LocalScale: {x: 1, y: 1, z: 1} 383 | m_Children: 384 | - {fileID: 1558850095} 385 | m_Father: {fileID: 398629471} 386 | m_RootOrder: 0 387 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 388 | m_AnchorMin: {x: 0, y: 0} 389 | m_AnchorMax: {x: 1, y: 1} 390 | m_AnchoredPosition: {x: -15, y: 0} 391 | m_SizeDelta: {x: -30, y: 0} 392 | m_Pivot: {x: 0.5, y: 1} 393 | --- !u!114 &296877744 394 | MonoBehaviour: 395 | m_ObjectHideFlags: 0 396 | m_CorrespondingSourceObject: {fileID: 0} 397 | m_PrefabInstance: {fileID: 0} 398 | m_PrefabAsset: {fileID: 0} 399 | m_GameObject: {fileID: 296877742} 400 | m_Enabled: 1 401 | m_EditorHideFlags: 0 402 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 403 | m_Name: 404 | m_EditorClassIdentifier: 405 | m_Material: {fileID: 0} 406 | m_Color: {r: 1, g: 1, b: 1, a: 1} 407 | m_RaycastTarget: 1 408 | m_Maskable: 1 409 | m_OnCullStateChanged: 410 | m_PersistentCalls: 411 | m_Calls: [] 412 | m_Sprite: {fileID: 0} 413 | m_Type: 0 414 | m_PreserveAspect: 0 415 | m_FillCenter: 1 416 | m_FillMethod: 4 417 | m_FillAmount: 1 418 | m_FillClockwise: 1 419 | m_FillOrigin: 0 420 | m_UseSpriteMesh: 0 421 | m_PixelsPerUnitMultiplier: 1 422 | --- !u!222 &296877745 423 | CanvasRenderer: 424 | m_ObjectHideFlags: 0 425 | m_CorrespondingSourceObject: {fileID: 0} 426 | m_PrefabInstance: {fileID: 0} 427 | m_PrefabAsset: {fileID: 0} 428 | m_GameObject: {fileID: 296877742} 429 | m_CullTransparentMesh: 0 430 | --- !u!114 &296877746 431 | MonoBehaviour: 432 | m_ObjectHideFlags: 0 433 | m_CorrespondingSourceObject: {fileID: 0} 434 | m_PrefabInstance: {fileID: 0} 435 | m_PrefabAsset: {fileID: 0} 436 | m_GameObject: {fileID: 296877742} 437 | m_Enabled: 1 438 | m_EditorHideFlags: 0 439 | m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} 440 | m_Name: 441 | m_EditorClassIdentifier: 442 | m_ShowMaskGraphic: 0 443 | --- !u!114 &296877747 444 | MonoBehaviour: 445 | m_ObjectHideFlags: 0 446 | m_CorrespondingSourceObject: {fileID: 0} 447 | m_PrefabInstance: {fileID: 0} 448 | m_PrefabAsset: {fileID: 0} 449 | m_GameObject: {fileID: 296877742} 450 | m_Enabled: 1 451 | m_EditorHideFlags: 0 452 | m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} 453 | m_Name: 454 | m_EditorClassIdentifier: 455 | m_Content: {fileID: 1558850095} 456 | m_Horizontal: 0 457 | m_Vertical: 1 458 | m_MovementType: 1 459 | m_Elasticity: 0.1 460 | m_Inertia: 1 461 | m_DecelerationRate: 0.135 462 | m_ScrollSensitivity: 1 463 | m_Viewport: {fileID: 0} 464 | m_HorizontalScrollbar: {fileID: 0} 465 | m_VerticalScrollbar: {fileID: 1324177433} 466 | m_HorizontalScrollbarVisibility: 0 467 | m_VerticalScrollbarVisibility: 0 468 | m_HorizontalScrollbarSpacing: 0 469 | m_VerticalScrollbarSpacing: 0 470 | m_OnValueChanged: 471 | m_PersistentCalls: 472 | m_Calls: 473 | - m_Target: {fileID: 1124998460} 474 | m_MethodName: OnScrollRectValueChanged 475 | m_Mode: 1 476 | m_Arguments: 477 | m_ObjectArgument: {fileID: 0} 478 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 479 | m_IntArgument: 0 480 | m_FloatArgument: 0 481 | m_StringArgument: 482 | m_BoolArgument: 0 483 | m_CallState: 2 484 | --- !u!1 &304459244 485 | GameObject: 486 | m_ObjectHideFlags: 0 487 | m_CorrespondingSourceObject: {fileID: 0} 488 | m_PrefabInstance: {fileID: 0} 489 | m_PrefabAsset: {fileID: 0} 490 | serializedVersion: 6 491 | m_Component: 492 | - component: {fileID: 304459245} 493 | - component: {fileID: 304459247} 494 | - component: {fileID: 304459246} 495 | m_Layer: 5 496 | m_Name: Text 497 | m_TagString: Untagged 498 | m_Icon: {fileID: 0} 499 | m_NavMeshLayer: 0 500 | m_StaticEditorFlags: 0 501 | m_IsActive: 1 502 | --- !u!224 &304459245 503 | RectTransform: 504 | m_ObjectHideFlags: 0 505 | m_CorrespondingSourceObject: {fileID: 0} 506 | m_PrefabInstance: {fileID: 0} 507 | m_PrefabAsset: {fileID: 0} 508 | m_GameObject: {fileID: 304459244} 509 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 510 | m_LocalPosition: {x: 0, y: 0, z: 0} 511 | m_LocalScale: {x: 1, y: 1, z: 1} 512 | m_Children: [] 513 | m_Father: {fileID: 743992496} 514 | m_RootOrder: 0 515 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 516 | m_AnchorMin: {x: 0, y: 0} 517 | m_AnchorMax: {x: 1, y: 1} 518 | m_AnchoredPosition: {x: 0, y: 0} 519 | m_SizeDelta: {x: 0, y: 0} 520 | m_Pivot: {x: 0.5, y: 0.5} 521 | --- !u!114 &304459246 522 | MonoBehaviour: 523 | m_ObjectHideFlags: 0 524 | m_CorrespondingSourceObject: {fileID: 0} 525 | m_PrefabInstance: {fileID: 0} 526 | m_PrefabAsset: {fileID: 0} 527 | m_GameObject: {fileID: 304459244} 528 | m_Enabled: 1 529 | m_EditorHideFlags: 0 530 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 531 | m_Name: 532 | m_EditorClassIdentifier: 533 | m_Material: {fileID: 0} 534 | m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1} 535 | m_RaycastTarget: 1 536 | m_Maskable: 1 537 | m_OnCullStateChanged: 538 | m_PersistentCalls: 539 | m_Calls: [] 540 | m_FontData: 541 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 542 | m_FontSize: 14 543 | m_FontStyle: 0 544 | m_BestFit: 0 545 | m_MinSize: 10 546 | m_MaxSize: 40 547 | m_Alignment: 4 548 | m_AlignByGeometry: 0 549 | m_RichText: 1 550 | m_HorizontalOverflow: 0 551 | m_VerticalOverflow: 0 552 | m_LineSpacing: 1 553 | m_Text: 'System 554 | 555 | Info' 556 | --- !u!222 &304459247 557 | CanvasRenderer: 558 | m_ObjectHideFlags: 0 559 | m_CorrespondingSourceObject: {fileID: 0} 560 | m_PrefabInstance: {fileID: 0} 561 | m_PrefabAsset: {fileID: 0} 562 | m_GameObject: {fileID: 304459244} 563 | m_CullTransparentMesh: 0 564 | --- !u!1 &346089859 565 | GameObject: 566 | m_ObjectHideFlags: 0 567 | m_CorrespondingSourceObject: {fileID: 0} 568 | m_PrefabInstance: {fileID: 0} 569 | m_PrefabAsset: {fileID: 0} 570 | serializedVersion: 6 571 | m_Component: 572 | - component: {fileID: 346089860} 573 | - component: {fileID: 346089862} 574 | - component: {fileID: 346089861} 575 | m_Layer: 5 576 | m_Name: ExampleTitle 577 | m_TagString: Untagged 578 | m_Icon: {fileID: 0} 579 | m_NavMeshLayer: 0 580 | m_StaticEditorFlags: 0 581 | m_IsActive: 1 582 | --- !u!224 &346089860 583 | RectTransform: 584 | m_ObjectHideFlags: 0 585 | m_CorrespondingSourceObject: {fileID: 0} 586 | m_PrefabInstance: {fileID: 0} 587 | m_PrefabAsset: {fileID: 0} 588 | m_GameObject: {fileID: 346089859} 589 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 590 | m_LocalPosition: {x: 0, y: 0, z: 0} 591 | m_LocalScale: {x: 1, y: 1, z: 1} 592 | m_Children: [] 593 | m_Father: {fileID: 1800755751} 594 | m_RootOrder: 0 595 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 596 | m_AnchorMin: {x: 0, y: 0} 597 | m_AnchorMax: {x: 0, y: 0} 598 | m_AnchoredPosition: {x: 0, y: 0} 599 | m_SizeDelta: {x: 0, y: 0} 600 | m_Pivot: {x: 0.5, y: 0.5} 601 | --- !u!114 &346089861 602 | MonoBehaviour: 603 | m_ObjectHideFlags: 0 604 | m_CorrespondingSourceObject: {fileID: 0} 605 | m_PrefabInstance: {fileID: 0} 606 | m_PrefabAsset: {fileID: 0} 607 | m_GameObject: {fileID: 346089859} 608 | m_Enabled: 1 609 | m_EditorHideFlags: 0 610 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 611 | m_Name: 612 | m_EditorClassIdentifier: 613 | m_Material: {fileID: 0} 614 | m_Color: {r: 1, g: 1, b: 1, a: 1} 615 | m_RaycastTarget: 1 616 | m_Maskable: 1 617 | m_OnCullStateChanged: 618 | m_PersistentCalls: 619 | m_Calls: [] 620 | m_FontData: 621 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 622 | m_FontSize: 22 623 | m_FontStyle: 1 624 | m_BestFit: 0 625 | m_MinSize: 2 626 | m_MaxSize: 40 627 | m_Alignment: 4 628 | m_AlignByGeometry: 0 629 | m_RichText: 1 630 | m_HorizontalOverflow: 0 631 | m_VerticalOverflow: 0 632 | m_LineSpacing: 1 633 | m_Text: NatCorderWithOpenCVForUnity Example 634 | --- !u!222 &346089862 635 | CanvasRenderer: 636 | m_ObjectHideFlags: 0 637 | m_CorrespondingSourceObject: {fileID: 0} 638 | m_PrefabInstance: {fileID: 0} 639 | m_PrefabAsset: {fileID: 0} 640 | m_GameObject: {fileID: 346089859} 641 | m_CullTransparentMesh: 0 642 | --- !u!1 &398629470 643 | GameObject: 644 | m_ObjectHideFlags: 0 645 | m_CorrespondingSourceObject: {fileID: 0} 646 | m_PrefabInstance: {fileID: 0} 647 | m_PrefabAsset: {fileID: 0} 648 | serializedVersion: 6 649 | m_Component: 650 | - component: {fileID: 398629471} 651 | - component: {fileID: 398629472} 652 | m_Layer: 5 653 | m_Name: SceneList 654 | m_TagString: Untagged 655 | m_Icon: {fileID: 0} 656 | m_NavMeshLayer: 0 657 | m_StaticEditorFlags: 0 658 | m_IsActive: 1 659 | --- !u!224 &398629471 660 | RectTransform: 661 | m_ObjectHideFlags: 0 662 | m_CorrespondingSourceObject: {fileID: 0} 663 | m_PrefabInstance: {fileID: 0} 664 | m_PrefabAsset: {fileID: 0} 665 | m_GameObject: {fileID: 398629470} 666 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 667 | m_LocalPosition: {x: 0, y: 0, z: 0} 668 | m_LocalScale: {x: 1, y: 1, z: 1} 669 | m_Children: 670 | - {fileID: 296877743} 671 | - {fileID: 1324177432} 672 | m_Father: {fileID: 1800755751} 673 | m_RootOrder: 2 674 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 675 | m_AnchorMin: {x: 0, y: 0} 676 | m_AnchorMax: {x: 0, y: 0} 677 | m_AnchoredPosition: {x: 0, y: 0} 678 | m_SizeDelta: {x: 0, y: 0} 679 | m_Pivot: {x: 0.5, y: 1} 680 | --- !u!114 &398629472 681 | MonoBehaviour: 682 | m_ObjectHideFlags: 0 683 | m_CorrespondingSourceObject: {fileID: 0} 684 | m_PrefabInstance: {fileID: 0} 685 | m_PrefabAsset: {fileID: 0} 686 | m_GameObject: {fileID: 398629470} 687 | m_Enabled: 1 688 | m_EditorHideFlags: 0 689 | m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} 690 | m_Name: 691 | m_EditorClassIdentifier: 692 | m_IgnoreLayout: 0 693 | m_MinWidth: -1 694 | m_MinHeight: -1 695 | m_PreferredWidth: -1 696 | m_PreferredHeight: -1 697 | m_FlexibleWidth: -1 698 | m_FlexibleHeight: 1 699 | m_LayoutPriority: 1 700 | --- !u!1 &595830807 701 | GameObject: 702 | m_ObjectHideFlags: 0 703 | m_CorrespondingSourceObject: {fileID: 0} 704 | m_PrefabInstance: {fileID: 0} 705 | m_PrefabAsset: {fileID: 0} 706 | serializedVersion: 6 707 | m_Component: 708 | - component: {fileID: 595830808} 709 | - component: {fileID: 595830810} 710 | - component: {fileID: 595830809} 711 | m_Layer: 5 712 | m_Name: VersionInfo 713 | m_TagString: Untagged 714 | m_Icon: {fileID: 0} 715 | m_NavMeshLayer: 0 716 | m_StaticEditorFlags: 0 717 | m_IsActive: 1 718 | --- !u!224 &595830808 719 | RectTransform: 720 | m_ObjectHideFlags: 0 721 | m_CorrespondingSourceObject: {fileID: 0} 722 | m_PrefabInstance: {fileID: 0} 723 | m_PrefabAsset: {fileID: 0} 724 | m_GameObject: {fileID: 595830807} 725 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 726 | m_LocalPosition: {x: 0, y: 0, z: 0} 727 | m_LocalScale: {x: 1, y: 1, z: 1} 728 | m_Children: [] 729 | m_Father: {fileID: 1800755751} 730 | m_RootOrder: 1 731 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 732 | m_AnchorMin: {x: 0, y: 0} 733 | m_AnchorMax: {x: 0, y: 0} 734 | m_AnchoredPosition: {x: 0, y: 0} 735 | m_SizeDelta: {x: 0, y: 0} 736 | m_Pivot: {x: 0.5, y: 0.5} 737 | --- !u!114 &595830809 738 | MonoBehaviour: 739 | m_ObjectHideFlags: 0 740 | m_CorrespondingSourceObject: {fileID: 0} 741 | m_PrefabInstance: {fileID: 0} 742 | m_PrefabAsset: {fileID: 0} 743 | m_GameObject: {fileID: 595830807} 744 | m_Enabled: 1 745 | m_EditorHideFlags: 0 746 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 747 | m_Name: 748 | m_EditorClassIdentifier: 749 | m_Material: {fileID: 0} 750 | m_Color: {r: 1, g: 1, b: 1, a: 1} 751 | m_RaycastTarget: 1 752 | m_Maskable: 1 753 | m_OnCullStateChanged: 754 | m_PersistentCalls: 755 | m_Calls: [] 756 | m_FontData: 757 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 758 | m_FontSize: 14 759 | m_FontStyle: 0 760 | m_BestFit: 0 761 | m_MinSize: 1 762 | m_MaxSize: 40 763 | m_Alignment: 4 764 | m_AlignByGeometry: 0 765 | m_RichText: 1 766 | m_HorizontalOverflow: 0 767 | m_VerticalOverflow: 0 768 | m_LineSpacing: 1 769 | m_Text: 770 | --- !u!222 &595830810 771 | CanvasRenderer: 772 | m_ObjectHideFlags: 0 773 | m_CorrespondingSourceObject: {fileID: 0} 774 | m_PrefabInstance: {fileID: 0} 775 | m_PrefabAsset: {fileID: 0} 776 | m_GameObject: {fileID: 595830807} 777 | m_CullTransparentMesh: 0 778 | --- !u!1 &743992495 779 | GameObject: 780 | m_ObjectHideFlags: 0 781 | m_CorrespondingSourceObject: {fileID: 0} 782 | m_PrefabInstance: {fileID: 0} 783 | m_PrefabAsset: {fileID: 0} 784 | serializedVersion: 6 785 | m_Component: 786 | - component: {fileID: 743992496} 787 | - component: {fileID: 743992500} 788 | - component: {fileID: 743992499} 789 | - component: {fileID: 743992498} 790 | m_Layer: 5 791 | m_Name: ShowSystemInfoButton 792 | m_TagString: Untagged 793 | m_Icon: {fileID: 0} 794 | m_NavMeshLayer: 0 795 | m_StaticEditorFlags: 0 796 | m_IsActive: 1 797 | --- !u!224 &743992496 798 | RectTransform: 799 | m_ObjectHideFlags: 0 800 | m_CorrespondingSourceObject: {fileID: 0} 801 | m_PrefabInstance: {fileID: 0} 802 | m_PrefabAsset: {fileID: 0} 803 | m_GameObject: {fileID: 743992495} 804 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 805 | m_LocalPosition: {x: 0, y: 0, z: 0} 806 | m_LocalScale: {x: 1, y: 1, z: 1} 807 | m_Children: 808 | - {fileID: 304459245} 809 | m_Father: {fileID: 1810133384} 810 | m_RootOrder: 1 811 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 812 | m_AnchorMin: {x: 1, y: 1} 813 | m_AnchorMax: {x: 1, y: 1} 814 | m_AnchoredPosition: {x: -9.999878, y: -9.999939} 815 | m_SizeDelta: {x: 100, y: 50} 816 | m_Pivot: {x: 1, y: 1} 817 | --- !u!114 &743992498 818 | MonoBehaviour: 819 | m_ObjectHideFlags: 0 820 | m_CorrespondingSourceObject: {fileID: 0} 821 | m_PrefabInstance: {fileID: 0} 822 | m_PrefabAsset: {fileID: 0} 823 | m_GameObject: {fileID: 743992495} 824 | m_Enabled: 1 825 | m_EditorHideFlags: 0 826 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 827 | m_Name: 828 | m_EditorClassIdentifier: 829 | m_Navigation: 830 | m_Mode: 3 831 | m_SelectOnUp: {fileID: 0} 832 | m_SelectOnDown: {fileID: 0} 833 | m_SelectOnLeft: {fileID: 0} 834 | m_SelectOnRight: {fileID: 0} 835 | m_Transition: 1 836 | m_Colors: 837 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 838 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 839 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 840 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 841 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 842 | m_ColorMultiplier: 1 843 | m_FadeDuration: 0.1 844 | m_SpriteState: 845 | m_HighlightedSprite: {fileID: 0} 846 | m_PressedSprite: {fileID: 0} 847 | m_SelectedSprite: {fileID: 0} 848 | m_DisabledSprite: {fileID: 0} 849 | m_AnimationTriggers: 850 | m_NormalTrigger: Normal 851 | m_HighlightedTrigger: Highlighted 852 | m_PressedTrigger: Pressed 853 | m_SelectedTrigger: Highlighted 854 | m_DisabledTrigger: Disabled 855 | m_Interactable: 1 856 | m_TargetGraphic: {fileID: 743992499} 857 | m_OnClick: 858 | m_PersistentCalls: 859 | m_Calls: 860 | - m_Target: {fileID: 1124998460} 861 | m_MethodName: OnShowSystemInfoButtonClick 862 | m_Mode: 1 863 | m_Arguments: 864 | m_ObjectArgument: {fileID: 0} 865 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 866 | m_IntArgument: 0 867 | m_FloatArgument: 0 868 | m_StringArgument: 869 | m_BoolArgument: 0 870 | m_CallState: 2 871 | --- !u!114 &743992499 872 | MonoBehaviour: 873 | m_ObjectHideFlags: 0 874 | m_CorrespondingSourceObject: {fileID: 0} 875 | m_PrefabInstance: {fileID: 0} 876 | m_PrefabAsset: {fileID: 0} 877 | m_GameObject: {fileID: 743992495} 878 | m_Enabled: 1 879 | m_EditorHideFlags: 0 880 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 881 | m_Name: 882 | m_EditorClassIdentifier: 883 | m_Material: {fileID: 0} 884 | m_Color: {r: 1, g: 1, b: 1, a: 1} 885 | m_RaycastTarget: 1 886 | m_Maskable: 1 887 | m_OnCullStateChanged: 888 | m_PersistentCalls: 889 | m_Calls: [] 890 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 891 | m_Type: 1 892 | m_PreserveAspect: 0 893 | m_FillCenter: 1 894 | m_FillMethod: 4 895 | m_FillAmount: 1 896 | m_FillClockwise: 1 897 | m_FillOrigin: 0 898 | m_UseSpriteMesh: 0 899 | m_PixelsPerUnitMultiplier: 1 900 | --- !u!222 &743992500 901 | CanvasRenderer: 902 | m_ObjectHideFlags: 0 903 | m_CorrespondingSourceObject: {fileID: 0} 904 | m_PrefabInstance: {fileID: 0} 905 | m_PrefabAsset: {fileID: 0} 906 | m_GameObject: {fileID: 743992495} 907 | m_CullTransparentMesh: 0 908 | --- !u!1 &760072661 909 | GameObject: 910 | m_ObjectHideFlags: 0 911 | m_CorrespondingSourceObject: {fileID: 0} 912 | m_PrefabInstance: {fileID: 0} 913 | m_PrefabAsset: {fileID: 0} 914 | serializedVersion: 6 915 | m_Component: 916 | - component: {fileID: 760072662} 917 | - component: {fileID: 760072664} 918 | - component: {fileID: 760072663} 919 | m_Layer: 5 920 | m_Name: Handle 921 | m_TagString: Untagged 922 | m_Icon: {fileID: 0} 923 | m_NavMeshLayer: 0 924 | m_StaticEditorFlags: 0 925 | m_IsActive: 1 926 | --- !u!224 &760072662 927 | RectTransform: 928 | m_ObjectHideFlags: 0 929 | m_CorrespondingSourceObject: {fileID: 0} 930 | m_PrefabInstance: {fileID: 0} 931 | m_PrefabAsset: {fileID: 0} 932 | m_GameObject: {fileID: 760072661} 933 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 934 | m_LocalPosition: {x: 0, y: 0, z: 0} 935 | m_LocalScale: {x: 1, y: 1, z: 1} 936 | m_Children: [] 937 | m_Father: {fileID: 1098302631} 938 | m_RootOrder: 0 939 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 940 | m_AnchorMin: {x: 0, y: 0} 941 | m_AnchorMax: {x: 0, y: 0} 942 | m_AnchoredPosition: {x: 0, y: 0} 943 | m_SizeDelta: {x: 20, y: 20} 944 | m_Pivot: {x: 0.5, y: 0.5} 945 | --- !u!114 &760072663 946 | MonoBehaviour: 947 | m_ObjectHideFlags: 0 948 | m_CorrespondingSourceObject: {fileID: 0} 949 | m_PrefabInstance: {fileID: 0} 950 | m_PrefabAsset: {fileID: 0} 951 | m_GameObject: {fileID: 760072661} 952 | m_Enabled: 1 953 | m_EditorHideFlags: 0 954 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 955 | m_Name: 956 | m_EditorClassIdentifier: 957 | m_Material: {fileID: 0} 958 | m_Color: {r: 1, g: 1, b: 1, a: 1} 959 | m_RaycastTarget: 1 960 | m_Maskable: 1 961 | m_OnCullStateChanged: 962 | m_PersistentCalls: 963 | m_Calls: [] 964 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 965 | m_Type: 1 966 | m_PreserveAspect: 0 967 | m_FillCenter: 1 968 | m_FillMethod: 4 969 | m_FillAmount: 1 970 | m_FillClockwise: 1 971 | m_FillOrigin: 0 972 | m_UseSpriteMesh: 0 973 | m_PixelsPerUnitMultiplier: 1 974 | --- !u!222 &760072664 975 | CanvasRenderer: 976 | m_ObjectHideFlags: 0 977 | m_CorrespondingSourceObject: {fileID: 0} 978 | m_PrefabInstance: {fileID: 0} 979 | m_PrefabAsset: {fileID: 0} 980 | m_GameObject: {fileID: 760072661} 981 | m_CullTransparentMesh: 0 982 | --- !u!1 &1098302630 983 | GameObject: 984 | m_ObjectHideFlags: 0 985 | m_CorrespondingSourceObject: {fileID: 0} 986 | m_PrefabInstance: {fileID: 0} 987 | m_PrefabAsset: {fileID: 0} 988 | serializedVersion: 6 989 | m_Component: 990 | - component: {fileID: 1098302631} 991 | m_Layer: 5 992 | m_Name: Sliding Area 993 | m_TagString: Untagged 994 | m_Icon: {fileID: 0} 995 | m_NavMeshLayer: 0 996 | m_StaticEditorFlags: 0 997 | m_IsActive: 1 998 | --- !u!224 &1098302631 999 | RectTransform: 1000 | m_ObjectHideFlags: 0 1001 | m_CorrespondingSourceObject: {fileID: 0} 1002 | m_PrefabInstance: {fileID: 0} 1003 | m_PrefabAsset: {fileID: 0} 1004 | m_GameObject: {fileID: 1098302630} 1005 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1006 | m_LocalPosition: {x: 0, y: 0, z: 0} 1007 | m_LocalScale: {x: 1, y: 1, z: 1} 1008 | m_Children: 1009 | - {fileID: 760072662} 1010 | m_Father: {fileID: 1324177432} 1011 | m_RootOrder: 0 1012 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1013 | m_AnchorMin: {x: 0, y: 0} 1014 | m_AnchorMax: {x: 1, y: 1} 1015 | m_AnchoredPosition: {x: 0, y: 0} 1016 | m_SizeDelta: {x: -20, y: -20} 1017 | m_Pivot: {x: 0.5, y: 0.5} 1018 | --- !u!1 &1124998459 1019 | GameObject: 1020 | m_ObjectHideFlags: 0 1021 | m_CorrespondingSourceObject: {fileID: 0} 1022 | m_PrefabInstance: {fileID: 0} 1023 | m_PrefabAsset: {fileID: 0} 1024 | serializedVersion: 6 1025 | m_Component: 1026 | - component: {fileID: 1124998464} 1027 | - component: {fileID: 1124998463} 1028 | - component: {fileID: 1124998462} 1029 | - component: {fileID: 1124998461} 1030 | - component: {fileID: 1124998460} 1031 | - component: {fileID: 1124998465} 1032 | m_Layer: 0 1033 | m_Name: NatCorderWithOpenCVForUnityExample 1034 | m_TagString: Untagged 1035 | m_Icon: {fileID: 0} 1036 | m_NavMeshLayer: 0 1037 | m_StaticEditorFlags: 0 1038 | m_IsActive: 1 1039 | --- !u!114 &1124998460 1040 | MonoBehaviour: 1041 | m_ObjectHideFlags: 0 1042 | m_CorrespondingSourceObject: {fileID: 0} 1043 | m_PrefabInstance: {fileID: 0} 1044 | m_PrefabAsset: {fileID: 0} 1045 | m_GameObject: {fileID: 1124998459} 1046 | m_Enabled: 1 1047 | m_EditorHideFlags: 0 1048 | m_Script: {fileID: 11500000, guid: 46c33a679f1c6954d9aee95271cf36ff, type: 3} 1049 | m_Name: 1050 | m_EditorClassIdentifier: 1051 | exampleTitle: {fileID: 346089861} 1052 | versionInfo: {fileID: 595830809} 1053 | scrollRect: {fileID: 296877747} 1054 | --- !u!23 &1124998461 1055 | MeshRenderer: 1056 | m_ObjectHideFlags: 0 1057 | m_CorrespondingSourceObject: {fileID: 0} 1058 | m_PrefabInstance: {fileID: 0} 1059 | m_PrefabAsset: {fileID: 0} 1060 | m_GameObject: {fileID: 1124998459} 1061 | m_Enabled: 0 1062 | m_CastShadows: 1 1063 | m_ReceiveShadows: 1 1064 | m_DynamicOccludee: 1 1065 | m_MotionVectors: 1 1066 | m_LightProbeUsage: 0 1067 | m_ReflectionProbeUsage: 1 1068 | m_RayTracingMode: 2 1069 | m_RenderingLayerMask: 1 1070 | m_RendererPriority: 0 1071 | m_Materials: 1072 | - {fileID: 2100000, guid: a78026fb4064cf1468a31b963c565658, type: 2} 1073 | m_StaticBatchInfo: 1074 | firstSubMesh: 0 1075 | subMeshCount: 0 1076 | m_StaticBatchRoot: {fileID: 0} 1077 | m_ProbeAnchor: {fileID: 0} 1078 | m_LightProbeVolumeOverride: {fileID: 0} 1079 | m_ScaleInLightmap: 1 1080 | m_ReceiveGI: 1 1081 | m_PreserveUVs: 0 1082 | m_IgnoreNormalsForChartDetection: 0 1083 | m_ImportantGI: 0 1084 | m_StitchLightmapSeams: 0 1085 | m_SelectedEditorRenderState: 3 1086 | m_MinimumChartSize: 4 1087 | m_AutoUVMaxDistance: 0.5 1088 | m_AutoUVMaxAngle: 89 1089 | m_LightmapParameters: {fileID: 0} 1090 | m_SortingLayerID: 0 1091 | m_SortingLayer: 0 1092 | m_SortingOrder: 0 1093 | --- !u!65 &1124998462 1094 | BoxCollider: 1095 | m_ObjectHideFlags: 0 1096 | m_CorrespondingSourceObject: {fileID: 0} 1097 | m_PrefabInstance: {fileID: 0} 1098 | m_PrefabAsset: {fileID: 0} 1099 | m_GameObject: {fileID: 1124998459} 1100 | m_Material: {fileID: 0} 1101 | m_IsTrigger: 0 1102 | m_Enabled: 0 1103 | serializedVersion: 2 1104 | m_Size: {x: 1, y: 1, z: 1} 1105 | m_Center: {x: 0, y: 0, z: 0} 1106 | --- !u!33 &1124998463 1107 | MeshFilter: 1108 | m_ObjectHideFlags: 0 1109 | m_CorrespondingSourceObject: {fileID: 0} 1110 | m_PrefabInstance: {fileID: 0} 1111 | m_PrefabAsset: {fileID: 0} 1112 | m_GameObject: {fileID: 1124998459} 1113 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 1114 | --- !u!4 &1124998464 1115 | Transform: 1116 | m_ObjectHideFlags: 0 1117 | m_CorrespondingSourceObject: {fileID: 0} 1118 | m_PrefabInstance: {fileID: 0} 1119 | m_PrefabAsset: {fileID: 0} 1120 | m_GameObject: {fileID: 1124998459} 1121 | m_LocalRotation: {x: 0, y: 0, z: 1, w: -0.00000016292068} 1122 | m_LocalPosition: {x: 0, y: 0, z: 0} 1123 | m_LocalScale: {x: 5, y: 5, z: 5} 1124 | m_Children: [] 1125 | m_Father: {fileID: 0} 1126 | m_RootOrder: 0 1127 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1128 | --- !u!114 &1124998465 1129 | MonoBehaviour: 1130 | m_ObjectHideFlags: 0 1131 | m_CorrespondingSourceObject: {fileID: 0} 1132 | m_PrefabInstance: {fileID: 0} 1133 | m_PrefabAsset: {fileID: 0} 1134 | m_GameObject: {fileID: 1124998459} 1135 | m_Enabled: 1 1136 | m_EditorHideFlags: 0 1137 | m_Script: {fileID: 11500000, guid: 38684b64d7283db4e8258e11d6c6e2e3, type: 3} 1138 | m_Name: 1139 | m_EditorClassIdentifier: 1140 | --- !u!1 &1209172879 1141 | GameObject: 1142 | m_ObjectHideFlags: 0 1143 | m_CorrespondingSourceObject: {fileID: 0} 1144 | m_PrefabInstance: {fileID: 0} 1145 | m_PrefabAsset: {fileID: 0} 1146 | serializedVersion: 6 1147 | m_Component: 1148 | - component: {fileID: 1209172880} 1149 | - component: {fileID: 1209172882} 1150 | - component: {fileID: 1209172881} 1151 | m_Layer: 5 1152 | m_Name: Text 1153 | m_TagString: Untagged 1154 | m_Icon: {fileID: 0} 1155 | m_NavMeshLayer: 0 1156 | m_StaticEditorFlags: 0 1157 | m_IsActive: 1 1158 | --- !u!224 &1209172880 1159 | RectTransform: 1160 | m_ObjectHideFlags: 0 1161 | m_CorrespondingSourceObject: {fileID: 0} 1162 | m_PrefabInstance: {fileID: 0} 1163 | m_PrefabAsset: {fileID: 0} 1164 | m_GameObject: {fileID: 1209172879} 1165 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1166 | m_LocalPosition: {x: 0, y: 0, z: 0} 1167 | m_LocalScale: {x: 1, y: 1, z: 1} 1168 | m_Children: [] 1169 | m_Father: {fileID: 10792474} 1170 | m_RootOrder: 0 1171 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1172 | m_AnchorMin: {x: 0, y: 0} 1173 | m_AnchorMax: {x: 1, y: 1} 1174 | m_AnchoredPosition: {x: 0, y: 0} 1175 | m_SizeDelta: {x: 0, y: 0} 1176 | m_Pivot: {x: 0.5, y: 0.5} 1177 | --- !u!114 &1209172881 1178 | MonoBehaviour: 1179 | m_ObjectHideFlags: 0 1180 | m_CorrespondingSourceObject: {fileID: 0} 1181 | m_PrefabInstance: {fileID: 0} 1182 | m_PrefabAsset: {fileID: 0} 1183 | m_GameObject: {fileID: 1209172879} 1184 | m_Enabled: 1 1185 | m_EditorHideFlags: 0 1186 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 1187 | m_Name: 1188 | m_EditorClassIdentifier: 1189 | m_Material: {fileID: 0} 1190 | m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1} 1191 | m_RaycastTarget: 1 1192 | m_Maskable: 1 1193 | m_OnCullStateChanged: 1194 | m_PersistentCalls: 1195 | m_Calls: [] 1196 | m_FontData: 1197 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1198 | m_FontSize: 14 1199 | m_FontStyle: 0 1200 | m_BestFit: 0 1201 | m_MinSize: 10 1202 | m_MaxSize: 40 1203 | m_Alignment: 4 1204 | m_AlignByGeometry: 0 1205 | m_RichText: 1 1206 | m_HorizontalOverflow: 0 1207 | m_VerticalOverflow: 0 1208 | m_LineSpacing: 1 1209 | m_Text: ShowLicense 1210 | --- !u!222 &1209172882 1211 | CanvasRenderer: 1212 | m_ObjectHideFlags: 0 1213 | m_CorrespondingSourceObject: {fileID: 0} 1214 | m_PrefabInstance: {fileID: 0} 1215 | m_PrefabAsset: {fileID: 0} 1216 | m_GameObject: {fileID: 1209172879} 1217 | m_CullTransparentMesh: 0 1218 | --- !u!1 &1324177431 1219 | GameObject: 1220 | m_ObjectHideFlags: 0 1221 | m_CorrespondingSourceObject: {fileID: 0} 1222 | m_PrefabInstance: {fileID: 0} 1223 | m_PrefabAsset: {fileID: 0} 1224 | serializedVersion: 6 1225 | m_Component: 1226 | - component: {fileID: 1324177432} 1227 | - component: {fileID: 1324177435} 1228 | - component: {fileID: 1324177434} 1229 | - component: {fileID: 1324177433} 1230 | m_Layer: 5 1231 | m_Name: Scrollbar 1232 | m_TagString: Untagged 1233 | m_Icon: {fileID: 0} 1234 | m_NavMeshLayer: 0 1235 | m_StaticEditorFlags: 0 1236 | m_IsActive: 1 1237 | --- !u!224 &1324177432 1238 | RectTransform: 1239 | m_ObjectHideFlags: 0 1240 | m_CorrespondingSourceObject: {fileID: 0} 1241 | m_PrefabInstance: {fileID: 0} 1242 | m_PrefabAsset: {fileID: 0} 1243 | m_GameObject: {fileID: 1324177431} 1244 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1245 | m_LocalPosition: {x: 0, y: 0, z: 0} 1246 | m_LocalScale: {x: 1, y: 1, z: 1} 1247 | m_Children: 1248 | - {fileID: 1098302631} 1249 | m_Father: {fileID: 398629471} 1250 | m_RootOrder: 1 1251 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1252 | m_AnchorMin: {x: 1, y: 0} 1253 | m_AnchorMax: {x: 1, y: 1} 1254 | m_AnchoredPosition: {x: -10, y: 0} 1255 | m_SizeDelta: {x: 20, y: 0} 1256 | m_Pivot: {x: 0.5, y: 0.5} 1257 | --- !u!114 &1324177433 1258 | MonoBehaviour: 1259 | m_ObjectHideFlags: 0 1260 | m_CorrespondingSourceObject: {fileID: 0} 1261 | m_PrefabInstance: {fileID: 0} 1262 | m_PrefabAsset: {fileID: 0} 1263 | m_GameObject: {fileID: 1324177431} 1264 | m_Enabled: 1 1265 | m_EditorHideFlags: 0 1266 | m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} 1267 | m_Name: 1268 | m_EditorClassIdentifier: 1269 | m_Navigation: 1270 | m_Mode: 3 1271 | m_SelectOnUp: {fileID: 0} 1272 | m_SelectOnDown: {fileID: 0} 1273 | m_SelectOnLeft: {fileID: 0} 1274 | m_SelectOnRight: {fileID: 0} 1275 | m_Transition: 1 1276 | m_Colors: 1277 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 1278 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1279 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 1280 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1281 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 1282 | m_ColorMultiplier: 1 1283 | m_FadeDuration: 0.1 1284 | m_SpriteState: 1285 | m_HighlightedSprite: {fileID: 0} 1286 | m_PressedSprite: {fileID: 0} 1287 | m_SelectedSprite: {fileID: 0} 1288 | m_DisabledSprite: {fileID: 0} 1289 | m_AnimationTriggers: 1290 | m_NormalTrigger: Normal 1291 | m_HighlightedTrigger: Highlighted 1292 | m_PressedTrigger: Pressed 1293 | m_SelectedTrigger: Highlighted 1294 | m_DisabledTrigger: Disabled 1295 | m_Interactable: 1 1296 | m_TargetGraphic: {fileID: 760072663} 1297 | m_HandleRect: {fileID: 760072662} 1298 | m_Direction: 2 1299 | m_Value: 1 1300 | m_Size: 0.9999999 1301 | m_NumberOfSteps: 0 1302 | m_OnValueChanged: 1303 | m_PersistentCalls: 1304 | m_Calls: [] 1305 | --- !u!114 &1324177434 1306 | MonoBehaviour: 1307 | m_ObjectHideFlags: 0 1308 | m_CorrespondingSourceObject: {fileID: 0} 1309 | m_PrefabInstance: {fileID: 0} 1310 | m_PrefabAsset: {fileID: 0} 1311 | m_GameObject: {fileID: 1324177431} 1312 | m_Enabled: 1 1313 | m_EditorHideFlags: 0 1314 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 1315 | m_Name: 1316 | m_EditorClassIdentifier: 1317 | m_Material: {fileID: 0} 1318 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1319 | m_RaycastTarget: 1 1320 | m_Maskable: 1 1321 | m_OnCullStateChanged: 1322 | m_PersistentCalls: 1323 | m_Calls: [] 1324 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 1325 | m_Type: 1 1326 | m_PreserveAspect: 0 1327 | m_FillCenter: 1 1328 | m_FillMethod: 4 1329 | m_FillAmount: 1 1330 | m_FillClockwise: 1 1331 | m_FillOrigin: 0 1332 | m_UseSpriteMesh: 0 1333 | m_PixelsPerUnitMultiplier: 1 1334 | --- !u!222 &1324177435 1335 | CanvasRenderer: 1336 | m_ObjectHideFlags: 0 1337 | m_CorrespondingSourceObject: {fileID: 0} 1338 | m_PrefabInstance: {fileID: 0} 1339 | m_PrefabAsset: {fileID: 0} 1340 | m_GameObject: {fileID: 1324177431} 1341 | m_CullTransparentMesh: 0 1342 | --- !u!1 &1374554968 1343 | GameObject: 1344 | m_ObjectHideFlags: 0 1345 | m_CorrespondingSourceObject: {fileID: 0} 1346 | m_PrefabInstance: {fileID: 0} 1347 | m_PrefabAsset: {fileID: 0} 1348 | serializedVersion: 6 1349 | m_Component: 1350 | - component: {fileID: 1374554972} 1351 | - component: {fileID: 1374554971} 1352 | - component: {fileID: 1374554970} 1353 | m_Layer: 0 1354 | m_Name: EventSystem 1355 | m_TagString: Untagged 1356 | m_Icon: {fileID: 0} 1357 | m_NavMeshLayer: 0 1358 | m_StaticEditorFlags: 0 1359 | m_IsActive: 1 1360 | --- !u!114 &1374554970 1361 | MonoBehaviour: 1362 | m_ObjectHideFlags: 0 1363 | m_CorrespondingSourceObject: {fileID: 0} 1364 | m_PrefabInstance: {fileID: 0} 1365 | m_PrefabAsset: {fileID: 0} 1366 | m_GameObject: {fileID: 1374554968} 1367 | m_Enabled: 1 1368 | m_EditorHideFlags: 0 1369 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 1370 | m_Name: 1371 | m_EditorClassIdentifier: 1372 | m_HorizontalAxis: Horizontal 1373 | m_VerticalAxis: Vertical 1374 | m_SubmitButton: Submit 1375 | m_CancelButton: Cancel 1376 | m_InputActionsPerSecond: 10 1377 | m_RepeatDelay: 0.5 1378 | m_ForceModuleActive: 0 1379 | --- !u!114 &1374554971 1380 | MonoBehaviour: 1381 | m_ObjectHideFlags: 0 1382 | m_CorrespondingSourceObject: {fileID: 0} 1383 | m_PrefabInstance: {fileID: 0} 1384 | m_PrefabAsset: {fileID: 0} 1385 | m_GameObject: {fileID: 1374554968} 1386 | m_Enabled: 1 1387 | m_EditorHideFlags: 0 1388 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 1389 | m_Name: 1390 | m_EditorClassIdentifier: 1391 | m_FirstSelected: {fileID: 0} 1392 | m_sendNavigationEvents: 1 1393 | m_DragThreshold: 5 1394 | --- !u!4 &1374554972 1395 | Transform: 1396 | m_ObjectHideFlags: 0 1397 | m_CorrespondingSourceObject: {fileID: 0} 1398 | m_PrefabInstance: {fileID: 0} 1399 | m_PrefabAsset: {fileID: 0} 1400 | m_GameObject: {fileID: 1374554968} 1401 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1402 | m_LocalPosition: {x: 0, y: 0, z: 0} 1403 | m_LocalScale: {x: 1, y: 1, z: 1} 1404 | m_Children: [] 1405 | m_Father: {fileID: 0} 1406 | m_RootOrder: 3 1407 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1408 | --- !u!1 &1558850094 1409 | GameObject: 1410 | m_ObjectHideFlags: 0 1411 | m_CorrespondingSourceObject: {fileID: 0} 1412 | m_PrefabInstance: {fileID: 0} 1413 | m_PrefabAsset: {fileID: 0} 1414 | serializedVersion: 6 1415 | m_Component: 1416 | - component: {fileID: 1558850095} 1417 | - component: {fileID: 1558850097} 1418 | - component: {fileID: 1558850096} 1419 | m_Layer: 0 1420 | m_Name: List 1421 | m_TagString: Untagged 1422 | m_Icon: {fileID: 0} 1423 | m_NavMeshLayer: 0 1424 | m_StaticEditorFlags: 0 1425 | m_IsActive: 1 1426 | --- !u!224 &1558850095 1427 | RectTransform: 1428 | m_ObjectHideFlags: 0 1429 | m_CorrespondingSourceObject: {fileID: 0} 1430 | m_PrefabInstance: {fileID: 0} 1431 | m_PrefabAsset: {fileID: 0} 1432 | m_GameObject: {fileID: 1558850094} 1433 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1434 | m_LocalPosition: {x: 0, y: 0, z: 0} 1435 | m_LocalScale: {x: 1, y: 1, z: 1} 1436 | m_Children: 1437 | - {fileID: 10792474} 1438 | - {fileID: 1791960685} 1439 | m_Father: {fileID: 296877743} 1440 | m_RootOrder: 0 1441 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1442 | m_AnchorMin: {x: 0, y: 0} 1443 | m_AnchorMax: {x: 1, y: 1} 1444 | m_AnchoredPosition: {x: 0, y: -0.000023926572} 1445 | m_SizeDelta: {x: 0, y: 0} 1446 | m_Pivot: {x: 0.5, y: 1} 1447 | --- !u!114 &1558850096 1448 | MonoBehaviour: 1449 | m_ObjectHideFlags: 0 1450 | m_CorrespondingSourceObject: {fileID: 0} 1451 | m_PrefabInstance: {fileID: 0} 1452 | m_PrefabAsset: {fileID: 0} 1453 | m_GameObject: {fileID: 1558850094} 1454 | m_Enabled: 1 1455 | m_EditorHideFlags: 0 1456 | m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} 1457 | m_Name: 1458 | m_EditorClassIdentifier: 1459 | m_Padding: 1460 | m_Left: 0 1461 | m_Right: 0 1462 | m_Top: 0 1463 | m_Bottom: 0 1464 | m_ChildAlignment: 1 1465 | m_Spacing: 10 1466 | m_ChildForceExpandWidth: 1 1467 | m_ChildForceExpandHeight: 0 1468 | m_ChildControlWidth: 1 1469 | m_ChildControlHeight: 1 1470 | m_ChildScaleWidth: 0 1471 | m_ChildScaleHeight: 0 1472 | --- !u!114 &1558850097 1473 | MonoBehaviour: 1474 | m_ObjectHideFlags: 0 1475 | m_CorrespondingSourceObject: {fileID: 0} 1476 | m_PrefabInstance: {fileID: 0} 1477 | m_PrefabAsset: {fileID: 0} 1478 | m_GameObject: {fileID: 1558850094} 1479 | m_Enabled: 1 1480 | m_EditorHideFlags: 0 1481 | m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} 1482 | m_Name: 1483 | m_EditorClassIdentifier: 1484 | m_HorizontalFit: 0 1485 | m_VerticalFit: 2 1486 | --- !u!1 &1677445088 1487 | GameObject: 1488 | m_ObjectHideFlags: 0 1489 | m_CorrespondingSourceObject: {fileID: 0} 1490 | m_PrefabInstance: {fileID: 0} 1491 | m_PrefabAsset: {fileID: 0} 1492 | serializedVersion: 6 1493 | m_Component: 1494 | - component: {fileID: 1677445093} 1495 | - component: {fileID: 1677445092} 1496 | - component: {fileID: 1677445090} 1497 | - component: {fileID: 1677445089} 1498 | m_Layer: 0 1499 | m_Name: Main Camera 1500 | m_TagString: MainCamera 1501 | m_Icon: {fileID: 0} 1502 | m_NavMeshLayer: 0 1503 | m_StaticEditorFlags: 0 1504 | m_IsActive: 1 1505 | --- !u!81 &1677445089 1506 | AudioListener: 1507 | m_ObjectHideFlags: 0 1508 | m_CorrespondingSourceObject: {fileID: 0} 1509 | m_PrefabInstance: {fileID: 0} 1510 | m_PrefabAsset: {fileID: 0} 1511 | m_GameObject: {fileID: 1677445088} 1512 | m_Enabled: 1 1513 | --- !u!124 &1677445090 1514 | Behaviour: 1515 | m_ObjectHideFlags: 0 1516 | m_CorrespondingSourceObject: {fileID: 0} 1517 | m_PrefabInstance: {fileID: 0} 1518 | m_PrefabAsset: {fileID: 0} 1519 | m_GameObject: {fileID: 1677445088} 1520 | m_Enabled: 1 1521 | --- !u!20 &1677445092 1522 | Camera: 1523 | m_ObjectHideFlags: 0 1524 | m_CorrespondingSourceObject: {fileID: 0} 1525 | m_PrefabInstance: {fileID: 0} 1526 | m_PrefabAsset: {fileID: 0} 1527 | m_GameObject: {fileID: 1677445088} 1528 | m_Enabled: 1 1529 | serializedVersion: 2 1530 | m_ClearFlags: 1 1531 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 1532 | m_projectionMatrixMode: 1 1533 | m_GateFitMode: 2 1534 | m_FOVAxisMode: 0 1535 | m_SensorSize: {x: 36, y: 24} 1536 | m_LensShift: {x: 0, y: 0} 1537 | m_FocalLength: 50 1538 | m_NormalizedViewPortRect: 1539 | serializedVersion: 2 1540 | x: 0 1541 | y: 0 1542 | width: 1 1543 | height: 1 1544 | near clip plane: 0.3 1545 | far clip plane: 1000 1546 | field of view: 60 1547 | orthographic: 0 1548 | orthographic size: 360 1549 | m_Depth: -1 1550 | m_CullingMask: 1551 | serializedVersion: 2 1552 | m_Bits: 4294967295 1553 | m_RenderingPath: -1 1554 | m_TargetTexture: {fileID: 0} 1555 | m_TargetDisplay: 0 1556 | m_TargetEye: 3 1557 | m_HDR: 0 1558 | m_AllowMSAA: 1 1559 | m_AllowDynamicResolution: 0 1560 | m_ForceIntoRT: 0 1561 | m_OcclusionCulling: 1 1562 | m_StereoConvergence: 10 1563 | m_StereoSeparation: 0.022 1564 | --- !u!4 &1677445093 1565 | Transform: 1566 | m_ObjectHideFlags: 0 1567 | m_CorrespondingSourceObject: {fileID: 0} 1568 | m_PrefabInstance: {fileID: 0} 1569 | m_PrefabAsset: {fileID: 0} 1570 | m_GameObject: {fileID: 1677445088} 1571 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1572 | m_LocalPosition: {x: 0, y: 0, z: -10} 1573 | m_LocalScale: {x: 1, y: 1, z: 1} 1574 | m_Children: [] 1575 | m_Father: {fileID: 0} 1576 | m_RootOrder: 1 1577 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1578 | --- !u!1 &1791960684 1579 | GameObject: 1580 | m_ObjectHideFlags: 0 1581 | m_CorrespondingSourceObject: {fileID: 0} 1582 | m_PrefabInstance: {fileID: 0} 1583 | m_PrefabAsset: {fileID: 0} 1584 | serializedVersion: 6 1585 | m_Component: 1586 | - component: {fileID: 1791960685} 1587 | - component: {fileID: 1791960689} 1588 | - component: {fileID: 1791960688} 1589 | - component: {fileID: 1791960687} 1590 | - component: {fileID: 1791960686} 1591 | m_Layer: 5 1592 | m_Name: VideoRecordingExampleButton 1593 | m_TagString: Untagged 1594 | m_Icon: {fileID: 0} 1595 | m_NavMeshLayer: 0 1596 | m_StaticEditorFlags: 0 1597 | m_IsActive: 1 1598 | --- !u!224 &1791960685 1599 | RectTransform: 1600 | m_ObjectHideFlags: 0 1601 | m_CorrespondingSourceObject: {fileID: 0} 1602 | m_PrefabInstance: {fileID: 0} 1603 | m_PrefabAsset: {fileID: 0} 1604 | m_GameObject: {fileID: 1791960684} 1605 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1606 | m_LocalPosition: {x: 0, y: 0, z: 0} 1607 | m_LocalScale: {x: 1, y: 1, z: 1} 1608 | m_Children: 1609 | - {fileID: 265521583} 1610 | m_Father: {fileID: 1558850095} 1611 | m_RootOrder: 1 1612 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1613 | m_AnchorMin: {x: 0, y: 0} 1614 | m_AnchorMax: {x: 0, y: 0} 1615 | m_AnchoredPosition: {x: 0, y: 0} 1616 | m_SizeDelta: {x: 0, y: 0} 1617 | m_Pivot: {x: 0.5, y: 0.5} 1618 | --- !u!114 &1791960686 1619 | MonoBehaviour: 1620 | m_ObjectHideFlags: 0 1621 | m_CorrespondingSourceObject: {fileID: 0} 1622 | m_PrefabInstance: {fileID: 0} 1623 | m_PrefabAsset: {fileID: 0} 1624 | m_GameObject: {fileID: 1791960684} 1625 | m_Enabled: 1 1626 | m_EditorHideFlags: 0 1627 | m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} 1628 | m_Name: 1629 | m_EditorClassIdentifier: 1630 | m_IgnoreLayout: 0 1631 | m_MinWidth: -1 1632 | m_MinHeight: -1 1633 | m_PreferredWidth: 250 1634 | m_PreferredHeight: 40 1635 | m_FlexibleWidth: -1 1636 | m_FlexibleHeight: -1 1637 | m_LayoutPriority: 1 1638 | --- !u!114 &1791960687 1639 | MonoBehaviour: 1640 | m_ObjectHideFlags: 0 1641 | m_CorrespondingSourceObject: {fileID: 0} 1642 | m_PrefabInstance: {fileID: 0} 1643 | m_PrefabAsset: {fileID: 0} 1644 | m_GameObject: {fileID: 1791960684} 1645 | m_Enabled: 1 1646 | m_EditorHideFlags: 0 1647 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 1648 | m_Name: 1649 | m_EditorClassIdentifier: 1650 | m_Navigation: 1651 | m_Mode: 3 1652 | m_SelectOnUp: {fileID: 0} 1653 | m_SelectOnDown: {fileID: 0} 1654 | m_SelectOnLeft: {fileID: 0} 1655 | m_SelectOnRight: {fileID: 0} 1656 | m_Transition: 1 1657 | m_Colors: 1658 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 1659 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1660 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 1661 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1662 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 1663 | m_ColorMultiplier: 1 1664 | m_FadeDuration: 0.1 1665 | m_SpriteState: 1666 | m_HighlightedSprite: {fileID: 0} 1667 | m_PressedSprite: {fileID: 0} 1668 | m_SelectedSprite: {fileID: 0} 1669 | m_DisabledSprite: {fileID: 0} 1670 | m_AnimationTriggers: 1671 | m_NormalTrigger: Normal 1672 | m_HighlightedTrigger: Highlighted 1673 | m_PressedTrigger: Pressed 1674 | m_SelectedTrigger: Highlighted 1675 | m_DisabledTrigger: Disabled 1676 | m_Interactable: 1 1677 | m_TargetGraphic: {fileID: 1791960688} 1678 | m_OnClick: 1679 | m_PersistentCalls: 1680 | m_Calls: 1681 | - m_Target: {fileID: 1124998460} 1682 | m_MethodName: OnVideoRecordingExampleButtonClick 1683 | m_Mode: 1 1684 | m_Arguments: 1685 | m_ObjectArgument: {fileID: 0} 1686 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 1687 | m_IntArgument: 0 1688 | m_FloatArgument: 0 1689 | m_StringArgument: 1690 | m_BoolArgument: 0 1691 | m_CallState: 2 1692 | --- !u!114 &1791960688 1693 | MonoBehaviour: 1694 | m_ObjectHideFlags: 0 1695 | m_CorrespondingSourceObject: {fileID: 0} 1696 | m_PrefabInstance: {fileID: 0} 1697 | m_PrefabAsset: {fileID: 0} 1698 | m_GameObject: {fileID: 1791960684} 1699 | m_Enabled: 1 1700 | m_EditorHideFlags: 0 1701 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 1702 | m_Name: 1703 | m_EditorClassIdentifier: 1704 | m_Material: {fileID: 0} 1705 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1706 | m_RaycastTarget: 1 1707 | m_Maskable: 1 1708 | m_OnCullStateChanged: 1709 | m_PersistentCalls: 1710 | m_Calls: [] 1711 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 1712 | m_Type: 1 1713 | m_PreserveAspect: 0 1714 | m_FillCenter: 1 1715 | m_FillMethod: 4 1716 | m_FillAmount: 1 1717 | m_FillClockwise: 1 1718 | m_FillOrigin: 0 1719 | m_UseSpriteMesh: 0 1720 | m_PixelsPerUnitMultiplier: 1 1721 | --- !u!222 &1791960689 1722 | CanvasRenderer: 1723 | m_ObjectHideFlags: 0 1724 | m_CorrespondingSourceObject: {fileID: 0} 1725 | m_PrefabInstance: {fileID: 0} 1726 | m_PrefabAsset: {fileID: 0} 1727 | m_GameObject: {fileID: 1791960684} 1728 | m_CullTransparentMesh: 0 1729 | --- !u!1 &1800755750 1730 | GameObject: 1731 | m_ObjectHideFlags: 0 1732 | m_CorrespondingSourceObject: {fileID: 0} 1733 | m_PrefabInstance: {fileID: 0} 1734 | m_PrefabAsset: {fileID: 0} 1735 | serializedVersion: 6 1736 | m_Component: 1737 | - component: {fileID: 1800755751} 1738 | - component: {fileID: 1800755752} 1739 | m_Layer: 5 1740 | m_Name: Panel 1741 | m_TagString: Untagged 1742 | m_Icon: {fileID: 0} 1743 | m_NavMeshLayer: 0 1744 | m_StaticEditorFlags: 0 1745 | m_IsActive: 1 1746 | --- !u!224 &1800755751 1747 | RectTransform: 1748 | m_ObjectHideFlags: 0 1749 | m_CorrespondingSourceObject: {fileID: 0} 1750 | m_PrefabInstance: {fileID: 0} 1751 | m_PrefabAsset: {fileID: 0} 1752 | m_GameObject: {fileID: 1800755750} 1753 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 1754 | m_LocalPosition: {x: 0, y: 0, z: 0} 1755 | m_LocalScale: {x: 1, y: 1, z: 1} 1756 | m_Children: 1757 | - {fileID: 346089860} 1758 | - {fileID: 595830808} 1759 | - {fileID: 398629471} 1760 | m_Father: {fileID: 1810133384} 1761 | m_RootOrder: 0 1762 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1763 | m_AnchorMin: {x: 0, y: 0} 1764 | m_AnchorMax: {x: 1, y: 1} 1765 | m_AnchoredPosition: {x: -10, y: -10} 1766 | m_SizeDelta: {x: -20, y: -20} 1767 | m_Pivot: {x: 1, y: 1} 1768 | --- !u!114 &1800755752 1769 | MonoBehaviour: 1770 | m_ObjectHideFlags: 0 1771 | m_CorrespondingSourceObject: {fileID: 0} 1772 | m_PrefabInstance: {fileID: 0} 1773 | m_PrefabAsset: {fileID: 0} 1774 | m_GameObject: {fileID: 1800755750} 1775 | m_Enabled: 1 1776 | m_EditorHideFlags: 0 1777 | m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} 1778 | m_Name: 1779 | m_EditorClassIdentifier: 1780 | m_Padding: 1781 | m_Left: 0 1782 | m_Right: 0 1783 | m_Top: 0 1784 | m_Bottom: 0 1785 | m_ChildAlignment: 0 1786 | m_Spacing: 10 1787 | m_ChildForceExpandWidth: 1 1788 | m_ChildForceExpandHeight: 0 1789 | m_ChildControlWidth: 1 1790 | m_ChildControlHeight: 1 1791 | m_ChildScaleWidth: 0 1792 | m_ChildScaleHeight: 0 1793 | --- !u!1 &1810133380 1794 | GameObject: 1795 | m_ObjectHideFlags: 0 1796 | m_CorrespondingSourceObject: {fileID: 0} 1797 | m_PrefabInstance: {fileID: 0} 1798 | m_PrefabAsset: {fileID: 0} 1799 | serializedVersion: 6 1800 | m_Component: 1801 | - component: {fileID: 1810133384} 1802 | - component: {fileID: 1810133383} 1803 | - component: {fileID: 1810133382} 1804 | - component: {fileID: 1810133381} 1805 | m_Layer: 5 1806 | m_Name: Canvas 1807 | m_TagString: Untagged 1808 | m_Icon: {fileID: 0} 1809 | m_NavMeshLayer: 0 1810 | m_StaticEditorFlags: 0 1811 | m_IsActive: 1 1812 | --- !u!114 &1810133381 1813 | MonoBehaviour: 1814 | m_ObjectHideFlags: 0 1815 | m_CorrespondingSourceObject: {fileID: 0} 1816 | m_PrefabInstance: {fileID: 0} 1817 | m_PrefabAsset: {fileID: 0} 1818 | m_GameObject: {fileID: 1810133380} 1819 | m_Enabled: 1 1820 | m_EditorHideFlags: 0 1821 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 1822 | m_Name: 1823 | m_EditorClassIdentifier: 1824 | m_IgnoreReversedGraphics: 1 1825 | m_BlockingObjects: 0 1826 | m_BlockingMask: 1827 | serializedVersion: 2 1828 | m_Bits: 4294967295 1829 | --- !u!114 &1810133382 1830 | MonoBehaviour: 1831 | m_ObjectHideFlags: 0 1832 | m_CorrespondingSourceObject: {fileID: 0} 1833 | m_PrefabInstance: {fileID: 0} 1834 | m_PrefabAsset: {fileID: 0} 1835 | m_GameObject: {fileID: 1810133380} 1836 | m_Enabled: 1 1837 | m_EditorHideFlags: 0 1838 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 1839 | m_Name: 1840 | m_EditorClassIdentifier: 1841 | m_UiScaleMode: 1 1842 | m_ReferencePixelsPerUnit: 100 1843 | m_ScaleFactor: 1 1844 | m_ReferenceResolution: {x: 800, y: 600} 1845 | m_ScreenMatchMode: 0 1846 | m_MatchWidthOrHeight: 0 1847 | m_PhysicalUnit: 3 1848 | m_FallbackScreenDPI: 96 1849 | m_DefaultSpriteDPI: 96 1850 | m_DynamicPixelsPerUnit: 1 1851 | --- !u!223 &1810133383 1852 | Canvas: 1853 | m_ObjectHideFlags: 0 1854 | m_CorrespondingSourceObject: {fileID: 0} 1855 | m_PrefabInstance: {fileID: 0} 1856 | m_PrefabAsset: {fileID: 0} 1857 | m_GameObject: {fileID: 1810133380} 1858 | m_Enabled: 1 1859 | serializedVersion: 3 1860 | m_RenderMode: 0 1861 | m_Camera: {fileID: 0} 1862 | m_PlaneDistance: 100 1863 | m_PixelPerfect: 0 1864 | m_ReceivesEvents: 1 1865 | m_OverrideSorting: 0 1866 | m_OverridePixelPerfect: 0 1867 | m_SortingBucketNormalizedSize: 0 1868 | m_AdditionalShaderChannelsFlag: 0 1869 | m_SortingLayerID: 0 1870 | m_SortingOrder: 0 1871 | m_TargetDisplay: 0 1872 | --- !u!224 &1810133384 1873 | RectTransform: 1874 | m_ObjectHideFlags: 0 1875 | m_CorrespondingSourceObject: {fileID: 0} 1876 | m_PrefabInstance: {fileID: 0} 1877 | m_PrefabAsset: {fileID: 0} 1878 | m_GameObject: {fileID: 1810133380} 1879 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1880 | m_LocalPosition: {x: 0, y: 0, z: 0} 1881 | m_LocalScale: {x: 0, y: 0, z: 0} 1882 | m_Children: 1883 | - {fileID: 1800755751} 1884 | - {fileID: 743992496} 1885 | m_Father: {fileID: 0} 1886 | m_RootOrder: 2 1887 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1888 | m_AnchorMin: {x: 0, y: 0} 1889 | m_AnchorMax: {x: 0, y: 0} 1890 | m_AnchoredPosition: {x: 0, y: 0} 1891 | m_SizeDelta: {x: 0, y: 0} 1892 | m_Pivot: {x: 0, y: 0} 1893 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/NatCorderWithOpenCVForUnityExample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1b861e5a2678d77479a1fd8a87e148ed 3 | timeCreated: 1530717696 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31542efa2042bb548841f2e24ddefb2d 3 | folderAsset: yes 4 | timeCreated: 1530717696 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/Scripts/Utils.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67205b3b47626fb4a94e43b0acdd832a 3 | folderAsset: yes 4 | timeCreated: 1530717696 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/Scripts/Utils/FpsMonitor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace NatCorderWithOpenCVForUnityExample 5 | { 6 | // v1.0.1 7 | public class FpsMonitor : MonoBehaviour 8 | { 9 | int tick = 0; 10 | float elapsed = 0; 11 | float fps = 0; 12 | 13 | public enum Alignment 14 | { 15 | LeftTop, 16 | RightTop, 17 | LeftBottom, 18 | RightBottom, 19 | } 20 | 21 | public Alignment alignment = Alignment.RightTop; 22 | 23 | const float GUI_WIDTH = 75f; 24 | const float GUI_HEIGHT = 30f; 25 | const float MARGIN_X = 10f; 26 | const float MARGIN_Y = 10f; 27 | const float INNER_X = 8f; 28 | const float INNER_Y = 5f; 29 | const float GUI_CONSOLE_HEIGHT = 50f; 30 | 31 | public Vector2 offset = new Vector2(MARGIN_X, MARGIN_Y); 32 | public bool boxVisible = true; 33 | public float boxWidth = GUI_WIDTH; 34 | public float boxHeight = GUI_HEIGHT; 35 | public Vector2 padding = new Vector2(INNER_X, INNER_Y); 36 | public float consoleHeight = GUI_CONSOLE_HEIGHT; 37 | 38 | GUIStyle console_labelStyle; 39 | 40 | float x, y; 41 | Rect outer; 42 | Rect inner; 43 | 44 | float console_x, console_y; 45 | Rect console_outer; 46 | Rect console_inner; 47 | 48 | int oldScrWidth; 49 | int oldScrHeight; 50 | 51 | Dictionary outputDict = new Dictionary(); 52 | 53 | protected string _consoleText = null; 54 | public virtual string consoleText 55 | { 56 | get { return _consoleText; } 57 | set 58 | { 59 | _consoleText = value; 60 | toast_time = -1; 61 | } 62 | } 63 | 64 | int toast_time = -1; 65 | 66 | // Use this for initialization 67 | void Start() 68 | { 69 | console_labelStyle = new GUIStyle(); 70 | console_labelStyle.fontSize = 32; 71 | console_labelStyle.fontStyle = FontStyle.Normal; 72 | console_labelStyle.wordWrap = true; 73 | console_labelStyle.normal.textColor = Color.white; 74 | 75 | oldScrWidth = Screen.width; 76 | oldScrHeight = Screen.height; 77 | LocateGUI(); 78 | } 79 | 80 | // Update is called once per frame 81 | void Update() 82 | { 83 | tick++; 84 | elapsed += Time.deltaTime; 85 | if (elapsed >= 1f) 86 | { 87 | fps = tick / elapsed; 88 | tick = 0; 89 | elapsed = 0; 90 | } 91 | 92 | if (toast_time > 0) 93 | { 94 | toast_time = toast_time - 1; 95 | } 96 | } 97 | 98 | void OnGUI() 99 | { 100 | if (oldScrWidth != Screen.width || oldScrHeight != Screen.height) 101 | { 102 | LocateGUI(); 103 | } 104 | oldScrWidth = Screen.width; 105 | oldScrHeight = Screen.height; 106 | 107 | if (boxVisible) 108 | { 109 | GUI.Box(outer, ""); 110 | } 111 | 112 | GUILayout.BeginArea(inner); 113 | { 114 | GUILayout.BeginVertical(); 115 | GUILayout.Label("fps : " + fps.ToString("F1")); 116 | foreach (KeyValuePair pair in outputDict) 117 | { 118 | GUILayout.Label(pair.Key + " : " + pair.Value); 119 | } 120 | GUILayout.EndVertical(); 121 | } 122 | GUILayout.EndArea(); 123 | 124 | if (!string.IsNullOrEmpty(consoleText)) 125 | { 126 | if (toast_time != 0) 127 | { 128 | if (boxVisible) 129 | { 130 | GUI.Box(console_outer, ""); 131 | } 132 | 133 | GUILayout.BeginArea(console_inner); 134 | { 135 | GUILayout.BeginVertical(); 136 | GUILayout.Label(consoleText, console_labelStyle); 137 | GUILayout.EndVertical(); 138 | } 139 | GUILayout.EndArea(); 140 | } 141 | } 142 | } 143 | 144 | public void Add(string key, string value) 145 | { 146 | if (outputDict.ContainsKey(key)) 147 | { 148 | outputDict[key] = value; 149 | } 150 | else 151 | { 152 | outputDict.Add(key, value); 153 | } 154 | } 155 | 156 | public void Remove(string key) 157 | { 158 | outputDict.Remove(key); 159 | } 160 | 161 | public void Clear() 162 | { 163 | outputDict.Clear(); 164 | } 165 | 166 | public void LocateGUI() 167 | { 168 | x = GetAlignedX(alignment, boxWidth); 169 | y = GetAlignedY(alignment, boxHeight); 170 | outer = new Rect(x, y, boxWidth, boxHeight); 171 | inner = new Rect(x + padding.x, y + padding.y, boxWidth, boxHeight); 172 | 173 | console_x = GetAlignedX(Alignment.LeftBottom, Screen.width); 174 | console_y = GetAlignedY(Alignment.LeftBottom, consoleHeight); 175 | console_outer = new Rect(console_x, console_y, Screen.width - offset.x * 2, consoleHeight); 176 | console_inner = new Rect(console_x + padding.x, console_y + padding.y, Screen.width - offset.x * 2 - padding.x, consoleHeight); 177 | } 178 | 179 | public void Toast(string message, int time = 120) 180 | { 181 | _consoleText = message; 182 | toast_time = (time < 60) ? 60 : time; 183 | } 184 | 185 | float GetAlignedX(Alignment anchor, float w) 186 | { 187 | switch (anchor) 188 | { 189 | default: 190 | case Alignment.LeftTop: 191 | case Alignment.LeftBottom: 192 | return offset.x; 193 | 194 | case Alignment.RightTop: 195 | case Alignment.RightBottom: 196 | return Screen.width - w - offset.x; 197 | } 198 | } 199 | 200 | float GetAlignedY(Alignment anchor, float h) 201 | { 202 | switch (anchor) 203 | { 204 | default: 205 | case Alignment.LeftTop: 206 | case Alignment.RightTop: 207 | return offset.y; 208 | 209 | case Alignment.LeftBottom: 210 | case Alignment.RightBottom: 211 | return Screen.height - h - offset.y; 212 | } 213 | } 214 | } 215 | } -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/Scripts/Utils/FpsMonitor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d260dc2cef983f54cb3df87f1135146c 3 | timeCreated: 1530717697 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/NatCorderWithOpenCVForUnityExample/Scripts/Utils/RuntimePermissionHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace NatCorderWithOpenCVForUnityExample 5 | { 6 | public class RuntimePermissionHelper : MonoBehaviour 7 | { 8 | 9 | public virtual IEnumerator hasUserAuthorizedCameraPermission() 10 | { 11 | #if UNITY_IOS && UNITY_2018_1_OR_NEWER 12 | UserAuthorization mode = UserAuthorization.WebCam; 13 | if (!Application.HasUserAuthorization(mode)) 14 | { 15 | yield return RequestUserAuthorization(mode); 16 | } 17 | yield return Application.HasUserAuthorization(mode); 18 | #elif UNITY_ANDROID && UNITY_2018_3_OR_NEWER 19 | string permission = UnityEngine.Android.Permission.Camera; 20 | if (!UnityEngine.Android.Permission.HasUserAuthorizedPermission(permission)) 21 | { 22 | yield return RequestUserPermission(permission); 23 | } 24 | yield return UnityEngine.Android.Permission.HasUserAuthorizedPermission(permission); 25 | #else 26 | yield return true; 27 | #endif 28 | } 29 | 30 | public virtual IEnumerator hasUserAuthorizedMicrophonePermission() 31 | { 32 | #if UNITY_IOS && UNITY_2018_1_OR_NEWER 33 | UserAuthorization mode = UserAuthorization.Microphone; 34 | if (!Application.HasUserAuthorization(mode)) 35 | { 36 | yield return RequestUserAuthorization(mode); 37 | } 38 | yield return Application.HasUserAuthorization(mode); 39 | #elif UNITY_ANDROID && UNITY_2018_3_OR_NEWER 40 | string permission = UnityEngine.Android.Permission.Microphone; 41 | if (!UnityEngine.Android.Permission.HasUserAuthorizedPermission(permission)) 42 | { 43 | yield return RequestUserPermission(permission); 44 | } 45 | yield return UnityEngine.Android.Permission.HasUserAuthorizedPermission(permission); 46 | #else 47 | yield return true; 48 | #endif 49 | } 50 | 51 | public virtual IEnumerator hasUserAuthorizedExternalStorageWritePermission() 52 | { 53 | #if UNITY_ANDROID && UNITY_2018_3_OR_NEWER 54 | string permission = UnityEngine.Android.Permission.ExternalStorageWrite; 55 | if (!UnityEngine.Android.Permission.HasUserAuthorizedPermission(permission)) 56 | { 57 | yield return RequestUserPermission(permission); 58 | } 59 | yield return UnityEngine.Android.Permission.HasUserAuthorizedPermission(permission); 60 | #else 61 | yield return true; 62 | #endif 63 | } 64 | 65 | #if (UNITY_IOS && UNITY_2018_1_OR_NEWER) || (UNITY_ANDROID && UNITY_2018_3_OR_NEWER) 66 | protected bool isUserRequestingPermission; 67 | 68 | protected virtual IEnumerator OnApplicationFocus(bool hasFocus) 69 | { 70 | yield return null; 71 | 72 | if (isUserRequestingPermission && hasFocus) 73 | isUserRequestingPermission = false; 74 | } 75 | 76 | #if UNITY_IOS 77 | protected virtual IEnumerator RequestUserAuthorization(UserAuthorization mode) 78 | { 79 | isUserRequestingPermission = true; 80 | yield return Application.RequestUserAuthorization(mode); 81 | 82 | float timeElapsed = 0; 83 | while (isUserRequestingPermission) 84 | { 85 | if (timeElapsed > 0.25f) 86 | { 87 | isUserRequestingPermission = false; 88 | yield break; 89 | } 90 | timeElapsed += Time.deltaTime; 91 | 92 | yield return null; 93 | } 94 | yield break; 95 | } 96 | #elif UNITY_ANDROID 97 | protected virtual IEnumerator RequestUserPermission(string permission) 98 | { 99 | isUserRequestingPermission = true; 100 | UnityEngine.Android.Permission.RequestUserPermission(permission); 101 | 102 | float timeElapsed = 0; 103 | while (isUserRequestingPermission) 104 | { 105 | if (timeElapsed > 0.25f) 106 | { 107 | isUserRequestingPermission = false; 108 | yield break; 109 | } 110 | timeElapsed += Time.deltaTime; 111 | 112 | yield return null; 113 | } 114 | yield break; 115 | } 116 | #endif 117 | #endif 118 | } 119 | } -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/Scripts/Utils/RuntimePermissionHelper.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38684b64d7283db4e8258e11d6c6e2e3 3 | timeCreated: 1553023899 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/NatCorderWithOpenCVForUnityExample/ShowLicense.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.SceneManagement; 3 | 4 | namespace NatCorderWithOpenCVForUnityExample 5 | { 6 | public class ShowLicense : MonoBehaviour 7 | { 8 | // Use this for initialization 9 | void Start() 10 | { 11 | 12 | } 13 | 14 | // Update is called once per frame 15 | void Update() 16 | { 17 | 18 | } 19 | 20 | public void OnBackButtonClick() 21 | { 22 | SceneManager.LoadScene("NatCorderWithOpenCVForUnityExample"); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/ShowLicense.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5f46871192c11974cbe5975ad9be2e44 3 | timeCreated: 1530717697 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/NatCorderWithOpenCVForUnityExample/ShowLicense.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 24 | m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 25 | m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &4 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 1 59 | m_BakeResolution: 50 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 0 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 0 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 0 102 | --- !u!196 &5 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666666 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &38156656 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 38156657} 133 | - component: {fileID: 38156661} 134 | - component: {fileID: 38156660} 135 | - component: {fileID: 38156659} 136 | - component: {fileID: 38156658} 137 | m_Layer: 5 138 | m_Name: ScrollView 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!224 &38156657 145 | RectTransform: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 38156656} 151 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 152 | m_LocalPosition: {x: 0, y: 0, z: 0} 153 | m_LocalScale: {x: 1, y: 1, z: 1} 154 | m_Children: 155 | - {fileID: 1086899404} 156 | m_Father: {fileID: 1646839690} 157 | m_RootOrder: 0 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | m_AnchorMin: {x: 0, y: 0} 160 | m_AnchorMax: {x: 1, y: 1} 161 | m_AnchoredPosition: {x: -10, y: 0} 162 | m_SizeDelta: {x: -20, y: 0} 163 | m_Pivot: {x: 0.5, y: 1} 164 | --- !u!114 &38156658 165 | MonoBehaviour: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 38156656} 171 | m_Enabled: 1 172 | m_EditorHideFlags: 0 173 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 174 | m_Name: 175 | m_EditorClassIdentifier: 176 | m_Material: {fileID: 0} 177 | m_Color: {r: 1, g: 1, b: 1, a: 1} 178 | m_RaycastTarget: 1 179 | m_Maskable: 1 180 | m_OnCullStateChanged: 181 | m_PersistentCalls: 182 | m_Calls: [] 183 | m_Sprite: {fileID: 0} 184 | m_Type: 0 185 | m_PreserveAspect: 0 186 | m_FillCenter: 1 187 | m_FillMethod: 4 188 | m_FillAmount: 1 189 | m_FillClockwise: 1 190 | m_FillOrigin: 0 191 | m_UseSpriteMesh: 0 192 | m_PixelsPerUnitMultiplier: 1 193 | --- !u!222 &38156659 194 | CanvasRenderer: 195 | m_ObjectHideFlags: 0 196 | m_CorrespondingSourceObject: {fileID: 0} 197 | m_PrefabInstance: {fileID: 0} 198 | m_PrefabAsset: {fileID: 0} 199 | m_GameObject: {fileID: 38156656} 200 | m_CullTransparentMesh: 0 201 | --- !u!114 &38156660 202 | MonoBehaviour: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 38156656} 208 | m_Enabled: 1 209 | m_EditorHideFlags: 0 210 | m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} 211 | m_Name: 212 | m_EditorClassIdentifier: 213 | m_ShowMaskGraphic: 0 214 | --- !u!114 &38156661 215 | MonoBehaviour: 216 | m_ObjectHideFlags: 0 217 | m_CorrespondingSourceObject: {fileID: 0} 218 | m_PrefabInstance: {fileID: 0} 219 | m_PrefabAsset: {fileID: 0} 220 | m_GameObject: {fileID: 38156656} 221 | m_Enabled: 1 222 | m_EditorHideFlags: 0 223 | m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} 224 | m_Name: 225 | m_EditorClassIdentifier: 226 | m_Content: {fileID: 1086899404} 227 | m_Horizontal: 0 228 | m_Vertical: 1 229 | m_MovementType: 1 230 | m_Elasticity: 0.1 231 | m_Inertia: 1 232 | m_DecelerationRate: 0.135 233 | m_ScrollSensitivity: 1 234 | m_Viewport: {fileID: 0} 235 | m_HorizontalScrollbar: {fileID: 0} 236 | m_VerticalScrollbar: {fileID: 155392644} 237 | m_HorizontalScrollbarVisibility: 0 238 | m_VerticalScrollbarVisibility: 0 239 | m_HorizontalScrollbarSpacing: 0 240 | m_VerticalScrollbarSpacing: 0 241 | m_OnValueChanged: 242 | m_PersistentCalls: 243 | m_Calls: [] 244 | --- !u!1 &155392642 245 | GameObject: 246 | m_ObjectHideFlags: 0 247 | m_CorrespondingSourceObject: {fileID: 0} 248 | m_PrefabInstance: {fileID: 0} 249 | m_PrefabAsset: {fileID: 0} 250 | serializedVersion: 6 251 | m_Component: 252 | - component: {fileID: 155392643} 253 | - component: {fileID: 155392646} 254 | - component: {fileID: 155392645} 255 | - component: {fileID: 155392644} 256 | m_Layer: 5 257 | m_Name: Scrollbar 258 | m_TagString: Untagged 259 | m_Icon: {fileID: 0} 260 | m_NavMeshLayer: 0 261 | m_StaticEditorFlags: 0 262 | m_IsActive: 1 263 | --- !u!224 &155392643 264 | RectTransform: 265 | m_ObjectHideFlags: 0 266 | m_CorrespondingSourceObject: {fileID: 0} 267 | m_PrefabInstance: {fileID: 0} 268 | m_PrefabAsset: {fileID: 0} 269 | m_GameObject: {fileID: 155392642} 270 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 271 | m_LocalPosition: {x: 0, y: 0, z: 0} 272 | m_LocalScale: {x: 1, y: 1, z: 1} 273 | m_Children: 274 | - {fileID: 823457167} 275 | m_Father: {fileID: 1646839690} 276 | m_RootOrder: 1 277 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 278 | m_AnchorMin: {x: 1, y: 0} 279 | m_AnchorMax: {x: 1, y: 1} 280 | m_AnchoredPosition: {x: -5, y: 0} 281 | m_SizeDelta: {x: 20, y: 0} 282 | m_Pivot: {x: 0.5, y: 0.5} 283 | --- !u!114 &155392644 284 | MonoBehaviour: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | m_GameObject: {fileID: 155392642} 290 | m_Enabled: 1 291 | m_EditorHideFlags: 0 292 | m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} 293 | m_Name: 294 | m_EditorClassIdentifier: 295 | m_Navigation: 296 | m_Mode: 3 297 | m_SelectOnUp: {fileID: 0} 298 | m_SelectOnDown: {fileID: 0} 299 | m_SelectOnLeft: {fileID: 0} 300 | m_SelectOnRight: {fileID: 0} 301 | m_Transition: 1 302 | m_Colors: 303 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 304 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 305 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 306 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 307 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 308 | m_ColorMultiplier: 1 309 | m_FadeDuration: 0.1 310 | m_SpriteState: 311 | m_HighlightedSprite: {fileID: 0} 312 | m_PressedSprite: {fileID: 0} 313 | m_SelectedSprite: {fileID: 0} 314 | m_DisabledSprite: {fileID: 0} 315 | m_AnimationTriggers: 316 | m_NormalTrigger: Normal 317 | m_HighlightedTrigger: Highlighted 318 | m_PressedTrigger: Pressed 319 | m_SelectedTrigger: Highlighted 320 | m_DisabledTrigger: Disabled 321 | m_Interactable: 1 322 | m_TargetGraphic: {fileID: 1011219729} 323 | m_HandleRect: {fileID: 1011219728} 324 | m_Direction: 2 325 | m_Value: 1 326 | m_Size: 0.59119594 327 | m_NumberOfSteps: 0 328 | m_OnValueChanged: 329 | m_PersistentCalls: 330 | m_Calls: [] 331 | --- !u!114 &155392645 332 | MonoBehaviour: 333 | m_ObjectHideFlags: 0 334 | m_CorrespondingSourceObject: {fileID: 0} 335 | m_PrefabInstance: {fileID: 0} 336 | m_PrefabAsset: {fileID: 0} 337 | m_GameObject: {fileID: 155392642} 338 | m_Enabled: 1 339 | m_EditorHideFlags: 0 340 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 341 | m_Name: 342 | m_EditorClassIdentifier: 343 | m_Material: {fileID: 0} 344 | m_Color: {r: 1, g: 1, b: 1, a: 1} 345 | m_RaycastTarget: 1 346 | m_Maskable: 1 347 | m_OnCullStateChanged: 348 | m_PersistentCalls: 349 | m_Calls: [] 350 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 351 | m_Type: 1 352 | m_PreserveAspect: 0 353 | m_FillCenter: 1 354 | m_FillMethod: 4 355 | m_FillAmount: 1 356 | m_FillClockwise: 1 357 | m_FillOrigin: 0 358 | m_UseSpriteMesh: 0 359 | m_PixelsPerUnitMultiplier: 1 360 | --- !u!222 &155392646 361 | CanvasRenderer: 362 | m_ObjectHideFlags: 0 363 | m_CorrespondingSourceObject: {fileID: 0} 364 | m_PrefabInstance: {fileID: 0} 365 | m_PrefabAsset: {fileID: 0} 366 | m_GameObject: {fileID: 155392642} 367 | m_CullTransparentMesh: 0 368 | --- !u!1 &316492814 369 | GameObject: 370 | m_ObjectHideFlags: 0 371 | m_CorrespondingSourceObject: {fileID: 0} 372 | m_PrefabInstance: {fileID: 0} 373 | m_PrefabAsset: {fileID: 0} 374 | serializedVersion: 6 375 | m_Component: 376 | - component: {fileID: 316492818} 377 | - component: {fileID: 316492817} 378 | - component: {fileID: 316492816} 379 | m_Layer: 0 380 | m_Name: EventSystem 381 | m_TagString: Untagged 382 | m_Icon: {fileID: 0} 383 | m_NavMeshLayer: 0 384 | m_StaticEditorFlags: 0 385 | m_IsActive: 1 386 | --- !u!114 &316492816 387 | MonoBehaviour: 388 | m_ObjectHideFlags: 0 389 | m_CorrespondingSourceObject: {fileID: 0} 390 | m_PrefabInstance: {fileID: 0} 391 | m_PrefabAsset: {fileID: 0} 392 | m_GameObject: {fileID: 316492814} 393 | m_Enabled: 1 394 | m_EditorHideFlags: 0 395 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 396 | m_Name: 397 | m_EditorClassIdentifier: 398 | m_HorizontalAxis: Horizontal 399 | m_VerticalAxis: Vertical 400 | m_SubmitButton: Submit 401 | m_CancelButton: Cancel 402 | m_InputActionsPerSecond: 10 403 | m_RepeatDelay: 0.5 404 | m_ForceModuleActive: 0 405 | --- !u!114 &316492817 406 | MonoBehaviour: 407 | m_ObjectHideFlags: 0 408 | m_CorrespondingSourceObject: {fileID: 0} 409 | m_PrefabInstance: {fileID: 0} 410 | m_PrefabAsset: {fileID: 0} 411 | m_GameObject: {fileID: 316492814} 412 | m_Enabled: 1 413 | m_EditorHideFlags: 0 414 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 415 | m_Name: 416 | m_EditorClassIdentifier: 417 | m_FirstSelected: {fileID: 0} 418 | m_sendNavigationEvents: 1 419 | m_DragThreshold: 5 420 | --- !u!4 &316492818 421 | Transform: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | m_GameObject: {fileID: 316492814} 427 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 428 | m_LocalPosition: {x: 0, y: 0, z: 0} 429 | m_LocalScale: {x: 1, y: 1, z: 1} 430 | m_Children: [] 431 | m_Father: {fileID: 0} 432 | m_RootOrder: 2 433 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 434 | --- !u!1 &432530561 435 | GameObject: 436 | m_ObjectHideFlags: 0 437 | m_CorrespondingSourceObject: {fileID: 0} 438 | m_PrefabInstance: {fileID: 0} 439 | m_PrefabAsset: {fileID: 0} 440 | serializedVersion: 6 441 | m_Component: 442 | - component: {fileID: 432530562} 443 | - component: {fileID: 432530565} 444 | - component: {fileID: 432530564} 445 | - component: {fileID: 432530563} 446 | m_Layer: 5 447 | m_Name: BackButton 448 | m_TagString: Untagged 449 | m_Icon: {fileID: 0} 450 | m_NavMeshLayer: 0 451 | m_StaticEditorFlags: 0 452 | m_IsActive: 1 453 | --- !u!224 &432530562 454 | RectTransform: 455 | m_ObjectHideFlags: 0 456 | m_CorrespondingSourceObject: {fileID: 0} 457 | m_PrefabInstance: {fileID: 0} 458 | m_PrefabAsset: {fileID: 0} 459 | m_GameObject: {fileID: 432530561} 460 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 461 | m_LocalPosition: {x: 0, y: 0, z: 0} 462 | m_LocalScale: {x: 1, y: 1, z: 1} 463 | m_Children: 464 | - {fileID: 531596783} 465 | m_Father: {fileID: 1502237571} 466 | m_RootOrder: 0 467 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 468 | m_AnchorMin: {x: 0, y: 1} 469 | m_AnchorMax: {x: 0, y: 1} 470 | m_AnchoredPosition: {x: 10, y: -10.0000305} 471 | m_SizeDelta: {x: 160, y: 40} 472 | m_Pivot: {x: 0, y: 1} 473 | --- !u!114 &432530563 474 | MonoBehaviour: 475 | m_ObjectHideFlags: 0 476 | m_CorrespondingSourceObject: {fileID: 0} 477 | m_PrefabInstance: {fileID: 0} 478 | m_PrefabAsset: {fileID: 0} 479 | m_GameObject: {fileID: 432530561} 480 | m_Enabled: 1 481 | m_EditorHideFlags: 0 482 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 483 | m_Name: 484 | m_EditorClassIdentifier: 485 | m_Navigation: 486 | m_Mode: 3 487 | m_SelectOnUp: {fileID: 0} 488 | m_SelectOnDown: {fileID: 0} 489 | m_SelectOnLeft: {fileID: 0} 490 | m_SelectOnRight: {fileID: 0} 491 | m_Transition: 1 492 | m_Colors: 493 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 494 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 495 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 496 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 497 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 498 | m_ColorMultiplier: 1 499 | m_FadeDuration: 0.1 500 | m_SpriteState: 501 | m_HighlightedSprite: {fileID: 0} 502 | m_PressedSprite: {fileID: 0} 503 | m_SelectedSprite: {fileID: 0} 504 | m_DisabledSprite: {fileID: 0} 505 | m_AnimationTriggers: 506 | m_NormalTrigger: Normal 507 | m_HighlightedTrigger: Highlighted 508 | m_PressedTrigger: Pressed 509 | m_SelectedTrigger: Highlighted 510 | m_DisabledTrigger: Disabled 511 | m_Interactable: 1 512 | m_TargetGraphic: {fileID: 432530564} 513 | m_OnClick: 514 | m_PersistentCalls: 515 | m_Calls: 516 | - m_Target: {fileID: 1787239750} 517 | m_MethodName: OnBackButtonClick 518 | m_Mode: 1 519 | m_Arguments: 520 | m_ObjectArgument: {fileID: 0} 521 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 522 | m_IntArgument: 0 523 | m_FloatArgument: 0 524 | m_StringArgument: 525 | m_BoolArgument: 0 526 | m_CallState: 2 527 | --- !u!114 &432530564 528 | MonoBehaviour: 529 | m_ObjectHideFlags: 0 530 | m_CorrespondingSourceObject: {fileID: 0} 531 | m_PrefabInstance: {fileID: 0} 532 | m_PrefabAsset: {fileID: 0} 533 | m_GameObject: {fileID: 432530561} 534 | m_Enabled: 1 535 | m_EditorHideFlags: 0 536 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 537 | m_Name: 538 | m_EditorClassIdentifier: 539 | m_Material: {fileID: 0} 540 | m_Color: {r: 1, g: 1, b: 1, a: 1} 541 | m_RaycastTarget: 1 542 | m_Maskable: 1 543 | m_OnCullStateChanged: 544 | m_PersistentCalls: 545 | m_Calls: [] 546 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 547 | m_Type: 1 548 | m_PreserveAspect: 0 549 | m_FillCenter: 1 550 | m_FillMethod: 4 551 | m_FillAmount: 1 552 | m_FillClockwise: 1 553 | m_FillOrigin: 0 554 | m_UseSpriteMesh: 0 555 | m_PixelsPerUnitMultiplier: 1 556 | --- !u!222 &432530565 557 | CanvasRenderer: 558 | m_ObjectHideFlags: 0 559 | m_CorrespondingSourceObject: {fileID: 0} 560 | m_PrefabInstance: {fileID: 0} 561 | m_PrefabAsset: {fileID: 0} 562 | m_GameObject: {fileID: 432530561} 563 | m_CullTransparentMesh: 0 564 | --- !u!1 &531596782 565 | GameObject: 566 | m_ObjectHideFlags: 0 567 | m_CorrespondingSourceObject: {fileID: 0} 568 | m_PrefabInstance: {fileID: 0} 569 | m_PrefabAsset: {fileID: 0} 570 | serializedVersion: 6 571 | m_Component: 572 | - component: {fileID: 531596783} 573 | - component: {fileID: 531596785} 574 | - component: {fileID: 531596784} 575 | m_Layer: 5 576 | m_Name: Text 577 | m_TagString: Untagged 578 | m_Icon: {fileID: 0} 579 | m_NavMeshLayer: 0 580 | m_StaticEditorFlags: 0 581 | m_IsActive: 1 582 | --- !u!224 &531596783 583 | RectTransform: 584 | m_ObjectHideFlags: 0 585 | m_CorrespondingSourceObject: {fileID: 0} 586 | m_PrefabInstance: {fileID: 0} 587 | m_PrefabAsset: {fileID: 0} 588 | m_GameObject: {fileID: 531596782} 589 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 590 | m_LocalPosition: {x: 0, y: 0, z: 0} 591 | m_LocalScale: {x: 1, y: 1, z: 1} 592 | m_Children: [] 593 | m_Father: {fileID: 432530562} 594 | m_RootOrder: 0 595 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 596 | m_AnchorMin: {x: 0, y: 0} 597 | m_AnchorMax: {x: 1, y: 1} 598 | m_AnchoredPosition: {x: 0, y: 0} 599 | m_SizeDelta: {x: 0, y: 0} 600 | m_Pivot: {x: 0.5, y: 0.5} 601 | --- !u!114 &531596784 602 | MonoBehaviour: 603 | m_ObjectHideFlags: 0 604 | m_CorrespondingSourceObject: {fileID: 0} 605 | m_PrefabInstance: {fileID: 0} 606 | m_PrefabAsset: {fileID: 0} 607 | m_GameObject: {fileID: 531596782} 608 | m_Enabled: 1 609 | m_EditorHideFlags: 0 610 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 611 | m_Name: 612 | m_EditorClassIdentifier: 613 | m_Material: {fileID: 0} 614 | m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1} 615 | m_RaycastTarget: 1 616 | m_Maskable: 1 617 | m_OnCullStateChanged: 618 | m_PersistentCalls: 619 | m_Calls: [] 620 | m_FontData: 621 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 622 | m_FontSize: 14 623 | m_FontStyle: 0 624 | m_BestFit: 0 625 | m_MinSize: 10 626 | m_MaxSize: 40 627 | m_Alignment: 4 628 | m_AlignByGeometry: 0 629 | m_RichText: 1 630 | m_HorizontalOverflow: 0 631 | m_VerticalOverflow: 0 632 | m_LineSpacing: 1 633 | m_Text: Back 634 | --- !u!222 &531596785 635 | CanvasRenderer: 636 | m_ObjectHideFlags: 0 637 | m_CorrespondingSourceObject: {fileID: 0} 638 | m_PrefabInstance: {fileID: 0} 639 | m_PrefabAsset: {fileID: 0} 640 | m_GameObject: {fileID: 531596782} 641 | m_CullTransparentMesh: 0 642 | --- !u!1 &823457166 643 | GameObject: 644 | m_ObjectHideFlags: 0 645 | m_CorrespondingSourceObject: {fileID: 0} 646 | m_PrefabInstance: {fileID: 0} 647 | m_PrefabAsset: {fileID: 0} 648 | serializedVersion: 6 649 | m_Component: 650 | - component: {fileID: 823457167} 651 | m_Layer: 5 652 | m_Name: Sliding Area 653 | m_TagString: Untagged 654 | m_Icon: {fileID: 0} 655 | m_NavMeshLayer: 0 656 | m_StaticEditorFlags: 0 657 | m_IsActive: 1 658 | --- !u!224 &823457167 659 | RectTransform: 660 | m_ObjectHideFlags: 0 661 | m_CorrespondingSourceObject: {fileID: 0} 662 | m_PrefabInstance: {fileID: 0} 663 | m_PrefabAsset: {fileID: 0} 664 | m_GameObject: {fileID: 823457166} 665 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 666 | m_LocalPosition: {x: 0, y: 0, z: 0} 667 | m_LocalScale: {x: 1, y: 1, z: 1} 668 | m_Children: 669 | - {fileID: 1011219728} 670 | m_Father: {fileID: 155392643} 671 | m_RootOrder: 0 672 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 673 | m_AnchorMin: {x: 0, y: 0} 674 | m_AnchorMax: {x: 1, y: 1} 675 | m_AnchoredPosition: {x: 0, y: 0} 676 | m_SizeDelta: {x: -20, y: -20} 677 | m_Pivot: {x: 0.5, y: 0.5} 678 | --- !u!1 &1011219727 679 | GameObject: 680 | m_ObjectHideFlags: 0 681 | m_CorrespondingSourceObject: {fileID: 0} 682 | m_PrefabInstance: {fileID: 0} 683 | m_PrefabAsset: {fileID: 0} 684 | serializedVersion: 6 685 | m_Component: 686 | - component: {fileID: 1011219728} 687 | - component: {fileID: 1011219730} 688 | - component: {fileID: 1011219729} 689 | m_Layer: 5 690 | m_Name: Handle 691 | m_TagString: Untagged 692 | m_Icon: {fileID: 0} 693 | m_NavMeshLayer: 0 694 | m_StaticEditorFlags: 0 695 | m_IsActive: 1 696 | --- !u!224 &1011219728 697 | RectTransform: 698 | m_ObjectHideFlags: 0 699 | m_CorrespondingSourceObject: {fileID: 0} 700 | m_PrefabInstance: {fileID: 0} 701 | m_PrefabAsset: {fileID: 0} 702 | m_GameObject: {fileID: 1011219727} 703 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 704 | m_LocalPosition: {x: 0, y: 0, z: 0} 705 | m_LocalScale: {x: 1, y: 1, z: 1} 706 | m_Children: [] 707 | m_Father: {fileID: 823457167} 708 | m_RootOrder: 0 709 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 710 | m_AnchorMin: {x: 0, y: 0} 711 | m_AnchorMax: {x: 0, y: 0} 712 | m_AnchoredPosition: {x: 0, y: 0} 713 | m_SizeDelta: {x: 20, y: 20} 714 | m_Pivot: {x: 0.5, y: 0.5} 715 | --- !u!114 &1011219729 716 | MonoBehaviour: 717 | m_ObjectHideFlags: 0 718 | m_CorrespondingSourceObject: {fileID: 0} 719 | m_PrefabInstance: {fileID: 0} 720 | m_PrefabAsset: {fileID: 0} 721 | m_GameObject: {fileID: 1011219727} 722 | m_Enabled: 1 723 | m_EditorHideFlags: 0 724 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 725 | m_Name: 726 | m_EditorClassIdentifier: 727 | m_Material: {fileID: 0} 728 | m_Color: {r: 1, g: 1, b: 1, a: 1} 729 | m_RaycastTarget: 1 730 | m_Maskable: 1 731 | m_OnCullStateChanged: 732 | m_PersistentCalls: 733 | m_Calls: [] 734 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 735 | m_Type: 1 736 | m_PreserveAspect: 0 737 | m_FillCenter: 1 738 | m_FillMethod: 4 739 | m_FillAmount: 1 740 | m_FillClockwise: 1 741 | m_FillOrigin: 0 742 | m_UseSpriteMesh: 0 743 | m_PixelsPerUnitMultiplier: 1 744 | --- !u!222 &1011219730 745 | CanvasRenderer: 746 | m_ObjectHideFlags: 0 747 | m_CorrespondingSourceObject: {fileID: 0} 748 | m_PrefabInstance: {fileID: 0} 749 | m_PrefabAsset: {fileID: 0} 750 | m_GameObject: {fileID: 1011219727} 751 | m_CullTransparentMesh: 0 752 | --- !u!1 &1086899403 753 | GameObject: 754 | m_ObjectHideFlags: 0 755 | m_CorrespondingSourceObject: {fileID: 0} 756 | m_PrefabInstance: {fileID: 0} 757 | m_PrefabAsset: {fileID: 0} 758 | serializedVersion: 6 759 | m_Component: 760 | - component: {fileID: 1086899404} 761 | - component: {fileID: 1086899406} 762 | - component: {fileID: 1086899405} 763 | - component: {fileID: 1086899407} 764 | m_Layer: 5 765 | m_Name: Text 766 | m_TagString: Untagged 767 | m_Icon: {fileID: 0} 768 | m_NavMeshLayer: 0 769 | m_StaticEditorFlags: 0 770 | m_IsActive: 1 771 | --- !u!224 &1086899404 772 | RectTransform: 773 | m_ObjectHideFlags: 0 774 | m_CorrespondingSourceObject: {fileID: 0} 775 | m_PrefabInstance: {fileID: 0} 776 | m_PrefabAsset: {fileID: 0} 777 | m_GameObject: {fileID: 1086899403} 778 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 779 | m_LocalPosition: {x: 0, y: 0, z: 0} 780 | m_LocalScale: {x: 1, y: 1, z: 1} 781 | m_Children: [] 782 | m_Father: {fileID: 38156657} 783 | m_RootOrder: 0 784 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 785 | m_AnchorMin: {x: 0, y: 0} 786 | m_AnchorMax: {x: 1, y: 1} 787 | m_AnchoredPosition: {x: 0, y: -0.000030517578} 788 | m_SizeDelta: {x: 0, y: 0} 789 | m_Pivot: {x: 0.5, y: 1} 790 | --- !u!114 &1086899405 791 | MonoBehaviour: 792 | m_ObjectHideFlags: 0 793 | m_CorrespondingSourceObject: {fileID: 0} 794 | m_PrefabInstance: {fileID: 0} 795 | m_PrefabAsset: {fileID: 0} 796 | m_GameObject: {fileID: 1086899403} 797 | m_Enabled: 1 798 | m_EditorHideFlags: 0 799 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 800 | m_Name: 801 | m_EditorClassIdentifier: 802 | m_Material: {fileID: 0} 803 | m_Color: {r: 1, g: 1, b: 1, a: 1} 804 | m_RaycastTarget: 1 805 | m_Maskable: 1 806 | m_OnCullStateChanged: 807 | m_PersistentCalls: 808 | m_Calls: [] 809 | m_FontData: 810 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 811 | m_FontSize: 20 812 | m_FontStyle: 0 813 | m_BestFit: 0 814 | m_MinSize: 10 815 | m_MaxSize: 40 816 | m_Alignment: 0 817 | m_AlignByGeometry: 0 818 | m_RichText: 1 819 | m_HorizontalOverflow: 0 820 | m_VerticalOverflow: 0 821 | m_LineSpacing: 1 822 | m_Text: "IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\r\n\r\n 823 | By downloading, copying, installing or using the software you agree to this license.\r\n 824 | If you do not agree to this license, do not download, install,\r\n copy or use 825 | the software.\r\n\r\n\r\n License Agreement\r\n 826 | For Open Source Computer Vision Library\r\n\r\nCopyright (C) 2000-2008, Intel 827 | Corporation, all rights reserved.\r\nCopyright (C) 2008-2011, Willow Garage Inc., 828 | all rights reserved.\r\nThird party copyrights are property of their respective 829 | owners.\r\n\r\nRedistribution and use in source and binary forms, with or without 830 | modification,\r\nare permitted provided that the following conditions are met:\r\n\r\n 831 | * Redistributions of source code must retain the above copyright notice,\r\n 832 | this list of conditions and the following disclaimer.\r\n\r\n * Redistributions 833 | in binary form must reproduce the above copyright notice,\r\n this list of 834 | conditions and the following disclaimer in the documentation\r\n and/or other 835 | materials provided with the distribution.\r\n\r\n * The name of the copyright 836 | holders may not be used to endorse or promote products\r\n derived from this 837 | software without specific prior written permission.\r\n\r\nThis software is provided 838 | by the copyright holders and contributors \"as is\" and\r\nany express or implied 839 | warranties, including, but not limited to, the implied\r\nwarranties of merchantability 840 | and fitness for a particular purpose are disclaimed.\r\nIn no event shall the 841 | Intel Corporation or contributors be liable for any direct,\r\nindirect, incidental, 842 | special, exemplary, or consequential damages\r\n(including, but not limited to, 843 | procurement of substitute goods or services;\r\nloss of use, data, or profits; 844 | or business interruption) however caused\r\nand on any theory of liability, whether 845 | in contract, strict liability,\r\nor tort (including negligence or otherwise) 846 | arising in any way out of\r\nthe use of this software, even if advised of the 847 | possibility of such damage.\r\n" 848 | --- !u!222 &1086899406 849 | CanvasRenderer: 850 | m_ObjectHideFlags: 0 851 | m_CorrespondingSourceObject: {fileID: 0} 852 | m_PrefabInstance: {fileID: 0} 853 | m_PrefabAsset: {fileID: 0} 854 | m_GameObject: {fileID: 1086899403} 855 | m_CullTransparentMesh: 0 856 | --- !u!114 &1086899407 857 | MonoBehaviour: 858 | m_ObjectHideFlags: 0 859 | m_CorrespondingSourceObject: {fileID: 0} 860 | m_PrefabInstance: {fileID: 0} 861 | m_PrefabAsset: {fileID: 0} 862 | m_GameObject: {fileID: 1086899403} 863 | m_Enabled: 1 864 | m_EditorHideFlags: 0 865 | m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} 866 | m_Name: 867 | m_EditorClassIdentifier: 868 | m_HorizontalFit: 0 869 | m_VerticalFit: 2 870 | --- !u!1 &1502237567 871 | GameObject: 872 | m_ObjectHideFlags: 0 873 | m_CorrespondingSourceObject: {fileID: 0} 874 | m_PrefabInstance: {fileID: 0} 875 | m_PrefabAsset: {fileID: 0} 876 | serializedVersion: 6 877 | m_Component: 878 | - component: {fileID: 1502237571} 879 | - component: {fileID: 1502237570} 880 | - component: {fileID: 1502237569} 881 | - component: {fileID: 1502237568} 882 | m_Layer: 5 883 | m_Name: Canvas 884 | m_TagString: Untagged 885 | m_Icon: {fileID: 0} 886 | m_NavMeshLayer: 0 887 | m_StaticEditorFlags: 0 888 | m_IsActive: 1 889 | --- !u!114 &1502237568 890 | MonoBehaviour: 891 | m_ObjectHideFlags: 0 892 | m_CorrespondingSourceObject: {fileID: 0} 893 | m_PrefabInstance: {fileID: 0} 894 | m_PrefabAsset: {fileID: 0} 895 | m_GameObject: {fileID: 1502237567} 896 | m_Enabled: 1 897 | m_EditorHideFlags: 0 898 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 899 | m_Name: 900 | m_EditorClassIdentifier: 901 | m_IgnoreReversedGraphics: 1 902 | m_BlockingObjects: 0 903 | m_BlockingMask: 904 | serializedVersion: 2 905 | m_Bits: 4294967295 906 | --- !u!114 &1502237569 907 | MonoBehaviour: 908 | m_ObjectHideFlags: 0 909 | m_CorrespondingSourceObject: {fileID: 0} 910 | m_PrefabInstance: {fileID: 0} 911 | m_PrefabAsset: {fileID: 0} 912 | m_GameObject: {fileID: 1502237567} 913 | m_Enabled: 1 914 | m_EditorHideFlags: 0 915 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 916 | m_Name: 917 | m_EditorClassIdentifier: 918 | m_UiScaleMode: 1 919 | m_ReferencePixelsPerUnit: 100 920 | m_ScaleFactor: 1 921 | m_ReferenceResolution: {x: 800, y: 600} 922 | m_ScreenMatchMode: 0 923 | m_MatchWidthOrHeight: 0 924 | m_PhysicalUnit: 3 925 | m_FallbackScreenDPI: 96 926 | m_DefaultSpriteDPI: 96 927 | m_DynamicPixelsPerUnit: 1 928 | --- !u!223 &1502237570 929 | Canvas: 930 | m_ObjectHideFlags: 0 931 | m_CorrespondingSourceObject: {fileID: 0} 932 | m_PrefabInstance: {fileID: 0} 933 | m_PrefabAsset: {fileID: 0} 934 | m_GameObject: {fileID: 1502237567} 935 | m_Enabled: 1 936 | serializedVersion: 3 937 | m_RenderMode: 0 938 | m_Camera: {fileID: 0} 939 | m_PlaneDistance: 100 940 | m_PixelPerfect: 0 941 | m_ReceivesEvents: 1 942 | m_OverrideSorting: 0 943 | m_OverridePixelPerfect: 0 944 | m_SortingBucketNormalizedSize: 0 945 | m_AdditionalShaderChannelsFlag: 0 946 | m_SortingLayerID: 0 947 | m_SortingOrder: 0 948 | m_TargetDisplay: 0 949 | --- !u!224 &1502237571 950 | RectTransform: 951 | m_ObjectHideFlags: 0 952 | m_CorrespondingSourceObject: {fileID: 0} 953 | m_PrefabInstance: {fileID: 0} 954 | m_PrefabAsset: {fileID: 0} 955 | m_GameObject: {fileID: 1502237567} 956 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 957 | m_LocalPosition: {x: 0, y: 0, z: 0} 958 | m_LocalScale: {x: 0, y: 0, z: 0} 959 | m_Children: 960 | - {fileID: 432530562} 961 | - {fileID: 1646839690} 962 | m_Father: {fileID: 0} 963 | m_RootOrder: 1 964 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 965 | m_AnchorMin: {x: 0, y: 0} 966 | m_AnchorMax: {x: 0, y: 0} 967 | m_AnchoredPosition: {x: 0, y: 0} 968 | m_SizeDelta: {x: 0, y: 0} 969 | m_Pivot: {x: 0, y: 0} 970 | --- !u!1 &1646839689 971 | GameObject: 972 | m_ObjectHideFlags: 0 973 | m_CorrespondingSourceObject: {fileID: 0} 974 | m_PrefabInstance: {fileID: 0} 975 | m_PrefabAsset: {fileID: 0} 976 | serializedVersion: 6 977 | m_Component: 978 | - component: {fileID: 1646839690} 979 | m_Layer: 5 980 | m_Name: LisenceText 981 | m_TagString: Untagged 982 | m_Icon: {fileID: 0} 983 | m_NavMeshLayer: 0 984 | m_StaticEditorFlags: 0 985 | m_IsActive: 1 986 | --- !u!224 &1646839690 987 | RectTransform: 988 | m_ObjectHideFlags: 0 989 | m_CorrespondingSourceObject: {fileID: 0} 990 | m_PrefabInstance: {fileID: 0} 991 | m_PrefabAsset: {fileID: 0} 992 | m_GameObject: {fileID: 1646839689} 993 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 994 | m_LocalPosition: {x: 0, y: 0, z: 0} 995 | m_LocalScale: {x: 1, y: 1, z: 1} 996 | m_Children: 997 | - {fileID: 38156657} 998 | - {fileID: 155392643} 999 | m_Father: {fileID: 1502237571} 1000 | m_RootOrder: 1 1001 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1002 | m_AnchorMin: {x: 0, y: 0} 1003 | m_AnchorMax: {x: 1, y: 1} 1004 | m_AnchoredPosition: {x: 0, y: -25} 1005 | m_SizeDelta: {x: -40, y: -90} 1006 | m_Pivot: {x: 0.5, y: 0.5} 1007 | --- !u!1 &1787239744 1008 | GameObject: 1009 | m_ObjectHideFlags: 0 1010 | m_CorrespondingSourceObject: {fileID: 0} 1011 | m_PrefabInstance: {fileID: 0} 1012 | m_PrefabAsset: {fileID: 0} 1013 | serializedVersion: 6 1014 | m_Component: 1015 | - component: {fileID: 1787239749} 1016 | - component: {fileID: 1787239748} 1017 | - component: {fileID: 1787239746} 1018 | - component: {fileID: 1787239745} 1019 | - component: {fileID: 1787239750} 1020 | m_Layer: 0 1021 | m_Name: Main Camera 1022 | m_TagString: MainCamera 1023 | m_Icon: {fileID: 0} 1024 | m_NavMeshLayer: 0 1025 | m_StaticEditorFlags: 0 1026 | m_IsActive: 1 1027 | --- !u!81 &1787239745 1028 | AudioListener: 1029 | m_ObjectHideFlags: 0 1030 | m_CorrespondingSourceObject: {fileID: 0} 1031 | m_PrefabInstance: {fileID: 0} 1032 | m_PrefabAsset: {fileID: 0} 1033 | m_GameObject: {fileID: 1787239744} 1034 | m_Enabled: 1 1035 | --- !u!124 &1787239746 1036 | Behaviour: 1037 | m_ObjectHideFlags: 0 1038 | m_CorrespondingSourceObject: {fileID: 0} 1039 | m_PrefabInstance: {fileID: 0} 1040 | m_PrefabAsset: {fileID: 0} 1041 | m_GameObject: {fileID: 1787239744} 1042 | m_Enabled: 1 1043 | --- !u!20 &1787239748 1044 | Camera: 1045 | m_ObjectHideFlags: 0 1046 | m_CorrespondingSourceObject: {fileID: 0} 1047 | m_PrefabInstance: {fileID: 0} 1048 | m_PrefabAsset: {fileID: 0} 1049 | m_GameObject: {fileID: 1787239744} 1050 | m_Enabled: 1 1051 | serializedVersion: 2 1052 | m_ClearFlags: 1 1053 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 1054 | m_projectionMatrixMode: 1 1055 | m_GateFitMode: 2 1056 | m_FOVAxisMode: 0 1057 | m_SensorSize: {x: 36, y: 24} 1058 | m_LensShift: {x: 0, y: 0} 1059 | m_FocalLength: 50 1060 | m_NormalizedViewPortRect: 1061 | serializedVersion: 2 1062 | x: 0 1063 | y: 0 1064 | width: 1 1065 | height: 1 1066 | near clip plane: 0.3 1067 | far clip plane: 1000 1068 | field of view: 60 1069 | orthographic: 0 1070 | orthographic size: 5 1071 | m_Depth: -1 1072 | m_CullingMask: 1073 | serializedVersion: 2 1074 | m_Bits: 4294967295 1075 | m_RenderingPath: -1 1076 | m_TargetTexture: {fileID: 0} 1077 | m_TargetDisplay: 0 1078 | m_TargetEye: 3 1079 | m_HDR: 0 1080 | m_AllowMSAA: 1 1081 | m_AllowDynamicResolution: 0 1082 | m_ForceIntoRT: 0 1083 | m_OcclusionCulling: 1 1084 | m_StereoConvergence: 10 1085 | m_StereoSeparation: 0.022 1086 | --- !u!4 &1787239749 1087 | Transform: 1088 | m_ObjectHideFlags: 0 1089 | m_CorrespondingSourceObject: {fileID: 0} 1090 | m_PrefabInstance: {fileID: 0} 1091 | m_PrefabAsset: {fileID: 0} 1092 | m_GameObject: {fileID: 1787239744} 1093 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1094 | m_LocalPosition: {x: 0, y: 1, z: -10} 1095 | m_LocalScale: {x: 1, y: 1, z: 1} 1096 | m_Children: [] 1097 | m_Father: {fileID: 0} 1098 | m_RootOrder: 0 1099 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1100 | --- !u!114 &1787239750 1101 | MonoBehaviour: 1102 | m_ObjectHideFlags: 0 1103 | m_CorrespondingSourceObject: {fileID: 0} 1104 | m_PrefabInstance: {fileID: 0} 1105 | m_PrefabAsset: {fileID: 0} 1106 | m_GameObject: {fileID: 1787239744} 1107 | m_Enabled: 1 1108 | m_EditorHideFlags: 0 1109 | m_Script: {fileID: 11500000, guid: 5f46871192c11974cbe5975ad9be2e44, type: 3} 1110 | m_Name: 1111 | m_EditorClassIdentifier: 1112 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/ShowLicense.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 95075e5d2774c4a46801db660516391f 3 | timeCreated: 1530717696 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/ShowSystemInfo.cs: -------------------------------------------------------------------------------- 1 | using OpenCVForUnity.CoreModule; 2 | using OpenCVForUnity.UnityUtils; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Reflection; 6 | using System.Text; 7 | using UnityEngine; 8 | using UnityEngine.SceneManagement; 9 | using UnityEngine.UI; 10 | 11 | namespace NatCorderWithOpenCVForUnityExample 12 | { 13 | public class ShowSystemInfo : MonoBehaviour 14 | { 15 | public Text systemInfoText; 16 | public InputField systemInfoInputField; 17 | 18 | private const string ASSET_NAME = "OpenCVForUnity"; 19 | 20 | // Use this for initialization 21 | void Start() 22 | { 23 | 24 | StringBuilder sb = new StringBuilder(); 25 | sb.Append("###### Build Info ######\n"); 26 | IDictionary buildInfo = GetBuildInfo(); 27 | foreach (string key in buildInfo.Keys) 28 | { 29 | sb.Append(key).Append(" = ").Append(buildInfo[key]).Append("\n"); 30 | } 31 | sb.Append("\n"); 32 | 33 | #if UNITY_IOS || (UNITY_ANDROID && UNITY_2018_3_OR_NEWER) 34 | sb.Append("###### Device Info ######\n"); 35 | IDictionary deviceInfo = GetDeviceInfo(); 36 | foreach (string key in deviceInfo.Keys) 37 | { 38 | sb.Append(key).Append(" = ").Append(deviceInfo[key]).Append("\n"); 39 | } 40 | sb.Append("\n"); 41 | #endif 42 | 43 | sb.Append("###### System Info ######\n"); 44 | IDictionary systemInfo = GetSystemInfo(); 45 | foreach (string key in systemInfo.Keys) 46 | { 47 | sb.Append(key).Append(" = ").Append(systemInfo[key]).Append("\n"); 48 | } 49 | sb.Append("#########################\n"); 50 | 51 | systemInfoText.text = systemInfoInputField.text = sb.ToString(); 52 | Debug.Log(sb.ToString()); 53 | } 54 | 55 | // Update is called once per frame 56 | void Update() 57 | { 58 | 59 | } 60 | 61 | public Dictionary GetBuildInfo() 62 | { 63 | Dictionary dict = new Dictionary(); 64 | 65 | dict.Add(ASSET_NAME + " version", Core.NATIVE_LIBRARY_NAME + " " + Utils.getVersion() + " (" + Core.VERSION + ")"); 66 | dict.Add("Build Unity version", Application.unityVersion); 67 | 68 | #if UNITY_EDITOR 69 | dict.Add("Build target", "Editor"); 70 | #elif UNITY_STANDALONE_WIN 71 | dict.Add("Build target", "Windows"); 72 | #elif UNITY_STANDALONE_OSX 73 | dict.Add("Build target", "Mac OSX"); 74 | #elif UNITY_STANDALONE_LINUX 75 | dict.Add("Build target", "Linux"); 76 | #elif UNITY_ANDROID 77 | dict.Add("Build target", "Android"); 78 | #elif UNITY_IOS 79 | dict.Add("Build target", "iOS"); 80 | #elif UNITY_WSA 81 | dict.Add("Build target", "WSA"); 82 | #elif UNITY_WEBGL 83 | dict.Add("Build target", "WebGL"); 84 | #elif PLATFORM_LUMIN 85 | dict.Add("Build target", "LUMIN"); 86 | #else 87 | dict.Add("Build target", ""); 88 | #endif 89 | 90 | #if ENABLE_MONO 91 | dict.Add("Scripting backend", "Mono"); 92 | #elif ENABLE_IL2CPP 93 | dict.Add("Scripting backend", "IL2CPP"); 94 | #elif ENABLE_DOTNET 95 | dict.Add("Scripting backend", ".NET"); 96 | #else 97 | dict.Add("Scripting backend", ""); 98 | #endif 99 | 100 | #if OPENCV_USE_UNSAFE_CODE 101 | dict.Add("Allow 'unsafe' Code", "Enabled"); 102 | #else 103 | dict.Add("Allow 'unsafe' Code", "Disabled"); 104 | #endif 105 | 106 | return dict; 107 | } 108 | 109 | public Dictionary GetDeviceInfo() 110 | { 111 | Dictionary dict = new Dictionary(); 112 | 113 | #if UNITY_IOS 114 | dict.Add("iOS.Device.generation", UnityEngine.iOS.Device.generation.ToString()); 115 | dict.Add("iOS.Device.systemVersion", UnityEngine.iOS.Device.systemVersion.ToString()); 116 | #endif 117 | #if UNITY_IOS && UNITY_2018_1_OR_NEWER 118 | dict.Add("UserAuthorization.WebCam", Application.HasUserAuthorization(UserAuthorization.WebCam).ToString()); 119 | dict.Add("UserAuthorization.Microphone", Application.HasUserAuthorization(UserAuthorization.Microphone).ToString()); 120 | #endif 121 | #if UNITY_ANDROID && UNITY_2018_3_OR_NEWER 122 | dict.Add("Android.Permission.Camera", UnityEngine.Android.Permission.HasUserAuthorizedPermission(UnityEngine.Android.Permission.Camera).ToString()); 123 | dict.Add("Android.Permission.CoarseLocation", UnityEngine.Android.Permission.HasUserAuthorizedPermission(UnityEngine.Android.Permission.CoarseLocation).ToString()); 124 | dict.Add("Android.Permission.ExternalStorageRead", UnityEngine.Android.Permission.HasUserAuthorizedPermission(UnityEngine.Android.Permission.ExternalStorageRead).ToString()); 125 | dict.Add("Android.Permission.ExternalStorageWrite", UnityEngine.Android.Permission.HasUserAuthorizedPermission(UnityEngine.Android.Permission.ExternalStorageWrite).ToString()); 126 | dict.Add("Android.Permission.FineLocation", UnityEngine.Android.Permission.HasUserAuthorizedPermission(UnityEngine.Android.Permission.FineLocation).ToString()); 127 | dict.Add("Android.Permission.Microphone", UnityEngine.Android.Permission.HasUserAuthorizedPermission(UnityEngine.Android.Permission.Microphone).ToString()); 128 | #endif 129 | 130 | return dict; 131 | } 132 | 133 | /// SystemInfo Class Propertys 134 | public SortedDictionary GetSystemInfo() 135 | { 136 | SortedDictionary dict = new SortedDictionary(); 137 | 138 | Type type = typeof(SystemInfo); 139 | MemberInfo[] members = type.GetMembers( 140 | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static); 141 | 142 | foreach (MemberInfo mb in members) 143 | { 144 | try 145 | { 146 | if (mb.MemberType == MemberTypes.Property) 147 | { 148 | if (mb.Name == "deviceUniqueIdentifier") 149 | { 150 | dict.Add(mb.Name, "xxxxxxxxxxxxxxxxxxxxxxxx"); 151 | continue; 152 | } 153 | 154 | PropertyInfo pr = type.GetProperty(mb.Name); 155 | 156 | if (pr != null) 157 | { 158 | object resobj = pr.GetValue(type, null); 159 | dict.Add(mb.Name, resobj.ToString()); 160 | } 161 | else 162 | { 163 | dict.Add(mb.Name, ""); 164 | } 165 | } 166 | } 167 | catch (Exception e) 168 | { 169 | Debug.Log("Exception: " + e); 170 | } 171 | } 172 | 173 | return dict; 174 | } 175 | 176 | public void OnBackButtonClick() 177 | { 178 | SceneManager.LoadScene("NatCorderWithOpenCVForUnityExample"); 179 | } 180 | } 181 | } -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/ShowSystemInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4dfd6276778291b4c813ecadfd770b95 3 | timeCreated: 1530717697 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/NatCorderWithOpenCVForUnityExample/ShowSystemInfo.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 24 | m_AmbientEquatorColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 25 | m_AmbientGroundColor: {r: 0.2, g: 0.2, b: 0.2, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &4 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 1 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 12 58 | m_Resolution: 1 59 | m_BakeResolution: 50 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 0 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 0 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 1024 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 1 75 | m_BakeBackend: 0 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 500 79 | m_PVRBounces: 2 80 | m_PVREnvironmentSampleCount: 500 81 | m_PVREnvironmentReferencePointCount: 2048 82 | m_PVRFilteringMode: 2 83 | m_PVRDenoiserTypeDirect: 0 84 | m_PVRDenoiserTypeIndirect: 0 85 | m_PVRDenoiserTypeAO: 0 86 | m_PVRFilterTypeDirect: 0 87 | m_PVRFilterTypeIndirect: 0 88 | m_PVRFilterTypeAO: 0 89 | m_PVREnvironmentMIS: 0 90 | m_PVRCulling: 1 91 | m_PVRFilteringGaussRadiusDirect: 1 92 | m_PVRFilteringGaussRadiusIndirect: 5 93 | m_PVRFilteringGaussRadiusAO: 2 94 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 95 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 96 | m_PVRFilteringAtrousPositionSigmaAO: 1 97 | m_ExportTrainingData: 0 98 | m_TrainingDataDestination: TrainingData 99 | m_LightProbeSampleCountMultiplier: 4 100 | m_LightingDataAsset: {fileID: 0} 101 | m_UseShadowmask: 0 102 | --- !u!196 &5 103 | NavMeshSettings: 104 | serializedVersion: 2 105 | m_ObjectHideFlags: 0 106 | m_BuildSettings: 107 | serializedVersion: 2 108 | agentTypeID: 0 109 | agentRadius: 0.5 110 | agentHeight: 2 111 | agentSlope: 45 112 | agentClimb: 0.4 113 | ledgeDropHeight: 0 114 | maxJumpAcrossDistance: 0 115 | minRegionArea: 2 116 | manualCellSize: 0 117 | cellSize: 0.16666666 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &38156656 125 | GameObject: 126 | m_ObjectHideFlags: 0 127 | m_CorrespondingSourceObject: {fileID: 0} 128 | m_PrefabInstance: {fileID: 0} 129 | m_PrefabAsset: {fileID: 0} 130 | serializedVersion: 6 131 | m_Component: 132 | - component: {fileID: 38156657} 133 | - component: {fileID: 38156661} 134 | - component: {fileID: 38156660} 135 | - component: {fileID: 38156659} 136 | - component: {fileID: 38156658} 137 | m_Layer: 5 138 | m_Name: ScrollView 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!224 &38156657 145 | RectTransform: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 38156656} 151 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 152 | m_LocalPosition: {x: 0, y: 0, z: 0} 153 | m_LocalScale: {x: 1, y: 1, z: 1} 154 | m_Children: 155 | - {fileID: 1086899404} 156 | m_Father: {fileID: 1646839690} 157 | m_RootOrder: 0 158 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 159 | m_AnchorMin: {x: 0, y: 0} 160 | m_AnchorMax: {x: 1, y: 1} 161 | m_AnchoredPosition: {x: -10, y: 0} 162 | m_SizeDelta: {x: -20, y: 0} 163 | m_Pivot: {x: 0.5, y: 1} 164 | --- !u!114 &38156658 165 | MonoBehaviour: 166 | m_ObjectHideFlags: 0 167 | m_CorrespondingSourceObject: {fileID: 0} 168 | m_PrefabInstance: {fileID: 0} 169 | m_PrefabAsset: {fileID: 0} 170 | m_GameObject: {fileID: 38156656} 171 | m_Enabled: 1 172 | m_EditorHideFlags: 0 173 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 174 | m_Name: 175 | m_EditorClassIdentifier: 176 | m_Material: {fileID: 0} 177 | m_Color: {r: 1, g: 1, b: 1, a: 1} 178 | m_RaycastTarget: 1 179 | m_Maskable: 1 180 | m_OnCullStateChanged: 181 | m_PersistentCalls: 182 | m_Calls: [] 183 | m_Sprite: {fileID: 0} 184 | m_Type: 0 185 | m_PreserveAspect: 0 186 | m_FillCenter: 1 187 | m_FillMethod: 4 188 | m_FillAmount: 1 189 | m_FillClockwise: 1 190 | m_FillOrigin: 0 191 | m_UseSpriteMesh: 0 192 | m_PixelsPerUnitMultiplier: 1 193 | --- !u!222 &38156659 194 | CanvasRenderer: 195 | m_ObjectHideFlags: 0 196 | m_CorrespondingSourceObject: {fileID: 0} 197 | m_PrefabInstance: {fileID: 0} 198 | m_PrefabAsset: {fileID: 0} 199 | m_GameObject: {fileID: 38156656} 200 | m_CullTransparentMesh: 0 201 | --- !u!114 &38156660 202 | MonoBehaviour: 203 | m_ObjectHideFlags: 0 204 | m_CorrespondingSourceObject: {fileID: 0} 205 | m_PrefabInstance: {fileID: 0} 206 | m_PrefabAsset: {fileID: 0} 207 | m_GameObject: {fileID: 38156656} 208 | m_Enabled: 1 209 | m_EditorHideFlags: 0 210 | m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} 211 | m_Name: 212 | m_EditorClassIdentifier: 213 | m_ShowMaskGraphic: 0 214 | --- !u!114 &38156661 215 | MonoBehaviour: 216 | m_ObjectHideFlags: 0 217 | m_CorrespondingSourceObject: {fileID: 0} 218 | m_PrefabInstance: {fileID: 0} 219 | m_PrefabAsset: {fileID: 0} 220 | m_GameObject: {fileID: 38156656} 221 | m_Enabled: 1 222 | m_EditorHideFlags: 0 223 | m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} 224 | m_Name: 225 | m_EditorClassIdentifier: 226 | m_Content: {fileID: 1086899404} 227 | m_Horizontal: 0 228 | m_Vertical: 1 229 | m_MovementType: 1 230 | m_Elasticity: 0.1 231 | m_Inertia: 1 232 | m_DecelerationRate: 0.135 233 | m_ScrollSensitivity: 1 234 | m_Viewport: {fileID: 0} 235 | m_HorizontalScrollbar: {fileID: 0} 236 | m_VerticalScrollbar: {fileID: 155392644} 237 | m_HorizontalScrollbarVisibility: 0 238 | m_VerticalScrollbarVisibility: 0 239 | m_HorizontalScrollbarSpacing: 0 240 | m_VerticalScrollbarSpacing: 0 241 | m_OnValueChanged: 242 | m_PersistentCalls: 243 | m_Calls: [] 244 | --- !u!1 &155392642 245 | GameObject: 246 | m_ObjectHideFlags: 0 247 | m_CorrespondingSourceObject: {fileID: 0} 248 | m_PrefabInstance: {fileID: 0} 249 | m_PrefabAsset: {fileID: 0} 250 | serializedVersion: 6 251 | m_Component: 252 | - component: {fileID: 155392643} 253 | - component: {fileID: 155392646} 254 | - component: {fileID: 155392645} 255 | - component: {fileID: 155392644} 256 | m_Layer: 5 257 | m_Name: Scrollbar 258 | m_TagString: Untagged 259 | m_Icon: {fileID: 0} 260 | m_NavMeshLayer: 0 261 | m_StaticEditorFlags: 0 262 | m_IsActive: 1 263 | --- !u!224 &155392643 264 | RectTransform: 265 | m_ObjectHideFlags: 0 266 | m_CorrespondingSourceObject: {fileID: 0} 267 | m_PrefabInstance: {fileID: 0} 268 | m_PrefabAsset: {fileID: 0} 269 | m_GameObject: {fileID: 155392642} 270 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 271 | m_LocalPosition: {x: 0, y: 0, z: 0} 272 | m_LocalScale: {x: 1, y: 1, z: 1} 273 | m_Children: 274 | - {fileID: 823457167} 275 | m_Father: {fileID: 1646839690} 276 | m_RootOrder: 1 277 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 278 | m_AnchorMin: {x: 1, y: 0} 279 | m_AnchorMax: {x: 1, y: 1} 280 | m_AnchoredPosition: {x: -5, y: 0} 281 | m_SizeDelta: {x: 20, y: 0} 282 | m_Pivot: {x: 0.5, y: 0.5} 283 | --- !u!114 &155392644 284 | MonoBehaviour: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | m_GameObject: {fileID: 155392642} 290 | m_Enabled: 1 291 | m_EditorHideFlags: 0 292 | m_Script: {fileID: 11500000, guid: 2a4db7a114972834c8e4117be1d82ba3, type: 3} 293 | m_Name: 294 | m_EditorClassIdentifier: 295 | m_Navigation: 296 | m_Mode: 3 297 | m_SelectOnUp: {fileID: 0} 298 | m_SelectOnDown: {fileID: 0} 299 | m_SelectOnLeft: {fileID: 0} 300 | m_SelectOnRight: {fileID: 0} 301 | m_Transition: 1 302 | m_Colors: 303 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 304 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 305 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 306 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 307 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 308 | m_ColorMultiplier: 1 309 | m_FadeDuration: 0.1 310 | m_SpriteState: 311 | m_HighlightedSprite: {fileID: 0} 312 | m_PressedSprite: {fileID: 0} 313 | m_SelectedSprite: {fileID: 0} 314 | m_DisabledSprite: {fileID: 0} 315 | m_AnimationTriggers: 316 | m_NormalTrigger: Normal 317 | m_HighlightedTrigger: Highlighted 318 | m_PressedTrigger: Pressed 319 | m_SelectedTrigger: Highlighted 320 | m_DisabledTrigger: Disabled 321 | m_Interactable: 1 322 | m_TargetGraphic: {fileID: 1011219729} 323 | m_HandleRect: {fileID: 1011219728} 324 | m_Direction: 2 325 | m_Value: 0 326 | m_Size: 0.9999999 327 | m_NumberOfSteps: 0 328 | m_OnValueChanged: 329 | m_PersistentCalls: 330 | m_Calls: [] 331 | --- !u!114 &155392645 332 | MonoBehaviour: 333 | m_ObjectHideFlags: 0 334 | m_CorrespondingSourceObject: {fileID: 0} 335 | m_PrefabInstance: {fileID: 0} 336 | m_PrefabAsset: {fileID: 0} 337 | m_GameObject: {fileID: 155392642} 338 | m_Enabled: 1 339 | m_EditorHideFlags: 0 340 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 341 | m_Name: 342 | m_EditorClassIdentifier: 343 | m_Material: {fileID: 0} 344 | m_Color: {r: 1, g: 1, b: 1, a: 1} 345 | m_RaycastTarget: 1 346 | m_Maskable: 1 347 | m_OnCullStateChanged: 348 | m_PersistentCalls: 349 | m_Calls: [] 350 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 351 | m_Type: 1 352 | m_PreserveAspect: 0 353 | m_FillCenter: 1 354 | m_FillMethod: 4 355 | m_FillAmount: 1 356 | m_FillClockwise: 1 357 | m_FillOrigin: 0 358 | m_UseSpriteMesh: 0 359 | m_PixelsPerUnitMultiplier: 1 360 | --- !u!222 &155392646 361 | CanvasRenderer: 362 | m_ObjectHideFlags: 0 363 | m_CorrespondingSourceObject: {fileID: 0} 364 | m_PrefabInstance: {fileID: 0} 365 | m_PrefabAsset: {fileID: 0} 366 | m_GameObject: {fileID: 155392642} 367 | m_CullTransparentMesh: 0 368 | --- !u!1 &316492814 369 | GameObject: 370 | m_ObjectHideFlags: 0 371 | m_CorrespondingSourceObject: {fileID: 0} 372 | m_PrefabInstance: {fileID: 0} 373 | m_PrefabAsset: {fileID: 0} 374 | serializedVersion: 6 375 | m_Component: 376 | - component: {fileID: 316492818} 377 | - component: {fileID: 316492817} 378 | - component: {fileID: 316492816} 379 | m_Layer: 0 380 | m_Name: EventSystem 381 | m_TagString: Untagged 382 | m_Icon: {fileID: 0} 383 | m_NavMeshLayer: 0 384 | m_StaticEditorFlags: 0 385 | m_IsActive: 1 386 | --- !u!114 &316492816 387 | MonoBehaviour: 388 | m_ObjectHideFlags: 0 389 | m_CorrespondingSourceObject: {fileID: 0} 390 | m_PrefabInstance: {fileID: 0} 391 | m_PrefabAsset: {fileID: 0} 392 | m_GameObject: {fileID: 316492814} 393 | m_Enabled: 1 394 | m_EditorHideFlags: 0 395 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 396 | m_Name: 397 | m_EditorClassIdentifier: 398 | m_HorizontalAxis: Horizontal 399 | m_VerticalAxis: Vertical 400 | m_SubmitButton: Submit 401 | m_CancelButton: Cancel 402 | m_InputActionsPerSecond: 10 403 | m_RepeatDelay: 0.5 404 | m_ForceModuleActive: 0 405 | --- !u!114 &316492817 406 | MonoBehaviour: 407 | m_ObjectHideFlags: 0 408 | m_CorrespondingSourceObject: {fileID: 0} 409 | m_PrefabInstance: {fileID: 0} 410 | m_PrefabAsset: {fileID: 0} 411 | m_GameObject: {fileID: 316492814} 412 | m_Enabled: 1 413 | m_EditorHideFlags: 0 414 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 415 | m_Name: 416 | m_EditorClassIdentifier: 417 | m_FirstSelected: {fileID: 0} 418 | m_sendNavigationEvents: 1 419 | m_DragThreshold: 5 420 | --- !u!4 &316492818 421 | Transform: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | m_GameObject: {fileID: 316492814} 427 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 428 | m_LocalPosition: {x: 0, y: 0, z: 0} 429 | m_LocalScale: {x: 1, y: 1, z: 1} 430 | m_Children: [] 431 | m_Father: {fileID: 0} 432 | m_RootOrder: 2 433 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 434 | --- !u!1 &432530561 435 | GameObject: 436 | m_ObjectHideFlags: 0 437 | m_CorrespondingSourceObject: {fileID: 0} 438 | m_PrefabInstance: {fileID: 0} 439 | m_PrefabAsset: {fileID: 0} 440 | serializedVersion: 6 441 | m_Component: 442 | - component: {fileID: 432530562} 443 | - component: {fileID: 432530565} 444 | - component: {fileID: 432530564} 445 | - component: {fileID: 432530563} 446 | m_Layer: 5 447 | m_Name: BackButton 448 | m_TagString: Untagged 449 | m_Icon: {fileID: 0} 450 | m_NavMeshLayer: 0 451 | m_StaticEditorFlags: 0 452 | m_IsActive: 1 453 | --- !u!224 &432530562 454 | RectTransform: 455 | m_ObjectHideFlags: 0 456 | m_CorrespondingSourceObject: {fileID: 0} 457 | m_PrefabInstance: {fileID: 0} 458 | m_PrefabAsset: {fileID: 0} 459 | m_GameObject: {fileID: 432530561} 460 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 461 | m_LocalPosition: {x: 0, y: 0, z: 0} 462 | m_LocalScale: {x: 1, y: 1, z: 1} 463 | m_Children: 464 | - {fileID: 531596783} 465 | m_Father: {fileID: 1502237571} 466 | m_RootOrder: 0 467 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 468 | m_AnchorMin: {x: 0, y: 1} 469 | m_AnchorMax: {x: 0, y: 1} 470 | m_AnchoredPosition: {x: 10, y: -10.0000305} 471 | m_SizeDelta: {x: 160, y: 40} 472 | m_Pivot: {x: 0, y: 1} 473 | --- !u!114 &432530563 474 | MonoBehaviour: 475 | m_ObjectHideFlags: 0 476 | m_CorrespondingSourceObject: {fileID: 0} 477 | m_PrefabInstance: {fileID: 0} 478 | m_PrefabAsset: {fileID: 0} 479 | m_GameObject: {fileID: 432530561} 480 | m_Enabled: 1 481 | m_EditorHideFlags: 0 482 | m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} 483 | m_Name: 484 | m_EditorClassIdentifier: 485 | m_Navigation: 486 | m_Mode: 3 487 | m_SelectOnUp: {fileID: 0} 488 | m_SelectOnDown: {fileID: 0} 489 | m_SelectOnLeft: {fileID: 0} 490 | m_SelectOnRight: {fileID: 0} 491 | m_Transition: 1 492 | m_Colors: 493 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 494 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 495 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 496 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 497 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 498 | m_ColorMultiplier: 1 499 | m_FadeDuration: 0.1 500 | m_SpriteState: 501 | m_HighlightedSprite: {fileID: 0} 502 | m_PressedSprite: {fileID: 0} 503 | m_SelectedSprite: {fileID: 0} 504 | m_DisabledSprite: {fileID: 0} 505 | m_AnimationTriggers: 506 | m_NormalTrigger: Normal 507 | m_HighlightedTrigger: Highlighted 508 | m_PressedTrigger: Pressed 509 | m_SelectedTrigger: Highlighted 510 | m_DisabledTrigger: Disabled 511 | m_Interactable: 1 512 | m_TargetGraphic: {fileID: 432530564} 513 | m_OnClick: 514 | m_PersistentCalls: 515 | m_Calls: 516 | - m_Target: {fileID: 1787239750} 517 | m_MethodName: OnBackButtonClick 518 | m_Mode: 1 519 | m_Arguments: 520 | m_ObjectArgument: {fileID: 0} 521 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 522 | m_IntArgument: 0 523 | m_FloatArgument: 0 524 | m_StringArgument: 525 | m_BoolArgument: 0 526 | m_CallState: 2 527 | --- !u!114 &432530564 528 | MonoBehaviour: 529 | m_ObjectHideFlags: 0 530 | m_CorrespondingSourceObject: {fileID: 0} 531 | m_PrefabInstance: {fileID: 0} 532 | m_PrefabAsset: {fileID: 0} 533 | m_GameObject: {fileID: 432530561} 534 | m_Enabled: 1 535 | m_EditorHideFlags: 0 536 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 537 | m_Name: 538 | m_EditorClassIdentifier: 539 | m_Material: {fileID: 0} 540 | m_Color: {r: 1, g: 1, b: 1, a: 1} 541 | m_RaycastTarget: 1 542 | m_Maskable: 1 543 | m_OnCullStateChanged: 544 | m_PersistentCalls: 545 | m_Calls: [] 546 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 547 | m_Type: 1 548 | m_PreserveAspect: 0 549 | m_FillCenter: 1 550 | m_FillMethod: 4 551 | m_FillAmount: 1 552 | m_FillClockwise: 1 553 | m_FillOrigin: 0 554 | m_UseSpriteMesh: 0 555 | m_PixelsPerUnitMultiplier: 1 556 | --- !u!222 &432530565 557 | CanvasRenderer: 558 | m_ObjectHideFlags: 0 559 | m_CorrespondingSourceObject: {fileID: 0} 560 | m_PrefabInstance: {fileID: 0} 561 | m_PrefabAsset: {fileID: 0} 562 | m_GameObject: {fileID: 432530561} 563 | m_CullTransparentMesh: 0 564 | --- !u!1 &531596782 565 | GameObject: 566 | m_ObjectHideFlags: 0 567 | m_CorrespondingSourceObject: {fileID: 0} 568 | m_PrefabInstance: {fileID: 0} 569 | m_PrefabAsset: {fileID: 0} 570 | serializedVersion: 6 571 | m_Component: 572 | - component: {fileID: 531596783} 573 | - component: {fileID: 531596785} 574 | - component: {fileID: 531596784} 575 | m_Layer: 5 576 | m_Name: Text 577 | m_TagString: Untagged 578 | m_Icon: {fileID: 0} 579 | m_NavMeshLayer: 0 580 | m_StaticEditorFlags: 0 581 | m_IsActive: 1 582 | --- !u!224 &531596783 583 | RectTransform: 584 | m_ObjectHideFlags: 0 585 | m_CorrespondingSourceObject: {fileID: 0} 586 | m_PrefabInstance: {fileID: 0} 587 | m_PrefabAsset: {fileID: 0} 588 | m_GameObject: {fileID: 531596782} 589 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 590 | m_LocalPosition: {x: 0, y: 0, z: 0} 591 | m_LocalScale: {x: 1, y: 1, z: 1} 592 | m_Children: [] 593 | m_Father: {fileID: 432530562} 594 | m_RootOrder: 0 595 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 596 | m_AnchorMin: {x: 0, y: 0} 597 | m_AnchorMax: {x: 1, y: 1} 598 | m_AnchoredPosition: {x: 0, y: 0} 599 | m_SizeDelta: {x: 0, y: 0} 600 | m_Pivot: {x: 0.5, y: 0.5} 601 | --- !u!114 &531596784 602 | MonoBehaviour: 603 | m_ObjectHideFlags: 0 604 | m_CorrespondingSourceObject: {fileID: 0} 605 | m_PrefabInstance: {fileID: 0} 606 | m_PrefabAsset: {fileID: 0} 607 | m_GameObject: {fileID: 531596782} 608 | m_Enabled: 1 609 | m_EditorHideFlags: 0 610 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 611 | m_Name: 612 | m_EditorClassIdentifier: 613 | m_Material: {fileID: 0} 614 | m_Color: {r: 0.196, g: 0.196, b: 0.196, a: 1} 615 | m_RaycastTarget: 1 616 | m_Maskable: 1 617 | m_OnCullStateChanged: 618 | m_PersistentCalls: 619 | m_Calls: [] 620 | m_FontData: 621 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 622 | m_FontSize: 14 623 | m_FontStyle: 0 624 | m_BestFit: 0 625 | m_MinSize: 10 626 | m_MaxSize: 40 627 | m_Alignment: 4 628 | m_AlignByGeometry: 0 629 | m_RichText: 1 630 | m_HorizontalOverflow: 0 631 | m_VerticalOverflow: 0 632 | m_LineSpacing: 1 633 | m_Text: Back 634 | --- !u!222 &531596785 635 | CanvasRenderer: 636 | m_ObjectHideFlags: 0 637 | m_CorrespondingSourceObject: {fileID: 0} 638 | m_PrefabInstance: {fileID: 0} 639 | m_PrefabAsset: {fileID: 0} 640 | m_GameObject: {fileID: 531596782} 641 | m_CullTransparentMesh: 0 642 | --- !u!1 &728638346 643 | GameObject: 644 | m_ObjectHideFlags: 0 645 | m_CorrespondingSourceObject: {fileID: 0} 646 | m_PrefabInstance: {fileID: 0} 647 | m_PrefabAsset: {fileID: 0} 648 | serializedVersion: 6 649 | m_Component: 650 | - component: {fileID: 728638347} 651 | - component: {fileID: 728638349} 652 | - component: {fileID: 728638348} 653 | m_Layer: 5 654 | m_Name: Text 655 | m_TagString: Untagged 656 | m_Icon: {fileID: 0} 657 | m_NavMeshLayer: 0 658 | m_StaticEditorFlags: 0 659 | m_IsActive: 1 660 | --- !u!224 &728638347 661 | RectTransform: 662 | m_ObjectHideFlags: 0 663 | m_CorrespondingSourceObject: {fileID: 0} 664 | m_PrefabInstance: {fileID: 0} 665 | m_PrefabAsset: {fileID: 0} 666 | m_GameObject: {fileID: 728638346} 667 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 668 | m_LocalPosition: {x: 0, y: 0, z: 0} 669 | m_LocalScale: {x: 1, y: 1, z: 1} 670 | m_Children: [] 671 | m_Father: {fileID: 2144323607} 672 | m_RootOrder: 1 673 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 674 | m_AnchorMin: {x: 0, y: 0} 675 | m_AnchorMax: {x: 1, y: 1} 676 | m_AnchoredPosition: {x: 0, y: -0.5} 677 | m_SizeDelta: {x: -20, y: -13} 678 | m_Pivot: {x: 0.5, y: 0.5} 679 | --- !u!114 &728638348 680 | MonoBehaviour: 681 | m_ObjectHideFlags: 0 682 | m_CorrespondingSourceObject: {fileID: 0} 683 | m_PrefabInstance: {fileID: 0} 684 | m_PrefabAsset: {fileID: 0} 685 | m_GameObject: {fileID: 728638346} 686 | m_Enabled: 1 687 | m_EditorHideFlags: 0 688 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 689 | m_Name: 690 | m_EditorClassIdentifier: 691 | m_Material: {fileID: 0} 692 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 693 | m_RaycastTarget: 1 694 | m_Maskable: 1 695 | m_OnCullStateChanged: 696 | m_PersistentCalls: 697 | m_Calls: [] 698 | m_FontData: 699 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 700 | m_FontSize: 12 701 | m_FontStyle: 0 702 | m_BestFit: 0 703 | m_MinSize: 10 704 | m_MaxSize: 40 705 | m_Alignment: 0 706 | m_AlignByGeometry: 0 707 | m_RichText: 0 708 | m_HorizontalOverflow: 0 709 | m_VerticalOverflow: 0 710 | m_LineSpacing: 1 711 | m_Text: 712 | --- !u!222 &728638349 713 | CanvasRenderer: 714 | m_ObjectHideFlags: 0 715 | m_CorrespondingSourceObject: {fileID: 0} 716 | m_PrefabInstance: {fileID: 0} 717 | m_PrefabAsset: {fileID: 0} 718 | m_GameObject: {fileID: 728638346} 719 | m_CullTransparentMesh: 0 720 | --- !u!1 &823457166 721 | GameObject: 722 | m_ObjectHideFlags: 0 723 | m_CorrespondingSourceObject: {fileID: 0} 724 | m_PrefabInstance: {fileID: 0} 725 | m_PrefabAsset: {fileID: 0} 726 | serializedVersion: 6 727 | m_Component: 728 | - component: {fileID: 823457167} 729 | m_Layer: 5 730 | m_Name: Sliding Area 731 | m_TagString: Untagged 732 | m_Icon: {fileID: 0} 733 | m_NavMeshLayer: 0 734 | m_StaticEditorFlags: 0 735 | m_IsActive: 1 736 | --- !u!224 &823457167 737 | RectTransform: 738 | m_ObjectHideFlags: 0 739 | m_CorrespondingSourceObject: {fileID: 0} 740 | m_PrefabInstance: {fileID: 0} 741 | m_PrefabAsset: {fileID: 0} 742 | m_GameObject: {fileID: 823457166} 743 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 744 | m_LocalPosition: {x: 0, y: 0, z: 0} 745 | m_LocalScale: {x: 1, y: 1, z: 1} 746 | m_Children: 747 | - {fileID: 1011219728} 748 | m_Father: {fileID: 155392643} 749 | m_RootOrder: 0 750 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 751 | m_AnchorMin: {x: 0, y: 0} 752 | m_AnchorMax: {x: 1, y: 1} 753 | m_AnchoredPosition: {x: 0, y: 0} 754 | m_SizeDelta: {x: -20, y: -20} 755 | m_Pivot: {x: 0.5, y: 0.5} 756 | --- !u!1 &1011219727 757 | GameObject: 758 | m_ObjectHideFlags: 0 759 | m_CorrespondingSourceObject: {fileID: 0} 760 | m_PrefabInstance: {fileID: 0} 761 | m_PrefabAsset: {fileID: 0} 762 | serializedVersion: 6 763 | m_Component: 764 | - component: {fileID: 1011219728} 765 | - component: {fileID: 1011219730} 766 | - component: {fileID: 1011219729} 767 | m_Layer: 5 768 | m_Name: Handle 769 | m_TagString: Untagged 770 | m_Icon: {fileID: 0} 771 | m_NavMeshLayer: 0 772 | m_StaticEditorFlags: 0 773 | m_IsActive: 1 774 | --- !u!224 &1011219728 775 | RectTransform: 776 | m_ObjectHideFlags: 0 777 | m_CorrespondingSourceObject: {fileID: 0} 778 | m_PrefabInstance: {fileID: 0} 779 | m_PrefabAsset: {fileID: 0} 780 | m_GameObject: {fileID: 1011219727} 781 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 782 | m_LocalPosition: {x: 0, y: 0, z: 0} 783 | m_LocalScale: {x: 1, y: 1, z: 1} 784 | m_Children: [] 785 | m_Father: {fileID: 823457167} 786 | m_RootOrder: 0 787 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 788 | m_AnchorMin: {x: 0, y: 0} 789 | m_AnchorMax: {x: 0, y: 0} 790 | m_AnchoredPosition: {x: 0, y: 0} 791 | m_SizeDelta: {x: 20, y: 20} 792 | m_Pivot: {x: 0.5, y: 0.5} 793 | --- !u!114 &1011219729 794 | MonoBehaviour: 795 | m_ObjectHideFlags: 0 796 | m_CorrespondingSourceObject: {fileID: 0} 797 | m_PrefabInstance: {fileID: 0} 798 | m_PrefabAsset: {fileID: 0} 799 | m_GameObject: {fileID: 1011219727} 800 | m_Enabled: 1 801 | m_EditorHideFlags: 0 802 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 803 | m_Name: 804 | m_EditorClassIdentifier: 805 | m_Material: {fileID: 0} 806 | m_Color: {r: 1, g: 1, b: 1, a: 1} 807 | m_RaycastTarget: 1 808 | m_Maskable: 1 809 | m_OnCullStateChanged: 810 | m_PersistentCalls: 811 | m_Calls: [] 812 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 813 | m_Type: 1 814 | m_PreserveAspect: 0 815 | m_FillCenter: 1 816 | m_FillMethod: 4 817 | m_FillAmount: 1 818 | m_FillClockwise: 1 819 | m_FillOrigin: 0 820 | m_UseSpriteMesh: 0 821 | m_PixelsPerUnitMultiplier: 1 822 | --- !u!222 &1011219730 823 | CanvasRenderer: 824 | m_ObjectHideFlags: 0 825 | m_CorrespondingSourceObject: {fileID: 0} 826 | m_PrefabInstance: {fileID: 0} 827 | m_PrefabAsset: {fileID: 0} 828 | m_GameObject: {fileID: 1011219727} 829 | m_CullTransparentMesh: 0 830 | --- !u!1 &1086899403 831 | GameObject: 832 | m_ObjectHideFlags: 0 833 | m_CorrespondingSourceObject: {fileID: 0} 834 | m_PrefabInstance: {fileID: 0} 835 | m_PrefabAsset: {fileID: 0} 836 | serializedVersion: 6 837 | m_Component: 838 | - component: {fileID: 1086899404} 839 | - component: {fileID: 1086899406} 840 | - component: {fileID: 1086899405} 841 | - component: {fileID: 1086899407} 842 | m_Layer: 5 843 | m_Name: Text 844 | m_TagString: Untagged 845 | m_Icon: {fileID: 0} 846 | m_NavMeshLayer: 0 847 | m_StaticEditorFlags: 0 848 | m_IsActive: 1 849 | --- !u!224 &1086899404 850 | RectTransform: 851 | m_ObjectHideFlags: 0 852 | m_CorrespondingSourceObject: {fileID: 0} 853 | m_PrefabInstance: {fileID: 0} 854 | m_PrefabAsset: {fileID: 0} 855 | m_GameObject: {fileID: 1086899403} 856 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 857 | m_LocalPosition: {x: 0, y: 0, z: 0} 858 | m_LocalScale: {x: 1, y: 1, z: 1} 859 | m_Children: [] 860 | m_Father: {fileID: 38156657} 861 | m_RootOrder: 0 862 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 863 | m_AnchorMin: {x: 0, y: 0} 864 | m_AnchorMax: {x: 1, y: 1} 865 | m_AnchoredPosition: {x: 0, y: 0.000030517578} 866 | m_SizeDelta: {x: 0, y: 0} 867 | m_Pivot: {x: 0.5, y: 1} 868 | --- !u!114 &1086899405 869 | MonoBehaviour: 870 | m_ObjectHideFlags: 0 871 | m_CorrespondingSourceObject: {fileID: 0} 872 | m_PrefabInstance: {fileID: 0} 873 | m_PrefabAsset: {fileID: 0} 874 | m_GameObject: {fileID: 1086899403} 875 | m_Enabled: 1 876 | m_EditorHideFlags: 0 877 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 878 | m_Name: 879 | m_EditorClassIdentifier: 880 | m_Material: {fileID: 0} 881 | m_Color: {r: 1, g: 1, b: 1, a: 1} 882 | m_RaycastTarget: 1 883 | m_Maskable: 1 884 | m_OnCullStateChanged: 885 | m_PersistentCalls: 886 | m_Calls: [] 887 | m_FontData: 888 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 889 | m_FontSize: 20 890 | m_FontStyle: 0 891 | m_BestFit: 0 892 | m_MinSize: 10 893 | m_MaxSize: 40 894 | m_Alignment: 0 895 | m_AlignByGeometry: 0 896 | m_RichText: 1 897 | m_HorizontalOverflow: 0 898 | m_VerticalOverflow: 0 899 | m_LineSpacing: 1 900 | m_Text: 901 | --- !u!222 &1086899406 902 | CanvasRenderer: 903 | m_ObjectHideFlags: 0 904 | m_CorrespondingSourceObject: {fileID: 0} 905 | m_PrefabInstance: {fileID: 0} 906 | m_PrefabAsset: {fileID: 0} 907 | m_GameObject: {fileID: 1086899403} 908 | m_CullTransparentMesh: 0 909 | --- !u!114 &1086899407 910 | MonoBehaviour: 911 | m_ObjectHideFlags: 0 912 | m_CorrespondingSourceObject: {fileID: 0} 913 | m_PrefabInstance: {fileID: 0} 914 | m_PrefabAsset: {fileID: 0} 915 | m_GameObject: {fileID: 1086899403} 916 | m_Enabled: 1 917 | m_EditorHideFlags: 0 918 | m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} 919 | m_Name: 920 | m_EditorClassIdentifier: 921 | m_HorizontalFit: 0 922 | m_VerticalFit: 2 923 | --- !u!1 &1201210458 924 | GameObject: 925 | m_ObjectHideFlags: 0 926 | m_CorrespondingSourceObject: {fileID: 0} 927 | m_PrefabInstance: {fileID: 0} 928 | m_PrefabAsset: {fileID: 0} 929 | serializedVersion: 6 930 | m_Component: 931 | - component: {fileID: 1201210459} 932 | - component: {fileID: 1201210461} 933 | - component: {fileID: 1201210460} 934 | m_Layer: 5 935 | m_Name: Placeholder 936 | m_TagString: Untagged 937 | m_Icon: {fileID: 0} 938 | m_NavMeshLayer: 0 939 | m_StaticEditorFlags: 0 940 | m_IsActive: 1 941 | --- !u!224 &1201210459 942 | RectTransform: 943 | m_ObjectHideFlags: 0 944 | m_CorrespondingSourceObject: {fileID: 0} 945 | m_PrefabInstance: {fileID: 0} 946 | m_PrefabAsset: {fileID: 0} 947 | m_GameObject: {fileID: 1201210458} 948 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 949 | m_LocalPosition: {x: 0, y: 0, z: 0} 950 | m_LocalScale: {x: 1, y: 1, z: 1} 951 | m_Children: [] 952 | m_Father: {fileID: 2144323607} 953 | m_RootOrder: 0 954 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 955 | m_AnchorMin: {x: 0, y: 0} 956 | m_AnchorMax: {x: 1, y: 1} 957 | m_AnchoredPosition: {x: 0, y: -0.5} 958 | m_SizeDelta: {x: -20, y: -13} 959 | m_Pivot: {x: 0.5, y: 0.5} 960 | --- !u!114 &1201210460 961 | MonoBehaviour: 962 | m_ObjectHideFlags: 0 963 | m_CorrespondingSourceObject: {fileID: 0} 964 | m_PrefabInstance: {fileID: 0} 965 | m_PrefabAsset: {fileID: 0} 966 | m_GameObject: {fileID: 1201210458} 967 | m_Enabled: 1 968 | m_EditorHideFlags: 0 969 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 970 | m_Name: 971 | m_EditorClassIdentifier: 972 | m_Material: {fileID: 0} 973 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5} 974 | m_RaycastTarget: 1 975 | m_Maskable: 1 976 | m_OnCullStateChanged: 977 | m_PersistentCalls: 978 | m_Calls: [] 979 | m_FontData: 980 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 981 | m_FontSize: 12 982 | m_FontStyle: 2 983 | m_BestFit: 0 984 | m_MinSize: 10 985 | m_MaxSize: 40 986 | m_Alignment: 0 987 | m_AlignByGeometry: 0 988 | m_RichText: 1 989 | m_HorizontalOverflow: 0 990 | m_VerticalOverflow: 0 991 | m_LineSpacing: 1 992 | m_Text: 993 | --- !u!222 &1201210461 994 | CanvasRenderer: 995 | m_ObjectHideFlags: 0 996 | m_CorrespondingSourceObject: {fileID: 0} 997 | m_PrefabInstance: {fileID: 0} 998 | m_PrefabAsset: {fileID: 0} 999 | m_GameObject: {fileID: 1201210458} 1000 | m_CullTransparentMesh: 0 1001 | --- !u!1 &1502237567 1002 | GameObject: 1003 | m_ObjectHideFlags: 0 1004 | m_CorrespondingSourceObject: {fileID: 0} 1005 | m_PrefabInstance: {fileID: 0} 1006 | m_PrefabAsset: {fileID: 0} 1007 | serializedVersion: 6 1008 | m_Component: 1009 | - component: {fileID: 1502237571} 1010 | - component: {fileID: 1502237570} 1011 | - component: {fileID: 1502237569} 1012 | - component: {fileID: 1502237568} 1013 | m_Layer: 5 1014 | m_Name: Canvas 1015 | m_TagString: Untagged 1016 | m_Icon: {fileID: 0} 1017 | m_NavMeshLayer: 0 1018 | m_StaticEditorFlags: 0 1019 | m_IsActive: 1 1020 | --- !u!114 &1502237568 1021 | MonoBehaviour: 1022 | m_ObjectHideFlags: 0 1023 | m_CorrespondingSourceObject: {fileID: 0} 1024 | m_PrefabInstance: {fileID: 0} 1025 | m_PrefabAsset: {fileID: 0} 1026 | m_GameObject: {fileID: 1502237567} 1027 | m_Enabled: 1 1028 | m_EditorHideFlags: 0 1029 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 1030 | m_Name: 1031 | m_EditorClassIdentifier: 1032 | m_IgnoreReversedGraphics: 1 1033 | m_BlockingObjects: 0 1034 | m_BlockingMask: 1035 | serializedVersion: 2 1036 | m_Bits: 4294967295 1037 | --- !u!114 &1502237569 1038 | MonoBehaviour: 1039 | m_ObjectHideFlags: 0 1040 | m_CorrespondingSourceObject: {fileID: 0} 1041 | m_PrefabInstance: {fileID: 0} 1042 | m_PrefabAsset: {fileID: 0} 1043 | m_GameObject: {fileID: 1502237567} 1044 | m_Enabled: 1 1045 | m_EditorHideFlags: 0 1046 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 1047 | m_Name: 1048 | m_EditorClassIdentifier: 1049 | m_UiScaleMode: 1 1050 | m_ReferencePixelsPerUnit: 100 1051 | m_ScaleFactor: 1 1052 | m_ReferenceResolution: {x: 800, y: 600} 1053 | m_ScreenMatchMode: 0 1054 | m_MatchWidthOrHeight: 0 1055 | m_PhysicalUnit: 3 1056 | m_FallbackScreenDPI: 96 1057 | m_DefaultSpriteDPI: 96 1058 | m_DynamicPixelsPerUnit: 1 1059 | --- !u!223 &1502237570 1060 | Canvas: 1061 | m_ObjectHideFlags: 0 1062 | m_CorrespondingSourceObject: {fileID: 0} 1063 | m_PrefabInstance: {fileID: 0} 1064 | m_PrefabAsset: {fileID: 0} 1065 | m_GameObject: {fileID: 1502237567} 1066 | m_Enabled: 1 1067 | serializedVersion: 3 1068 | m_RenderMode: 0 1069 | m_Camera: {fileID: 0} 1070 | m_PlaneDistance: 100 1071 | m_PixelPerfect: 0 1072 | m_ReceivesEvents: 1 1073 | m_OverrideSorting: 0 1074 | m_OverridePixelPerfect: 0 1075 | m_SortingBucketNormalizedSize: 0 1076 | m_AdditionalShaderChannelsFlag: 0 1077 | m_SortingLayerID: 0 1078 | m_SortingOrder: 0 1079 | m_TargetDisplay: 0 1080 | --- !u!224 &1502237571 1081 | RectTransform: 1082 | m_ObjectHideFlags: 0 1083 | m_CorrespondingSourceObject: {fileID: 0} 1084 | m_PrefabInstance: {fileID: 0} 1085 | m_PrefabAsset: {fileID: 0} 1086 | m_GameObject: {fileID: 1502237567} 1087 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1088 | m_LocalPosition: {x: 0, y: 0, z: 0} 1089 | m_LocalScale: {x: 0, y: 0, z: 0} 1090 | m_Children: 1091 | - {fileID: 432530562} 1092 | - {fileID: 1646839690} 1093 | - {fileID: 2144323607} 1094 | m_Father: {fileID: 0} 1095 | m_RootOrder: 1 1096 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1097 | m_AnchorMin: {x: 0, y: 0} 1098 | m_AnchorMax: {x: 0, y: 0} 1099 | m_AnchoredPosition: {x: 0, y: 0} 1100 | m_SizeDelta: {x: 0, y: 0} 1101 | m_Pivot: {x: 0, y: 0} 1102 | --- !u!1 &1646839689 1103 | GameObject: 1104 | m_ObjectHideFlags: 0 1105 | m_CorrespondingSourceObject: {fileID: 0} 1106 | m_PrefabInstance: {fileID: 0} 1107 | m_PrefabAsset: {fileID: 0} 1108 | serializedVersion: 6 1109 | m_Component: 1110 | - component: {fileID: 1646839690} 1111 | m_Layer: 5 1112 | m_Name: SystemInfoText 1113 | m_TagString: Untagged 1114 | m_Icon: {fileID: 0} 1115 | m_NavMeshLayer: 0 1116 | m_StaticEditorFlags: 0 1117 | m_IsActive: 1 1118 | --- !u!224 &1646839690 1119 | RectTransform: 1120 | m_ObjectHideFlags: 0 1121 | m_CorrespondingSourceObject: {fileID: 0} 1122 | m_PrefabInstance: {fileID: 0} 1123 | m_PrefabAsset: {fileID: 0} 1124 | m_GameObject: {fileID: 1646839689} 1125 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1126 | m_LocalPosition: {x: 0, y: 0, z: 0} 1127 | m_LocalScale: {x: 1, y: 1, z: 1} 1128 | m_Children: 1129 | - {fileID: 38156657} 1130 | - {fileID: 155392643} 1131 | m_Father: {fileID: 1502237571} 1132 | m_RootOrder: 1 1133 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1134 | m_AnchorMin: {x: 0, y: 0} 1135 | m_AnchorMax: {x: 1, y: 1} 1136 | m_AnchoredPosition: {x: 0, y: 0} 1137 | m_SizeDelta: {x: -40, y: -140} 1138 | m_Pivot: {x: 0.5, y: 0.5} 1139 | --- !u!1 &1787239744 1140 | GameObject: 1141 | m_ObjectHideFlags: 0 1142 | m_CorrespondingSourceObject: {fileID: 0} 1143 | m_PrefabInstance: {fileID: 0} 1144 | m_PrefabAsset: {fileID: 0} 1145 | serializedVersion: 6 1146 | m_Component: 1147 | - component: {fileID: 1787239749} 1148 | - component: {fileID: 1787239748} 1149 | - component: {fileID: 1787239746} 1150 | - component: {fileID: 1787239745} 1151 | - component: {fileID: 1787239750} 1152 | m_Layer: 0 1153 | m_Name: Main Camera 1154 | m_TagString: MainCamera 1155 | m_Icon: {fileID: 0} 1156 | m_NavMeshLayer: 0 1157 | m_StaticEditorFlags: 0 1158 | m_IsActive: 1 1159 | --- !u!81 &1787239745 1160 | AudioListener: 1161 | m_ObjectHideFlags: 0 1162 | m_CorrespondingSourceObject: {fileID: 0} 1163 | m_PrefabInstance: {fileID: 0} 1164 | m_PrefabAsset: {fileID: 0} 1165 | m_GameObject: {fileID: 1787239744} 1166 | m_Enabled: 1 1167 | --- !u!124 &1787239746 1168 | Behaviour: 1169 | m_ObjectHideFlags: 0 1170 | m_CorrespondingSourceObject: {fileID: 0} 1171 | m_PrefabInstance: {fileID: 0} 1172 | m_PrefabAsset: {fileID: 0} 1173 | m_GameObject: {fileID: 1787239744} 1174 | m_Enabled: 1 1175 | --- !u!20 &1787239748 1176 | Camera: 1177 | m_ObjectHideFlags: 0 1178 | m_CorrespondingSourceObject: {fileID: 0} 1179 | m_PrefabInstance: {fileID: 0} 1180 | m_PrefabAsset: {fileID: 0} 1181 | m_GameObject: {fileID: 1787239744} 1182 | m_Enabled: 1 1183 | serializedVersion: 2 1184 | m_ClearFlags: 1 1185 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844} 1186 | m_projectionMatrixMode: 1 1187 | m_GateFitMode: 2 1188 | m_FOVAxisMode: 0 1189 | m_SensorSize: {x: 36, y: 24} 1190 | m_LensShift: {x: 0, y: 0} 1191 | m_FocalLength: 50 1192 | m_NormalizedViewPortRect: 1193 | serializedVersion: 2 1194 | x: 0 1195 | y: 0 1196 | width: 1 1197 | height: 1 1198 | near clip plane: 0.3 1199 | far clip plane: 1000 1200 | field of view: 60 1201 | orthographic: 0 1202 | orthographic size: 5 1203 | m_Depth: -1 1204 | m_CullingMask: 1205 | serializedVersion: 2 1206 | m_Bits: 4294967295 1207 | m_RenderingPath: -1 1208 | m_TargetTexture: {fileID: 0} 1209 | m_TargetDisplay: 0 1210 | m_TargetEye: 3 1211 | m_HDR: 0 1212 | m_AllowMSAA: 1 1213 | m_AllowDynamicResolution: 0 1214 | m_ForceIntoRT: 0 1215 | m_OcclusionCulling: 1 1216 | m_StereoConvergence: 10 1217 | m_StereoSeparation: 0.022 1218 | --- !u!4 &1787239749 1219 | Transform: 1220 | m_ObjectHideFlags: 0 1221 | m_CorrespondingSourceObject: {fileID: 0} 1222 | m_PrefabInstance: {fileID: 0} 1223 | m_PrefabAsset: {fileID: 0} 1224 | m_GameObject: {fileID: 1787239744} 1225 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1226 | m_LocalPosition: {x: 0, y: 1, z: -10} 1227 | m_LocalScale: {x: 1, y: 1, z: 1} 1228 | m_Children: [] 1229 | m_Father: {fileID: 0} 1230 | m_RootOrder: 0 1231 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1232 | --- !u!114 &1787239750 1233 | MonoBehaviour: 1234 | m_ObjectHideFlags: 0 1235 | m_CorrespondingSourceObject: {fileID: 0} 1236 | m_PrefabInstance: {fileID: 0} 1237 | m_PrefabAsset: {fileID: 0} 1238 | m_GameObject: {fileID: 1787239744} 1239 | m_Enabled: 1 1240 | m_EditorHideFlags: 0 1241 | m_Script: {fileID: 11500000, guid: 4dfd6276778291b4c813ecadfd770b95, type: 3} 1242 | m_Name: 1243 | m_EditorClassIdentifier: 1244 | systemInfoText: {fileID: 1086899405} 1245 | systemInfoInputField: {fileID: 2144323609} 1246 | --- !u!1 &2144323606 1247 | GameObject: 1248 | m_ObjectHideFlags: 0 1249 | m_CorrespondingSourceObject: {fileID: 0} 1250 | m_PrefabInstance: {fileID: 0} 1251 | m_PrefabAsset: {fileID: 0} 1252 | serializedVersion: 6 1253 | m_Component: 1254 | - component: {fileID: 2144323607} 1255 | - component: {fileID: 2144323611} 1256 | - component: {fileID: 2144323610} 1257 | - component: {fileID: 2144323609} 1258 | m_Layer: 5 1259 | m_Name: SystemInfoInputField 1260 | m_TagString: Untagged 1261 | m_Icon: {fileID: 0} 1262 | m_NavMeshLayer: 0 1263 | m_StaticEditorFlags: 0 1264 | m_IsActive: 1 1265 | --- !u!224 &2144323607 1266 | RectTransform: 1267 | m_ObjectHideFlags: 0 1268 | m_CorrespondingSourceObject: {fileID: 0} 1269 | m_PrefabInstance: {fileID: 0} 1270 | m_PrefabAsset: {fileID: 0} 1271 | m_GameObject: {fileID: 2144323606} 1272 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1273 | m_LocalPosition: {x: 0, y: 0, z: 0} 1274 | m_LocalScale: {x: 1, y: 1, z: 1} 1275 | m_Children: 1276 | - {fileID: 1201210459} 1277 | - {fileID: 728638347} 1278 | m_Father: {fileID: 1502237571} 1279 | m_RootOrder: 2 1280 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1281 | m_AnchorMin: {x: 0, y: 0} 1282 | m_AnchorMax: {x: 1, y: 0} 1283 | m_AnchoredPosition: {x: -10, y: 60} 1284 | m_SizeDelta: {x: -20, y: 50} 1285 | m_Pivot: {x: 1, y: 1} 1286 | --- !u!114 &2144323609 1287 | MonoBehaviour: 1288 | m_ObjectHideFlags: 0 1289 | m_CorrespondingSourceObject: {fileID: 0} 1290 | m_PrefabInstance: {fileID: 0} 1291 | m_PrefabAsset: {fileID: 0} 1292 | m_GameObject: {fileID: 2144323606} 1293 | m_Enabled: 1 1294 | m_EditorHideFlags: 0 1295 | m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3} 1296 | m_Name: 1297 | m_EditorClassIdentifier: 1298 | m_Navigation: 1299 | m_Mode: 3 1300 | m_SelectOnUp: {fileID: 0} 1301 | m_SelectOnDown: {fileID: 0} 1302 | m_SelectOnLeft: {fileID: 0} 1303 | m_SelectOnRight: {fileID: 0} 1304 | m_Transition: 1 1305 | m_Colors: 1306 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 1307 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1308 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 1309 | m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 1310 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 1311 | m_ColorMultiplier: 1 1312 | m_FadeDuration: 0.1 1313 | m_SpriteState: 1314 | m_HighlightedSprite: {fileID: 0} 1315 | m_PressedSprite: {fileID: 0} 1316 | m_SelectedSprite: {fileID: 0} 1317 | m_DisabledSprite: {fileID: 0} 1318 | m_AnimationTriggers: 1319 | m_NormalTrigger: Normal 1320 | m_HighlightedTrigger: Highlighted 1321 | m_PressedTrigger: Pressed 1322 | m_SelectedTrigger: Highlighted 1323 | m_DisabledTrigger: Disabled 1324 | m_Interactable: 1 1325 | m_TargetGraphic: {fileID: 2144323610} 1326 | m_TextComponent: {fileID: 728638348} 1327 | m_Placeholder: {fileID: 1201210460} 1328 | m_ContentType: 0 1329 | m_InputType: 0 1330 | m_AsteriskChar: 42 1331 | m_KeyboardType: 0 1332 | m_LineType: 1 1333 | m_HideMobileInput: 0 1334 | m_CharacterValidation: 0 1335 | m_CharacterLimit: 0 1336 | m_OnEndEdit: 1337 | m_PersistentCalls: 1338 | m_Calls: [] 1339 | m_OnValueChanged: 1340 | m_PersistentCalls: 1341 | m_Calls: [] 1342 | m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 1343 | m_CustomCaretColor: 0 1344 | m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412} 1345 | m_Text: 1346 | m_CaretBlinkRate: 0.85 1347 | m_CaretWidth: 1 1348 | m_ReadOnly: 1 1349 | m_ShouldActivateOnSelect: 1 1350 | --- !u!114 &2144323610 1351 | MonoBehaviour: 1352 | m_ObjectHideFlags: 0 1353 | m_CorrespondingSourceObject: {fileID: 0} 1354 | m_PrefabInstance: {fileID: 0} 1355 | m_PrefabAsset: {fileID: 0} 1356 | m_GameObject: {fileID: 2144323606} 1357 | m_Enabled: 1 1358 | m_EditorHideFlags: 0 1359 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 1360 | m_Name: 1361 | m_EditorClassIdentifier: 1362 | m_Material: {fileID: 0} 1363 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1364 | m_RaycastTarget: 1 1365 | m_Maskable: 1 1366 | m_OnCullStateChanged: 1367 | m_PersistentCalls: 1368 | m_Calls: [] 1369 | m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0} 1370 | m_Type: 1 1371 | m_PreserveAspect: 0 1372 | m_FillCenter: 1 1373 | m_FillMethod: 4 1374 | m_FillAmount: 1 1375 | m_FillClockwise: 1 1376 | m_FillOrigin: 0 1377 | m_UseSpriteMesh: 0 1378 | m_PixelsPerUnitMultiplier: 1 1379 | --- !u!222 &2144323611 1380 | CanvasRenderer: 1381 | m_ObjectHideFlags: 0 1382 | m_CorrespondingSourceObject: {fileID: 0} 1383 | m_PrefabInstance: {fileID: 0} 1384 | m_PrefabAsset: {fileID: 0} 1385 | m_GameObject: {fileID: 2144323606} 1386 | m_CullTransparentMesh: 0 1387 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/ShowSystemInfo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf8508aa0b191ea4e88b6ea36d0f7157 3 | timeCreated: 1530717696 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/VideoRecordingExample.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d645ece02ec8a94fbc419acde9cd543 3 | folderAsset: yes 4 | timeCreated: 1530717696 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/ComicFilter.cs: -------------------------------------------------------------------------------- 1 | using OpenCVForUnity.CoreModule; 2 | using OpenCVForUnity.ImgprocModule; 3 | using OpenCVForUnity.UtilsModule; 4 | using System; 5 | 6 | namespace NatCorderWithOpenCVForUnityExample 7 | { 8 | 9 | public class ComicFilter 10 | { 11 | 12 | Mat grayMat; 13 | Mat maskMat; 14 | Mat screentoneMat; 15 | Mat grayDstMat; 16 | 17 | Mat grayLUT; 18 | Mat contrastAdjustmentsLUT; 19 | Mat kernel_dilate; 20 | Mat kernel_erode; 21 | Size blurSize; 22 | int blackThresh; 23 | bool drawMainLine; 24 | bool useNoiseFilter; 25 | 26 | 27 | public ComicFilter(int blackThresh = 60, int grayThresh = 120, int thickness = 5, bool useNoiseFilter = true) 28 | { 29 | this.blackThresh = blackThresh; 30 | this.drawMainLine = (thickness != 0); 31 | this.useNoiseFilter = useNoiseFilter; 32 | 33 | grayLUT = new Mat(1, 256, CvType.CV_8UC1); 34 | byte[] lutArray = new byte[256]; 35 | for (int i = 0; i < lutArray.Length; i++) 36 | { 37 | if (blackThresh <= i && i < grayThresh) 38 | lutArray[i] = 255; 39 | } 40 | MatUtils.copyToMat(lutArray, grayLUT); 41 | 42 | if (drawMainLine) 43 | { 44 | kernel_dilate = new Mat(thickness, thickness, CvType.CV_8UC1, new Scalar(1)); 45 | 46 | int erode = (thickness >= 5) ? 2 : 1; 47 | kernel_erode = new Mat(erode, erode, CvType.CV_8UC1, new Scalar(1)); 48 | 49 | int blur = (thickness >= 4) ? thickness - 1 : 3; 50 | blurSize = new Size(blur, blur); 51 | 52 | contrastAdjustmentsLUT = new Mat(1, 256, CvType.CV_8UC1); 53 | byte[] contrastAdjustmentsLUTArray = new byte[256]; 54 | for (int i = 0; i < contrastAdjustmentsLUTArray.Length; i++) 55 | { 56 | int a = (int)(i * 1.5f); 57 | contrastAdjustmentsLUTArray[i] = (a > byte.MaxValue) ? (byte)255 : (byte)a; 58 | 59 | } 60 | MatUtils.copyToMat(contrastAdjustmentsLUTArray, contrastAdjustmentsLUT); 61 | } 62 | } 63 | 64 | public void Process(Mat src, Mat dst, bool isBGR = false) 65 | { 66 | if (src == null) 67 | throw new ArgumentNullException("src == null"); 68 | if (dst == null) 69 | throw new ArgumentNullException("dst == null"); 70 | 71 | if (grayMat != null && (grayMat.width() != src.width() || grayMat.height() != src.height())) 72 | { 73 | grayMat.Dispose(); 74 | grayMat = null; 75 | maskMat.Dispose(); 76 | maskMat = null; 77 | screentoneMat.Dispose(); 78 | screentoneMat = null; 79 | grayDstMat.Dispose(); 80 | grayDstMat = null; 81 | } 82 | grayMat = grayMat ?? new Mat(src.height(), src.width(), CvType.CV_8UC1); 83 | maskMat = maskMat ?? new Mat(src.height(), src.width(), CvType.CV_8UC1); 84 | grayDstMat = grayDstMat ?? new Mat(src.height(), src.width(), CvType.CV_8UC1); 85 | 86 | if (screentoneMat == null) 87 | { 88 | // create a striped screentone. 89 | screentoneMat = new Mat(src.height(), src.width(), CvType.CV_8UC1, new Scalar(255)); 90 | for (int i = 0; i < screentoneMat.rows() * 2.5f; i = i + 4) 91 | { 92 | Imgproc.line(screentoneMat, new Point(0, 0 + i), new Point(screentoneMat.cols(), -screentoneMat.cols() + i), new Scalar(0), 1); 93 | } 94 | } 95 | 96 | if (src.type() == CvType.CV_8UC1) 97 | { 98 | src.copyTo(grayMat); 99 | } 100 | else if (dst.type() == CvType.CV_8UC3) 101 | { 102 | Imgproc.cvtColor(src, grayMat, (isBGR) ? Imgproc.COLOR_BGR2GRAY : Imgproc.COLOR_RGB2GRAY); 103 | } 104 | else 105 | { 106 | Imgproc.cvtColor(src, grayMat, (isBGR) ? Imgproc.COLOR_BGRA2GRAY : Imgproc.COLOR_RGBA2GRAY); 107 | } 108 | 109 | 110 | // binarize. 111 | Imgproc.threshold(grayMat, grayDstMat, blackThresh, 255.0, Imgproc.THRESH_BINARY); 112 | 113 | // draw striped screentone. 114 | Core.LUT(grayMat, grayLUT, maskMat); 115 | screentoneMat.copyTo(grayDstMat, maskMat); 116 | 117 | // draw main line. 118 | if (drawMainLine) 119 | { 120 | Core.LUT(grayMat, contrastAdjustmentsLUT, maskMat); // = grayMat.convertTo(maskMat, -1, 1.5, 0); 121 | 122 | if (useNoiseFilter) 123 | { 124 | Imgproc.blur(maskMat, grayMat, blurSize); 125 | Imgproc.dilate(grayMat, maskMat, kernel_dilate); 126 | } 127 | else 128 | { 129 | Imgproc.dilate(maskMat, grayMat, kernel_dilate); 130 | } 131 | Core.absdiff(grayMat, maskMat, grayMat); 132 | Imgproc.threshold(grayMat, maskMat, 25, 255.0, Imgproc.THRESH_BINARY); 133 | if (useNoiseFilter) 134 | { 135 | Imgproc.erode(maskMat, grayMat, kernel_erode); 136 | Core.bitwise_not(grayMat, maskMat); 137 | maskMat.copyTo(grayDstMat, grayMat); 138 | } 139 | else 140 | { 141 | Core.bitwise_not(maskMat, grayMat); 142 | grayMat.copyTo(grayDstMat, maskMat); 143 | } 144 | } 145 | 146 | 147 | if (dst.type() == CvType.CV_8UC1) 148 | { 149 | grayDstMat.copyTo(dst); 150 | } 151 | else if (dst.type() == CvType.CV_8UC3) 152 | { 153 | Imgproc.cvtColor(grayDstMat, dst, (isBGR) ? Imgproc.COLOR_GRAY2BGR : Imgproc.COLOR_GRAY2RGB); 154 | } 155 | else 156 | { 157 | Imgproc.cvtColor(grayDstMat, dst, (isBGR) ? Imgproc.COLOR_GRAY2BGRA : Imgproc.COLOR_GRAY2RGBA); 158 | } 159 | } 160 | 161 | public void Dispose() 162 | { 163 | foreach (var mat in new[] { grayMat, maskMat, screentoneMat, grayDstMat, grayLUT, kernel_dilate, kernel_erode, contrastAdjustmentsLUT }) 164 | if (mat != null) mat.Dispose(); 165 | 166 | grayDstMat = 167 | screentoneMat = 168 | maskMat = 169 | grayMat = 170 | grayLUT = 171 | kernel_dilate = 172 | kernel_erode = 173 | contrastAdjustmentsLUT = null; 174 | } 175 | } 176 | } -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/ComicFilter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0960f693dee86104da1c5538dcd9d26d 3 | timeCreated: 1530717696 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/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/ExampleMaterial.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: ExampleMaterial 10 | m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0} 11 | m_ShaderKeywords: 12 | m_LightmapFlags: 5 13 | m_EnableInstancingVariants: 0 14 | m_CustomRenderQueue: -1 15 | stringTagMap: {} 16 | disabledShaderPasses: [] 17 | m_SavedProperties: 18 | serializedVersion: 3 19 | m_TexEnvs: 20 | - _MainTex: 21 | m_Texture: {fileID: 2800000, guid: 9a89f0244015e104fb922e309d53caf1, type: 3} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | m_Floats: [] 25 | m_Colors: 26 | - _Color: {r: 1, g: 1, b: 1, a: 1} 27 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/ExampleMaterial.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c2aac2dcd4396d4a8423a29591d6581 3 | timeCreated: 1530717698 4 | licenseType: Free 5 | NativeFormatImporter: 6 | mainObjectFileID: -1 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/VideoRecordingExample.cs: -------------------------------------------------------------------------------- 1 | using NatSuite.Recorders; 2 | using NatSuite.Recorders.Clocks; 3 | using NatSuite.Recorders.Inputs; 4 | using NatSuite.Sharing; 5 | using OpenCVForUnity.CoreModule; 6 | using OpenCVForUnity.ImgprocModule; 7 | using OpenCVForUnity.UnityUtils; 8 | using OpenCVForUnity.UnityUtils.Helper; 9 | using OpenCVForUnity.UtilsModule; 10 | using System; 11 | using System.Collections; 12 | using System.Threading; 13 | using System.Threading.Tasks; 14 | using UnityEngine; 15 | using UnityEngine.SceneManagement; 16 | using UnityEngine.UI; 17 | using UnityEngine.Video; 18 | 19 | namespace NatCorderWithOpenCVForUnityExample 20 | { 21 | /// 22 | /// VideoRecording Example 23 | /// 24 | [RequireComponent(typeof(WebCamTextureToMatHelper))] 25 | public class VideoRecordingExample : MonoBehaviour 26 | { 27 | /// 28 | /// The requested resolution. 29 | /// 30 | public ResolutionPreset requestedResolution = ResolutionPreset._640x480; 31 | 32 | /// 33 | /// The requested resolution dropdown. 34 | /// 35 | public Dropdown requestedResolutionDropdown; 36 | 37 | [Space(20)] 38 | [Header("Recording")] 39 | 40 | /// 41 | /// The type of container. 42 | /// 43 | public ContainerPreset container = ContainerPreset.MP4; 44 | 45 | /// 46 | /// The container dropdown. 47 | /// 48 | public Dropdown containerDropdown; 49 | 50 | /// 51 | /// Determines if applies the comic filter. 52 | /// 53 | public bool applyComicFilter; 54 | 55 | /// 56 | /// The apply comic filter toggle. 57 | /// 58 | public Toggle applyComicFilterToggle; 59 | 60 | /// 61 | /// The video bitrate. 62 | /// 63 | public VideoBitRatePreset videoBitRate = VideoBitRatePreset._10Mbps; 64 | 65 | /// 66 | /// The video bitrate frequency. 67 | /// 68 | public Dropdown videoBitRateDropdown; 69 | 70 | /// 71 | /// The audio bitrate. 72 | /// 73 | public AudioBitRatePreset audioBitRate = AudioBitRatePreset._64Kbps; 74 | 75 | /// 76 | /// The audio bitrate frequency. 77 | /// 78 | public Dropdown audioBitRateDropdown; 79 | 80 | [Header("Microphone")] 81 | 82 | /// 83 | /// Determines if record microphone audio. 84 | /// 85 | public bool recordMicrophoneAudio; 86 | 87 | /// 88 | /// The record microphone audio toggle. 89 | /// 90 | public Toggle recordMicrophoneAudioToggle; 91 | 92 | [Space(20)] 93 | 94 | /// 95 | /// The record video button. 96 | /// 97 | public Button recordVideoButton; 98 | 99 | /// 100 | /// The save path input field. 101 | /// 102 | public InputField savePathInputField; 103 | 104 | /// 105 | /// The play video button. 106 | /// 107 | public Button playVideoButton; 108 | 109 | /// 110 | /// The play video full screen button. 111 | /// 112 | public Button playVideoFullScreenButton; 113 | 114 | [Space(20)] 115 | 116 | /// 117 | /// The share button. 118 | /// 119 | public Button shareButton; 120 | 121 | /// 122 | /// The save to CameraRoll button. 123 | /// 124 | public Button saveToCameraRollButton; 125 | 126 | /// 127 | /// The texture. 128 | /// 129 | Texture2D texture; 130 | 131 | /// 132 | /// The webcam texture to mat helper. 133 | /// 134 | WebCamTextureToMatHelper webCamTextureToMatHelper; 135 | 136 | IMediaRecorder videoRecorder; 137 | 138 | AudioSource microphoneSource; 139 | 140 | AudioInput audioInput; 141 | 142 | IClock recordingClock; 143 | 144 | CancellationTokenSource cancellationTokenSource; 145 | 146 | const int MAX_RECORDING_TIME = 10; // Seconds 147 | 148 | string videoPath = ""; 149 | 150 | VideoPlayer videoPlayer; 151 | 152 | bool isVideoPlaying; 153 | 154 | bool isVideoRecording; 155 | 156 | bool isFinishWriting; 157 | 158 | int frameCount; 159 | 160 | int recordEveryNthFrame; 161 | 162 | int recordingWidth; 163 | int recordingHeight; 164 | int videoFramerate; 165 | int audioSampleRate; 166 | int audioChannelCount; 167 | float frameDuration; 168 | 169 | ComicFilter comicFilter; 170 | 171 | string exampleTitle = ""; 172 | string exampleSceneTitle = ""; 173 | string settingInfo1 = ""; 174 | string settingInfo2 = ""; 175 | string settingInfoGIF = ""; 176 | string settingInfoJPG = ""; 177 | Scalar textColor = new Scalar(255, 255, 255, 255); 178 | Point textPos = new Point(); 179 | 180 | #if !OPENCV_USE_UNSAFE_CODE 181 | byte[] pixelBuffer; 182 | #endif 183 | 184 | /// 185 | /// The FPS monitor. 186 | /// 187 | FpsMonitor fpsMonitor; 188 | 189 | // Use this for initialization 190 | void Start() 191 | { 192 | exampleTitle = "[NatCorderWithOpenCVForUnity Example] (" + NatCorderWithOpenCVForUnityExample.GetNatCorderVersion() + ")"; 193 | exampleSceneTitle = "- Video Recording Example"; 194 | 195 | fpsMonitor = GetComponent(); 196 | 197 | webCamTextureToMatHelper = gameObject.GetComponent(); 198 | int width, height; 199 | Dimensions(requestedResolution, out width, out height); 200 | webCamTextureToMatHelper.requestedWidth = width; 201 | webCamTextureToMatHelper.requestedHeight = height; 202 | 203 | #if UNITY_ANDROID && !UNITY_EDITOR 204 | // Avoids the front camera low light issue that occurs in only some Android devices (e.g. Google Pixel, Pixel2). 205 | webCamTextureToMatHelper.avoidAndroidFrontCameraLowLightIssue = true; 206 | #endif 207 | webCamTextureToMatHelper.Initialize(); 208 | 209 | 210 | microphoneSource = gameObject.AddComponent(); 211 | videoPlayer = gameObject.AddComponent(); 212 | 213 | 214 | comicFilter = new ComicFilter(); 215 | 216 | // Update GUI state 217 | requestedResolutionDropdown.value = (int)requestedResolution; 218 | containerDropdown.value = (int)container; 219 | videoBitRateDropdown.value = Array.IndexOf(System.Enum.GetNames(typeof(VideoBitRatePreset)), videoBitRate.ToString()); 220 | audioBitRateDropdown.value = Array.IndexOf(System.Enum.GetNames(typeof(AudioBitRatePreset)), audioBitRate.ToString()); 221 | applyComicFilterToggle.isOn = applyComicFilter; 222 | recordMicrophoneAudioToggle.isOn = recordMicrophoneAudio; 223 | } 224 | 225 | /// 226 | /// Raises the webcam texture to mat helper initialized event. 227 | /// 228 | public void OnWebCamTextureToMatHelperInitialized() 229 | { 230 | Debug.Log("OnWebCamTextureToMatHelperInitialized"); 231 | 232 | Mat webCamTextureMat = webCamTextureToMatHelper.GetMat(); 233 | 234 | texture = new Texture2D(webCamTextureMat.cols(), webCamTextureMat.rows(), TextureFormat.RGBA32, false); 235 | 236 | #if !OPENCV_USE_UNSAFE_CODE 237 | pixelBuffer = new byte[webCamTextureMat.cols() * webCamTextureMat.rows() * 4]; 238 | #endif 239 | 240 | gameObject.GetComponent().material.mainTexture = texture; 241 | 242 | gameObject.transform.localScale = new Vector3(webCamTextureMat.cols(), webCamTextureMat.rows(), 1); 243 | Debug.Log("Screen.width " + Screen.width + " Screen.height " + Screen.height + " Screen.orientation " + Screen.orientation); 244 | 245 | if (fpsMonitor != null) 246 | { 247 | fpsMonitor.Add("width", webCamTextureToMatHelper.GetWidth().ToString()); 248 | fpsMonitor.Add("height", webCamTextureToMatHelper.GetHeight().ToString()); 249 | fpsMonitor.Add("isFrontFacing", webCamTextureToMatHelper.IsFrontFacing().ToString()); 250 | fpsMonitor.Add("rotate90Degree", webCamTextureToMatHelper.rotate90Degree.ToString()); 251 | fpsMonitor.Add("flipVertical", webCamTextureToMatHelper.flipVertical.ToString()); 252 | fpsMonitor.Add("flipHorizontal", webCamTextureToMatHelper.flipHorizontal.ToString()); 253 | fpsMonitor.Add("orientation", Screen.orientation.ToString()); 254 | } 255 | 256 | 257 | float width = webCamTextureMat.width(); 258 | float height = webCamTextureMat.height(); 259 | 260 | float widthScale = (float)Screen.width / width; 261 | float heightScale = (float)Screen.height / height; 262 | if (widthScale < heightScale) 263 | { 264 | Camera.main.orthographicSize = (width * (float)Screen.height / (float)Screen.width) / 2; 265 | } 266 | else 267 | { 268 | Camera.main.orthographicSize = height / 2; 269 | } 270 | } 271 | 272 | /// 273 | /// Raises the webcam texture to mat helper disposed event. 274 | /// 275 | public void OnWebCamTextureToMatHelperDisposed() 276 | { 277 | Debug.Log("OnWebCamTextureToMatHelperDisposed"); 278 | 279 | CancelRecording(); 280 | StopVideo(); 281 | 282 | if (texture != null) 283 | { 284 | Texture2D.Destroy(texture); 285 | texture = null; 286 | } 287 | } 288 | 289 | /// 290 | /// Raises the webcam texture to mat helper error occurred event. 291 | /// 292 | /// Error code. 293 | public void OnWebCamTextureToMatHelperErrorOccurred(WebCamTextureToMatHelper.ErrorCode errorCode) 294 | { 295 | Debug.Log("OnWebCamTextureToMatHelperErrorOccurred " + errorCode); 296 | } 297 | 298 | // Update is called once per frame 299 | void Update() 300 | { 301 | if (webCamTextureToMatHelper.IsPlaying() && webCamTextureToMatHelper.DidUpdateThisFrame()) 302 | { 303 | 304 | Mat rgbaMat = webCamTextureToMatHelper.GetMat(); 305 | 306 | if (applyComicFilter) 307 | comicFilter.Process(rgbaMat, rgbaMat); 308 | 309 | if (isVideoRecording && !isFinishWriting) 310 | { 311 | textPos.x = 5; 312 | textPos.y = rgbaMat.rows() - 70; 313 | Imgproc.putText(rgbaMat, exampleTitle, textPos, Imgproc.FONT_HERSHEY_SIMPLEX, 0.5, textColor, 1, Imgproc.LINE_AA, false); 314 | textPos.y = rgbaMat.rows() - 50; 315 | Imgproc.putText(rgbaMat, exampleSceneTitle, textPos, Imgproc.FONT_HERSHEY_SIMPLEX, 0.5, textColor, 1, Imgproc.LINE_AA, false); 316 | if (container == ContainerPreset.MP4 || container == ContainerPreset.HEVC) 317 | { 318 | textPos.y = rgbaMat.rows() - 30; 319 | Imgproc.putText(rgbaMat, settingInfo1, textPos, Imgproc.FONT_HERSHEY_SIMPLEX, 0.5, textColor, 1, Imgproc.LINE_AA, false); 320 | textPos.y = rgbaMat.rows() - 10; 321 | Imgproc.putText(rgbaMat, settingInfo2, textPos, Imgproc.FONT_HERSHEY_SIMPLEX, 0.5, textColor, 1, Imgproc.LINE_AA, false); 322 | } 323 | else if (container == ContainerPreset.GIF) 324 | { 325 | textPos.y = rgbaMat.rows() - 30; 326 | Imgproc.putText(rgbaMat, settingInfoGIF, textPos, Imgproc.FONT_HERSHEY_SIMPLEX, 0.5, textColor, 1, Imgproc.LINE_AA, false); 327 | } 328 | else if (container == ContainerPreset.JPG) 329 | { 330 | textPos.y = rgbaMat.rows() - 30; 331 | Imgproc.putText(rgbaMat, settingInfoJPG, textPos, Imgproc.FONT_HERSHEY_SIMPLEX, 0.5, textColor, 1, Imgproc.LINE_AA, false); 332 | } 333 | } 334 | 335 | // Upload the image Mat data to the Texture2D. 336 | // (The internal processing of the fastMatToTexture method restore the image Mat data to Unity coordinate system) 337 | Utils.fastMatToTexture2D(rgbaMat, texture); 338 | 339 | // Record frames 340 | if (videoRecorder != null && (isVideoRecording && !isFinishWriting) && frameCount++ % recordEveryNthFrame == 0) 341 | { 342 | #if !OPENCV_USE_UNSAFE_CODE 343 | MatUtils.copyFromMat(rgbaMat, pixelBuffer); 344 | videoRecorder.CommitFrame(pixelBuffer, recordingClock.timestamp); 345 | #else 346 | unsafe 347 | { 348 | videoRecorder.CommitFrame((void*)rgbaMat.dataAddr(), recordingClock.timestamp); 349 | } 350 | #endif 351 | } 352 | } 353 | 354 | if (isVideoPlaying && videoPlayer.isPlaying) 355 | { 356 | gameObject.GetComponent().sharedMaterial.mainTexture = videoPlayer.texture; 357 | } 358 | } 359 | 360 | private async Task StartRecording() 361 | { 362 | if (isVideoPlaying || isVideoRecording || isFinishWriting) 363 | return; 364 | 365 | Debug.Log("StartRecording ()"); 366 | 367 | // First make sure recording microphone is only on MP4 or HEVC 368 | recordMicrophoneAudio = recordMicrophoneAudioToggle.isOn; 369 | recordMicrophoneAudio &= (container == ContainerPreset.MP4 || container == ContainerPreset.HEVC); 370 | // Create recording configurations 371 | recordingWidth = webCamTextureToMatHelper.GetWidth(); 372 | recordingHeight = webCamTextureToMatHelper.GetHeight(); 373 | videoFramerate = 30; 374 | audioSampleRate = recordMicrophoneAudio ? AudioSettings.outputSampleRate : 0; 375 | audioChannelCount = recordMicrophoneAudio ? (int)AudioSettings.speakerMode : 0; 376 | frameDuration = 0.1f; 377 | 378 | // Create video recorder 379 | recordingClock = new RealtimeClock(); 380 | if (container == ContainerPreset.MP4) 381 | { 382 | videoRecorder = new MP4Recorder( 383 | recordingWidth, 384 | recordingHeight, 385 | videoFramerate, 386 | audioSampleRate, 387 | audioChannelCount, 388 | (int)videoBitRate, 389 | audioBitRate: (int)audioBitRate 390 | ); 391 | recordEveryNthFrame = 1; 392 | } 393 | else if (container == ContainerPreset.HEVC) 394 | { 395 | videoRecorder = new HEVCRecorder( 396 | recordingWidth, 397 | recordingHeight, 398 | videoFramerate, 399 | audioSampleRate, 400 | audioChannelCount, 401 | (int)videoBitRate, 402 | audioBitRate: (int)audioBitRate 403 | ); 404 | recordEveryNthFrame = 1; 405 | } 406 | else if (container == ContainerPreset.GIF) 407 | { 408 | videoRecorder = new GIFRecorder( 409 | recordingWidth, 410 | recordingHeight, 411 | frameDuration 412 | ); 413 | recordEveryNthFrame = 5; 414 | } 415 | else if (container == ContainerPreset.JPG) // macOS and Windows platform only. 416 | { 417 | videoRecorder = new JPGRecorder( 418 | recordingWidth, 419 | recordingHeight 420 | ); 421 | recordEveryNthFrame = 5; 422 | } 423 | frameCount = 0; 424 | 425 | 426 | 427 | // Start recording 428 | isVideoRecording = true; 429 | 430 | HideAllVideoUI(); 431 | recordVideoButton.interactable = true; 432 | recordVideoButton.GetComponentInChildren().color = Color.red; 433 | 434 | CreateSettingInfo(); 435 | 436 | // Start microphone and create audio input 437 | if (recordMicrophoneAudio) 438 | { 439 | await StartMicrophone(); 440 | audioInput = new AudioInput(videoRecorder, recordingClock, microphoneSource, true); 441 | } 442 | // Unmute microphone 443 | microphoneSource.mute = audioInput == null; 444 | 445 | // Start countdown 446 | cancellationTokenSource = new CancellationTokenSource(); 447 | try 448 | { 449 | Debug.Log("Countdown start."); 450 | await CountdownAsync( 451 | sec => 452 | { 453 | string str = "Recording"; 454 | for (int i = 0; i < sec; i++) 455 | { 456 | str += "."; 457 | } 458 | 459 | if (fpsMonitor != null) fpsMonitor.consoleText = str; 460 | 461 | }, MAX_RECORDING_TIME, cancellationTokenSource.Token); 462 | Debug.Log("Countdown end."); 463 | } 464 | catch (OperationCanceledException e) 465 | { 466 | if (e.CancellationToken == cancellationTokenSource.Token) 467 | { 468 | Debug.Log("Countdown canceled."); 469 | } 470 | } 471 | cancellationTokenSource.Dispose(); 472 | cancellationTokenSource = null; 473 | 474 | if (this != null && isActiveAndEnabled) 475 | await FinishRecording(); 476 | } 477 | 478 | private void CancelRecording() 479 | { 480 | if (!isVideoRecording || isFinishWriting) 481 | return; 482 | 483 | if (cancellationTokenSource != null) 484 | cancellationTokenSource.Cancel(true); 485 | } 486 | 487 | private async Task FinishRecording() 488 | { 489 | if (!isVideoRecording || isFinishWriting) 490 | return; 491 | 492 | // Mute microphone 493 | microphoneSource.mute = true; 494 | 495 | // Stop the microphone if we used it for recording 496 | if (recordMicrophoneAudio) 497 | { 498 | StopMicrophone(); 499 | audioInput.Dispose(); 500 | audioInput = null; 501 | } 502 | 503 | if (fpsMonitor != null) fpsMonitor.consoleText = "FinishWriting..."; 504 | 505 | // Stop recording 506 | isFinishWriting = true; 507 | try 508 | { 509 | var path = await videoRecorder.FinishWriting(); 510 | videoPath = path; 511 | Debug.Log("Saved recording to: " + videoPath); 512 | savePathInputField.text = videoPath; 513 | } 514 | catch (ApplicationException e) 515 | { 516 | Debug.Log(e.Message); 517 | savePathInputField.text = e.Message; 518 | } 519 | isFinishWriting = false; 520 | 521 | if (fpsMonitor != null) fpsMonitor.consoleText = ""; 522 | 523 | ShowAllVideoUI(); 524 | recordVideoButton.GetComponentInChildren().color = Color.black; 525 | 526 | isVideoRecording = false; 527 | } 528 | 529 | private Task StartMicrophone() 530 | { 531 | var task = new TaskCompletionSource(); 532 | StartCoroutine(CreateMicrophoneClip(granted => 533 | { 534 | microphoneSource.Play(); 535 | task.SetResult(granted); 536 | })); 537 | 538 | return task.Task; 539 | } 540 | 541 | private IEnumerator CreateMicrophoneClip(Action completionHandler) 542 | { 543 | // Create a microphone clip 544 | microphoneSource.mute = 545 | microphoneSource.loop = true; 546 | microphoneSource.bypassEffects = 547 | microphoneSource.bypassListenerEffects = false; 548 | microphoneSource.clip = Microphone.Start(null, true, 1, AudioSettings.outputSampleRate); 549 | yield return new WaitUntil(() => Microphone.GetPosition(null) > 0); 550 | completionHandler(true); 551 | } 552 | 553 | private void StopMicrophone() 554 | { 555 | // Stop microphone 556 | microphoneSource.Stop(); 557 | Microphone.End(null); 558 | } 559 | 560 | private async Task CountdownAsync(Action countdownHandler, int sec = 10, CancellationToken cancellationToken = default(CancellationToken)) 561 | { 562 | for (int i = sec; i > 0; i--) 563 | { 564 | cancellationToken.ThrowIfCancellationRequested(); 565 | countdownHandler(i); 566 | await Task.Delay(1000, cancellationToken); 567 | } 568 | cancellationToken.ThrowIfCancellationRequested(); 569 | countdownHandler(0); 570 | } 571 | 572 | 573 | private void PlayVideo(string path) 574 | { 575 | if (isVideoPlaying || isVideoRecording || isFinishWriting || string.IsNullOrEmpty(path)) 576 | return; 577 | 578 | Debug.Log("PlayVideo ()"); 579 | 580 | isVideoPlaying = true; 581 | 582 | // Playback the video 583 | videoPlayer.renderMode = VideoRenderMode.APIOnly; 584 | videoPlayer.playOnAwake = false; 585 | videoPlayer.isLooping = false; 586 | 587 | // Unmute microphone 588 | microphoneSource.mute = false; 589 | microphoneSource.playOnAwake = false; 590 | 591 | videoPlayer.source = VideoSource.Url; 592 | videoPlayer.url = path; 593 | videoPlayer.audioOutputMode = VideoAudioOutputMode.AudioSource; 594 | videoPlayer.controlledAudioTrackCount = 1; 595 | videoPlayer.EnableAudioTrack(0, true); 596 | videoPlayer.SetTargetAudioSource(0, microphoneSource); 597 | 598 | videoPlayer.prepareCompleted += PrepareCompleted; 599 | videoPlayer.loopPointReached += EndReached; 600 | 601 | videoPlayer.Prepare(); 602 | 603 | HideAllVideoUI(); 604 | } 605 | 606 | private void PrepareCompleted(VideoPlayer vp) 607 | { 608 | Debug.Log("PrepareCompleted ()"); 609 | 610 | vp.prepareCompleted -= PrepareCompleted; 611 | 612 | vp.Play(); 613 | 614 | webCamTextureToMatHelper.Pause(); 615 | } 616 | 617 | private void EndReached(VideoPlayer vp) 618 | { 619 | Debug.Log("EndReached ()"); 620 | 621 | StopVideo(); 622 | } 623 | 624 | private void StopVideo() 625 | { 626 | if (!isVideoPlaying) 627 | return; 628 | 629 | Debug.Log("StopVideo ()"); 630 | 631 | videoPlayer.loopPointReached -= EndReached; 632 | 633 | if (videoPlayer.isPlaying) 634 | videoPlayer.Stop(); 635 | 636 | // Mute microphone 637 | microphoneSource.mute = true; 638 | 639 | isVideoPlaying = false; 640 | 641 | if (this != null && isActiveAndEnabled) 642 | { 643 | gameObject.GetComponent().sharedMaterial.mainTexture = texture; 644 | webCamTextureToMatHelper.Play(); 645 | ShowAllVideoUI(); 646 | } 647 | } 648 | 649 | private void ShowAllVideoUI() 650 | { 651 | requestedResolutionDropdown.interactable = true; 652 | containerDropdown.interactable = true; 653 | videoBitRateDropdown.interactable = true; 654 | audioBitRateDropdown.interactable = true; 655 | applyComicFilterToggle.interactable = true; 656 | recordMicrophoneAudioToggle.interactable = true; 657 | recordVideoButton.interactable = true; 658 | savePathInputField.interactable = true; 659 | playVideoButton.interactable = true; 660 | playVideoFullScreenButton.interactable = true; 661 | shareButton.interactable = true; 662 | saveToCameraRollButton.interactable = true; 663 | } 664 | 665 | private void HideAllVideoUI() 666 | { 667 | requestedResolutionDropdown.interactable = false; 668 | containerDropdown.interactable = false; 669 | videoBitRateDropdown.interactable = false; 670 | audioBitRateDropdown.interactable = false; 671 | applyComicFilterToggle.interactable = false; 672 | recordMicrophoneAudioToggle.interactable = false; 673 | recordVideoButton.interactable = false; 674 | savePathInputField.interactable = false; 675 | playVideoButton.interactable = false; 676 | playVideoFullScreenButton.interactable = false; 677 | shareButton.interactable = false; 678 | saveToCameraRollButton.interactable = false; 679 | } 680 | 681 | private void CreateSettingInfo() 682 | { 683 | settingInfo1 = "- [" + container + "] SIZE:" + recordingWidth + "x" + recordingHeight + " FPS:" + videoFramerate; 684 | settingInfo2 = "- ASR:" + audioSampleRate + " ACh:" + audioChannelCount + " VBR:" + (int)videoBitRate + " ABR:" + (int)audioBitRate; 685 | settingInfoGIF = "- [" + container + "] SIZE:" + recordingWidth + "x" + recordingHeight + " FrameDur:" + frameDuration; 686 | settingInfoJPG = "- [" + container + "] SIZE:" + recordingWidth + "x" + recordingHeight; 687 | } 688 | 689 | /// 690 | /// Raises the destroy event. 691 | /// 692 | void OnDestroy() 693 | { 694 | webCamTextureToMatHelper.Dispose(); 695 | 696 | if (comicFilter != null) 697 | comicFilter.Dispose(); 698 | } 699 | 700 | /// 701 | /// Raises the back button click event. 702 | /// 703 | public void OnBackButtonClick() 704 | { 705 | SceneManager.LoadScene("NatCorderWithOpenCVForUnityExample"); 706 | } 707 | 708 | /// 709 | /// Raises the play button click event. 710 | /// 711 | public void OnPlayButtonClick() 712 | { 713 | webCamTextureToMatHelper.Play(); 714 | } 715 | 716 | /// 717 | /// Raises the pause button click event. 718 | /// 719 | public void OnPauseButtonClick() 720 | { 721 | webCamTextureToMatHelper.Pause(); 722 | } 723 | 724 | /// 725 | /// Raises the stop button click event. 726 | /// 727 | public void OnStopButtonClick() 728 | { 729 | webCamTextureToMatHelper.Stop(); 730 | } 731 | 732 | /// 733 | /// Raises the change camera button click event. 734 | /// 735 | public void OnChangeCameraButtonClick() 736 | { 737 | webCamTextureToMatHelper.requestedIsFrontFacing = !webCamTextureToMatHelper.IsFrontFacing(); 738 | } 739 | 740 | /// 741 | /// Raises the requested resolution dropdown value changed event. 742 | /// 743 | public void OnRequestedResolutionDropdownValueChanged(int result) 744 | { 745 | if ((int)requestedResolution != result) 746 | { 747 | requestedResolution = (ResolutionPreset)result; 748 | 749 | int width, height; 750 | Dimensions(requestedResolution, out width, out height); 751 | 752 | webCamTextureToMatHelper.Initialize(width, height); 753 | } 754 | } 755 | 756 | /// 757 | /// Raises the container dropdown value changed event. 758 | /// 759 | public void OnContainerDropdownValueChanged(int result) 760 | { 761 | #if !(UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_EDITOR_OSX) 762 | if ((ContainerPreset)(result) == ContainerPreset.JPG) 763 | { 764 | containerDropdown.value = (int)container; 765 | 766 | if (fpsMonitor != null) fpsMonitor.Toast("JPG format is not supported on this platform"); 767 | 768 | return; 769 | } 770 | #endif 771 | 772 | if ((int)container != result) 773 | { 774 | container = (ContainerPreset)(result); 775 | } 776 | } 777 | 778 | /// 779 | /// Raises the video bitrate dropdown value changed event. 780 | /// 781 | public void OnVideoBitRateDropdownValueChanged(int result) 782 | { 783 | string[] enumNames = Enum.GetNames(typeof(VideoBitRatePreset)); 784 | int value = (int)System.Enum.Parse(typeof(VideoBitRatePreset), enumNames[result], true); 785 | 786 | if ((int)videoBitRate != value) 787 | { 788 | videoBitRate = (VideoBitRatePreset)value; 789 | } 790 | } 791 | 792 | /// 793 | /// Raises the audio bitrate dropdown value changed event. 794 | /// 795 | public void OnAudioBitRateDropdownValueChanged(int result) 796 | { 797 | string[] enumNames = Enum.GetNames(typeof(AudioBitRatePreset)); 798 | int value = (int)System.Enum.Parse(typeof(AudioBitRatePreset), enumNames[result], true); 799 | 800 | if ((int)audioBitRate != value) 801 | { 802 | audioBitRate = (AudioBitRatePreset)value; 803 | } 804 | } 805 | 806 | /// 807 | /// Raises the apply comic filter toggle value changed event. 808 | /// 809 | public void OnApplyComicFilterToggleValueChanged() 810 | { 811 | if (applyComicFilter != applyComicFilterToggle.isOn) 812 | { 813 | applyComicFilter = applyComicFilterToggle.isOn; 814 | } 815 | } 816 | 817 | /// 818 | /// Raises the record microphone audio toggle value changed event. 819 | /// 820 | public void OnRecordMicrophoneAudioToggleValueChanged() 821 | { 822 | if (recordMicrophoneAudio != recordMicrophoneAudioToggle.isOn) 823 | { 824 | recordMicrophoneAudio = recordMicrophoneAudioToggle.isOn; 825 | } 826 | } 827 | 828 | /// 829 | /// Raises the record video button click event. 830 | /// 831 | public async void OnRecordVideoButtonClick() 832 | { 833 | Debug.Log("OnRecordVideoButtonClick ()"); 834 | 835 | if (isVideoPlaying) 836 | return; 837 | 838 | if (!isVideoRecording && !isFinishWriting) 839 | { 840 | await StartRecording(); 841 | } 842 | else 843 | { 844 | CancelRecording(); 845 | } 846 | } 847 | 848 | /// 849 | /// Raises the play video button click event. 850 | /// 851 | public void OnPlayVideoButtonClick() 852 | { 853 | Debug.Log("OnPlayVideoButtonClick ()"); 854 | 855 | if (isVideoPlaying || isVideoRecording || isFinishWriting || string.IsNullOrEmpty(videoPath)) 856 | return; 857 | 858 | if (System.IO.Path.GetExtension(videoPath) == ".gif") 859 | { 860 | Debug.LogWarning("GIF format video playback is not supported."); 861 | if (fpsMonitor != null) fpsMonitor.Toast("GIF format video playback is not supported."); 862 | return; 863 | } 864 | if (System.IO.Path.GetExtension(videoPath) == "") 865 | { 866 | Debug.LogWarning("JPG format images playback is not supported."); 867 | if (fpsMonitor != null) fpsMonitor.Toast("JPG format images playback is not supported."); 868 | return; 869 | } 870 | 871 | // Playback the video 872 | var prefix = Application.platform == RuntimePlatform.IPhonePlayer ? "file://" : ""; 873 | PlayVideo(prefix + videoPath); 874 | } 875 | 876 | /// 877 | /// Raises the play video full screen button click event. 878 | /// 879 | public void OnPlayVideoFullScreenButtonClick() 880 | { 881 | Debug.Log("OnPlayVideoFullScreenButtonClick ()"); 882 | 883 | if (isVideoPlaying || isVideoRecording || isFinishWriting || string.IsNullOrEmpty(videoPath)) 884 | return; 885 | 886 | // Playback the video 887 | #if UNITY_EDITOR 888 | UnityEditor.EditorUtility.OpenWithDefaultApp(videoPath); 889 | #elif UNITY_ANDROID || UNITY_IOS 890 | if (System.IO.Path.GetExtension(videoPath) == ".gif") 891 | { 892 | Debug.LogWarning("GIF format video full screen playback is not supported."); 893 | if (fpsMonitor != null) fpsMonitor.Toast("GIF format video full screen playback is not supported."); 894 | return; 895 | } 896 | if (System.IO.Path.GetExtension(videoPath) == "") 897 | { 898 | Debug.LogWarning("JPG format images full screen playback is not supported."); 899 | if (fpsMonitor != null) fpsMonitor.Toast("JPG format images full screen playback is not supported."); 900 | return; 901 | } 902 | 903 | var prefix = Application.platform == RuntimePlatform.IPhonePlayer ? "file://" : ""; 904 | Handheld.PlayFullScreenMovie(prefix + videoPath); 905 | #else 906 | Debug.LogWarning("Full-screen video playback is not supported on this platform."); 907 | if (fpsMonitor != null) fpsMonitor.Toast("Full-screen video playback is not supported on this platform."); 908 | #endif 909 | } 910 | 911 | /// 912 | /// Raises the share button click event. 913 | /// 914 | public async void OnShareButtonClick() 915 | { 916 | Debug.Log("OnShareButtonClick ()"); 917 | 918 | if (isVideoPlaying || isVideoRecording || isFinishWriting || string.IsNullOrEmpty(videoPath)) 919 | return; 920 | 921 | var mes = ""; 922 | 923 | #if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR 924 | try 925 | { 926 | SharePayload payload = new SharePayload(); 927 | payload.AddText("User shared video! [NatCorderWithOpenCVForUnity Example](" + NatCorderWithOpenCVForUnityExample.GetNatCorderVersion() + ")"); 928 | payload.AddMedia(videoPath); 929 | var success = await payload.Commit(); 930 | 931 | mes = $"Successfully shared items: {success}"; 932 | } 933 | catch (ApplicationException e) 934 | { 935 | mes = e.Message; 936 | } 937 | #else 938 | mes = "NatShare Error: SharePayload is not supported on this platform."; 939 | await Task.Delay(100); 940 | #endif 941 | 942 | Debug.Log(mes); 943 | if (fpsMonitor != null) fpsMonitor.Toast(mes); 944 | } 945 | 946 | /// 947 | /// Raises the save to camera roll button click event. 948 | /// 949 | public async void OnSaveToCameraRollButtonClick() 950 | { 951 | Debug.Log("OnSaveToCameraRollButtonClick ()"); 952 | 953 | if (isVideoPlaying || isVideoRecording || isFinishWriting || string.IsNullOrEmpty(videoPath)) 954 | return; 955 | 956 | var mes = ""; 957 | 958 | #if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR 959 | try 960 | { 961 | SavePayload payload = new SavePayload("NatCorderWithOpenCVForUnityExample"); 962 | payload.AddMedia(videoPath); 963 | var success = await payload.Commit(); 964 | 965 | mes = $"Successfully saved items: {success}"; 966 | } 967 | catch (ApplicationException e) 968 | { 969 | mes = e.Message; 970 | } 971 | #else 972 | mes = "NatShare Error: SavePayload is not supported on this platform."; 973 | await Task.Delay(100); 974 | #endif 975 | 976 | Debug.Log(mes); 977 | if (fpsMonitor != null) fpsMonitor.Toast(mes); 978 | } 979 | 980 | public enum ResolutionPreset 981 | { 982 | Lowest, 983 | _640x480, 984 | _1280x720, 985 | _1920x1080, 986 | Highest, 987 | } 988 | 989 | private void Dimensions(ResolutionPreset preset, out int width, out int height) 990 | { 991 | switch (preset) 992 | { 993 | case ResolutionPreset.Lowest: 994 | width = height = 50; 995 | break; 996 | case ResolutionPreset._640x480: 997 | width = 640; 998 | height = 480; 999 | break; 1000 | case ResolutionPreset._1920x1080: 1001 | width = 1920; 1002 | height = 1080; 1003 | break; 1004 | case ResolutionPreset.Highest: 1005 | width = height = 9999; 1006 | break; 1007 | case ResolutionPreset._1280x720: 1008 | default: 1009 | width = 1280; 1010 | height = 720; 1011 | break; 1012 | } 1013 | } 1014 | 1015 | public enum ContainerPreset 1016 | { 1017 | MP4, 1018 | HEVC, 1019 | GIF, 1020 | JPG, 1021 | } 1022 | 1023 | public enum VideoBitRatePreset 1024 | { 1025 | _1Mbps = 1000000, 1026 | _3Mbps = 3000000, 1027 | _5Mbps = 5000000, 1028 | _8Mbps = 8000000, 1029 | _10Mbps = 10000000, 1030 | _15Mbps = 15000000, 1031 | } 1032 | 1033 | public enum AudioBitRatePreset 1034 | { 1035 | _24Kbps = 24000, 1036 | _48Kbps = 48000, 1037 | _64Kbps = 64000, 1038 | _96Kbps = 96000, 1039 | _128Kbps = 128000, 1040 | _192Kbps = 192000, 1041 | } 1042 | } 1043 | } -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/VideoRecordingExample.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7333ad288ec0c8349a05ac0a4b850109 3 | timeCreated: 1530717697 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/NatCorderWithOpenCVForUnityExample/VideoRecordingExample/VideoRecordingExample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c6ed31508255234eabb4d73aa5c3591 3 | timeCreated: 1530717696 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/link.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Assets/NatCorderWithOpenCVForUnityExample/link.xml.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9c03cfcae1ed4b40bb61f9b4d2ba48f 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NatCorder With OpenCVForUnity Example 2 | 3 | * An example of a video recording app by using NatCorder and OpenCVForUnity. 4 | * An example of native sharing and save to the camera roll using NatShare API. 5 | 6 | 7 | ## Environment 8 | * Anddroid (Pixel 3a) / iOS (iPhoneSE2) 9 | * Unity >= 2020.3.31f1+ 10 | * Scripting backend MONO / IL2CPP 11 | * [NatCorder - Video Recording API](https://assetstore.unity.com/packages/tools/integration/natcorder-video-recording-api-102645?aid=1011l4ehR) 1.8.2+ 12 | * [NatShare - Mobile Sharing API](https://github.com/natsuite/NatShare) 1.2.6+ 13 | * [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.4.7+ 14 | 15 | 16 | ## Demo 17 | * Android [NatCorderWithOpenCVForUnityExample.apk](https://github.com/EnoxSoftware/NatCorderWithOpenCVForUnityExample/releases) 18 | 19 | 20 | ## Note 21 | * [Using HEIF or HEVC media on Apple devices](https://support.apple.com/en-us/HT207022) 22 | 23 | 24 | ## Setup 25 | 1. Download the latest release unitypackage. [NatCorderWithOpenCVForUnityExample.unitypackage](https://github.com/EnoxSoftware/NatCorderWithOpenCVForUnityExample/releases) 26 | 1. Create a new project. (NatCorderWithOpenCVForUnityExample) 27 | * Enable "Allow 'unsafe' Code" option in the "Player Settings > Other Settings" Inspector. 28 | 1. Import NatCorder. 29 | 1. Import NatShare. (NatShare should be installed using the Unity Package Manager. See [README](https://github.com/natsuite/NatShare)) 30 | 1. Import OpenCVForUnity. 31 | * Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings) 32 | * Select MenuItem[Tools/OpenCV for Unity/Use Unsafe Code]. 33 | ![Use_UnsafeCode.PNG](Use_UnsafeCode.png) 34 | ![AllowUnsafeCode.PNG](AllowUnsafeCode.png) 35 | 1. Import the NatCorderWithOpenCVForUnityExample.unitypackage. 36 | 1. Change the "Minimum API Level" to 24 or higher in the "Player Settings (Androd)" Inspector. 37 | 1. Change the "Target minimum iOS Version" to 13 or higher in the "Player Settings (iOS)" Inspector. 38 | * Set the reason for accessing the camera in "cameraUsageDescription". 39 | * Set the reason for accessing the microphone in "microphoneUsageDescription". 40 | 1. Add the "Assets/NatCorderWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window. 41 | 1. Build and Deploy to Android and iOS. 42 | 43 | 44 | ## Android Instructions 45 | Build requires Android SDK Platform 29 or higher. 46 | 47 | 48 | ## iOS Instructions 49 | After building an Xcode project from Unity, add the following keys to the `Info.plist` file with a good description: 50 | - `NSPhotoLibraryUsageDescription` 51 | - `NSPhotoLibraryAddUsageDescription` 52 | 53 | 54 | ## ScreenShot 55 | ![screenshot01.jpg](screenshot01.jpg) 56 | 57 | -------------------------------------------------------------------------------- /Use_UnsafeCode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnoxSoftware/NatCorderWithOpenCVForUnityExample/376c97969a38f60f10e861d970f398053f2ffa29/Use_UnsafeCode.png -------------------------------------------------------------------------------- /screenshot01.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EnoxSoftware/NatCorderWithOpenCVForUnityExample/376c97969a38f60f10e861d970f398053f2ffa29/screenshot01.jpg --------------------------------------------------------------------------------