├── .editorconfig ├── .github └── FUNDING.yml ├── .gitignore ├── Extras~ ├── demo.gif └── demo.mp4 ├── README.md ├── README.md.meta ├── Runtime.meta ├── Runtime ├── CameraViewportRect.cs ├── CameraViewportRect.cs.meta ├── Gilzoide.CameraViewportRect.asmdef └── Gilzoide.CameraViewportRect.asmdef.meta ├── Samples~ ├── RotatingCube.meta └── RotatingCube │ ├── Gilzoide.CameraViewportRect.Samples.RotatingCube.asmdef │ ├── Gilzoide.CameraViewportRect.Samples.RotatingCube.asmdef.meta │ ├── Rotate.cs │ ├── Rotate.cs.meta │ ├── RotatingCubeSample.unity │ ├── RotatingCubeSample.unity.meta │ ├── ViewportBackground.mat │ └── ViewportBackground.mat.meta ├── UNLICENSE ├── UNLICENSE.meta ├── package.json └── package.json.meta /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | 9 | [*.{cs,h,m}] 10 | indent_size = 4 11 | 12 | [Makefile] 13 | indent_style = tab 14 | indent_size = 8 -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [gilzoide] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: gilzoide # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: gilzoide # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Samples 2 | Samples.meta -------------------------------------------------------------------------------- /Extras~/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gilzoide/unity-camera-viewport-rect/59c376e9234c127a3b8b35fc2610e7a118093227/Extras~/demo.gif -------------------------------------------------------------------------------- /Extras~/demo.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gilzoide/unity-camera-viewport-rect/59c376e9234c127a3b8b35fc2610e7a118093227/Extras~/demo.mp4 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Camera Viewport Rect 2 | [![openupm](https://img.shields.io/npm/v/com.gilzoide.camera-viewport-rect?label=openupm®istry_uri=https://package.openupm.com)](https://openupm.com/packages/com.gilzoide.camera-viewport-rect/) 3 | 4 | Automatically setup `Camera` viewports from `RectTransform`s. 5 | 6 | This way one can easily show 3D models directly into responsive UI without the need of setting up `RenderTexture`s. 7 | 8 | ![Demonstration of the CameraViewportRect script](Extras~/demo.gif) 9 | 10 | 11 | ## Features 12 | - Supports canvases in both `Screen Space - Camera` and `Screen Space - Overlay` modes. 13 | Using `Screen Space - Camera` mode is recommended to make sure the camera renders above the UI. 14 | - Supports enabling/disabling the target Camera when the script itself gets enabled/disabled 15 | 16 | 17 | ## How to install 18 | Either: 19 | 20 | - Install using [openupm](https://openupm.com/): 21 | ``` 22 | openupm add com.gilzoide.camera-viewport-rect 23 | ``` 24 | 25 | - Install via [Unity Package Manager](https://docs.unity3d.com/Manual/upm-ui-giturl.html) using the following URL: 26 | ``` 27 | https://github.com/gilzoide/unity-camera-viewport-rect.git#1.0.1 28 | ``` 29 | 30 | - Copy the script [CameraViewportRect.cs](Runtime/CameraViewportRect.cs) directly into your project 31 | 32 | 33 | ## How to use 34 | 1. Add a [CameraViewportRect](Runtime/CameraViewportRect.cs) component to any 35 | object with a `RectTransform` 36 | 2. Set the `Camera` property to the camera that should render inside it 37 | 3. Enjoy 🍾 38 | 39 | 40 | ## Samples 41 | This UPM package has the following sample scene: 42 | - [RotatingCube](Samples~/RotatingCube/RotatingCubeSample.unity): Simple sample with a rotating cube that appears on a responsive UI -------------------------------------------------------------------------------- /README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 53ea81345822c483eaceb1f8a1cf8555 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Runtime.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e6e9aadb89cf44e48dab63fa76818e0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Runtime/CameraViewportRect.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Gilzoide.CameraViewportRect 4 | { 5 | [RequireComponent(typeof(RectTransform)), ExecuteAlways] 6 | public class CameraViewportRect : MonoBehaviour 7 | { 8 | [Tooltip("Target Camera")] 9 | [SerializeField] protected Camera _camera; 10 | 11 | [Tooltip("Toggle Camera.enabled when this script gets enabled/disabled")] 12 | public bool ToggleCameraEnabled = true; 13 | 14 | public Camera Camera 15 | { 16 | get => _camera; 17 | set 18 | { 19 | _camera = value; 20 | if (isActiveAndEnabled) 21 | { 22 | RefreshCameraRect(); 23 | } 24 | } 25 | } 26 | 27 | protected Canvas _canvas; 28 | protected readonly Vector3[] _worldCorners = new Vector3[4]; 29 | 30 | public void RefreshCameraRect() 31 | { 32 | if (Camera && _canvas) 33 | { 34 | Camera.pixelRect = GetScreenRect(); 35 | } 36 | } 37 | 38 | protected virtual void Update() 39 | { 40 | if (transform.hasChanged) 41 | { 42 | transform.hasChanged = false; 43 | RefreshCameraRect(); 44 | } 45 | } 46 | 47 | protected virtual void OnEnable() 48 | { 49 | _canvas = FindRootCanvas(); 50 | if (ToggleCameraEnabled && Camera) 51 | { 52 | Camera.enabled = true; 53 | } 54 | } 55 | 56 | protected virtual void OnDisable() 57 | { 58 | if (ToggleCameraEnabled && Camera) 59 | { 60 | Camera.enabled = false; 61 | } 62 | } 63 | 64 | protected virtual void OnTransformParentChanged() 65 | { 66 | if (isActiveAndEnabled) 67 | { 68 | _canvas = FindRootCanvas(); 69 | RefreshCameraRect(); 70 | } 71 | } 72 | 73 | #if UNITY_EDITOR 74 | protected virtual void OnValidate() 75 | { 76 | if (isActiveAndEnabled) 77 | { 78 | RefreshCameraRect(); 79 | } 80 | } 81 | #endif 82 | 83 | protected Rect GetScreenRect() 84 | { 85 | ((RectTransform) transform).GetWorldCorners(_worldCorners); 86 | 87 | Vector3 bottomLeft = _worldCorners[0]; 88 | Vector3 topRight = _worldCorners[2]; 89 | if (_canvas.renderMode == RenderMode.ScreenSpaceCamera && _canvas.worldCamera != null) 90 | { 91 | Camera camera = _canvas.worldCamera; 92 | bottomLeft = camera.WorldToScreenPoint(bottomLeft); 93 | topRight = camera.WorldToScreenPoint(topRight); 94 | } 95 | return Rect.MinMaxRect(bottomLeft.x, bottomLeft.y, topRight.x, topRight.y); 96 | } 97 | 98 | protected Canvas FindRootCanvas() 99 | { 100 | Canvas canvas = GetComponentInParent(); 101 | return canvas != null ? canvas.rootCanvas : null; 102 | } 103 | } 104 | } -------------------------------------------------------------------------------- /Runtime/CameraViewportRect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ae5102901ac040e2b6dd5bad5a31af6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Runtime/Gilzoide.CameraViewportRect.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gilzoide.CameraViewportRect", 3 | "rootNamespace": "Gilzoide.CameraViewportRect", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": true, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Runtime/Gilzoide.CameraViewportRect.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c2d4307e43784312b809247e1cb99f5 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/RotatingCube.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31062563366c5407095d38f7614d3cc4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/Gilzoide.CameraViewportRect.Samples.RotatingCube.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Gilzoide.CameraViewportRect.Samples.RotatingCube", 3 | "rootNamespace": "Gilzoide.CameraViewportRect.Samples.RotatingCube", 4 | "references": [], 5 | "includePlatforms": [], 6 | "excludePlatforms": [], 7 | "allowUnsafeCode": false, 8 | "overrideReferences": false, 9 | "precompiledReferences": [], 10 | "autoReferenced": false, 11 | "defineConstraints": [], 12 | "versionDefines": [], 13 | "noEngineReferences": false 14 | } -------------------------------------------------------------------------------- /Samples~/RotatingCube/Gilzoide.CameraViewportRect.Samples.RotatingCube.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73c6f33ee546c49de83433ad0c40bc16 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/Rotate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace Gilzoide.CameraViewportRect.Samples.RotatingCube 4 | { 5 | public class Rotate : MonoBehaviour 6 | { 7 | public Vector3 Velocidade = new Vector3(30, 30, 30); 8 | 9 | void Update() 10 | { 11 | transform.Rotate(Velocidade * Time.deltaTime); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/Rotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bf536f62f4fb41b19e8271814ab763c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/RotatingCubeSample.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.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 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: 705507994} 41 | m_IndirectSpecularColor: {r: 0.44671863, g: 0.496575, b: 0.5750147, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 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: 2 59 | m_BakeResolution: 40 60 | m_AtlasSize: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_ExtractAmbientOcclusion: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 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: 1 102 | --- !u!196 &4 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.16666667 118 | manualTileSize: 0 119 | tileSize: 256 120 | accuratePlacement: 0 121 | debug: 122 | m_Flags: 0 123 | m_NavMeshData: {fileID: 0} 124 | --- !u!1 &12356999 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: 12357000} 133 | - component: {fileID: 12357004} 134 | - component: {fileID: 12357003} 135 | - component: {fileID: 12357002} 136 | - component: {fileID: 12357001} 137 | m_Layer: 5 138 | m_Name: Rotating Cube 139 | m_TagString: Untagged 140 | m_Icon: {fileID: 0} 141 | m_NavMeshLayer: 0 142 | m_StaticEditorFlags: 0 143 | m_IsActive: 1 144 | --- !u!4 &12357000 145 | Transform: 146 | m_ObjectHideFlags: 0 147 | m_CorrespondingSourceObject: {fileID: 0} 148 | m_PrefabInstance: {fileID: 0} 149 | m_PrefabAsset: {fileID: 0} 150 | m_GameObject: {fileID: 12356999} 151 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 152 | m_LocalPosition: {x: 0, y: 0, z: -1.24} 153 | m_LocalScale: {x: 1, y: 1, z: 1} 154 | m_Children: [] 155 | m_Father: {fileID: 785171920} 156 | m_RootOrder: 2 157 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 158 | --- !u!114 &12357001 159 | MonoBehaviour: 160 | m_ObjectHideFlags: 0 161 | m_CorrespondingSourceObject: {fileID: 0} 162 | m_PrefabInstance: {fileID: 0} 163 | m_PrefabAsset: {fileID: 0} 164 | m_GameObject: {fileID: 12356999} 165 | m_Enabled: 1 166 | m_EditorHideFlags: 0 167 | m_Script: {fileID: 11500000, guid: 1bf536f62f4fb41b19e8271814ab763c, type: 3} 168 | m_Name: 169 | m_EditorClassIdentifier: 170 | Velocidade: {x: 30, y: 30, z: 30} 171 | --- !u!65 &12357002 172 | BoxCollider: 173 | m_ObjectHideFlags: 0 174 | m_CorrespondingSourceObject: {fileID: 0} 175 | m_PrefabInstance: {fileID: 0} 176 | m_PrefabAsset: {fileID: 0} 177 | m_GameObject: {fileID: 12356999} 178 | m_Material: {fileID: 0} 179 | m_IsTrigger: 0 180 | m_Enabled: 1 181 | serializedVersion: 2 182 | m_Size: {x: 1, y: 1, z: 1} 183 | m_Center: {x: 0, y: 0, z: 0} 184 | --- !u!23 &12357003 185 | MeshRenderer: 186 | m_ObjectHideFlags: 0 187 | m_CorrespondingSourceObject: {fileID: 0} 188 | m_PrefabInstance: {fileID: 0} 189 | m_PrefabAsset: {fileID: 0} 190 | m_GameObject: {fileID: 12356999} 191 | m_Enabled: 1 192 | m_CastShadows: 1 193 | m_ReceiveShadows: 0 194 | m_DynamicOccludee: 1 195 | m_MotionVectors: 1 196 | m_LightProbeUsage: 1 197 | m_ReflectionProbeUsage: 1 198 | m_RayTracingMode: 2 199 | m_RenderingLayerMask: 1 200 | m_RendererPriority: 0 201 | m_Materials: 202 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} 203 | m_StaticBatchInfo: 204 | firstSubMesh: 0 205 | subMeshCount: 0 206 | m_StaticBatchRoot: {fileID: 0} 207 | m_ProbeAnchor: {fileID: 0} 208 | m_LightProbeVolumeOverride: {fileID: 0} 209 | m_ScaleInLightmap: 1 210 | m_ReceiveGI: 1 211 | m_PreserveUVs: 0 212 | m_IgnoreNormalsForChartDetection: 0 213 | m_ImportantGI: 0 214 | m_StitchLightmapSeams: 1 215 | m_SelectedEditorRenderState: 3 216 | m_MinimumChartSize: 4 217 | m_AutoUVMaxDistance: 0.5 218 | m_AutoUVMaxAngle: 89 219 | m_LightmapParameters: {fileID: 0} 220 | m_SortingLayerID: 0 221 | m_SortingLayer: 0 222 | m_SortingOrder: 0 223 | --- !u!33 &12357004 224 | MeshFilter: 225 | m_ObjectHideFlags: 0 226 | m_CorrespondingSourceObject: {fileID: 0} 227 | m_PrefabInstance: {fileID: 0} 228 | m_PrefabAsset: {fileID: 0} 229 | m_GameObject: {fileID: 12356999} 230 | m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} 231 | --- !u!1 &631601106 232 | GameObject: 233 | m_ObjectHideFlags: 0 234 | m_CorrespondingSourceObject: {fileID: 0} 235 | m_PrefabInstance: {fileID: 0} 236 | m_PrefabAsset: {fileID: 0} 237 | serializedVersion: 6 238 | m_Component: 239 | - component: {fileID: 631601109} 240 | - component: {fileID: 631601108} 241 | - component: {fileID: 631601107} 242 | m_Layer: 0 243 | m_Name: EventSystem 244 | m_TagString: Untagged 245 | m_Icon: {fileID: 0} 246 | m_NavMeshLayer: 0 247 | m_StaticEditorFlags: 0 248 | m_IsActive: 1 249 | --- !u!114 &631601107 250 | MonoBehaviour: 251 | m_ObjectHideFlags: 0 252 | m_CorrespondingSourceObject: {fileID: 0} 253 | m_PrefabInstance: {fileID: 0} 254 | m_PrefabAsset: {fileID: 0} 255 | m_GameObject: {fileID: 631601106} 256 | m_Enabled: 1 257 | m_EditorHideFlags: 0 258 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3} 259 | m_Name: 260 | m_EditorClassIdentifier: 261 | m_HorizontalAxis: Horizontal 262 | m_VerticalAxis: Vertical 263 | m_SubmitButton: Submit 264 | m_CancelButton: Cancel 265 | m_InputActionsPerSecond: 10 266 | m_RepeatDelay: 0.5 267 | m_ForceModuleActive: 0 268 | --- !u!114 &631601108 269 | MonoBehaviour: 270 | m_ObjectHideFlags: 0 271 | m_CorrespondingSourceObject: {fileID: 0} 272 | m_PrefabInstance: {fileID: 0} 273 | m_PrefabAsset: {fileID: 0} 274 | m_GameObject: {fileID: 631601106} 275 | m_Enabled: 1 276 | m_EditorHideFlags: 0 277 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3} 278 | m_Name: 279 | m_EditorClassIdentifier: 280 | m_FirstSelected: {fileID: 0} 281 | m_sendNavigationEvents: 1 282 | m_DragThreshold: 10 283 | --- !u!4 &631601109 284 | Transform: 285 | m_ObjectHideFlags: 0 286 | m_CorrespondingSourceObject: {fileID: 0} 287 | m_PrefabInstance: {fileID: 0} 288 | m_PrefabAsset: {fileID: 0} 289 | m_GameObject: {fileID: 631601106} 290 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 291 | m_LocalPosition: {x: 0, y: 0, z: 0} 292 | m_LocalScale: {x: 1, y: 1, z: 1} 293 | m_Children: [] 294 | m_Father: {fileID: 0} 295 | m_RootOrder: 3 296 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 297 | --- !u!1 &705507993 298 | GameObject: 299 | m_ObjectHideFlags: 0 300 | m_CorrespondingSourceObject: {fileID: 0} 301 | m_PrefabInstance: {fileID: 0} 302 | m_PrefabAsset: {fileID: 0} 303 | serializedVersion: 6 304 | m_Component: 305 | - component: {fileID: 705507995} 306 | - component: {fileID: 705507994} 307 | m_Layer: 0 308 | m_Name: Directional Light 309 | m_TagString: Untagged 310 | m_Icon: {fileID: 0} 311 | m_NavMeshLayer: 0 312 | m_StaticEditorFlags: 0 313 | m_IsActive: 1 314 | --- !u!108 &705507994 315 | Light: 316 | m_ObjectHideFlags: 0 317 | m_CorrespondingSourceObject: {fileID: 0} 318 | m_PrefabInstance: {fileID: 0} 319 | m_PrefabAsset: {fileID: 0} 320 | m_GameObject: {fileID: 705507993} 321 | m_Enabled: 1 322 | serializedVersion: 10 323 | m_Type: 1 324 | m_Shape: 0 325 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 326 | m_Intensity: 1 327 | m_Range: 10 328 | m_SpotAngle: 30 329 | m_InnerSpotAngle: 21.802082 330 | m_CookieSize: 10 331 | m_Shadows: 332 | m_Type: 2 333 | m_Resolution: -1 334 | m_CustomResolution: -1 335 | m_Strength: 1 336 | m_Bias: 0.05 337 | m_NormalBias: 0.4 338 | m_NearPlane: 0.2 339 | m_CullingMatrixOverride: 340 | e00: 1 341 | e01: 0 342 | e02: 0 343 | e03: 0 344 | e10: 0 345 | e11: 1 346 | e12: 0 347 | e13: 0 348 | e20: 0 349 | e21: 0 350 | e22: 1 351 | e23: 0 352 | e30: 0 353 | e31: 0 354 | e32: 0 355 | e33: 1 356 | m_UseCullingMatrixOverride: 0 357 | m_Cookie: {fileID: 0} 358 | m_DrawHalo: 0 359 | m_Flare: {fileID: 0} 360 | m_RenderMode: 0 361 | m_CullingMask: 362 | serializedVersion: 2 363 | m_Bits: 4294967295 364 | m_RenderingLayerMask: 1 365 | m_Lightmapping: 1 366 | m_LightShadowCasterMode: 0 367 | m_AreaSize: {x: 1, y: 1} 368 | m_BounceIntensity: 1 369 | m_ColorTemperature: 6570 370 | m_UseColorTemperature: 0 371 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} 372 | m_UseBoundingSphereOverride: 0 373 | m_ShadowRadius: 0 374 | m_ShadowAngle: 0 375 | --- !u!4 &705507995 376 | Transform: 377 | m_ObjectHideFlags: 0 378 | m_CorrespondingSourceObject: {fileID: 0} 379 | m_PrefabInstance: {fileID: 0} 380 | m_PrefabAsset: {fileID: 0} 381 | m_GameObject: {fileID: 705507993} 382 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 383 | m_LocalPosition: {x: 0, y: 3, z: 0} 384 | m_LocalScale: {x: 1, y: 1, z: 1} 385 | m_Children: [] 386 | m_Father: {fileID: 0} 387 | m_RootOrder: 1 388 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 389 | --- !u!1 &771962670 390 | GameObject: 391 | m_ObjectHideFlags: 0 392 | m_CorrespondingSourceObject: {fileID: 0} 393 | m_PrefabInstance: {fileID: 0} 394 | m_PrefabAsset: {fileID: 0} 395 | serializedVersion: 6 396 | m_Component: 397 | - component: {fileID: 771962671} 398 | - component: {fileID: 771962673} 399 | m_Layer: 5 400 | m_Name: Camera 401 | m_TagString: Untagged 402 | m_Icon: {fileID: 0} 403 | m_NavMeshLayer: 0 404 | m_StaticEditorFlags: 0 405 | m_IsActive: 1 406 | --- !u!4 &771962671 407 | Transform: 408 | m_ObjectHideFlags: 0 409 | m_CorrespondingSourceObject: {fileID: 0} 410 | m_PrefabInstance: {fileID: 0} 411 | m_PrefabAsset: {fileID: 0} 412 | m_GameObject: {fileID: 771962670} 413 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 414 | m_LocalPosition: {x: 0, y: 0, z: -5} 415 | m_LocalScale: {x: 1, y: 1, z: 1} 416 | m_Children: [] 417 | m_Father: {fileID: 785171920} 418 | m_RootOrder: 0 419 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 420 | --- !u!20 &771962673 421 | Camera: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | m_GameObject: {fileID: 771962670} 427 | m_Enabled: 1 428 | serializedVersion: 2 429 | m_ClearFlags: 3 430 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 431 | m_projectionMatrixMode: 1 432 | m_GateFitMode: 2 433 | m_FOVAxisMode: 0 434 | m_SensorSize: {x: 36, y: 24} 435 | m_LensShift: {x: 0, y: 0} 436 | m_FocalLength: 50 437 | m_NormalizedViewPortRect: 438 | serializedVersion: 2 439 | x: 0.13124996 440 | y: 0.18896681 441 | width: 0.7375 442 | height: 0.4330118 443 | near clip plane: 0.3 444 | far clip plane: 1000 445 | field of view: 35.9 446 | orthographic: 0 447 | orthographic size: 5 448 | m_Depth: 0 449 | m_CullingMask: 450 | serializedVersion: 2 451 | m_Bits: 32 452 | m_RenderingPath: -1 453 | m_TargetTexture: {fileID: 0} 454 | m_TargetDisplay: 0 455 | m_TargetEye: 3 456 | m_HDR: 1 457 | m_AllowMSAA: 1 458 | m_AllowDynamicResolution: 0 459 | m_ForceIntoRT: 0 460 | m_OcclusionCulling: 1 461 | m_StereoConvergence: 10 462 | m_StereoSeparation: 0.022 463 | --- !u!1 &785171919 464 | GameObject: 465 | m_ObjectHideFlags: 0 466 | m_CorrespondingSourceObject: {fileID: 0} 467 | m_PrefabInstance: {fileID: 0} 468 | m_PrefabAsset: {fileID: 0} 469 | serializedVersion: 6 470 | m_Component: 471 | - component: {fileID: 785171920} 472 | m_Layer: 5 473 | m_Name: ViewportContent 474 | m_TagString: Untagged 475 | m_Icon: {fileID: 0} 476 | m_NavMeshLayer: 0 477 | m_StaticEditorFlags: 0 478 | m_IsActive: 1 479 | --- !u!4 &785171920 480 | Transform: 481 | m_ObjectHideFlags: 0 482 | m_CorrespondingSourceObject: {fileID: 0} 483 | m_PrefabInstance: {fileID: 0} 484 | m_PrefabAsset: {fileID: 0} 485 | m_GameObject: {fileID: 785171919} 486 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 487 | m_LocalPosition: {x: 0, y: 0, z: 0} 488 | m_LocalScale: {x: 1, y: 1, z: 1} 489 | m_Children: 490 | - {fileID: 771962671} 491 | - {fileID: 1056751968} 492 | - {fileID: 12357000} 493 | m_Father: {fileID: 0} 494 | m_RootOrder: 4 495 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 496 | --- !u!1 &963194225 497 | GameObject: 498 | m_ObjectHideFlags: 0 499 | m_CorrespondingSourceObject: {fileID: 0} 500 | m_PrefabInstance: {fileID: 0} 501 | m_PrefabAsset: {fileID: 0} 502 | serializedVersion: 6 503 | m_Component: 504 | - component: {fileID: 963194228} 505 | - component: {fileID: 963194227} 506 | - component: {fileID: 963194226} 507 | m_Layer: 0 508 | m_Name: Main Camera 509 | m_TagString: MainCamera 510 | m_Icon: {fileID: 0} 511 | m_NavMeshLayer: 0 512 | m_StaticEditorFlags: 0 513 | m_IsActive: 1 514 | --- !u!81 &963194226 515 | AudioListener: 516 | m_ObjectHideFlags: 0 517 | m_CorrespondingSourceObject: {fileID: 0} 518 | m_PrefabInstance: {fileID: 0} 519 | m_PrefabAsset: {fileID: 0} 520 | m_GameObject: {fileID: 963194225} 521 | m_Enabled: 1 522 | --- !u!20 &963194227 523 | Camera: 524 | m_ObjectHideFlags: 0 525 | m_CorrespondingSourceObject: {fileID: 0} 526 | m_PrefabInstance: {fileID: 0} 527 | m_PrefabAsset: {fileID: 0} 528 | m_GameObject: {fileID: 963194225} 529 | m_Enabled: 1 530 | serializedVersion: 2 531 | m_ClearFlags: 1 532 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 533 | m_projectionMatrixMode: 1 534 | m_GateFitMode: 2 535 | m_FOVAxisMode: 0 536 | m_SensorSize: {x: 36, y: 24} 537 | m_LensShift: {x: 0, y: 0} 538 | m_FocalLength: 50 539 | m_NormalizedViewPortRect: 540 | serializedVersion: 2 541 | x: 0 542 | y: 0 543 | width: 1 544 | height: 1 545 | near clip plane: 0.3 546 | far clip plane: 1000 547 | field of view: 60 548 | orthographic: 0 549 | orthographic size: 5 550 | m_Depth: -1 551 | m_CullingMask: 552 | serializedVersion: 2 553 | m_Bits: 2147483647 554 | m_RenderingPath: -1 555 | m_TargetTexture: {fileID: 0} 556 | m_TargetDisplay: 0 557 | m_TargetEye: 3 558 | m_HDR: 1 559 | m_AllowMSAA: 1 560 | m_AllowDynamicResolution: 0 561 | m_ForceIntoRT: 0 562 | m_OcclusionCulling: 1 563 | m_StereoConvergence: 10 564 | m_StereoSeparation: 0.022 565 | --- !u!4 &963194228 566 | Transform: 567 | m_ObjectHideFlags: 0 568 | m_CorrespondingSourceObject: {fileID: 0} 569 | m_PrefabInstance: {fileID: 0} 570 | m_PrefabAsset: {fileID: 0} 571 | m_GameObject: {fileID: 963194225} 572 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 573 | m_LocalPosition: {x: 0, y: 1, z: 10} 574 | m_LocalScale: {x: 1, y: 1, z: 1} 575 | m_Children: [] 576 | m_Father: {fileID: 0} 577 | m_RootOrder: 0 578 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 579 | --- !u!1 &1056751967 580 | GameObject: 581 | m_ObjectHideFlags: 0 582 | m_CorrespondingSourceObject: {fileID: 0} 583 | m_PrefabInstance: {fileID: 0} 584 | m_PrefabAsset: {fileID: 0} 585 | serializedVersion: 6 586 | m_Component: 587 | - component: {fileID: 1056751968} 588 | - component: {fileID: 1056751971} 589 | - component: {fileID: 1056751970} 590 | - component: {fileID: 1056751969} 591 | m_Layer: 5 592 | m_Name: Quad 593 | m_TagString: Untagged 594 | m_Icon: {fileID: 0} 595 | m_NavMeshLayer: 0 596 | m_StaticEditorFlags: 0 597 | m_IsActive: 1 598 | --- !u!4 &1056751968 599 | Transform: 600 | m_ObjectHideFlags: 0 601 | m_CorrespondingSourceObject: {fileID: 0} 602 | m_PrefabInstance: {fileID: 0} 603 | m_PrefabAsset: {fileID: 0} 604 | m_GameObject: {fileID: 1056751967} 605 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 606 | m_LocalPosition: {x: 0, y: 0, z: 0} 607 | m_LocalScale: {x: 10, y: 10, z: 10} 608 | m_Children: [] 609 | m_Father: {fileID: 785171920} 610 | m_RootOrder: 1 611 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 612 | --- !u!64 &1056751969 613 | MeshCollider: 614 | m_ObjectHideFlags: 0 615 | m_CorrespondingSourceObject: {fileID: 0} 616 | m_PrefabInstance: {fileID: 0} 617 | m_PrefabAsset: {fileID: 0} 618 | m_GameObject: {fileID: 1056751967} 619 | m_Material: {fileID: 0} 620 | m_IsTrigger: 0 621 | m_Enabled: 1 622 | serializedVersion: 4 623 | m_Convex: 0 624 | m_CookingOptions: 30 625 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 626 | --- !u!23 &1056751970 627 | MeshRenderer: 628 | m_ObjectHideFlags: 0 629 | m_CorrespondingSourceObject: {fileID: 0} 630 | m_PrefabInstance: {fileID: 0} 631 | m_PrefabAsset: {fileID: 0} 632 | m_GameObject: {fileID: 1056751967} 633 | m_Enabled: 1 634 | m_CastShadows: 1 635 | m_ReceiveShadows: 1 636 | m_DynamicOccludee: 1 637 | m_MotionVectors: 1 638 | m_LightProbeUsage: 1 639 | m_ReflectionProbeUsage: 1 640 | m_RayTracingMode: 2 641 | m_RenderingLayerMask: 1 642 | m_RendererPriority: 0 643 | m_Materials: 644 | - {fileID: 2100000, guid: 4b8debeea20b245b2af2414acdfc6e4f, type: 2} 645 | m_StaticBatchInfo: 646 | firstSubMesh: 0 647 | subMeshCount: 0 648 | m_StaticBatchRoot: {fileID: 0} 649 | m_ProbeAnchor: {fileID: 0} 650 | m_LightProbeVolumeOverride: {fileID: 0} 651 | m_ScaleInLightmap: 1 652 | m_ReceiveGI: 1 653 | m_PreserveUVs: 0 654 | m_IgnoreNormalsForChartDetection: 0 655 | m_ImportantGI: 0 656 | m_StitchLightmapSeams: 1 657 | m_SelectedEditorRenderState: 3 658 | m_MinimumChartSize: 4 659 | m_AutoUVMaxDistance: 0.5 660 | m_AutoUVMaxAngle: 89 661 | m_LightmapParameters: {fileID: 0} 662 | m_SortingLayerID: 0 663 | m_SortingLayer: 0 664 | m_SortingOrder: 0 665 | --- !u!33 &1056751971 666 | MeshFilter: 667 | m_ObjectHideFlags: 0 668 | m_CorrespondingSourceObject: {fileID: 0} 669 | m_PrefabInstance: {fileID: 0} 670 | m_PrefabAsset: {fileID: 0} 671 | m_GameObject: {fileID: 1056751967} 672 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 673 | --- !u!1 &1500094529 674 | GameObject: 675 | m_ObjectHideFlags: 0 676 | m_CorrespondingSourceObject: {fileID: 0} 677 | m_PrefabInstance: {fileID: 0} 678 | m_PrefabAsset: {fileID: 0} 679 | serializedVersion: 6 680 | m_Component: 681 | - component: {fileID: 1500094530} 682 | - component: {fileID: 1500094532} 683 | - component: {fileID: 1500094531} 684 | m_Layer: 5 685 | m_Name: Panel 686 | m_TagString: Untagged 687 | m_Icon: {fileID: 0} 688 | m_NavMeshLayer: 0 689 | m_StaticEditorFlags: 0 690 | m_IsActive: 1 691 | --- !u!224 &1500094530 692 | RectTransform: 693 | m_ObjectHideFlags: 0 694 | m_CorrespondingSourceObject: {fileID: 0} 695 | m_PrefabInstance: {fileID: 0} 696 | m_PrefabAsset: {fileID: 0} 697 | m_GameObject: {fileID: 1500094529} 698 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 699 | m_LocalPosition: {x: 0, y: 0, z: 0} 700 | m_LocalScale: {x: 1, y: 1, z: 1} 701 | m_Children: 702 | - {fileID: 1682864442} 703 | - {fileID: 1581701911} 704 | m_Father: {fileID: 1708103954} 705 | m_RootOrder: 0 706 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 707 | m_AnchorMin: {x: 0.1, y: 0.1} 708 | m_AnchorMax: {x: 0.9, y: 0.9} 709 | m_AnchoredPosition: {x: 0, y: 0} 710 | m_SizeDelta: {x: 0, y: 0} 711 | m_Pivot: {x: 0.5, y: 0.5} 712 | --- !u!114 &1500094531 713 | MonoBehaviour: 714 | m_ObjectHideFlags: 0 715 | m_CorrespondingSourceObject: {fileID: 0} 716 | m_PrefabInstance: {fileID: 0} 717 | m_PrefabAsset: {fileID: 0} 718 | m_GameObject: {fileID: 1500094529} 719 | m_Enabled: 1 720 | m_EditorHideFlags: 0 721 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 722 | m_Name: 723 | m_EditorClassIdentifier: 724 | m_Material: {fileID: 0} 725 | m_Color: {r: 1, g: 1, b: 1, a: 0.392} 726 | m_RaycastTarget: 1 727 | m_Maskable: 1 728 | m_OnCullStateChanged: 729 | m_PersistentCalls: 730 | m_Calls: [] 731 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 732 | m_Type: 1 733 | m_PreserveAspect: 0 734 | m_FillCenter: 1 735 | m_FillMethod: 4 736 | m_FillAmount: 1 737 | m_FillClockwise: 1 738 | m_FillOrigin: 0 739 | m_UseSpriteMesh: 0 740 | m_PixelsPerUnitMultiplier: 1 741 | --- !u!222 &1500094532 742 | CanvasRenderer: 743 | m_ObjectHideFlags: 0 744 | m_CorrespondingSourceObject: {fileID: 0} 745 | m_PrefabInstance: {fileID: 0} 746 | m_PrefabAsset: {fileID: 0} 747 | m_GameObject: {fileID: 1500094529} 748 | m_CullTransparentMesh: 1 749 | --- !u!1 &1581701910 750 | GameObject: 751 | m_ObjectHideFlags: 0 752 | m_CorrespondingSourceObject: {fileID: 0} 753 | m_PrefabInstance: {fileID: 0} 754 | m_PrefabAsset: {fileID: 0} 755 | serializedVersion: 6 756 | m_Component: 757 | - component: {fileID: 1581701911} 758 | - component: {fileID: 1581701912} 759 | m_Layer: 5 760 | m_Name: Camera Viewport Rect 761 | m_TagString: Untagged 762 | m_Icon: {fileID: 0} 763 | m_NavMeshLayer: 0 764 | m_StaticEditorFlags: 0 765 | m_IsActive: 1 766 | --- !u!224 &1581701911 767 | RectTransform: 768 | m_ObjectHideFlags: 0 769 | m_CorrespondingSourceObject: {fileID: 0} 770 | m_PrefabInstance: {fileID: 0} 771 | m_PrefabAsset: {fileID: 0} 772 | m_GameObject: {fileID: 1581701910} 773 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 774 | m_LocalPosition: {x: 0, y: 0, z: 0} 775 | m_LocalScale: {x: 1, y: 1, z: 1} 776 | m_Children: [] 777 | m_Father: {fileID: 1500094530} 778 | m_RootOrder: 1 779 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 780 | m_AnchorMin: {x: 0, y: 0} 781 | m_AnchorMax: {x: 1, y: 1} 782 | m_AnchoredPosition: {x: 0, y: -34} 783 | m_SizeDelta: {x: -64, y: -132} 784 | m_Pivot: {x: 0.5, y: 0.5} 785 | --- !u!114 &1581701912 786 | MonoBehaviour: 787 | m_ObjectHideFlags: 0 788 | m_CorrespondingSourceObject: {fileID: 0} 789 | m_PrefabInstance: {fileID: 0} 790 | m_PrefabAsset: {fileID: 0} 791 | m_GameObject: {fileID: 1581701910} 792 | m_Enabled: 1 793 | m_EditorHideFlags: 0 794 | m_Script: {fileID: 11500000, guid: 1ae5102901ac040e2b6dd5bad5a31af6, type: 3} 795 | m_Name: 796 | m_EditorClassIdentifier: 797 | _camera: {fileID: 771962673} 798 | ToggleCameraEnabled: 1 799 | --- !u!1 &1682864441 800 | GameObject: 801 | m_ObjectHideFlags: 0 802 | m_CorrespondingSourceObject: {fileID: 0} 803 | m_PrefabInstance: {fileID: 0} 804 | m_PrefabAsset: {fileID: 0} 805 | serializedVersion: 6 806 | m_Component: 807 | - component: {fileID: 1682864442} 808 | - component: {fileID: 1682864444} 809 | - component: {fileID: 1682864445} 810 | m_Layer: 5 811 | m_Name: Title 812 | m_TagString: Untagged 813 | m_Icon: {fileID: 0} 814 | m_NavMeshLayer: 0 815 | m_StaticEditorFlags: 0 816 | m_IsActive: 1 817 | --- !u!224 &1682864442 818 | RectTransform: 819 | m_ObjectHideFlags: 0 820 | m_CorrespondingSourceObject: {fileID: 0} 821 | m_PrefabInstance: {fileID: 0} 822 | m_PrefabAsset: {fileID: 0} 823 | m_GameObject: {fileID: 1682864441} 824 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 825 | m_LocalPosition: {x: 0, y: 0, z: 0} 826 | m_LocalScale: {x: 1, y: 1, z: 1} 827 | m_Children: [] 828 | m_Father: {fileID: 1500094530} 829 | m_RootOrder: 0 830 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 831 | m_AnchorMin: {x: 0, y: 1} 832 | m_AnchorMax: {x: 1, y: 1} 833 | m_AnchoredPosition: {x: 0, y: 0} 834 | m_SizeDelta: {x: 0, y: 100} 835 | m_Pivot: {x: 0.5, y: 1} 836 | --- !u!222 &1682864444 837 | CanvasRenderer: 838 | m_ObjectHideFlags: 0 839 | m_CorrespondingSourceObject: {fileID: 0} 840 | m_PrefabInstance: {fileID: 0} 841 | m_PrefabAsset: {fileID: 0} 842 | m_GameObject: {fileID: 1682864441} 843 | m_CullTransparentMesh: 1 844 | --- !u!114 &1682864445 845 | MonoBehaviour: 846 | m_ObjectHideFlags: 0 847 | m_CorrespondingSourceObject: {fileID: 0} 848 | m_PrefabInstance: {fileID: 0} 849 | m_PrefabAsset: {fileID: 0} 850 | m_GameObject: {fileID: 1682864441} 851 | m_Enabled: 1 852 | m_EditorHideFlags: 0 853 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} 854 | m_Name: 855 | m_EditorClassIdentifier: 856 | m_Material: {fileID: 0} 857 | m_Color: {r: 1, g: 1, b: 1, a: 1} 858 | m_RaycastTarget: 1 859 | m_Maskable: 1 860 | m_OnCullStateChanged: 861 | m_PersistentCalls: 862 | m_Calls: [] 863 | m_FontData: 864 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 865 | m_FontSize: 70 866 | m_FontStyle: 0 867 | m_BestFit: 0 868 | m_MinSize: 10 869 | m_MaxSize: 70 870 | m_Alignment: 4 871 | m_AlignByGeometry: 0 872 | m_RichText: 1 873 | m_HorizontalOverflow: 0 874 | m_VerticalOverflow: 0 875 | m_LineSpacing: 1 876 | m_Text: Here's a 3D scene! 877 | --- !u!1 &1708103950 878 | GameObject: 879 | m_ObjectHideFlags: 0 880 | m_CorrespondingSourceObject: {fileID: 0} 881 | m_PrefabInstance: {fileID: 0} 882 | m_PrefabAsset: {fileID: 0} 883 | serializedVersion: 6 884 | m_Component: 885 | - component: {fileID: 1708103954} 886 | - component: {fileID: 1708103953} 887 | - component: {fileID: 1708103952} 888 | - component: {fileID: 1708103951} 889 | m_Layer: 5 890 | m_Name: Canvas 891 | m_TagString: Untagged 892 | m_Icon: {fileID: 0} 893 | m_NavMeshLayer: 0 894 | m_StaticEditorFlags: 0 895 | m_IsActive: 1 896 | --- !u!114 &1708103951 897 | MonoBehaviour: 898 | m_ObjectHideFlags: 0 899 | m_CorrespondingSourceObject: {fileID: 0} 900 | m_PrefabInstance: {fileID: 0} 901 | m_PrefabAsset: {fileID: 0} 902 | m_GameObject: {fileID: 1708103950} 903 | m_Enabled: 1 904 | m_EditorHideFlags: 0 905 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} 906 | m_Name: 907 | m_EditorClassIdentifier: 908 | m_IgnoreReversedGraphics: 1 909 | m_BlockingObjects: 0 910 | m_BlockingMask: 911 | serializedVersion: 2 912 | m_Bits: 4294967295 913 | --- !u!114 &1708103952 914 | MonoBehaviour: 915 | m_ObjectHideFlags: 0 916 | m_CorrespondingSourceObject: {fileID: 0} 917 | m_PrefabInstance: {fileID: 0} 918 | m_PrefabAsset: {fileID: 0} 919 | m_GameObject: {fileID: 1708103950} 920 | m_Enabled: 1 921 | m_EditorHideFlags: 0 922 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} 923 | m_Name: 924 | m_EditorClassIdentifier: 925 | m_UiScaleMode: 1 926 | m_ReferencePixelsPerUnit: 100 927 | m_ScaleFactor: 1 928 | m_ReferenceResolution: {x: 1024, y: 768} 929 | m_ScreenMatchMode: 0 930 | m_MatchWidthOrHeight: 0 931 | m_PhysicalUnit: 3 932 | m_FallbackScreenDPI: 96 933 | m_DefaultSpriteDPI: 96 934 | m_DynamicPixelsPerUnit: 1 935 | --- !u!223 &1708103953 936 | Canvas: 937 | m_ObjectHideFlags: 0 938 | m_CorrespondingSourceObject: {fileID: 0} 939 | m_PrefabInstance: {fileID: 0} 940 | m_PrefabAsset: {fileID: 0} 941 | m_GameObject: {fileID: 1708103950} 942 | m_Enabled: 1 943 | serializedVersion: 3 944 | m_RenderMode: 1 945 | m_Camera: {fileID: 963194227} 946 | m_PlaneDistance: 100 947 | m_PixelPerfect: 0 948 | m_ReceivesEvents: 1 949 | m_OverrideSorting: 0 950 | m_OverridePixelPerfect: 0 951 | m_SortingBucketNormalizedSize: 0 952 | m_AdditionalShaderChannelsFlag: 25 953 | m_SortingLayerID: 0 954 | m_SortingOrder: 0 955 | m_TargetDisplay: 0 956 | --- !u!224 &1708103954 957 | RectTransform: 958 | m_ObjectHideFlags: 0 959 | m_CorrespondingSourceObject: {fileID: 0} 960 | m_PrefabInstance: {fileID: 0} 961 | m_PrefabAsset: {fileID: 0} 962 | m_GameObject: {fileID: 1708103950} 963 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 964 | m_LocalPosition: {x: 0, y: 0, z: 0} 965 | m_LocalScale: {x: 0, y: 0, z: 0} 966 | m_Children: 967 | - {fileID: 1500094530} 968 | m_Father: {fileID: 0} 969 | m_RootOrder: 2 970 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 971 | m_AnchorMin: {x: 0, y: 0} 972 | m_AnchorMax: {x: 0, y: 0} 973 | m_AnchoredPosition: {x: 0, y: 0} 974 | m_SizeDelta: {x: 0, y: 0} 975 | m_Pivot: {x: 0, y: 0} 976 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/RotatingCubeSample.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ef0ccc70ae4a4acc80c1b055d90286a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/ViewportBackground.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 8 6 | m_ObjectHideFlags: 0 7 | m_CorrespondingSourceObject: {fileID: 0} 8 | m_PrefabInstance: {fileID: 0} 9 | m_PrefabAsset: {fileID: 0} 10 | m_Name: ViewportBackground 11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} 12 | m_ValidKeywords: [] 13 | m_InvalidKeywords: [] 14 | m_LightmapFlags: 4 15 | m_EnableInstancingVariants: 0 16 | m_DoubleSidedGI: 0 17 | m_CustomRenderQueue: -1 18 | stringTagMap: {} 19 | disabledShaderPasses: [] 20 | m_SavedProperties: 21 | serializedVersion: 3 22 | m_TexEnvs: 23 | - _BumpMap: 24 | m_Texture: {fileID: 0} 25 | m_Scale: {x: 1, y: 1} 26 | m_Offset: {x: 0, y: 0} 27 | - _DetailAlbedoMap: 28 | m_Texture: {fileID: 0} 29 | m_Scale: {x: 1, y: 1} 30 | m_Offset: {x: 0, y: 0} 31 | - _DetailMask: 32 | m_Texture: {fileID: 0} 33 | m_Scale: {x: 1, y: 1} 34 | m_Offset: {x: 0, y: 0} 35 | - _DetailNormalMap: 36 | m_Texture: {fileID: 0} 37 | m_Scale: {x: 1, y: 1} 38 | m_Offset: {x: 0, y: 0} 39 | - _EmissionMap: 40 | m_Texture: {fileID: 0} 41 | m_Scale: {x: 1, y: 1} 42 | m_Offset: {x: 0, y: 0} 43 | - _MainTex: 44 | m_Texture: {fileID: 0} 45 | m_Scale: {x: 1, y: 1} 46 | m_Offset: {x: 0, y: 0} 47 | - _MetallicGlossMap: 48 | m_Texture: {fileID: 0} 49 | m_Scale: {x: 1, y: 1} 50 | m_Offset: {x: 0, y: 0} 51 | - _OcclusionMap: 52 | m_Texture: {fileID: 0} 53 | m_Scale: {x: 1, y: 1} 54 | m_Offset: {x: 0, y: 0} 55 | - _ParallaxMap: 56 | m_Texture: {fileID: 0} 57 | m_Scale: {x: 1, y: 1} 58 | m_Offset: {x: 0, y: 0} 59 | m_Ints: [] 60 | m_Floats: 61 | - _BumpScale: 1 62 | - _Cutoff: 0.5 63 | - _DetailNormalMapScale: 1 64 | - _DstBlend: 0 65 | - _GlossMapScale: 1 66 | - _Glossiness: 0.5 67 | - _GlossyReflections: 1 68 | - _Metallic: 0 69 | - _Mode: 0 70 | - _OcclusionStrength: 1 71 | - _Parallax: 0.02 72 | - _SmoothnessTextureChannel: 0 73 | - _SpecularHighlights: 1 74 | - _SrcBlend: 1 75 | - _UVSec: 0 76 | - _ZWrite: 1 77 | m_Colors: 78 | - _Color: {r: 0.20015359, g: 1, b: 0, a: 1} 79 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} 80 | m_BuildTextureStacks: [] 81 | -------------------------------------------------------------------------------- /Samples~/RotatingCube/ViewportBackground.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b8debeea20b245b2af2414acdfc6e4f 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 2100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /UNLICENSE.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 42a51bb15a73f4f5183f3c57e36f2668 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.gilzoide.camera-viewport-rect", 3 | "displayName": "Camera Viewport Rect", 4 | "version": "1.0.1", 5 | "description": "Automatically setup Camera viewports from RectTransforms\n\nThis way one can easily show 3D models directly into responsive UI without the need of setting up RenderTextures", 6 | "homepage": "https://github.com/gilzoide/unity-camera-viewport-rect", 7 | "license": "Unlicense", 8 | "author": { 9 | "name": "Gil Barbosa Reis" 10 | }, 11 | "samples": [ 12 | { 13 | "displayName": "Rotating Cube Sample", 14 | "description": "Simple sample with a rotating cube that appears on a responsive UI", 15 | "path": "Samples~/RotatingCube" 16 | } 17 | ] 18 | } -------------------------------------------------------------------------------- /package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d40eff55113c84b9984b96a6a09b512a 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | --------------------------------------------------------------------------------