├── .gitignore ├── README.md ├── Scenes ├── UIBehaviors-Example.unity └── UIBehaviors_Example.cs └── Scripts ├── UIFadeAway.cs ├── UIGroupFader.cs ├── UIPulse.cs ├── UIShaker.cs ├── UISlamIn.cs └── UIValueAnimator.cs /.gitignore: -------------------------------------------------------------------------------- 1 | *.meta -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UIBehaviorKit 2 | 3 | This library provides visual behaviors for UI elements in the Unity Engine. 4 | 5 | #### Isn't this stuff already handled by Unity's animation system? 6 | 7 | Sure, but if you're like me, you'd rather control everything from code. I find it frustrating dealing with Unity's animation system -- the overhead of animations & animators, and the ambiguity trying to decipher the current state an animation may be in. This code also handles a lot of the legwork of allowing an action to be cut-off and redirected mid-animation. 8 | 9 | ## License 10 | 11 | This code is freely available to you via the [WTFPL License](https://en.wikipedia.org/wiki/WTFPL) 12 | 13 | ## Examples 14 | Examples of each are provided in the scene UIBehaviors-Example.unity found in the 'Scenes' folder. 15 | 16 | TODO: Show examples in GIF format. 17 | 18 | ## Behaviors 19 | ### UIFadeAway 20 | Place this on a MaskableGraphic such as Image or Text and call Fade to make it fade away and grow. 21 | NOTE: Growth will happen relative to the pivot point of the element. This means if your pivot is on the top left, it will grow toward the bottom right. 22 | ### UISlamIn 23 | Place this on a UI element such as Image or Text and you can call "Slam" on it to have the text slam into place. 24 | ### UIPulse 25 | Place this on a maskable UI element such as Image or Text and it will pulse through the colors laid out in colorPattern. 26 | ### UIShaker 27 | Place this on a UI element and shake it all around by calling Shake on this component. 28 | ### UIValueAnimator 29 | Place this on a Text element and call AnimateValue to change the value over time, "tallying" the result. 30 | ### UIGroupFader 31 | Used to fade an entire group of UI elements together. All children of this object will be affected. 32 | Introduce a delay to create a cascading effect without having to manage coroutines. 33 | -------------------------------------------------------------------------------- /Scenes/UIBehaviors-Example.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: 8 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: 0} 41 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 42 | --- !u!157 &3 43 | LightmapSettings: 44 | m_ObjectHideFlags: 0 45 | serializedVersion: 11 46 | m_GIWorkflowMode: 1 47 | m_GISettings: 48 | serializedVersion: 2 49 | m_BounceScale: 1 50 | m_IndirectOutputScale: 1 51 | m_AlbedoBoost: 1 52 | m_TemporalCoherenceThreshold: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 1 56 | m_LightmapEditorSettings: 57 | serializedVersion: 9 58 | m_Resolution: 2 59 | m_BakeResolution: 40 60 | m_TextureWidth: 1024 61 | m_TextureHeight: 1024 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 0 65 | m_CompAOExponentDirect: 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: 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_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 0 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 0 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &112553627 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_PrefabParentObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 5 122 | m_Component: 123 | - component: {fileID: 112553628} 124 | - component: {fileID: 112553631} 125 | - component: {fileID: 112553630} 126 | - component: {fileID: 112553629} 127 | m_Layer: 5 128 | m_Name: UISlamIn 129 | m_TagString: Untagged 130 | m_Icon: {fileID: 0} 131 | m_NavMeshLayer: 0 132 | m_StaticEditorFlags: 0 133 | m_IsActive: 1 134 | --- !u!224 &112553628 135 | RectTransform: 136 | m_ObjectHideFlags: 0 137 | m_PrefabParentObject: {fileID: 0} 138 | m_PrefabInternal: {fileID: 0} 139 | m_GameObject: {fileID: 112553627} 140 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 141 | m_LocalPosition: {x: 0, y: 0, z: 0} 142 | m_LocalScale: {x: 1, y: 1, z: 1} 143 | m_Children: [] 144 | m_Father: {fileID: 1448656527} 145 | m_RootOrder: 3 146 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 147 | m_AnchorMin: {x: 0, y: 1} 148 | m_AnchorMax: {x: 0, y: 1} 149 | m_AnchoredPosition: {x: 139.5, y: -192.5} 150 | m_SizeDelta: {x: 279, y: 55} 151 | m_Pivot: {x: 0.5, y: 0.5} 152 | --- !u!114 &112553629 153 | MonoBehaviour: 154 | m_ObjectHideFlags: 0 155 | m_PrefabParentObject: {fileID: 0} 156 | m_PrefabInternal: {fileID: 0} 157 | m_GameObject: {fileID: 112553627} 158 | m_Enabled: 1 159 | m_EditorHideFlags: 0 160 | m_Script: {fileID: 11500000, guid: be2f487c927ec466fa5595e96ff442c8, type: 3} 161 | m_Name: 162 | m_EditorClassIdentifier: 163 | curve: 164 | m_Curve: 165 | - time: 0 166 | value: 0 167 | inSlope: 2 168 | outSlope: 2 169 | tangentMode: 0 170 | - time: 1 171 | value: 1 172 | inSlope: 0 173 | outSlope: 0 174 | tangentMode: 0 175 | m_PreInfinity: 2 176 | m_PostInfinity: 2 177 | m_RotationOrder: 0 178 | slamSize: 2 179 | slamTime: 0.5 180 | slamImmediately: 0 181 | --- !u!114 &112553630 182 | MonoBehaviour: 183 | m_ObjectHideFlags: 0 184 | m_PrefabParentObject: {fileID: 0} 185 | m_PrefabInternal: {fileID: 0} 186 | m_GameObject: {fileID: 112553627} 187 | m_Enabled: 1 188 | m_EditorHideFlags: 0 189 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 190 | m_Name: 191 | m_EditorClassIdentifier: 192 | m_Material: {fileID: 0} 193 | m_Color: {r: 1, g: 1, b: 1, a: 1} 194 | m_RaycastTarget: 1 195 | m_OnCullStateChanged: 196 | m_PersistentCalls: 197 | m_Calls: [] 198 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 199 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 200 | m_FontData: 201 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 202 | m_FontSize: 26 203 | m_FontStyle: 0 204 | m_BestFit: 0 205 | m_MinSize: 10 206 | m_MaxSize: 54 207 | m_Alignment: 4 208 | m_AlignByGeometry: 0 209 | m_RichText: 1 210 | m_HorizontalOverflow: 0 211 | m_VerticalOverflow: 0 212 | m_LineSpacing: 1 213 | m_Text: UI Slam In 214 | --- !u!222 &112553631 215 | CanvasRenderer: 216 | m_ObjectHideFlags: 0 217 | m_PrefabParentObject: {fileID: 0} 218 | m_PrefabInternal: {fileID: 0} 219 | m_GameObject: {fileID: 112553627} 220 | --- !u!1 &142953189 221 | GameObject: 222 | m_ObjectHideFlags: 0 223 | m_PrefabParentObject: {fileID: 0} 224 | m_PrefabInternal: {fileID: 0} 225 | serializedVersion: 5 226 | m_Component: 227 | - component: {fileID: 142953192} 228 | - component: {fileID: 142953191} 229 | - component: {fileID: 142953190} 230 | m_Layer: 0 231 | m_Name: EventSystem 232 | m_TagString: Untagged 233 | m_Icon: {fileID: 0} 234 | m_NavMeshLayer: 0 235 | m_StaticEditorFlags: 0 236 | m_IsActive: 1 237 | --- !u!114 &142953190 238 | MonoBehaviour: 239 | m_ObjectHideFlags: 0 240 | m_PrefabParentObject: {fileID: 0} 241 | m_PrefabInternal: {fileID: 0} 242 | m_GameObject: {fileID: 142953189} 243 | m_Enabled: 1 244 | m_EditorHideFlags: 0 245 | m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 246 | m_Name: 247 | m_EditorClassIdentifier: 248 | m_HorizontalAxis: Horizontal 249 | m_VerticalAxis: Vertical 250 | m_SubmitButton: Submit 251 | m_CancelButton: Cancel 252 | m_InputActionsPerSecond: 10 253 | m_RepeatDelay: 0.5 254 | m_ForceModuleActive: 0 255 | --- !u!114 &142953191 256 | MonoBehaviour: 257 | m_ObjectHideFlags: 0 258 | m_PrefabParentObject: {fileID: 0} 259 | m_PrefabInternal: {fileID: 0} 260 | m_GameObject: {fileID: 142953189} 261 | m_Enabled: 1 262 | m_EditorHideFlags: 0 263 | m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 264 | m_Name: 265 | m_EditorClassIdentifier: 266 | m_FirstSelected: {fileID: 0} 267 | m_sendNavigationEvents: 1 268 | m_DragThreshold: 5 269 | --- !u!4 &142953192 270 | Transform: 271 | m_ObjectHideFlags: 0 272 | m_PrefabParentObject: {fileID: 0} 273 | m_PrefabInternal: {fileID: 0} 274 | m_GameObject: {fileID: 142953189} 275 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 276 | m_LocalPosition: {x: 0, y: 0, z: 0} 277 | m_LocalScale: {x: 1, y: 1, z: 1} 278 | m_Children: [] 279 | m_Father: {fileID: 0} 280 | m_RootOrder: 3 281 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 282 | --- !u!1 &454780381 283 | GameObject: 284 | m_ObjectHideFlags: 0 285 | m_PrefabParentObject: {fileID: 0} 286 | m_PrefabInternal: {fileID: 0} 287 | serializedVersion: 5 288 | m_Component: 289 | - component: {fileID: 454780382} 290 | - component: {fileID: 454780383} 291 | m_Layer: 5 292 | m_Name: GroupFive 293 | m_TagString: Untagged 294 | m_Icon: {fileID: 0} 295 | m_NavMeshLayer: 0 296 | m_StaticEditorFlags: 0 297 | m_IsActive: 1 298 | --- !u!224 &454780382 299 | RectTransform: 300 | m_ObjectHideFlags: 0 301 | m_PrefabParentObject: {fileID: 0} 302 | m_PrefabInternal: {fileID: 0} 303 | m_GameObject: {fileID: 454780381} 304 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 305 | m_LocalPosition: {x: 0, y: 0, z: 0} 306 | m_LocalScale: {x: 1, y: 1, z: 1} 307 | m_Children: 308 | - {fileID: 1471412478} 309 | - {fileID: 1602449278} 310 | m_Father: {fileID: 1584191609} 311 | m_RootOrder: 4 312 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 313 | m_AnchorMin: {x: 1, y: 1} 314 | m_AnchorMax: {x: 1, y: 1} 315 | m_AnchoredPosition: {x: 0, y: -175} 316 | m_SizeDelta: {x: 221, y: 45} 317 | m_Pivot: {x: 1, y: 1} 318 | --- !u!114 &454780383 319 | MonoBehaviour: 320 | m_ObjectHideFlags: 0 321 | m_PrefabParentObject: {fileID: 0} 322 | m_PrefabInternal: {fileID: 0} 323 | m_GameObject: {fileID: 454780381} 324 | m_Enabled: 1 325 | m_EditorHideFlags: 0 326 | m_Script: {fileID: 11500000, guid: 318fa12cc93744afe8fc40c61343ead6, type: 3} 327 | m_Name: 328 | m_EditorClassIdentifier: 329 | changeRate: 0.75 330 | changeDelay: 2 331 | startOpacity: 0 332 | goalOpacity: 1 333 | --- !u!1 &585401851 334 | GameObject: 335 | m_ObjectHideFlags: 0 336 | m_PrefabParentObject: {fileID: 0} 337 | m_PrefabInternal: {fileID: 0} 338 | serializedVersion: 5 339 | m_Component: 340 | - component: {fileID: 585401852} 341 | - component: {fileID: 585401855} 342 | - component: {fileID: 585401854} 343 | m_Layer: 5 344 | m_Name: LineOne 345 | m_TagString: Untagged 346 | m_Icon: {fileID: 0} 347 | m_NavMeshLayer: 0 348 | m_StaticEditorFlags: 0 349 | m_IsActive: 1 350 | --- !u!224 &585401852 351 | RectTransform: 352 | m_ObjectHideFlags: 0 353 | m_PrefabParentObject: {fileID: 0} 354 | m_PrefabInternal: {fileID: 0} 355 | m_GameObject: {fileID: 585401851} 356 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 357 | m_LocalPosition: {x: 0, y: 0, z: 0} 358 | m_LocalScale: {x: 1, y: 1, z: 1} 359 | m_Children: [] 360 | m_Father: {fileID: 692094606} 361 | m_RootOrder: 0 362 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 363 | m_AnchorMin: {x: 0, y: 0.5} 364 | m_AnchorMax: {x: 0, y: 0.5} 365 | m_AnchoredPosition: {x: 0, y: 0} 366 | m_SizeDelta: {x: 122, y: 45} 367 | m_Pivot: {x: 0, y: 0.5} 368 | --- !u!114 &585401854 369 | MonoBehaviour: 370 | m_ObjectHideFlags: 0 371 | m_PrefabParentObject: {fileID: 0} 372 | m_PrefabInternal: {fileID: 0} 373 | m_GameObject: {fileID: 585401851} 374 | m_Enabled: 1 375 | m_EditorHideFlags: 0 376 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 377 | m_Name: 378 | m_EditorClassIdentifier: 379 | m_Material: {fileID: 0} 380 | m_Color: {r: 1, g: 1, b: 1, a: 1} 381 | m_RaycastTarget: 1 382 | m_OnCullStateChanged: 383 | m_PersistentCalls: 384 | m_Calls: [] 385 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 386 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 387 | m_FontData: 388 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 389 | m_FontSize: 26 390 | m_FontStyle: 0 391 | m_BestFit: 0 392 | m_MinSize: 10 393 | m_MaxSize: 54 394 | m_Alignment: 3 395 | m_AlignByGeometry: 0 396 | m_RichText: 1 397 | m_HorizontalOverflow: 0 398 | m_VerticalOverflow: 0 399 | m_LineSpacing: 1 400 | m_Text: 'Line Two 401 | 402 | ' 403 | --- !u!222 &585401855 404 | CanvasRenderer: 405 | m_ObjectHideFlags: 0 406 | m_PrefabParentObject: {fileID: 0} 407 | m_PrefabInternal: {fileID: 0} 408 | m_GameObject: {fileID: 585401851} 409 | --- !u!1 &606290945 410 | GameObject: 411 | m_ObjectHideFlags: 0 412 | m_PrefabParentObject: {fileID: 0} 413 | m_PrefabInternal: {fileID: 0} 414 | serializedVersion: 5 415 | m_Component: 416 | - component: {fileID: 606290946} 417 | - component: {fileID: 606290949} 418 | - component: {fileID: 606290948} 419 | m_Layer: 5 420 | m_Name: LineOne (1) 421 | m_TagString: Untagged 422 | m_Icon: {fileID: 0} 423 | m_NavMeshLayer: 0 424 | m_StaticEditorFlags: 0 425 | m_IsActive: 1 426 | --- !u!224 &606290946 427 | RectTransform: 428 | m_ObjectHideFlags: 0 429 | m_PrefabParentObject: {fileID: 0} 430 | m_PrefabInternal: {fileID: 0} 431 | m_GameObject: {fileID: 606290945} 432 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 433 | m_LocalPosition: {x: 0, y: 0, z: 0} 434 | m_LocalScale: {x: 1, y: 1, z: 1} 435 | m_Children: [] 436 | m_Father: {fileID: 673404802} 437 | m_RootOrder: 1 438 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 439 | m_AnchorMin: {x: 1, y: 0.5} 440 | m_AnchorMax: {x: 1, y: 0.5} 441 | m_AnchoredPosition: {x: 0, y: 0} 442 | m_SizeDelta: {x: 122, y: 45} 443 | m_Pivot: {x: 1, y: 0.5} 444 | --- !u!114 &606290948 445 | MonoBehaviour: 446 | m_ObjectHideFlags: 0 447 | m_PrefabParentObject: {fileID: 0} 448 | m_PrefabInternal: {fileID: 0} 449 | m_GameObject: {fileID: 606290945} 450 | m_Enabled: 1 451 | m_EditorHideFlags: 0 452 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 453 | m_Name: 454 | m_EditorClassIdentifier: 455 | m_Material: {fileID: 0} 456 | m_Color: {r: 1, g: 1, b: 1, a: 1} 457 | m_RaycastTarget: 1 458 | m_OnCullStateChanged: 459 | m_PersistentCalls: 460 | m_Calls: [] 461 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 462 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 463 | m_FontData: 464 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 465 | m_FontSize: 26 466 | m_FontStyle: 0 467 | m_BestFit: 0 468 | m_MinSize: 10 469 | m_MaxSize: 54 470 | m_Alignment: 5 471 | m_AlignByGeometry: 0 472 | m_RichText: 1 473 | m_HorizontalOverflow: 0 474 | m_VerticalOverflow: 0 475 | m_LineSpacing: 1 476 | m_Text: 688 477 | --- !u!222 &606290949 478 | CanvasRenderer: 479 | m_ObjectHideFlags: 0 480 | m_PrefabParentObject: {fileID: 0} 481 | m_PrefabInternal: {fileID: 0} 482 | m_GameObject: {fileID: 606290945} 483 | --- !u!1 &673404801 484 | GameObject: 485 | m_ObjectHideFlags: 0 486 | m_PrefabParentObject: {fileID: 0} 487 | m_PrefabInternal: {fileID: 0} 488 | serializedVersion: 5 489 | m_Component: 490 | - component: {fileID: 673404802} 491 | - component: {fileID: 673404803} 492 | m_Layer: 5 493 | m_Name: GroupFour 494 | m_TagString: Untagged 495 | m_Icon: {fileID: 0} 496 | m_NavMeshLayer: 0 497 | m_StaticEditorFlags: 0 498 | m_IsActive: 1 499 | --- !u!224 &673404802 500 | RectTransform: 501 | m_ObjectHideFlags: 0 502 | m_PrefabParentObject: {fileID: 0} 503 | m_PrefabInternal: {fileID: 0} 504 | m_GameObject: {fileID: 673404801} 505 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 506 | m_LocalPosition: {x: 0, y: 0, z: 0} 507 | m_LocalScale: {x: 1, y: 1, z: 1} 508 | m_Children: 509 | - {fileID: 1621045120} 510 | - {fileID: 606290946} 511 | m_Father: {fileID: 1584191609} 512 | m_RootOrder: 3 513 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 514 | m_AnchorMin: {x: 1, y: 1} 515 | m_AnchorMax: {x: 1, y: 1} 516 | m_AnchoredPosition: {x: 0, y: -132.5} 517 | m_SizeDelta: {x: 221, y: 45} 518 | m_Pivot: {x: 1, y: 1} 519 | --- !u!114 &673404803 520 | MonoBehaviour: 521 | m_ObjectHideFlags: 0 522 | m_PrefabParentObject: {fileID: 0} 523 | m_PrefabInternal: {fileID: 0} 524 | m_GameObject: {fileID: 673404801} 525 | m_Enabled: 1 526 | m_EditorHideFlags: 0 527 | m_Script: {fileID: 11500000, guid: 318fa12cc93744afe8fc40c61343ead6, type: 3} 528 | m_Name: 529 | m_EditorClassIdentifier: 530 | changeRate: 0.75 531 | changeDelay: 1.5 532 | startOpacity: 0 533 | goalOpacity: 1 534 | --- !u!1 &692094605 535 | GameObject: 536 | m_ObjectHideFlags: 0 537 | m_PrefabParentObject: {fileID: 0} 538 | m_PrefabInternal: {fileID: 0} 539 | serializedVersion: 5 540 | m_Component: 541 | - component: {fileID: 692094606} 542 | - component: {fileID: 692094607} 543 | m_Layer: 5 544 | m_Name: GroupTwo 545 | m_TagString: Untagged 546 | m_Icon: {fileID: 0} 547 | m_NavMeshLayer: 0 548 | m_StaticEditorFlags: 0 549 | m_IsActive: 1 550 | --- !u!224 &692094606 551 | RectTransform: 552 | m_ObjectHideFlags: 0 553 | m_PrefabParentObject: {fileID: 0} 554 | m_PrefabInternal: {fileID: 0} 555 | m_GameObject: {fileID: 692094605} 556 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 557 | m_LocalPosition: {x: 0, y: 0, z: 0} 558 | m_LocalScale: {x: 1, y: 1, z: 1} 559 | m_Children: 560 | - {fileID: 585401852} 561 | - {fileID: 2101037260} 562 | m_Father: {fileID: 1584191609} 563 | m_RootOrder: 1 564 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 565 | m_AnchorMin: {x: 1, y: 1} 566 | m_AnchorMax: {x: 1, y: 1} 567 | m_AnchoredPosition: {x: 0, y: -45} 568 | m_SizeDelta: {x: 221, y: 45} 569 | m_Pivot: {x: 1, y: 1} 570 | --- !u!114 &692094607 571 | MonoBehaviour: 572 | m_ObjectHideFlags: 0 573 | m_PrefabParentObject: {fileID: 0} 574 | m_PrefabInternal: {fileID: 0} 575 | m_GameObject: {fileID: 692094605} 576 | m_Enabled: 1 577 | m_EditorHideFlags: 0 578 | m_Script: {fileID: 11500000, guid: 318fa12cc93744afe8fc40c61343ead6, type: 3} 579 | m_Name: 580 | m_EditorClassIdentifier: 581 | changeRate: 0.75 582 | changeDelay: 0.5 583 | startOpacity: 0 584 | goalOpacity: 1 585 | --- !u!1 &774538231 586 | GameObject: 587 | m_ObjectHideFlags: 0 588 | m_PrefabParentObject: {fileID: 0} 589 | m_PrefabInternal: {fileID: 0} 590 | serializedVersion: 5 591 | m_Component: 592 | - component: {fileID: 774538232} 593 | - component: {fileID: 774538235} 594 | - component: {fileID: 774538234} 595 | - component: {fileID: 774538233} 596 | m_Layer: 5 597 | m_Name: UIShaker 598 | m_TagString: Untagged 599 | m_Icon: {fileID: 0} 600 | m_NavMeshLayer: 0 601 | m_StaticEditorFlags: 0 602 | m_IsActive: 1 603 | --- !u!224 &774538232 604 | RectTransform: 605 | m_ObjectHideFlags: 0 606 | m_PrefabParentObject: {fileID: 0} 607 | m_PrefabInternal: {fileID: 0} 608 | m_GameObject: {fileID: 774538231} 609 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 610 | m_LocalPosition: {x: 0, y: 0, z: 0} 611 | m_LocalScale: {x: 1, y: 1, z: 1} 612 | m_Children: [] 613 | m_Father: {fileID: 1448656527} 614 | m_RootOrder: 2 615 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 616 | m_AnchorMin: {x: 0, y: 1} 617 | m_AnchorMax: {x: 0, y: 1} 618 | m_AnchoredPosition: {x: 139.5, y: -137.5} 619 | m_SizeDelta: {x: 279, y: 55} 620 | m_Pivot: {x: 0.5, y: 0.5} 621 | --- !u!114 &774538233 622 | MonoBehaviour: 623 | m_ObjectHideFlags: 0 624 | m_PrefabParentObject: {fileID: 0} 625 | m_PrefabInternal: {fileID: 0} 626 | m_GameObject: {fileID: 774538231} 627 | m_Enabled: 1 628 | m_EditorHideFlags: 0 629 | m_Script: {fileID: 11500000, guid: e73f7f761894f483688b44a688828691, type: 3} 630 | m_Name: 631 | m_EditorClassIdentifier: 632 | --- !u!114 &774538234 633 | MonoBehaviour: 634 | m_ObjectHideFlags: 0 635 | m_PrefabParentObject: {fileID: 0} 636 | m_PrefabInternal: {fileID: 0} 637 | m_GameObject: {fileID: 774538231} 638 | m_Enabled: 1 639 | m_EditorHideFlags: 0 640 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 641 | m_Name: 642 | m_EditorClassIdentifier: 643 | m_Material: {fileID: 0} 644 | m_Color: {r: 1, g: 1, b: 1, a: 1} 645 | m_RaycastTarget: 1 646 | m_OnCullStateChanged: 647 | m_PersistentCalls: 648 | m_Calls: [] 649 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 650 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 651 | m_FontData: 652 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 653 | m_FontSize: 26 654 | m_FontStyle: 0 655 | m_BestFit: 0 656 | m_MinSize: 10 657 | m_MaxSize: 54 658 | m_Alignment: 4 659 | m_AlignByGeometry: 0 660 | m_RichText: 1 661 | m_HorizontalOverflow: 0 662 | m_VerticalOverflow: 0 663 | m_LineSpacing: 1 664 | m_Text: UI Shaker 665 | --- !u!222 &774538235 666 | CanvasRenderer: 667 | m_ObjectHideFlags: 0 668 | m_PrefabParentObject: {fileID: 0} 669 | m_PrefabInternal: {fileID: 0} 670 | m_GameObject: {fileID: 774538231} 671 | --- !u!1 &969676918 672 | GameObject: 673 | m_ObjectHideFlags: 0 674 | m_PrefabParentObject: {fileID: 0} 675 | m_PrefabInternal: {fileID: 0} 676 | serializedVersion: 5 677 | m_Component: 678 | - component: {fileID: 969676919} 679 | - component: {fileID: 969676920} 680 | m_Layer: 0 681 | m_Name: DemoController 682 | m_TagString: Untagged 683 | m_Icon: {fileID: 0} 684 | m_NavMeshLayer: 0 685 | m_StaticEditorFlags: 0 686 | m_IsActive: 1 687 | --- !u!4 &969676919 688 | Transform: 689 | m_ObjectHideFlags: 0 690 | m_PrefabParentObject: {fileID: 0} 691 | m_PrefabInternal: {fileID: 0} 692 | m_GameObject: {fileID: 969676918} 693 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 694 | m_LocalPosition: {x: 303.2068, y: 158.69046, z: 0} 695 | m_LocalScale: {x: 1, y: 1, z: 1} 696 | m_Children: [] 697 | m_Father: {fileID: 0} 698 | m_RootOrder: 4 699 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 700 | --- !u!114 &969676920 701 | MonoBehaviour: 702 | m_ObjectHideFlags: 0 703 | m_PrefabParentObject: {fileID: 0} 704 | m_PrefabInternal: {fileID: 0} 705 | m_GameObject: {fileID: 969676918} 706 | m_Enabled: 1 707 | m_EditorHideFlags: 0 708 | m_Script: {fileID: 11500000, guid: 2e758bcb4bdb140bd898f5681b8e68cd, type: 3} 709 | m_Name: 710 | m_EditorClassIdentifier: 711 | --- !u!1 &1001061048 712 | GameObject: 713 | m_ObjectHideFlags: 0 714 | m_PrefabParentObject: {fileID: 0} 715 | m_PrefabInternal: {fileID: 0} 716 | serializedVersion: 5 717 | m_Component: 718 | - component: {fileID: 1001061049} 719 | - component: {fileID: 1001061051} 720 | - component: {fileID: 1001061050} 721 | - component: {fileID: 1001061052} 722 | m_Layer: 5 723 | m_Name: UIFadeAway 724 | m_TagString: Untagged 725 | m_Icon: {fileID: 0} 726 | m_NavMeshLayer: 0 727 | m_StaticEditorFlags: 0 728 | m_IsActive: 1 729 | --- !u!224 &1001061049 730 | RectTransform: 731 | m_ObjectHideFlags: 0 732 | m_PrefabParentObject: {fileID: 0} 733 | m_PrefabInternal: {fileID: 0} 734 | m_GameObject: {fileID: 1001061048} 735 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 736 | m_LocalPosition: {x: 0, y: 0, z: 0} 737 | m_LocalScale: {x: 1, y: 1, z: 1} 738 | m_Children: [] 739 | m_Father: {fileID: 1448656527} 740 | m_RootOrder: 0 741 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 742 | m_AnchorMin: {x: 0, y: 1} 743 | m_AnchorMax: {x: 0, y: 1} 744 | m_AnchoredPosition: {x: 139.5, y: -27.5} 745 | m_SizeDelta: {x: 279, y: 55} 746 | m_Pivot: {x: 0.5, y: 0.5} 747 | --- !u!114 &1001061050 748 | MonoBehaviour: 749 | m_ObjectHideFlags: 0 750 | m_PrefabParentObject: {fileID: 0} 751 | m_PrefabInternal: {fileID: 0} 752 | m_GameObject: {fileID: 1001061048} 753 | m_Enabled: 1 754 | m_EditorHideFlags: 0 755 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 756 | m_Name: 757 | m_EditorClassIdentifier: 758 | m_Material: {fileID: 0} 759 | m_Color: {r: 1, g: 1, b: 1, a: 1} 760 | m_RaycastTarget: 1 761 | m_OnCullStateChanged: 762 | m_PersistentCalls: 763 | m_Calls: [] 764 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 765 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 766 | m_FontData: 767 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 768 | m_FontSize: 26 769 | m_FontStyle: 0 770 | m_BestFit: 0 771 | m_MinSize: 10 772 | m_MaxSize: 54 773 | m_Alignment: 4 774 | m_AlignByGeometry: 0 775 | m_RichText: 1 776 | m_HorizontalOverflow: 0 777 | m_VerticalOverflow: 0 778 | m_LineSpacing: 1 779 | m_Text: UI Fade Away 780 | --- !u!222 &1001061051 781 | CanvasRenderer: 782 | m_ObjectHideFlags: 0 783 | m_PrefabParentObject: {fileID: 0} 784 | m_PrefabInternal: {fileID: 0} 785 | m_GameObject: {fileID: 1001061048} 786 | --- !u!114 &1001061052 787 | MonoBehaviour: 788 | m_ObjectHideFlags: 0 789 | m_PrefabParentObject: {fileID: 0} 790 | m_PrefabInternal: {fileID: 0} 791 | m_GameObject: {fileID: 1001061048} 792 | m_Enabled: 1 793 | m_EditorHideFlags: 0 794 | m_Script: {fileID: 11500000, guid: d2c3a39bdcda1f34db3449986fd0a833, type: 3} 795 | m_Name: 796 | m_EditorClassIdentifier: 797 | curve: 798 | m_Curve: 799 | - time: 0 800 | value: 0 801 | inSlope: 2 802 | outSlope: 2 803 | tangentMode: 0 804 | - time: 1 805 | value: 1 806 | inSlope: 0 807 | outSlope: 0 808 | tangentMode: 0 809 | m_PreInfinity: 2 810 | m_PostInfinity: 2 811 | m_RotationOrder: 0 812 | fadeSize: 4 813 | fadeTime: 1 814 | fadeImmediately: 0 815 | --- !u!1 &1335263719 816 | GameObject: 817 | m_ObjectHideFlags: 0 818 | m_PrefabParentObject: {fileID: 0} 819 | m_PrefabInternal: {fileID: 0} 820 | serializedVersion: 5 821 | m_Component: 822 | - component: {fileID: 1335263720} 823 | - component: {fileID: 1335263721} 824 | m_Layer: 5 825 | m_Name: GroupThree 826 | m_TagString: Untagged 827 | m_Icon: {fileID: 0} 828 | m_NavMeshLayer: 0 829 | m_StaticEditorFlags: 0 830 | m_IsActive: 1 831 | --- !u!224 &1335263720 832 | RectTransform: 833 | m_ObjectHideFlags: 0 834 | m_PrefabParentObject: {fileID: 0} 835 | m_PrefabInternal: {fileID: 0} 836 | m_GameObject: {fileID: 1335263719} 837 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 838 | m_LocalPosition: {x: 0, y: 0, z: 0} 839 | m_LocalScale: {x: 1, y: 1, z: 1} 840 | m_Children: 841 | - {fileID: 1449900163} 842 | - {fileID: 1758915286} 843 | m_Father: {fileID: 1584191609} 844 | m_RootOrder: 2 845 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 846 | m_AnchorMin: {x: 1, y: 1} 847 | m_AnchorMax: {x: 1, y: 1} 848 | m_AnchoredPosition: {x: 0, y: -87.5} 849 | m_SizeDelta: {x: 221, y: 45} 850 | m_Pivot: {x: 1, y: 1} 851 | --- !u!114 &1335263721 852 | MonoBehaviour: 853 | m_ObjectHideFlags: 0 854 | m_PrefabParentObject: {fileID: 0} 855 | m_PrefabInternal: {fileID: 0} 856 | m_GameObject: {fileID: 1335263719} 857 | m_Enabled: 1 858 | m_EditorHideFlags: 0 859 | m_Script: {fileID: 11500000, guid: 318fa12cc93744afe8fc40c61343ead6, type: 3} 860 | m_Name: 861 | m_EditorClassIdentifier: 862 | changeRate: 0.75 863 | changeDelay: 1 864 | startOpacity: 0 865 | goalOpacity: 1 866 | --- !u!1 &1378001915 867 | GameObject: 868 | m_ObjectHideFlags: 0 869 | m_PrefabParentObject: {fileID: 0} 870 | m_PrefabInternal: {fileID: 0} 871 | serializedVersion: 5 872 | m_Component: 873 | - component: {fileID: 1378001916} 874 | - component: {fileID: 1378001919} 875 | - component: {fileID: 1378001918} 876 | m_Layer: 5 877 | m_Name: LineOne (1) 878 | m_TagString: Untagged 879 | m_Icon: {fileID: 0} 880 | m_NavMeshLayer: 0 881 | m_StaticEditorFlags: 0 882 | m_IsActive: 1 883 | --- !u!224 &1378001916 884 | RectTransform: 885 | m_ObjectHideFlags: 0 886 | m_PrefabParentObject: {fileID: 0} 887 | m_PrefabInternal: {fileID: 0} 888 | m_GameObject: {fileID: 1378001915} 889 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 890 | m_LocalPosition: {x: 0, y: 0, z: 0} 891 | m_LocalScale: {x: 1, y: 1, z: 1} 892 | m_Children: [] 893 | m_Father: {fileID: 1932872830} 894 | m_RootOrder: 1 895 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 896 | m_AnchorMin: {x: 1, y: 0.5} 897 | m_AnchorMax: {x: 1, y: 0.5} 898 | m_AnchoredPosition: {x: 0, y: 0} 899 | m_SizeDelta: {x: 122, y: 45} 900 | m_Pivot: {x: 1, y: 0.5} 901 | --- !u!114 &1378001918 902 | MonoBehaviour: 903 | m_ObjectHideFlags: 0 904 | m_PrefabParentObject: {fileID: 0} 905 | m_PrefabInternal: {fileID: 0} 906 | m_GameObject: {fileID: 1378001915} 907 | m_Enabled: 1 908 | m_EditorHideFlags: 0 909 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 910 | m_Name: 911 | m_EditorClassIdentifier: 912 | m_Material: {fileID: 0} 913 | m_Color: {r: 1, g: 1, b: 1, a: 1} 914 | m_RaycastTarget: 1 915 | m_OnCullStateChanged: 916 | m_PersistentCalls: 917 | m_Calls: [] 918 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 919 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 920 | m_FontData: 921 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 922 | m_FontSize: 26 923 | m_FontStyle: 0 924 | m_BestFit: 0 925 | m_MinSize: 10 926 | m_MaxSize: 54 927 | m_Alignment: 5 928 | m_AlignByGeometry: 0 929 | m_RichText: 1 930 | m_HorizontalOverflow: 0 931 | m_VerticalOverflow: 0 932 | m_LineSpacing: 1 933 | m_Text: 801 934 | --- !u!222 &1378001919 935 | CanvasRenderer: 936 | m_ObjectHideFlags: 0 937 | m_PrefabParentObject: {fileID: 0} 938 | m_PrefabInternal: {fileID: 0} 939 | m_GameObject: {fileID: 1378001915} 940 | --- !u!1 &1448656523 941 | GameObject: 942 | m_ObjectHideFlags: 0 943 | m_PrefabParentObject: {fileID: 0} 944 | m_PrefabInternal: {fileID: 0} 945 | serializedVersion: 5 946 | m_Component: 947 | - component: {fileID: 1448656527} 948 | - component: {fileID: 1448656526} 949 | - component: {fileID: 1448656525} 950 | - component: {fileID: 1448656524} 951 | m_Layer: 5 952 | m_Name: Canvas 953 | m_TagString: Untagged 954 | m_Icon: {fileID: 0} 955 | m_NavMeshLayer: 0 956 | m_StaticEditorFlags: 0 957 | m_IsActive: 1 958 | --- !u!114 &1448656524 959 | MonoBehaviour: 960 | m_ObjectHideFlags: 0 961 | m_PrefabParentObject: {fileID: 0} 962 | m_PrefabInternal: {fileID: 0} 963 | m_GameObject: {fileID: 1448656523} 964 | m_Enabled: 1 965 | m_EditorHideFlags: 0 966 | m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 967 | m_Name: 968 | m_EditorClassIdentifier: 969 | m_IgnoreReversedGraphics: 1 970 | m_BlockingObjects: 0 971 | m_BlockingMask: 972 | serializedVersion: 2 973 | m_Bits: 4294967295 974 | --- !u!114 &1448656525 975 | MonoBehaviour: 976 | m_ObjectHideFlags: 0 977 | m_PrefabParentObject: {fileID: 0} 978 | m_PrefabInternal: {fileID: 0} 979 | m_GameObject: {fileID: 1448656523} 980 | m_Enabled: 1 981 | m_EditorHideFlags: 0 982 | m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 983 | m_Name: 984 | m_EditorClassIdentifier: 985 | m_UiScaleMode: 0 986 | m_ReferencePixelsPerUnit: 100 987 | m_ScaleFactor: 1 988 | m_ReferenceResolution: {x: 800, y: 600} 989 | m_ScreenMatchMode: 0 990 | m_MatchWidthOrHeight: 0 991 | m_PhysicalUnit: 3 992 | m_FallbackScreenDPI: 96 993 | m_DefaultSpriteDPI: 96 994 | m_DynamicPixelsPerUnit: 1 995 | --- !u!223 &1448656526 996 | Canvas: 997 | m_ObjectHideFlags: 0 998 | m_PrefabParentObject: {fileID: 0} 999 | m_PrefabInternal: {fileID: 0} 1000 | m_GameObject: {fileID: 1448656523} 1001 | m_Enabled: 1 1002 | serializedVersion: 3 1003 | m_RenderMode: 0 1004 | m_Camera: {fileID: 0} 1005 | m_PlaneDistance: 100 1006 | m_PixelPerfect: 0 1007 | m_ReceivesEvents: 1 1008 | m_OverrideSorting: 0 1009 | m_OverridePixelPerfect: 0 1010 | m_SortingBucketNormalizedSize: 0 1011 | m_AdditionalShaderChannelsFlag: 25 1012 | m_SortingLayerID: 0 1013 | m_SortingOrder: 0 1014 | m_TargetDisplay: 0 1015 | --- !u!224 &1448656527 1016 | RectTransform: 1017 | m_ObjectHideFlags: 0 1018 | m_PrefabParentObject: {fileID: 0} 1019 | m_PrefabInternal: {fileID: 0} 1020 | m_GameObject: {fileID: 1448656523} 1021 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1022 | m_LocalPosition: {x: 0, y: 0, z: 0} 1023 | m_LocalScale: {x: 0, y: 0, z: 0} 1024 | m_Children: 1025 | - {fileID: 1001061049} 1026 | - {fileID: 1908131973} 1027 | - {fileID: 774538232} 1028 | - {fileID: 112553628} 1029 | - {fileID: 1584191609} 1030 | - {fileID: 1725545975} 1031 | m_Father: {fileID: 0} 1032 | m_RootOrder: 2 1033 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1034 | m_AnchorMin: {x: 0, y: 0} 1035 | m_AnchorMax: {x: 0, y: 0} 1036 | m_AnchoredPosition: {x: 0, y: 0} 1037 | m_SizeDelta: {x: 0, y: 0} 1038 | m_Pivot: {x: 0, y: 0} 1039 | --- !u!1 &1449900162 1040 | GameObject: 1041 | m_ObjectHideFlags: 0 1042 | m_PrefabParentObject: {fileID: 0} 1043 | m_PrefabInternal: {fileID: 0} 1044 | serializedVersion: 5 1045 | m_Component: 1046 | - component: {fileID: 1449900163} 1047 | - component: {fileID: 1449900166} 1048 | - component: {fileID: 1449900165} 1049 | m_Layer: 5 1050 | m_Name: LineOne 1051 | m_TagString: Untagged 1052 | m_Icon: {fileID: 0} 1053 | m_NavMeshLayer: 0 1054 | m_StaticEditorFlags: 0 1055 | m_IsActive: 1 1056 | --- !u!224 &1449900163 1057 | RectTransform: 1058 | m_ObjectHideFlags: 0 1059 | m_PrefabParentObject: {fileID: 0} 1060 | m_PrefabInternal: {fileID: 0} 1061 | m_GameObject: {fileID: 1449900162} 1062 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1063 | m_LocalPosition: {x: 0, y: 0, z: 0} 1064 | m_LocalScale: {x: 1, y: 1, z: 1} 1065 | m_Children: [] 1066 | m_Father: {fileID: 1335263720} 1067 | m_RootOrder: 0 1068 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1069 | m_AnchorMin: {x: 0, y: 0.5} 1070 | m_AnchorMax: {x: 0, y: 0.5} 1071 | m_AnchoredPosition: {x: 0, y: 0} 1072 | m_SizeDelta: {x: 122, y: 45} 1073 | m_Pivot: {x: 0, y: 0.5} 1074 | --- !u!114 &1449900165 1075 | MonoBehaviour: 1076 | m_ObjectHideFlags: 0 1077 | m_PrefabParentObject: {fileID: 0} 1078 | m_PrefabInternal: {fileID: 0} 1079 | m_GameObject: {fileID: 1449900162} 1080 | m_Enabled: 1 1081 | m_EditorHideFlags: 0 1082 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1083 | m_Name: 1084 | m_EditorClassIdentifier: 1085 | m_Material: {fileID: 0} 1086 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1087 | m_RaycastTarget: 1 1088 | m_OnCullStateChanged: 1089 | m_PersistentCalls: 1090 | m_Calls: [] 1091 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1092 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1093 | m_FontData: 1094 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1095 | m_FontSize: 26 1096 | m_FontStyle: 0 1097 | m_BestFit: 0 1098 | m_MinSize: 10 1099 | m_MaxSize: 54 1100 | m_Alignment: 3 1101 | m_AlignByGeometry: 0 1102 | m_RichText: 1 1103 | m_HorizontalOverflow: 0 1104 | m_VerticalOverflow: 0 1105 | m_LineSpacing: 1 1106 | m_Text: Line Three 1107 | --- !u!222 &1449900166 1108 | CanvasRenderer: 1109 | m_ObjectHideFlags: 0 1110 | m_PrefabParentObject: {fileID: 0} 1111 | m_PrefabInternal: {fileID: 0} 1112 | m_GameObject: {fileID: 1449900162} 1113 | --- !u!1 &1471412477 1114 | GameObject: 1115 | m_ObjectHideFlags: 0 1116 | m_PrefabParentObject: {fileID: 0} 1117 | m_PrefabInternal: {fileID: 0} 1118 | serializedVersion: 5 1119 | m_Component: 1120 | - component: {fileID: 1471412478} 1121 | - component: {fileID: 1471412481} 1122 | - component: {fileID: 1471412480} 1123 | m_Layer: 5 1124 | m_Name: LineOne 1125 | m_TagString: Untagged 1126 | m_Icon: {fileID: 0} 1127 | m_NavMeshLayer: 0 1128 | m_StaticEditorFlags: 0 1129 | m_IsActive: 1 1130 | --- !u!224 &1471412478 1131 | RectTransform: 1132 | m_ObjectHideFlags: 0 1133 | m_PrefabParentObject: {fileID: 0} 1134 | m_PrefabInternal: {fileID: 0} 1135 | m_GameObject: {fileID: 1471412477} 1136 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1137 | m_LocalPosition: {x: 0, y: 0, z: 0} 1138 | m_LocalScale: {x: 1, y: 1, z: 1} 1139 | m_Children: [] 1140 | m_Father: {fileID: 454780382} 1141 | m_RootOrder: 0 1142 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1143 | m_AnchorMin: {x: 0, y: 0.5} 1144 | m_AnchorMax: {x: 0, y: 0.5} 1145 | m_AnchoredPosition: {x: 0, y: 0} 1146 | m_SizeDelta: {x: 122, y: 45} 1147 | m_Pivot: {x: 0, y: 0.5} 1148 | --- !u!114 &1471412480 1149 | MonoBehaviour: 1150 | m_ObjectHideFlags: 0 1151 | m_PrefabParentObject: {fileID: 0} 1152 | m_PrefabInternal: {fileID: 0} 1153 | m_GameObject: {fileID: 1471412477} 1154 | m_Enabled: 1 1155 | m_EditorHideFlags: 0 1156 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1157 | m_Name: 1158 | m_EditorClassIdentifier: 1159 | m_Material: {fileID: 0} 1160 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1161 | m_RaycastTarget: 1 1162 | m_OnCullStateChanged: 1163 | m_PersistentCalls: 1164 | m_Calls: [] 1165 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1166 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1167 | m_FontData: 1168 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1169 | m_FontSize: 26 1170 | m_FontStyle: 0 1171 | m_BestFit: 0 1172 | m_MinSize: 10 1173 | m_MaxSize: 54 1174 | m_Alignment: 3 1175 | m_AlignByGeometry: 0 1176 | m_RichText: 1 1177 | m_HorizontalOverflow: 0 1178 | m_VerticalOverflow: 0 1179 | m_LineSpacing: 1 1180 | m_Text: Line Five 1181 | --- !u!222 &1471412481 1182 | CanvasRenderer: 1183 | m_ObjectHideFlags: 0 1184 | m_PrefabParentObject: {fileID: 0} 1185 | m_PrefabInternal: {fileID: 0} 1186 | m_GameObject: {fileID: 1471412477} 1187 | --- !u!1 &1584191608 1188 | GameObject: 1189 | m_ObjectHideFlags: 0 1190 | m_PrefabParentObject: {fileID: 0} 1191 | m_PrefabInternal: {fileID: 0} 1192 | serializedVersion: 5 1193 | m_Component: 1194 | - component: {fileID: 1584191609} 1195 | m_Layer: 5 1196 | m_Name: UIGroupFader 1197 | m_TagString: Untagged 1198 | m_Icon: {fileID: 0} 1199 | m_NavMeshLayer: 0 1200 | m_StaticEditorFlags: 0 1201 | m_IsActive: 1 1202 | --- !u!224 &1584191609 1203 | RectTransform: 1204 | m_ObjectHideFlags: 0 1205 | m_PrefabParentObject: {fileID: 0} 1206 | m_PrefabInternal: {fileID: 0} 1207 | m_GameObject: {fileID: 1584191608} 1208 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1209 | m_LocalPosition: {x: 0, y: 0, z: 0} 1210 | m_LocalScale: {x: 1, y: 1, z: 1} 1211 | m_Children: 1212 | - {fileID: 1932872830} 1213 | - {fileID: 692094606} 1214 | - {fileID: 1335263720} 1215 | - {fileID: 673404802} 1216 | - {fileID: 454780382} 1217 | m_Father: {fileID: 1448656527} 1218 | m_RootOrder: 4 1219 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1220 | m_AnchorMin: {x: 1, y: 1} 1221 | m_AnchorMax: {x: 1, y: 1} 1222 | m_AnchoredPosition: {x: -12, y: 0} 1223 | m_SizeDelta: {x: 221, y: 220} 1224 | m_Pivot: {x: 1, y: 1} 1225 | --- !u!1 &1602449277 1226 | GameObject: 1227 | m_ObjectHideFlags: 0 1228 | m_PrefabParentObject: {fileID: 0} 1229 | m_PrefabInternal: {fileID: 0} 1230 | serializedVersion: 5 1231 | m_Component: 1232 | - component: {fileID: 1602449278} 1233 | - component: {fileID: 1602449281} 1234 | - component: {fileID: 1602449280} 1235 | m_Layer: 5 1236 | m_Name: LineOne (1) 1237 | m_TagString: Untagged 1238 | m_Icon: {fileID: 0} 1239 | m_NavMeshLayer: 0 1240 | m_StaticEditorFlags: 0 1241 | m_IsActive: 1 1242 | --- !u!224 &1602449278 1243 | RectTransform: 1244 | m_ObjectHideFlags: 0 1245 | m_PrefabParentObject: {fileID: 0} 1246 | m_PrefabInternal: {fileID: 0} 1247 | m_GameObject: {fileID: 1602449277} 1248 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1249 | m_LocalPosition: {x: 0, y: 0, z: 0} 1250 | m_LocalScale: {x: 1, y: 1, z: 1} 1251 | m_Children: [] 1252 | m_Father: {fileID: 454780382} 1253 | m_RootOrder: 1 1254 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1255 | m_AnchorMin: {x: 1, y: 0.5} 1256 | m_AnchorMax: {x: 1, y: 0.5} 1257 | m_AnchoredPosition: {x: 0, y: 0} 1258 | m_SizeDelta: {x: 122, y: 45} 1259 | m_Pivot: {x: 1, y: 0.5} 1260 | --- !u!114 &1602449280 1261 | MonoBehaviour: 1262 | m_ObjectHideFlags: 0 1263 | m_PrefabParentObject: {fileID: 0} 1264 | m_PrefabInternal: {fileID: 0} 1265 | m_GameObject: {fileID: 1602449277} 1266 | m_Enabled: 1 1267 | m_EditorHideFlags: 0 1268 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1269 | m_Name: 1270 | m_EditorClassIdentifier: 1271 | m_Material: {fileID: 0} 1272 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1273 | m_RaycastTarget: 1 1274 | m_OnCullStateChanged: 1275 | m_PersistentCalls: 1276 | m_Calls: [] 1277 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1278 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1279 | m_FontData: 1280 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1281 | m_FontSize: 26 1282 | m_FontStyle: 0 1283 | m_BestFit: 0 1284 | m_MinSize: 10 1285 | m_MaxSize: 54 1286 | m_Alignment: 5 1287 | m_AlignByGeometry: 0 1288 | m_RichText: 1 1289 | m_HorizontalOverflow: 0 1290 | m_VerticalOverflow: 0 1291 | m_LineSpacing: 1 1292 | m_Text: 556 1293 | --- !u!222 &1602449281 1294 | CanvasRenderer: 1295 | m_ObjectHideFlags: 0 1296 | m_PrefabParentObject: {fileID: 0} 1297 | m_PrefabInternal: {fileID: 0} 1298 | m_GameObject: {fileID: 1602449277} 1299 | --- !u!1 &1621045119 1300 | GameObject: 1301 | m_ObjectHideFlags: 0 1302 | m_PrefabParentObject: {fileID: 0} 1303 | m_PrefabInternal: {fileID: 0} 1304 | serializedVersion: 5 1305 | m_Component: 1306 | - component: {fileID: 1621045120} 1307 | - component: {fileID: 1621045123} 1308 | - component: {fileID: 1621045122} 1309 | m_Layer: 5 1310 | m_Name: LineOne 1311 | m_TagString: Untagged 1312 | m_Icon: {fileID: 0} 1313 | m_NavMeshLayer: 0 1314 | m_StaticEditorFlags: 0 1315 | m_IsActive: 1 1316 | --- !u!224 &1621045120 1317 | RectTransform: 1318 | m_ObjectHideFlags: 0 1319 | m_PrefabParentObject: {fileID: 0} 1320 | m_PrefabInternal: {fileID: 0} 1321 | m_GameObject: {fileID: 1621045119} 1322 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1323 | m_LocalPosition: {x: 0, y: 0, z: 0} 1324 | m_LocalScale: {x: 1, y: 1, z: 1} 1325 | m_Children: [] 1326 | m_Father: {fileID: 673404802} 1327 | m_RootOrder: 0 1328 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1329 | m_AnchorMin: {x: 0, y: 0.5} 1330 | m_AnchorMax: {x: 0, y: 0.5} 1331 | m_AnchoredPosition: {x: 0, y: 0} 1332 | m_SizeDelta: {x: 122, y: 45} 1333 | m_Pivot: {x: 0, y: 0.5} 1334 | --- !u!114 &1621045122 1335 | MonoBehaviour: 1336 | m_ObjectHideFlags: 0 1337 | m_PrefabParentObject: {fileID: 0} 1338 | m_PrefabInternal: {fileID: 0} 1339 | m_GameObject: {fileID: 1621045119} 1340 | m_Enabled: 1 1341 | m_EditorHideFlags: 0 1342 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1343 | m_Name: 1344 | m_EditorClassIdentifier: 1345 | m_Material: {fileID: 0} 1346 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1347 | m_RaycastTarget: 1 1348 | m_OnCullStateChanged: 1349 | m_PersistentCalls: 1350 | m_Calls: [] 1351 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1352 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1353 | m_FontData: 1354 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1355 | m_FontSize: 26 1356 | m_FontStyle: 0 1357 | m_BestFit: 0 1358 | m_MinSize: 10 1359 | m_MaxSize: 54 1360 | m_Alignment: 3 1361 | m_AlignByGeometry: 0 1362 | m_RichText: 1 1363 | m_HorizontalOverflow: 0 1364 | m_VerticalOverflow: 0 1365 | m_LineSpacing: 1 1366 | m_Text: Line Four 1367 | --- !u!222 &1621045123 1368 | CanvasRenderer: 1369 | m_ObjectHideFlags: 0 1370 | m_PrefabParentObject: {fileID: 0} 1371 | m_PrefabInternal: {fileID: 0} 1372 | m_GameObject: {fileID: 1621045119} 1373 | --- !u!1 &1725545972 1374 | GameObject: 1375 | m_ObjectHideFlags: 0 1376 | m_PrefabParentObject: {fileID: 0} 1377 | m_PrefabInternal: {fileID: 0} 1378 | serializedVersion: 5 1379 | m_Component: 1380 | - component: {fileID: 1725545975} 1381 | - component: {fileID: 1725545974} 1382 | - component: {fileID: 1725545973} 1383 | - component: {fileID: 1725545976} 1384 | m_Layer: 5 1385 | m_Name: AnimateValue 1386 | m_TagString: Untagged 1387 | m_Icon: {fileID: 0} 1388 | m_NavMeshLayer: 0 1389 | m_StaticEditorFlags: 0 1390 | m_IsActive: 1 1391 | --- !u!114 &1725545973 1392 | MonoBehaviour: 1393 | m_ObjectHideFlags: 0 1394 | m_PrefabParentObject: {fileID: 0} 1395 | m_PrefabInternal: {fileID: 0} 1396 | m_GameObject: {fileID: 1725545972} 1397 | m_Enabled: 1 1398 | m_EditorHideFlags: 0 1399 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1400 | m_Name: 1401 | m_EditorClassIdentifier: 1402 | m_Material: {fileID: 0} 1403 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1404 | m_RaycastTarget: 1 1405 | m_OnCullStateChanged: 1406 | m_PersistentCalls: 1407 | m_Calls: [] 1408 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1409 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1410 | m_FontData: 1411 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1412 | m_FontSize: 26 1413 | m_FontStyle: 0 1414 | m_BestFit: 0 1415 | m_MinSize: 10 1416 | m_MaxSize: 54 1417 | m_Alignment: 4 1418 | m_AlignByGeometry: 0 1419 | m_RichText: 1 1420 | m_HorizontalOverflow: 0 1421 | m_VerticalOverflow: 0 1422 | m_LineSpacing: 1 1423 | m_Text: 9999 1424 | --- !u!222 &1725545974 1425 | CanvasRenderer: 1426 | m_ObjectHideFlags: 0 1427 | m_PrefabParentObject: {fileID: 0} 1428 | m_PrefabInternal: {fileID: 0} 1429 | m_GameObject: {fileID: 1725545972} 1430 | --- !u!224 &1725545975 1431 | RectTransform: 1432 | m_ObjectHideFlags: 0 1433 | m_PrefabParentObject: {fileID: 0} 1434 | m_PrefabInternal: {fileID: 0} 1435 | m_GameObject: {fileID: 1725545972} 1436 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1437 | m_LocalPosition: {x: 0, y: 0, z: 0} 1438 | m_LocalScale: {x: 1, y: 1, z: 1} 1439 | m_Children: [] 1440 | m_Father: {fileID: 1448656527} 1441 | m_RootOrder: 5 1442 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1443 | m_AnchorMin: {x: 0, y: 1} 1444 | m_AnchorMax: {x: 0, y: 1} 1445 | m_AnchoredPosition: {x: 139.5, y: -247.5} 1446 | m_SizeDelta: {x: 279, y: 55} 1447 | m_Pivot: {x: 0.5, y: 0.5} 1448 | --- !u!114 &1725545976 1449 | MonoBehaviour: 1450 | m_ObjectHideFlags: 0 1451 | m_PrefabParentObject: {fileID: 0} 1452 | m_PrefabInternal: {fileID: 0} 1453 | m_GameObject: {fileID: 1725545972} 1454 | m_Enabled: 1 1455 | m_EditorHideFlags: 0 1456 | m_Script: {fileID: 11500000, guid: b6fbc119aab5a4966b44259d02642fa0, type: 3} 1457 | m_Name: 1458 | m_EditorClassIdentifier: 1459 | --- !u!1 &1741348275 1460 | GameObject: 1461 | m_ObjectHideFlags: 0 1462 | m_PrefabParentObject: {fileID: 0} 1463 | m_PrefabInternal: {fileID: 0} 1464 | serializedVersion: 5 1465 | m_Component: 1466 | - component: {fileID: 1741348280} 1467 | - component: {fileID: 1741348279} 1468 | - component: {fileID: 1741348278} 1469 | - component: {fileID: 1741348277} 1470 | - component: {fileID: 1741348276} 1471 | m_Layer: 0 1472 | m_Name: Main Camera 1473 | m_TagString: MainCamera 1474 | m_Icon: {fileID: 0} 1475 | m_NavMeshLayer: 0 1476 | m_StaticEditorFlags: 0 1477 | m_IsActive: 1 1478 | --- !u!81 &1741348276 1479 | AudioListener: 1480 | m_ObjectHideFlags: 0 1481 | m_PrefabParentObject: {fileID: 0} 1482 | m_PrefabInternal: {fileID: 0} 1483 | m_GameObject: {fileID: 1741348275} 1484 | m_Enabled: 1 1485 | --- !u!124 &1741348277 1486 | Behaviour: 1487 | m_ObjectHideFlags: 0 1488 | m_PrefabParentObject: {fileID: 0} 1489 | m_PrefabInternal: {fileID: 0} 1490 | m_GameObject: {fileID: 1741348275} 1491 | m_Enabled: 1 1492 | --- !u!92 &1741348278 1493 | Behaviour: 1494 | m_ObjectHideFlags: 0 1495 | m_PrefabParentObject: {fileID: 0} 1496 | m_PrefabInternal: {fileID: 0} 1497 | m_GameObject: {fileID: 1741348275} 1498 | m_Enabled: 1 1499 | --- !u!20 &1741348279 1500 | Camera: 1501 | m_ObjectHideFlags: 0 1502 | m_PrefabParentObject: {fileID: 0} 1503 | m_PrefabInternal: {fileID: 0} 1504 | m_GameObject: {fileID: 1741348275} 1505 | m_Enabled: 1 1506 | serializedVersion: 2 1507 | m_ClearFlags: 2 1508 | m_BackGroundColor: {r: 0.2647059, g: 0.2647059, b: 0.2647059, a: 1} 1509 | m_NormalizedViewPortRect: 1510 | serializedVersion: 2 1511 | x: 0 1512 | y: 0 1513 | width: 1 1514 | height: 1 1515 | near clip plane: 0.3 1516 | far clip plane: 1000 1517 | field of view: 60 1518 | orthographic: 0 1519 | orthographic size: 5 1520 | m_Depth: -1 1521 | m_CullingMask: 1522 | serializedVersion: 2 1523 | m_Bits: 4294967295 1524 | m_RenderingPath: -1 1525 | m_TargetTexture: {fileID: 0} 1526 | m_TargetDisplay: 0 1527 | m_TargetEye: 3 1528 | m_HDR: 0 1529 | m_AllowMSAA: 1 1530 | m_AllowDynamicResolution: 0 1531 | m_ForceIntoRT: 0 1532 | m_OcclusionCulling: 1 1533 | m_StereoConvergence: 10 1534 | m_StereoSeparation: 0.022 1535 | --- !u!4 &1741348280 1536 | Transform: 1537 | m_ObjectHideFlags: 0 1538 | m_PrefabParentObject: {fileID: 0} 1539 | m_PrefabInternal: {fileID: 0} 1540 | m_GameObject: {fileID: 1741348275} 1541 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1542 | m_LocalPosition: {x: 0, y: 1, z: -10} 1543 | m_LocalScale: {x: 1, y: 1, z: 1} 1544 | m_Children: [] 1545 | m_Father: {fileID: 0} 1546 | m_RootOrder: 0 1547 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1548 | --- !u!1 &1758915285 1549 | GameObject: 1550 | m_ObjectHideFlags: 0 1551 | m_PrefabParentObject: {fileID: 0} 1552 | m_PrefabInternal: {fileID: 0} 1553 | serializedVersion: 5 1554 | m_Component: 1555 | - component: {fileID: 1758915286} 1556 | - component: {fileID: 1758915289} 1557 | - component: {fileID: 1758915288} 1558 | m_Layer: 5 1559 | m_Name: LineOne (1) 1560 | m_TagString: Untagged 1561 | m_Icon: {fileID: 0} 1562 | m_NavMeshLayer: 0 1563 | m_StaticEditorFlags: 0 1564 | m_IsActive: 1 1565 | --- !u!224 &1758915286 1566 | RectTransform: 1567 | m_ObjectHideFlags: 0 1568 | m_PrefabParentObject: {fileID: 0} 1569 | m_PrefabInternal: {fileID: 0} 1570 | m_GameObject: {fileID: 1758915285} 1571 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1572 | m_LocalPosition: {x: 0, y: 0, z: 0} 1573 | m_LocalScale: {x: 1, y: 1, z: 1} 1574 | m_Children: [] 1575 | m_Father: {fileID: 1335263720} 1576 | m_RootOrder: 1 1577 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1578 | m_AnchorMin: {x: 1, y: 0.5} 1579 | m_AnchorMax: {x: 1, y: 0.5} 1580 | m_AnchoredPosition: {x: 0, y: 0} 1581 | m_SizeDelta: {x: 122, y: 45} 1582 | m_Pivot: {x: 1, y: 0.5} 1583 | --- !u!114 &1758915288 1584 | MonoBehaviour: 1585 | m_ObjectHideFlags: 0 1586 | m_PrefabParentObject: {fileID: 0} 1587 | m_PrefabInternal: {fileID: 0} 1588 | m_GameObject: {fileID: 1758915285} 1589 | m_Enabled: 1 1590 | m_EditorHideFlags: 0 1591 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1592 | m_Name: 1593 | m_EditorClassIdentifier: 1594 | m_Material: {fileID: 0} 1595 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1596 | m_RaycastTarget: 1 1597 | m_OnCullStateChanged: 1598 | m_PersistentCalls: 1599 | m_Calls: [] 1600 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1601 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1602 | m_FontData: 1603 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1604 | m_FontSize: 26 1605 | m_FontStyle: 0 1606 | m_BestFit: 0 1607 | m_MinSize: 10 1608 | m_MaxSize: 54 1609 | m_Alignment: 5 1610 | m_AlignByGeometry: 0 1611 | m_RichText: 1 1612 | m_HorizontalOverflow: 0 1613 | m_VerticalOverflow: 0 1614 | m_LineSpacing: 1 1615 | m_Text: 783 1616 | --- !u!222 &1758915289 1617 | CanvasRenderer: 1618 | m_ObjectHideFlags: 0 1619 | m_PrefabParentObject: {fileID: 0} 1620 | m_PrefabInternal: {fileID: 0} 1621 | m_GameObject: {fileID: 1758915285} 1622 | --- !u!1 &1908131972 1623 | GameObject: 1624 | m_ObjectHideFlags: 0 1625 | m_PrefabParentObject: {fileID: 0} 1626 | m_PrefabInternal: {fileID: 0} 1627 | serializedVersion: 5 1628 | m_Component: 1629 | - component: {fileID: 1908131973} 1630 | - component: {fileID: 1908131976} 1631 | - component: {fileID: 1908131975} 1632 | - component: {fileID: 1908131974} 1633 | m_Layer: 5 1634 | m_Name: UIPulse 1635 | m_TagString: Untagged 1636 | m_Icon: {fileID: 0} 1637 | m_NavMeshLayer: 0 1638 | m_StaticEditorFlags: 0 1639 | m_IsActive: 1 1640 | --- !u!224 &1908131973 1641 | RectTransform: 1642 | m_ObjectHideFlags: 0 1643 | m_PrefabParentObject: {fileID: 0} 1644 | m_PrefabInternal: {fileID: 0} 1645 | m_GameObject: {fileID: 1908131972} 1646 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1647 | m_LocalPosition: {x: 0, y: 0, z: 0} 1648 | m_LocalScale: {x: 1, y: 1, z: 1} 1649 | m_Children: [] 1650 | m_Father: {fileID: 1448656527} 1651 | m_RootOrder: 1 1652 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1653 | m_AnchorMin: {x: 0, y: 1} 1654 | m_AnchorMax: {x: 0, y: 1} 1655 | m_AnchoredPosition: {x: 139.5, y: -82.5} 1656 | m_SizeDelta: {x: 279, y: 55} 1657 | m_Pivot: {x: 0.5, y: 0.5} 1658 | --- !u!114 &1908131974 1659 | MonoBehaviour: 1660 | m_ObjectHideFlags: 0 1661 | m_PrefabParentObject: {fileID: 0} 1662 | m_PrefabInternal: {fileID: 0} 1663 | m_GameObject: {fileID: 1908131972} 1664 | m_Enabled: 1 1665 | m_EditorHideFlags: 0 1666 | m_Script: {fileID: 11500000, guid: df0c9e51e608c4f4e9bdca55d8e2a0cc, type: 3} 1667 | m_Name: 1668 | m_EditorClassIdentifier: 1669 | colorPattern: 1670 | key0: 1671 | rgba: 4294964224 1672 | key1: 1673 | rgba: 4289746543 1674 | key2: 1675 | rgba: 16777215 1676 | key3: 1677 | rgba: 255 1678 | key4: 1679 | rgba: 255 1680 | key5: 1681 | rgba: 255 1682 | key6: 1683 | rgba: 0 1684 | key7: 1685 | rgba: 0 1686 | m_NumColorKeys: 3 1687 | m_NumAlphaKeys: 2 1688 | pulseSpeed: 1 1689 | --- !u!114 &1908131975 1690 | MonoBehaviour: 1691 | m_ObjectHideFlags: 0 1692 | m_PrefabParentObject: {fileID: 0} 1693 | m_PrefabInternal: {fileID: 0} 1694 | m_GameObject: {fileID: 1908131972} 1695 | m_Enabled: 1 1696 | m_EditorHideFlags: 0 1697 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1698 | m_Name: 1699 | m_EditorClassIdentifier: 1700 | m_Material: {fileID: 0} 1701 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1702 | m_RaycastTarget: 1 1703 | m_OnCullStateChanged: 1704 | m_PersistentCalls: 1705 | m_Calls: [] 1706 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1707 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1708 | m_FontData: 1709 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1710 | m_FontSize: 26 1711 | m_FontStyle: 0 1712 | m_BestFit: 0 1713 | m_MinSize: 10 1714 | m_MaxSize: 54 1715 | m_Alignment: 4 1716 | m_AlignByGeometry: 0 1717 | m_RichText: 1 1718 | m_HorizontalOverflow: 0 1719 | m_VerticalOverflow: 0 1720 | m_LineSpacing: 1 1721 | m_Text: UI Pulse 1722 | --- !u!222 &1908131976 1723 | CanvasRenderer: 1724 | m_ObjectHideFlags: 0 1725 | m_PrefabParentObject: {fileID: 0} 1726 | m_PrefabInternal: {fileID: 0} 1727 | m_GameObject: {fileID: 1908131972} 1728 | --- !u!1 &1932872829 1729 | GameObject: 1730 | m_ObjectHideFlags: 0 1731 | m_PrefabParentObject: {fileID: 0} 1732 | m_PrefabInternal: {fileID: 0} 1733 | serializedVersion: 5 1734 | m_Component: 1735 | - component: {fileID: 1932872830} 1736 | - component: {fileID: 1932872831} 1737 | m_Layer: 5 1738 | m_Name: GroupOne 1739 | m_TagString: Untagged 1740 | m_Icon: {fileID: 0} 1741 | m_NavMeshLayer: 0 1742 | m_StaticEditorFlags: 0 1743 | m_IsActive: 1 1744 | --- !u!224 &1932872830 1745 | RectTransform: 1746 | m_ObjectHideFlags: 0 1747 | m_PrefabParentObject: {fileID: 0} 1748 | m_PrefabInternal: {fileID: 0} 1749 | m_GameObject: {fileID: 1932872829} 1750 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1751 | m_LocalPosition: {x: 0, y: 0, z: 0} 1752 | m_LocalScale: {x: 1, y: 1, z: 1} 1753 | m_Children: 1754 | - {fileID: 1979241573} 1755 | - {fileID: 1378001916} 1756 | m_Father: {fileID: 1584191609} 1757 | m_RootOrder: 0 1758 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1759 | m_AnchorMin: {x: 1, y: 1} 1760 | m_AnchorMax: {x: 1, y: 1} 1761 | m_AnchoredPosition: {x: 0, y: 0} 1762 | m_SizeDelta: {x: 221, y: 45} 1763 | m_Pivot: {x: 1, y: 1} 1764 | --- !u!114 &1932872831 1765 | MonoBehaviour: 1766 | m_ObjectHideFlags: 0 1767 | m_PrefabParentObject: {fileID: 0} 1768 | m_PrefabInternal: {fileID: 0} 1769 | m_GameObject: {fileID: 1932872829} 1770 | m_Enabled: 1 1771 | m_EditorHideFlags: 0 1772 | m_Script: {fileID: 11500000, guid: 318fa12cc93744afe8fc40c61343ead6, type: 3} 1773 | m_Name: 1774 | m_EditorClassIdentifier: 1775 | changeRate: 0.75 1776 | changeDelay: 0 1777 | startOpacity: 0 1778 | goalOpacity: 1 1779 | --- !u!1 &1979241572 1780 | GameObject: 1781 | m_ObjectHideFlags: 0 1782 | m_PrefabParentObject: {fileID: 0} 1783 | m_PrefabInternal: {fileID: 0} 1784 | serializedVersion: 5 1785 | m_Component: 1786 | - component: {fileID: 1979241573} 1787 | - component: {fileID: 1979241576} 1788 | - component: {fileID: 1979241575} 1789 | m_Layer: 5 1790 | m_Name: LineOne 1791 | m_TagString: Untagged 1792 | m_Icon: {fileID: 0} 1793 | m_NavMeshLayer: 0 1794 | m_StaticEditorFlags: 0 1795 | m_IsActive: 1 1796 | --- !u!224 &1979241573 1797 | RectTransform: 1798 | m_ObjectHideFlags: 0 1799 | m_PrefabParentObject: {fileID: 0} 1800 | m_PrefabInternal: {fileID: 0} 1801 | m_GameObject: {fileID: 1979241572} 1802 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1803 | m_LocalPosition: {x: 0, y: 0, z: 0} 1804 | m_LocalScale: {x: 1, y: 1, z: 1} 1805 | m_Children: [] 1806 | m_Father: {fileID: 1932872830} 1807 | m_RootOrder: 0 1808 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1809 | m_AnchorMin: {x: 0, y: 0.5} 1810 | m_AnchorMax: {x: 0, y: 0.5} 1811 | m_AnchoredPosition: {x: 0, y: 0} 1812 | m_SizeDelta: {x: 122, y: 45} 1813 | m_Pivot: {x: 0, y: 0.5} 1814 | --- !u!114 &1979241575 1815 | MonoBehaviour: 1816 | m_ObjectHideFlags: 0 1817 | m_PrefabParentObject: {fileID: 0} 1818 | m_PrefabInternal: {fileID: 0} 1819 | m_GameObject: {fileID: 1979241572} 1820 | m_Enabled: 1 1821 | m_EditorHideFlags: 0 1822 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1823 | m_Name: 1824 | m_EditorClassIdentifier: 1825 | m_Material: {fileID: 0} 1826 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1827 | m_RaycastTarget: 1 1828 | m_OnCullStateChanged: 1829 | m_PersistentCalls: 1830 | m_Calls: [] 1831 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1832 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1833 | m_FontData: 1834 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1835 | m_FontSize: 26 1836 | m_FontStyle: 0 1837 | m_BestFit: 0 1838 | m_MinSize: 10 1839 | m_MaxSize: 54 1840 | m_Alignment: 3 1841 | m_AlignByGeometry: 0 1842 | m_RichText: 1 1843 | m_HorizontalOverflow: 0 1844 | m_VerticalOverflow: 0 1845 | m_LineSpacing: 1 1846 | m_Text: Line One 1847 | --- !u!222 &1979241576 1848 | CanvasRenderer: 1849 | m_ObjectHideFlags: 0 1850 | m_PrefabParentObject: {fileID: 0} 1851 | m_PrefabInternal: {fileID: 0} 1852 | m_GameObject: {fileID: 1979241572} 1853 | --- !u!1 &2101037259 1854 | GameObject: 1855 | m_ObjectHideFlags: 0 1856 | m_PrefabParentObject: {fileID: 0} 1857 | m_PrefabInternal: {fileID: 0} 1858 | serializedVersion: 5 1859 | m_Component: 1860 | - component: {fileID: 2101037260} 1861 | - component: {fileID: 2101037263} 1862 | - component: {fileID: 2101037262} 1863 | m_Layer: 5 1864 | m_Name: LineOne (1) 1865 | m_TagString: Untagged 1866 | m_Icon: {fileID: 0} 1867 | m_NavMeshLayer: 0 1868 | m_StaticEditorFlags: 0 1869 | m_IsActive: 1 1870 | --- !u!224 &2101037260 1871 | RectTransform: 1872 | m_ObjectHideFlags: 0 1873 | m_PrefabParentObject: {fileID: 0} 1874 | m_PrefabInternal: {fileID: 0} 1875 | m_GameObject: {fileID: 2101037259} 1876 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 1877 | m_LocalPosition: {x: 0, y: 0, z: 0} 1878 | m_LocalScale: {x: 1, y: 1, z: 1} 1879 | m_Children: [] 1880 | m_Father: {fileID: 692094606} 1881 | m_RootOrder: 1 1882 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1883 | m_AnchorMin: {x: 1, y: 0.5} 1884 | m_AnchorMax: {x: 1, y: 0.5} 1885 | m_AnchoredPosition: {x: 0, y: 0} 1886 | m_SizeDelta: {x: 122, y: 45} 1887 | m_Pivot: {x: 1, y: 0.5} 1888 | --- !u!114 &2101037262 1889 | MonoBehaviour: 1890 | m_ObjectHideFlags: 0 1891 | m_PrefabParentObject: {fileID: 0} 1892 | m_PrefabInternal: {fileID: 0} 1893 | m_GameObject: {fileID: 2101037259} 1894 | m_Enabled: 1 1895 | m_EditorHideFlags: 0 1896 | m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} 1897 | m_Name: 1898 | m_EditorClassIdentifier: 1899 | m_Material: {fileID: 0} 1900 | m_Color: {r: 1, g: 1, b: 1, a: 1} 1901 | m_RaycastTarget: 1 1902 | m_OnCullStateChanged: 1903 | m_PersistentCalls: 1904 | m_Calls: [] 1905 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 1906 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 1907 | m_FontData: 1908 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 1909 | m_FontSize: 26 1910 | m_FontStyle: 0 1911 | m_BestFit: 0 1912 | m_MinSize: 10 1913 | m_MaxSize: 54 1914 | m_Alignment: 5 1915 | m_AlignByGeometry: 0 1916 | m_RichText: 1 1917 | m_HorizontalOverflow: 0 1918 | m_VerticalOverflow: 0 1919 | m_LineSpacing: 1 1920 | m_Text: 556 1921 | --- !u!222 &2101037263 1922 | CanvasRenderer: 1923 | m_ObjectHideFlags: 0 1924 | m_PrefabParentObject: {fileID: 0} 1925 | m_PrefabInternal: {fileID: 0} 1926 | m_GameObject: {fileID: 2101037259} 1927 | --- !u!1 &2135420389 1928 | GameObject: 1929 | m_ObjectHideFlags: 0 1930 | m_PrefabParentObject: {fileID: 0} 1931 | m_PrefabInternal: {fileID: 0} 1932 | serializedVersion: 5 1933 | m_Component: 1934 | - component: {fileID: 2135420391} 1935 | - component: {fileID: 2135420390} 1936 | m_Layer: 0 1937 | m_Name: Directional Light 1938 | m_TagString: Untagged 1939 | m_Icon: {fileID: 0} 1940 | m_NavMeshLayer: 0 1941 | m_StaticEditorFlags: 0 1942 | m_IsActive: 1 1943 | --- !u!108 &2135420390 1944 | Light: 1945 | m_ObjectHideFlags: 0 1946 | m_PrefabParentObject: {fileID: 0} 1947 | m_PrefabInternal: {fileID: 0} 1948 | m_GameObject: {fileID: 2135420389} 1949 | m_Enabled: 1 1950 | serializedVersion: 8 1951 | m_Type: 1 1952 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 1953 | m_Intensity: 1 1954 | m_Range: 10 1955 | m_SpotAngle: 30 1956 | m_CookieSize: 10 1957 | m_Shadows: 1958 | m_Type: 2 1959 | m_Resolution: -1 1960 | m_CustomResolution: -1 1961 | m_Strength: 1 1962 | m_Bias: 0.05 1963 | m_NormalBias: 0.4 1964 | m_NearPlane: 0.2 1965 | m_Cookie: {fileID: 0} 1966 | m_DrawHalo: 0 1967 | m_Flare: {fileID: 0} 1968 | m_RenderMode: 0 1969 | m_CullingMask: 1970 | serializedVersion: 2 1971 | m_Bits: 4294967295 1972 | m_Lightmapping: 4 1973 | m_AreaSize: {x: 1, y: 1} 1974 | m_BounceIntensity: 1 1975 | m_ColorTemperature: 6570 1976 | m_UseColorTemperature: 0 1977 | m_ShadowRadius: 0 1978 | m_ShadowAngle: 0 1979 | --- !u!4 &2135420391 1980 | Transform: 1981 | m_ObjectHideFlags: 0 1982 | m_PrefabParentObject: {fileID: 0} 1983 | m_PrefabInternal: {fileID: 0} 1984 | m_GameObject: {fileID: 2135420389} 1985 | m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} 1986 | m_LocalPosition: {x: 0, y: 3, z: 0} 1987 | m_LocalScale: {x: 1, y: 1, z: 1} 1988 | m_Children: [] 1989 | m_Father: {fileID: 0} 1990 | m_RootOrder: 1 1991 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 1992 | -------------------------------------------------------------------------------- /Scenes/UIBehaviors_Example.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | 5 | public class UIBehaviors_Example : MonoBehaviour { 6 | 7 | void Start() 8 | { 9 | StartCoroutine (RunFader ()); 10 | StartCoroutine (RunShaker ()); 11 | StartCoroutine (RunSlammer ()); 12 | StartCoroutine (RunGroupFader ()); 13 | StartCoroutine (RunAnimateValue ()); 14 | } 15 | 16 | IEnumerator RunAnimateValue() 17 | { 18 | UIValueAnimator anim = GameObject.FindObjectOfType (); 19 | anim.SetValue (0); 20 | 21 | while (true) { 22 | anim.AnimateValue (Random.Range (0, 10) * 750, Random.Range (1.0f, 3.0f)); 23 | yield return new WaitForSeconds (5.0f); 24 | } 25 | } 26 | 27 | IEnumerator RunGroupFader() 28 | { 29 | UIGroupFader[] list = GameObject.FindObjectsOfType(); 30 | float[] delayList = new float[list.Length]; 31 | for (int i = 0; i < delayList.Length; i++) { 32 | delayList [i] = list [i].changeDelay; 33 | } 34 | 35 | while (true) { 36 | yield return new WaitForSeconds (3.0f); 37 | for (int i = 0; i < delayList.Length; i++) { 38 | list [i].Fade (0.0f, 0.25f, delayList [i] * 0.2f); 39 | } 40 | yield return new WaitForSeconds (3.0f); 41 | for (int i = 0; i < delayList.Length; i++) { 42 | list [i].Fade (1.0f, 0.75f, delayList [i]); 43 | } 44 | } 45 | } 46 | 47 | 48 | IEnumerator RunSlammer() 49 | { 50 | UISlamIn slammer = GameObject.FindObjectOfType (); 51 | 52 | while (true) { 53 | slammer.slamSize = Random.Range (1.5f, 3.0f); 54 | slammer.slamTime = Random.Range (0.2f, 1.0f); 55 | slammer.Slam (); 56 | yield return new WaitForSeconds (3.0f); 57 | } 58 | } 59 | 60 | IEnumerator RunFader() 61 | { 62 | UIFadeAway fader = GameObject.FindObjectOfType (); 63 | 64 | while (true) { 65 | fader.fadeSize = Random.Range (1.5f, 3.0f); 66 | fader.Fade (Random.Range (1.0f, 3.0f)); 67 | yield return new WaitForSeconds (3.0f); 68 | fader.Restore (); 69 | yield return new WaitForSeconds (1.0f); 70 | } 71 | } 72 | 73 | IEnumerator RunShaker() 74 | { 75 | UIShaker shaker = GameObject.FindObjectOfType (); 76 | 77 | while (true) { 78 | shaker.Shake (2.0f, Random.Range(1.0f, 10.0f)); 79 | yield return new WaitForSeconds (3.0f); 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /Scripts/UIFadeAway.cs: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * UI Fade Away 4 | * 2016 Slonersoft Games 5 | * 6 | * Place this on a MaskableGraphic such as Image or Text and 7 | * call Fade to make it fade away and grow. 8 | * 9 | * NOTE: Growth will happen relative to the pivot point of the 10 | * element. This means if your pivot is on the top left, it 11 | * will grow toward the bottom right. 12 | * 13 | ************************************************************/ 14 | 15 | using UnityEngine; 16 | using UnityEngine.UI; 17 | using System.Collections; 18 | 19 | public class UIFadeAway : MonoBehaviour { 20 | 21 | [Tooltip("Rate at which to animate.")] 22 | public AnimationCurve curve = AnimationCurve.Linear (0.0f, 0.0f, 1.0f, 1.0f); 23 | 24 | [Tooltip("Size to fade away to. 1.0 = no change. 2.0 = double size.")] 25 | public float fadeSize = 2.0f; 26 | 27 | [Tooltip("Time over which to perform the fade.")] 28 | public float fadeTime = 1.0f; 29 | 30 | [Tooltip("True to fade immediately on load, false to wait for script intervention.")] 31 | public bool fadeImmediately = true; 32 | 33 | float startAlpha = 1f; 34 | float endAlpha = 0f; 35 | float progressPct = 0.0f; 36 | MaskableGraphic element; 37 | 38 | Vector3 baseScale; 39 | 40 | // Use this for initialization 41 | void Start() 42 | { 43 | Initialize(); 44 | if (!fadeImmediately) { 45 | Restore (); 46 | } 47 | } 48 | 49 | // Grab initial conditions for the graphic. 50 | // 51 | void Initialize() 52 | { 53 | if (element == null) 54 | { 55 | element = GetComponent(); 56 | Fade(fadeTime); 57 | baseScale = element.rectTransform.localScale; 58 | } 59 | } 60 | 61 | // Update is called once per frame 62 | void Update() 63 | { 64 | if (progressPct < 1.0f) 65 | { 66 | progressPct = Mathf.Clamp01(progressPct + (Time.deltaTime / fadeTime)); 67 | 68 | float adjustedPct = curve.Evaluate(progressPct); 69 | float curAlpha = Mathf.Lerp (startAlpha, endAlpha, adjustedPct); 70 | 71 | element.rectTransform.localScale = Vector3.Lerp(baseScale, baseScale * fadeSize, adjustedPct); 72 | element.color = new Color(element.color.r, element.color.g, element.color.b, curAlpha); 73 | } 74 | } 75 | 76 | // Fade to another alpha level. 77 | // 78 | // time: time in seconds to perform the fade. 79 | // goalPct: Opacity percentage [0,1] to fade to. 80 | // 81 | public void Fade(float time = -1f, float goalPct = 0f) 82 | { 83 | Initialize(); 84 | 85 | if (time == 0) { 86 | Restore (); 87 | element.color = new Color(element.color.r, element.color.g, element.color.b, goalPct); 88 | return; 89 | } else if (fadeTime > 0f) 90 | fadeTime = time; 91 | else 92 | fadeTime = 0.5f; 93 | 94 | progressPct = 0.0f; 95 | startAlpha = element.color.a; 96 | endAlpha = goalPct; 97 | } 98 | 99 | // Restore the graphic to its initial size and full opacity. 100 | // 101 | public void Restore() 102 | { 103 | Initialize(); 104 | 105 | progressPct = 1.0f; 106 | element.rectTransform.localScale = baseScale; 107 | element.color = new Color(element.color.r, element.color.g, element.color.b, 1.0f); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /Scripts/UIGroupFader.cs: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * Group Fader 4 | * 2016 Slonersoft Games 5 | * 6 | * Used to fade an entire group of UI elements together. 7 | * All children of this object will be affected. 8 | * 9 | ************************************************************/ 10 | 11 | using UnityEngine; 12 | using UnityEngine.UI; 13 | using System.Collections; 14 | 15 | public class UIGroupFader : MonoBehaviour { 16 | 17 | private MaskableGraphic[] elements; 18 | private float currentOpacity; 19 | 20 | [Tooltip("How quickly to perform the fade.")] 21 | public float changeRate = 1.0f; 22 | 23 | [Tooltip("Time (sec) after which the fade should begin.")] 24 | public float changeDelay = 0.0f; 25 | 26 | [Tooltip("Starting opacity level.")] 27 | public float startOpacity = 0.0f; 28 | 29 | [Tooltip("Opacity level to fade to.")] 30 | public float goalOpacity = 1.0f; 31 | 32 | // Advances a value at a specified speed, stopping it once it reaches that value. 33 | // 34 | // val: current value 35 | // goal: goal value 36 | // speed: rate at which to move toward goal. 37 | // 38 | private float AdvanceValue( float val, float goal, float speed) { 39 | if (val < goal) { 40 | val += speed * Time.deltaTime; 41 | val = val > goal ? goal : val; 42 | } else if (val > goal) { 43 | val -= speed * Time.deltaTime; 44 | val = val < goal ? goal : val; 45 | } 46 | return val; 47 | } 48 | 49 | void Awake() 50 | { 51 | elements = gameObject.GetComponentsInChildren (); 52 | 53 | // If I have my own element, add that too. 54 | MaskableGraphic myElem = gameObject.GetComponent (); 55 | if (myElem) { 56 | MaskableGraphic[] newList = new MaskableGraphic[elements.Length + 1]; 57 | for (int i = 0; i < elements.Length; i++) { 58 | newList [i] = elements [i]; 59 | } 60 | newList [newList.Length - 1] = myElem; 61 | elements = newList; 62 | } 63 | 64 | SetFade (startOpacity); 65 | } 66 | 67 | void Update() 68 | { 69 | if (changeDelay <= 0.0f) { 70 | if (currentOpacity != goalOpacity) { 71 | float newOpacity = AdvanceValue (currentOpacity, goalOpacity, changeRate); 72 | SetFade (newOpacity); 73 | } 74 | } else { 75 | changeDelay -= Time.deltaTime; 76 | } 77 | } 78 | 79 | // Set the fade amount on all elements in children. 80 | // 81 | void SetFade(float opacity = 1.0f) 82 | { 83 | currentOpacity = opacity; 84 | foreach (MaskableGraphic mg in elements) { 85 | mg.color = new Color(mg.color.r, mg.color.g, mg.color.b, currentOpacity); 86 | } 87 | } 88 | 89 | // Start a new fade. 90 | // 91 | // opacity: opacity level to fade to. 92 | // timeSec: time in seconds over which to perform the fade. 93 | // delay (optional): time to wait before performing the fade. 94 | // 95 | public void Fade(float opacity, float timeSec = 0.0f, float delay = 0.0f) 96 | { 97 | goalOpacity = opacity; 98 | changeDelay = delay; 99 | if (timeSec <= 0.0f) { 100 | SetFade (goalOpacity); 101 | } else { 102 | changeRate = 1.0f / timeSec; 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /Scripts/UIPulse.cs: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * UI Pulse 4 | * 2016 Slonersoft Games 5 | * 6 | * Place this on a maskable UI element such as Image or Text 7 | * and it will pulse through the colors laid out in colorPattern. 8 | * 9 | ************************************************************/ 10 | 11 | using UnityEngine; 12 | using UnityEngine.UI; 13 | using System.Collections; 14 | 15 | public class UIPulse : MonoBehaviour { 16 | 17 | public Gradient colorPattern; // Pattern for the colors to rotate through. 18 | public float pulseSpeed = 1.0f; // How fast to rotate through the colors. 19 | 20 | Color baseColor; 21 | MaskableGraphic image; 22 | bool fwd; 23 | float pct; 24 | 25 | // Use this for initialization 26 | void Start () { 27 | image = gameObject.GetComponent (); 28 | image.color = colorPattern.Evaluate (0.0f); 29 | pct = 0.0f; 30 | fwd = true; 31 | } 32 | 33 | // Update is called once per frame 34 | void Update () { 35 | if (fwd) { 36 | pct += pulseSpeed * Time.deltaTime; 37 | } else { 38 | pct -= pulseSpeed * Time.deltaTime; 39 | } 40 | 41 | if (pct < 0.0f || pct > 1.0f) { 42 | fwd = !fwd; 43 | pct = Mathf.Clamp01 (pct); 44 | } 45 | 46 | image.color = colorPattern.Evaluate (pct); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Scripts/UIShaker.cs: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * UI Shaker 4 | * 2016 Slonersoft Games 5 | * 6 | * Place this on a UI element and shake it all around by calling 7 | * Shake on this component. 8 | * 9 | ************************************************************/ 10 | 11 | using UnityEngine; 12 | using UnityEngine.UI; 13 | using System.Collections; 14 | using System.Collections.Generic; 15 | 16 | public class UIShaker : MonoBehaviour { 17 | 18 | float maxMagnitude = 0.0f; 19 | float timeLeft_s = 0.0f; 20 | float timeTotal_s = 0.0f; 21 | 22 | RectTransform rectTransform; 23 | Vector3 rootPos; 24 | 25 | // Initialize the component, grabbing initial conditions. 26 | // 27 | void Initialize() 28 | { 29 | if (rectTransform == null) { 30 | rectTransform = GetComponent (); 31 | rootPos = rectTransform.localPosition; 32 | } 33 | } 34 | 35 | // Called every frame. 36 | // 37 | void Update () { 38 | 39 | if (rectTransform && timeLeft_s > 0) { 40 | // Subtract time until it reaches zero, then the shake is done. Reset the system. 41 | timeLeft_s -= Time.deltaTime; 42 | if (timeLeft_s <= 0.0f) { 43 | timeLeft_s = 0.0f; 44 | timeTotal_s = 0.0f; 45 | } 46 | 47 | // Set the local position to the shaken offset. 48 | rectTransform.localPosition = rootPos + GetOffset (); 49 | } 50 | } 51 | 52 | // Generates a random offset based on the current state of the shake. 53 | // 54 | Vector3 GetOffset() 55 | { 56 | 57 | // Default offset is zero -- no shake. 58 | Vector3 offset = Vector2.zero; 59 | 60 | // If there is a current shake in play. 61 | if (timeLeft_s > 0f && timeTotal_s > 0f) { 62 | 63 | // Choose a random direction. 64 | float direction = Random.Range (0.0f, 360.0f); 65 | 66 | // Create a vector (relative to orientation) with a random direction rotated around the forward axis. 67 | offset = Quaternion.AngleAxis (direction, Vector3.forward) * Vector3.right; 68 | 69 | // Determine the current effective spread (between 0 and maxSpread) and multiply the offset by that. 70 | offset *= Mathf.Lerp (0.0f, maxMagnitude, timeLeft_s / timeTotal_s); 71 | } 72 | 73 | return offset; 74 | } 75 | 76 | // Shake the element! 77 | // 78 | // time_s: Time (in seconds) for the shake to take. 79 | // magnitude: distance (in game units) for the shake to move the camera at its most extreme. 80 | // 81 | public void Shake(float time_s, float magnitude) 82 | { 83 | Initialize (); 84 | timeTotal_s = time_s; 85 | timeLeft_s = time_s; 86 | maxMagnitude = magnitude; 87 | } 88 | } -------------------------------------------------------------------------------- /Scripts/UISlamIn.cs: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * UI Slam-In 4 | * 2016 Slonersoft Games 5 | * 6 | * Place this on a UI element such as Image or Text and you 7 | * can call "Slam" on it to have the text slam into place. 8 | * 9 | ************************************************************/ 10 | 11 | using UnityEngine; 12 | using UnityEngine.UI; 13 | using System.Collections; 14 | 15 | public class UISlamIn : MonoBehaviour { 16 | 17 | [Tooltip("Determines how slam animates in.")] 18 | public AnimationCurve curve = AnimationCurve.Linear(0.0f, 0.0f, 1.0f, 1.0f); 19 | 20 | [Tooltip("How big should it slam in? (1.0 for no size change)")] 21 | public float slamSize = 2.0f; 22 | 23 | [Tooltip("Time (sec) for the slam to take.")] 24 | public float slamTime = 1.0f; 25 | 26 | [Tooltip("True to slam upon enable, false to wait for script intervention.")] 27 | public bool slamImmediately = false; 28 | 29 | float progressPct = 0.0f; 30 | MaskableGraphic graphic; 31 | RectTransform rectTransform; 32 | Vector3 baseScale; 33 | 34 | // Use this for initialization 35 | void Start () { 36 | graphic = GetComponent (); 37 | rectTransform = GetComponent (); 38 | baseScale = rectTransform.localScale; 39 | Slam (slamTime); 40 | } 41 | 42 | // Update is called once per frame 43 | void Update () { 44 | if (progressPct < 1.0f) { 45 | progressPct = Mathf.Clamp01(progressPct + (Time.deltaTime / slamTime)); 46 | 47 | float adjustedPct = curve.Evaluate (progressPct); 48 | 49 | rectTransform.localScale = baseScale * Mathf.Lerp (slamSize, 1f, adjustedPct); 50 | 51 | if (graphic != null) { 52 | graphic.color = new Color (graphic.color.r, graphic.color.g, graphic.color.b, adjustedPct); 53 | } 54 | } 55 | } 56 | 57 | // Slam the UI text into place. 58 | // 59 | // time (optional): how long should the slam take? Omit to use value set in the inspector. 60 | public void Slam(float time = -1f) 61 | { 62 | if (time > 0f) 63 | slamTime = time; 64 | 65 | progressPct = 0.0f; 66 | 67 | // Might not be initialized yet. 68 | if (graphic != null) { 69 | graphic.color = new Color (graphic.color.r, graphic.color.g, graphic.color.b, 0.0f); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Scripts/UIValueAnimator.cs: -------------------------------------------------------------------------------- 1 | /************************************************************ 2 | * 3 | * UI Value Animator 4 | * 2016 Slonersoft Games 5 | * 6 | * Place this on a Text element and call AnimateValue to change 7 | * the value over time, "tallying" the result. 8 | * 9 | ************************************************************/ 10 | 11 | using UnityEngine; 12 | using UnityEngine.UI; 13 | using System.Collections; 14 | 15 | public class UIValueAnimator : MonoBehaviour { 16 | 17 | float animateTime = 1.0f; 18 | float finishTime = -1.0f; 19 | AnimationCurve curve = null; 20 | 21 | Text _element = null; 22 | Text element { 23 | get { 24 | if (_element == null) { 25 | _element = GetComponent (); 26 | if (_element == null) { 27 | Debug.LogError ("Could not find Text element on UIValueAnimator."); 28 | } 29 | } 30 | return _element; 31 | } 32 | } 33 | 34 | // Use this for initialization 35 | void Start () { 36 | 37 | } 38 | 39 | // Update is called once per frame 40 | void Update () { 41 | if (finishTime > 0) { 42 | if (Time.time < finishTime) { 43 | SetValue(Mathf.FloorToInt (curve.Evaluate (Time.time))); 44 | } else { 45 | SetValue (Mathf.FloorToInt (curve.Evaluate (finishTime))); 46 | curve = null; 47 | finishTime = -1f; 48 | } 49 | } 50 | } 51 | 52 | int GetCurrentValue() 53 | { 54 | int result = 0; 55 | int.TryParse (element.text, out result); 56 | return result; 57 | } 58 | 59 | // Set the value of the text immediately without animating. 60 | // 61 | // value: new value for the element. 62 | // 63 | public void SetValue(int value) 64 | { 65 | element.text = "" + value; 66 | } 67 | 68 | // Animate toward a new value. 69 | // 70 | // endVal: new value to animate toward. 71 | // animTime (optional): time to take getting to endVal. Omit to use value set in inspector. 72 | // 73 | public void AnimateValue(int endVal, float animTime = -1.0f) 74 | { 75 | if (animTime > 0) { 76 | animateTime = animTime; 77 | } 78 | 79 | finishTime = Time.time + animateTime; 80 | curve = AnimationCurve.EaseInOut (Time.time, GetCurrentValue(), finishTime, endVal); 81 | } 82 | } 83 | --------------------------------------------------------------------------------