├── .gitattributes
├── Assets
├── Rowlan.meta
└── Rowlan
│ ├── Fader.meta
│ └── Fader
│ ├── Fader.asmdef.meta
│ ├── VFX.meta
│ ├── _Demo
│ ├── Fader Demo.unity.meta
│ ├── Materials.meta
│ ├── Materials
│ │ ├── Red.mat.meta
│ │ ├── Blue.mat.meta
│ │ ├── Green.mat.meta
│ │ ├── Grey.mat.meta
│ │ ├── Grey (Float).mat.meta
│ │ ├── Multi - Green.mat.meta
│ │ ├── Multi - Red.mat.meta
│ │ ├── Red with Yellow Emissive.mat.meta
│ │ ├── Red.mat
│ │ ├── Green.mat
│ │ ├── Grey.mat
│ │ ├── Blue.mat
│ │ ├── Multi - Red.mat
│ │ ├── Multi - Green.mat
│ │ ├── Grey (Float).mat
│ │ └── Red with Yellow Emissive.mat
│ └── Fader Demo.unity
│ ├── Aura 2.meta
│ ├── Enviro.meta
│ ├── Fader.meta
│ ├── Material.meta
│ ├── _Demo.meta
│ ├── Material
│ ├── Material Object.meta
│ ├── Material Property.meta
│ ├── Material Property
│ │ ├── FadeMaterial.cs.meta
│ │ ├── MaterialPropertyFader.cs.meta
│ │ ├── MaterialPropertyFader.cs
│ │ └── FadeMaterial.cs
│ └── Material Object
│ │ ├── MaterialObjectFader.cs.meta
│ │ └── MaterialObjectFader.cs
│ ├── Fader
│ ├── Fader.cs.meta
│ ├── FadeConst.cs.meta
│ ├── FadeSettings.cs.meta
│ ├── InputToggleFader.cs.meta
│ ├── FadeSettings.cs
│ ├── FadeConst.cs
│ ├── InputToggleFader.cs
│ └── Fader.cs
│ ├── VFX
│ ├── VFXFader.cs.meta
│ └── VFXFader.cs
│ ├── Aura 2
│ ├── Aura2CameraFader.cs.meta
│ ├── Aura2VolumeFader.cs.meta
│ ├── Aura2VolumeFader.cs
│ └── Aura2CameraFader.cs
│ ├── Enviro
│ ├── EnviroTimeFader.cs.meta
│ └── EnviroTimeFader.cs
│ └── Fader.asmdef
├── .gitignore
├── LICENSE
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/Assets/Rowlan.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 06fb617fcb54e1e4e993e4eb8a2e7add
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: db98f417ac1de2748a9e4e9257a5ffe7
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader.asmdef.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 3dea3ca71b5398748850822353d84b72
3 | AssemblyDefinitionImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/VFX.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f4276f3b6f66d7744ae6be27909cdb44
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Fader Demo.unity.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 98b42eccfe9a46d42859cf51df9c1083
3 | DefaultImporter:
4 | externalObjects: {}
5 | userData:
6 | assetBundleName:
7 | assetBundleVariant:
8 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Aura 2.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 82431d6e4460f794abc7fbcc3589e77b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Enviro.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 185d57814c2d05949863517868cd4d3d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 30164f4c052ac1548ac1cc515f49a19c
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 0a3a367d0a472c048b061cb52b2f7f7d
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 505f79a415e702c4e93dbf9930df4f69
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bba77a33f57ba0c4aa4e9f99b9530c7b
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Object.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4b8a7b9c4b44fed4b8c325a3855abca6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Property.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 91ea51b014a080b47a85b00c96a681f6
3 | folderAsset: yes
4 | DefaultImporter:
5 | externalObjects: {}
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Red.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: bfa8b98a8c9fed548bd9da7e553de747
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Blue.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a140d81838cb5554997a6603b24e55d3
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Green.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: f29b7e3f917377c4894b8ef936422eed
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Grey.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: fa936bf082d83fc4da86dc176f416011
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Grey (Float).mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b09d87969730a4445ab035e3f9289b6d
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Multi - Green.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: be410787742e4d74c8cef57e71ae21ad
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Multi - Red.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: b03a5a59f64efd54e8087af55aacd805
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Red with Yellow Emissive.mat.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 481386212bddce44bb28c539aaaaa474
3 | NativeFormatImporter:
4 | externalObjects: {}
5 | mainObjectFileID: 2100000
6 | userData:
7 | assetBundleName:
8 | assetBundleVariant:
9 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/Fader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 94b3028644f30534cb68ba1f6afc64d6
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/FadeConst.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 480dd36a78e438e4ca13ee6bc918059c
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/VFX/VFXFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 829223226a435cb47ac049d8919709b1
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/FadeSettings.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 747176dbea914924ab97379edf6d2226
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Aura 2/Aura2CameraFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: a613fe0fd05663a409263b5da7100137
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Aura 2/Aura2VolumeFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: cb666d9ec67b6394284491eae3f11a36
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Enviro/EnviroTimeFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 874b82a2581d65b4e91fa69144feea2b
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/InputToggleFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 147835b55947051458b79940dc863934
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Property/FadeMaterial.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 241f27cf5bd0d42499496c44eb20b881
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Object/MaterialObjectFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 41c34e3906bb4e040a91bc07903ef717
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Property/MaterialPropertyFader.cs.meta:
--------------------------------------------------------------------------------
1 | fileFormatVersion: 2
2 | guid: 4f87397aa812e53429bf9836e7e07494
3 | MonoImporter:
4 | externalObjects: {}
5 | serializedVersion: 2
6 | defaultReferences: []
7 | executionOrder: 0
8 | icon: {instanceID: 0}
9 | userData:
10 | assetBundleName:
11 | assetBundleVariant:
12 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader.asmdef:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Fader",
3 | "rootNamespace": "",
4 | "references": [],
5 | "includePlatforms": [],
6 | "excludePlatforms": [],
7 | "allowUnsafeCode": false,
8 | "overrideReferences": false,
9 | "precompiledReferences": [],
10 | "autoReferenced": true,
11 | "defineConstraints": [],
12 | "versionDefines": [
13 | {
14 | "name": "com.unity.visualeffectgraph",
15 | "expression": "",
16 | "define": "USING_VFX"
17 | }
18 | ],
19 | "noEngineReferences": false
20 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | [Ll]ibrary/
2 | [Tt]emp/
3 | [Oo]bj/
4 | [Bb]uild/
5 | [Bb]uilds/
6 | Assets/AssetStoreTools*
7 |
8 | # Visual Studio cache directory
9 | .vs/
10 |
11 | # Autogenerated VS/MD/Consulo solution and project files
12 | ExportedObj/
13 | .consulo/
14 | *.csproj
15 | *.unityproj
16 | *.sln
17 | *.suo
18 | *.tmp
19 | *.user
20 | *.userprefs
21 | *.pidb
22 | *.booproj
23 | *.svd
24 | *.pdb
25 | *.opendb
26 | *.VC.db
27 |
28 | # Unity3D generated meta files
29 | *.pidb.meta
30 | *.pdb.meta
31 |
32 | # Unity3D Generated File On Crash Reports
33 | sysinfo.txt
34 |
35 | # Builds
36 | *.apk
37 | *.unitypackage
38 | Documentation
39 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/FadeSettings.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | using static Rowlan.Fader.FadeConst;
6 |
7 | namespace Rowlan.Fader
8 | {
9 | [Serializable]
10 | public class FadeSettings
11 | {
12 | [Header("Property")]
13 |
14 | public PropertyType propertyType = PropertyType.Float;
15 |
16 | [Tooltip("The property name which is assigned the value. Example for material shader usage: _EmissionColor")]
17 | public string propertyNameID;
18 |
19 | [Header("Fade")]
20 |
21 | public float minimumValue = 0f;
22 | public float maximumValue = 1f;
23 |
24 | [Tooltip("The easing meachinsm")]
25 | public Ease ease = Ease.Linear;
26 |
27 | public FadeSettings() : this ( 0f, 1f)
28 | {
29 | }
30 |
31 | public FadeSettings(float minimumValue, float maximumValue)
32 | {
33 | this.minimumValue = minimumValue;
34 | this.maximumValue = maximumValue;
35 | }
36 |
37 | }
38 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Roland09
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/FadeConst.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | using static Rowlan.Fader.FadeConst;
6 |
7 | namespace Rowlan.Fader
8 | {
9 | ///
10 | /// Various enums and types used for the fading parameters
11 | ///
12 | public class FadeConst
13 | {
14 | public enum FadeDirection
15 | {
16 | In,
17 | Out
18 | }
19 |
20 | public enum PropertyType
21 | {
22 | Float,
23 | Color
24 | }
25 |
26 | public enum Ease
27 | {
28 | Linear,
29 | EaseInQuad,
30 | EaseOutQuad
31 | }
32 | }
33 |
34 | ///
35 | /// Perform the Lerp algorithm depending on the selected ease type
36 | ///
37 | public static class EaseExtensions
38 | {
39 | public static float Lerp(this Ease ease, float start, float end, float value)
40 | {
41 | switch (ease)
42 | {
43 | case Ease.Linear: return Mathf.Lerp(start, end, value);
44 | case Ease.EaseInQuad: end -= start; return end * value * value + start;
45 | case Ease.EaseOutQuad: end -= start; return -end * value * (value - 2) + start;
46 | default: throw new ArgumentOutOfRangeException("Unsupported parameter " + ease);
47 | }
48 | }
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Fader
2 |
3 | ### Description
4 |
5 | Fader allows you to lerp between values and colors for a given duration and toggle lerp direction.
6 |
7 | Specific implementations can e. g. fade Materials, Enviro Time, VFX Spawn Rate, etc in and out in Unity.
8 |
9 |
10 | ### Example Implementations
11 |
12 | * Material Property
13 | - Fade Float and Color Properties of Materials
14 | * Material Object
15 | - Fade two material using Unity's internal [Material.Lerp](https://docs.unity3d.com/ScriptReference/Material.Lerp.html) function
16 | * VFX
17 | - Fade VFX property values
18 | * Enviro
19 | - Fade Enviro's time in and out. This requires the scripting define symbol `ENVIRO` to be defined
20 | * Aura 2
21 | - Fade the Aura 2 Camera and Fade the Aura 2 Volume
22 |
23 |
24 | ### Example Setup
25 |
26 | 
27 |
28 | In my case I was toying around with the new Malbers Realistic Wolf.
29 | The eyes use the Standard material, property `_EmissionColor` as color.
30 | The fur is a special shader with a property `_EmissionPower` as float.
31 |
32 | Looks like this then:
33 |
34 | 
35 |
36 | This video clip shows how it looks with both the Material Property and Enviro Fader applied:
37 |
38 | [](https://www.youtube.com/watch?v=A6mdaOySVQM)
39 |
40 | If you need a custom fader, I suggest to check out VFXFader.cs or EnviroTimeFader.cs. The implementation should be straightforward.
41 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/InputToggleFader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using static Rowlan.Fader.FadeConst;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | ///
9 | /// Control the via Input and toggle the fade direction upon keypress.
10 | ///
11 | public abstract class InputToggleFader : Fader
12 | {
13 | ///
14 | /// Starts the fading using and toggled the fade direction afterwards
15 | ///
16 | ///
17 | ///
18 | ///
19 | public void StartToggle(MonoBehaviour monoBehaviour, ref FadeDirection fadeDirection, float duration)
20 | {
21 | Start(monoBehaviour, fadeDirection, duration);
22 |
23 | // toggle fade direction
24 | fadeDirection = fadeDirection == FadeDirection.In ? FadeDirection.Out : FadeDirection.In;
25 | }
26 |
27 | ///
28 | /// Checks if the toggle key got pressed and if so starts the fading and toggles the fade direction afterwards
29 | ///
30 | ///
31 | ///
32 | ///
33 | ///
34 | public void StartToggleOnInput(KeyCode toggleKeyCode, MonoBehaviour monoBehaviour, ref FadeDirection fadeDirection, float duration)
35 | {
36 | if (Input.anyKeyDown)
37 | {
38 | if (Input.GetKeyDown(toggleKeyCode))
39 | {
40 | StartToggle(monoBehaviour, ref fadeDirection, duration);
41 | }
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Fader/Fader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections;
2 | using System.Collections.Generic;
3 | using UnityEngine;
4 | using static Rowlan.Fader.FadeConst;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | ///
9 | /// Interpolate between 0 and 1 for a specified duration
10 | /// and apply it to the implemented method.
11 | ///
12 | public abstract class Fader
13 | {
14 | private Coroutine currentFadeCoroutine = null;
15 |
16 | ///
17 | /// Stop currently running fading and start a new one depending on the specified parameters
18 | ///
19 | /// Required for the Coroutine invocations
20 | public void Start(MonoBehaviour monoBehaviour, FadeDirection fadeDirection, float duration)
21 | {
22 |
23 | if (currentFadeCoroutine != null)
24 | {
25 | monoBehaviour.StopCoroutine(currentFadeCoroutine);
26 | }
27 |
28 | currentFadeCoroutine = monoBehaviour.StartCoroutine(Fade(duration, fadeDirection));
29 | }
30 |
31 | private IEnumerator Fade(float globalDuration, FadeDirection fadeDirection)
32 | {
33 |
34 | float timeElapsed = 0;
35 |
36 | while (timeElapsed < globalDuration)
37 | {
38 |
39 | float percentage = timeElapsed / globalDuration;
40 |
41 | if (fadeDirection == FadeDirection.Out)
42 | {
43 | percentage = 1.0f - percentage;
44 | }
45 |
46 | percentage = Mathf.Clamp(percentage, 0f, 1f);
47 |
48 | timeElapsed += Time.deltaTime;
49 |
50 | ApplyFade(percentage);
51 |
52 | yield return null;
53 | }
54 |
55 | // set end value explicitly, otherwise it might not be the specified one because of the time increments
56 | if (fadeDirection == FadeDirection.Out)
57 | {
58 | ApplyFade(0f);
59 | }
60 | else
61 | {
62 | ApplyFade(1f);
63 | }
64 | }
65 |
66 | ///
67 | /// This method is invoked for the time of the fade duration and gets the interpolated percentage applied
68 | ///
69 | /// An interpolated value of [0,1] range which spans the duration
70 | public abstract void ApplyFade(float percentage);
71 | }
72 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Aura 2/Aura2VolumeFader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEngine;
4 | using static Rowlan.Fader.FadeConst;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | ///
9 | /// Example about how to fade Aura 2's fog density
10 | ///
11 | public class Aura2VolumeFader : MonoBehaviour
12 | {
13 | #if AURA_IN_PROJECT
14 |
15 | #region Public Variables
16 |
17 | [Header("Aura")]
18 |
19 | public Aura2API.AuraVolume auraVolume;
20 |
21 | [Header( "Fade")]
22 |
23 | [Tooltip("The minimum and the maximum fog density")]
24 | public FadeSettings propertyFadeSettings = new FadeSettings( -2f, 5f);
25 |
26 | [Tooltip("The fade duration in seconds")]
27 | public float duration = 2f;
28 |
29 | [Header("Input")]
30 |
31 | [Tooltip("The input key that triggers the fading")]
32 | public KeyCode toggleKeyCode = KeyCode.None;
33 |
34 | #endregion Public Variables
35 |
36 | #region Internal Variables
37 | private FadeDirection fadeDirection = FadeDirection.In;
38 |
39 | private InputToggleFader fader;
40 | #endregion Internal Variables
41 |
42 | #region Initialization
43 | void Start()
44 | {
45 | fader = new CustomFader(auraVolume, propertyFadeSettings);
46 | }
47 | #endregion Initialization
48 |
49 | #region Fade Trigger
50 | void Update()
51 | {
52 | // check if the toggle key got pressed and if so start the fading and toggle the fade direction afterwards
53 | fader.StartToggleOnInput(toggleKeyCode, this, ref fadeDirection, duration);
54 | }
55 | #endregion Fade Trigger
56 |
57 | #region Fade Logic
58 |
59 | public class CustomFader : InputToggleFader
60 | {
61 | FadeSettings propertyFadeSettings;
62 | Aura2API.AuraVolume auraVolume;
63 |
64 | public CustomFader(Aura2API.AuraVolume auraVolume, FadeSettings propertyFadeSettings) {
65 | this.auraVolume = auraVolume;
66 | this.propertyFadeSettings = propertyFadeSettings;
67 | }
68 |
69 | public override void ApplyFade(float percentage)
70 | {
71 | float interpolatedValue = propertyFadeSettings.ease.Lerp(propertyFadeSettings.minimumValue, propertyFadeSettings.maximumValue, percentage);
72 |
73 | auraVolume.densityInjection.strength = interpolatedValue;
74 | }
75 | }
76 |
77 | #endregion Fade Logic
78 |
79 | #endif
80 | }
81 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Aura 2/Aura2CameraFader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEngine;
4 | using static Rowlan.Fader.FadeConst;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | ///
9 | /// Example about how to fade Aura 2's extinction
10 | ///
11 | public class Aura2CameraFader : MonoBehaviour
12 | {
13 | #if AURA_IN_PROJECT
14 |
15 | #region Public Variables
16 |
17 | [Header("Aura")]
18 |
19 | public Aura2API.AuraCamera auraCamera;
20 |
21 | [Header( "Fade")]
22 |
23 | [Tooltip("The minimum fog density and he maximum fog density")]
24 | public FadeSettings propertyFadeSettings = new FadeSettings( -2f, 5f);
25 |
26 | [Tooltip("The fade duration in seconds")]
27 | public float duration = 2f;
28 |
29 | [Header("Input")]
30 |
31 | [Tooltip("The input key that triggers the fading")]
32 | public KeyCode toggleKeyCode = KeyCode.None;
33 |
34 | #endregion Public Variables
35 |
36 | #region Internal Variables
37 | private FadeDirection fadeDirection = FadeDirection.In;
38 |
39 | private InputToggleFader fader;
40 | #endregion Internal Variables
41 |
42 | #region Initialization
43 | void Start()
44 | {
45 | fader = new CustomFader(auraCamera, propertyFadeSettings);
46 | }
47 | #endregion Initialization
48 |
49 | #region Fade Trigger
50 | void Update()
51 | {
52 | // check if the toggle key got pressed and if so start the fading and toggle the fade direction afterwards
53 | fader.StartToggleOnInput(toggleKeyCode, this, ref fadeDirection, duration);
54 | }
55 | #endregion Fade Trigger
56 |
57 | #region Fade Logic
58 |
59 | public class CustomFader : InputToggleFader
60 | {
61 | Aura2API.AuraCamera auraCamera;
62 | FadeSettings propertyFadeSettings;
63 |
64 | public CustomFader(Aura2API.AuraCamera auraCamera, FadeSettings propertyFadeSettings) {
65 | this.auraCamera = auraCamera;
66 | this.propertyFadeSettings = propertyFadeSettings;
67 | }
68 |
69 | public override void ApplyFade(float percentage)
70 | {
71 | float interpolatedValue = propertyFadeSettings.ease.Lerp(propertyFadeSettings.minimumValue, propertyFadeSettings.maximumValue, percentage);
72 |
73 | auraCamera.frustumSettings.baseSettings.extinction = interpolatedValue;
74 | }
75 | }
76 |
77 | #endregion Fade Logic
78 |
79 | #endif
80 | }
81 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Red.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Red
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 1, g: 0, b: 0, a: 1}
77 | - _EmissionColor: {r: 1.4980392, g: 1.2, b: 0, a: 1}
78 | m_BuildTextureStacks: []
79 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Green.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Green
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0, g: 1, b: 0, a: 1}
77 | - _EmissionColor: {r: 1.4980392, g: 1.2, b: 0, a: 1}
78 | m_BuildTextureStacks: []
79 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Grey.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Grey
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Floats:
59 | - _BumpScale: 1
60 | - _Cutoff: 0.5
61 | - _DetailNormalMapScale: 1
62 | - _DstBlend: 0
63 | - _GlossMapScale: 1
64 | - _Glossiness: 0.5
65 | - _GlossyReflections: 1
66 | - _Metallic: 0
67 | - _Mode: 0
68 | - _OcclusionStrength: 1
69 | - _Parallax: 0.02
70 | - _SmoothnessTextureChannel: 0
71 | - _SpecularHighlights: 1
72 | - _SrcBlend: 1
73 | - _UVSec: 0
74 | - _ZWrite: 1
75 | m_Colors:
76 | - _Color: {r: 0.4433962, g: 0.4433962, b: 0.4433962, a: 1}
77 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
78 | m_BuildTextureStacks: []
79 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Blue.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Blue
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Ints: []
59 | m_Floats:
60 | - _BumpScale: 1
61 | - _Cutoff: 0.5
62 | - _DetailNormalMapScale: 1
63 | - _DstBlend: 0
64 | - _GlossMapScale: 1
65 | - _Glossiness: 0.5
66 | - _GlossyReflections: 1
67 | - _Metallic: 1
68 | - _Mode: 0
69 | - _OcclusionStrength: 1
70 | - _Parallax: 0.02
71 | - _SmoothnessTextureChannel: 0
72 | - _SpecularHighlights: 1
73 | - _SrcBlend: 1
74 | - _UVSec: 0
75 | - _ZWrite: 1
76 | m_Colors:
77 | - _Color: {r: 0, g: 0, b: 1, a: 1}
78 | - _EmissionColor: {r: 1.4980392, g: 1.2, b: 0, a: 1}
79 | m_BuildTextureStacks: []
80 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Multi - Red.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Multi - Red
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Ints: []
59 | m_Floats:
60 | - _BumpScale: 1
61 | - _Cutoff: 0.5
62 | - _DetailNormalMapScale: 1
63 | - _DstBlend: 0
64 | - _GlossMapScale: 1
65 | - _Glossiness: 0
66 | - _GlossyReflections: 1
67 | - _Metallic: 1
68 | - _Mode: 0
69 | - _OcclusionStrength: 1
70 | - _Parallax: 0.02
71 | - _SmoothnessTextureChannel: 0
72 | - _SpecularHighlights: 1
73 | - _SrcBlend: 1
74 | - _UVSec: 0
75 | - _ZWrite: 1
76 | m_Colors:
77 | - _Color: {r: 1, g: 0, b: 0, a: 1}
78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
79 | m_BuildTextureStacks: []
80 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Multi - Green.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Multi - Green
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Ints: []
59 | m_Floats:
60 | - _BumpScale: 1
61 | - _Cutoff: 0.5
62 | - _DetailNormalMapScale: 1
63 | - _DstBlend: 0
64 | - _GlossMapScale: 1
65 | - _Glossiness: 1
66 | - _GlossyReflections: 1
67 | - _Metallic: 1
68 | - _Mode: 0
69 | - _OcclusionStrength: 1
70 | - _Parallax: 0.02
71 | - _SmoothnessTextureChannel: 0
72 | - _SpecularHighlights: 1
73 | - _SrcBlend: 1
74 | - _UVSec: 0
75 | - _ZWrite: 1
76 | m_Colors:
77 | - _Color: {r: 1, g: 1, b: 1, a: 1}
78 | - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
79 | m_BuildTextureStacks: []
80 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Grey (Float).mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Grey (Float)
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords:
13 | m_LightmapFlags: 4
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Ints: []
59 | m_Floats:
60 | - _BumpScale: 1
61 | - _Cutoff: 0.5
62 | - _DetailNormalMapScale: 1
63 | - _DstBlend: 0
64 | - _GlossMapScale: 1
65 | - _Glossiness: 0.5
66 | - _GlossyReflections: 1
67 | - _Metallic: 1
68 | - _Mode: 0
69 | - _OcclusionStrength: 1
70 | - _Parallax: 0.02
71 | - _SmoothnessTextureChannel: 0
72 | - _SpecularHighlights: 1
73 | - _SrcBlend: 1
74 | - _UVSec: 0
75 | - _ZWrite: 1
76 | m_Colors:
77 | - _Color: {r: 1, g: 1, b: 1, a: 1}
78 | - _EmissionColor: {r: 1.4980392, g: 1.2, b: 0, a: 1}
79 | m_BuildTextureStacks: []
80 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/VFX/VFXFader.cs:
--------------------------------------------------------------------------------
1 | using UnityEngine;
2 | using static Rowlan.Fader.FadeConst;
3 |
4 | namespace Rowlan.Fader
5 | {
6 | public class VFXFader : MonoBehaviour
7 | {
8 | #if USING_VFX
9 |
10 | #region Public Variables
11 |
12 | public UnityEngine.VFX.VisualEffect visualEffectComponent;
13 |
14 | [Header( "Fade")]
15 |
16 | [Tooltip("The minimum hour offset. Note that if you want from midday to 3 hours past midnight, you should use e. g. from 12 to 27. The maximum hour offset. Note that if you want from midday to 3 hours past midnight, you should use e. g. from 12 to 27")]
17 | public FadeSettings propertyFadeSettings = new FadeSettings( 0f, 12f);
18 |
19 | [Tooltip("The fade duration in seconds")]
20 | public float duration = 5f;
21 |
22 | [Header("Input")]
23 |
24 | [Tooltip("The input key that triggers the fading")]
25 | public KeyCode toggleKeyCode = KeyCode.None;
26 |
27 | #endregion Public Variables
28 |
29 | #region Internal Variables
30 | private FadeDirection fadeDirection = FadeDirection.In;
31 |
32 | private InputToggleFader fader;
33 | #endregion Internal Variables
34 |
35 | #region Initialization
36 | void Start()
37 | {
38 | fader = new CustomFader(visualEffectComponent, propertyFadeSettings);
39 | }
40 | #endregion Initialization
41 |
42 | #region Fade Trigger
43 | void Update()
44 | {
45 | // check if the toggle key got pressed and if so start the fading and toggle the fade direction afterwards
46 | fader.StartToggleOnInput(toggleKeyCode, this, ref fadeDirection, duration);
47 | }
48 | #endregion Fade Trigger
49 |
50 | #region Fade Logic
51 |
52 | public class CustomFader : InputToggleFader
53 | {
54 | private UnityEngine.VFX.VisualEffect visualEffectComponent;
55 | private FadeSettings propertyFadeSettings;
56 |
57 | public CustomFader(UnityEngine.VFX.VisualEffect visualEffectComponent, FadeSettings propertyFadeSettings)
58 | {
59 | this.visualEffectComponent = visualEffectComponent;
60 | this.propertyFadeSettings = propertyFadeSettings;
61 | }
62 |
63 | public override void ApplyFade(float percentage)
64 | {
65 | float interpolatedValue = propertyFadeSettings.ease.Lerp(propertyFadeSettings.minimumValue, propertyFadeSettings.maximumValue, percentage);
66 |
67 | visualEffectComponent.SetFloat(propertyFadeSettings.propertyNameID, interpolatedValue);
68 |
69 | }
70 | }
71 |
72 | #endregion Fade Logic
73 |
74 | #endif
75 | }
76 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Materials/Red with Yellow Emissive.mat:
--------------------------------------------------------------------------------
1 | %YAML 1.1
2 | %TAG !u! tag:unity3d.com,2011:
3 | --- !u!21 &2100000
4 | Material:
5 | serializedVersion: 6
6 | m_ObjectHideFlags: 0
7 | m_CorrespondingSourceObject: {fileID: 0}
8 | m_PrefabInstance: {fileID: 0}
9 | m_PrefabAsset: {fileID: 0}
10 | m_Name: Red with Yellow Emissive
11 | m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
12 | m_ShaderKeywords: _EMISSION
13 | m_LightmapFlags: 2
14 | m_EnableInstancingVariants: 0
15 | m_DoubleSidedGI: 0
16 | m_CustomRenderQueue: -1
17 | stringTagMap: {}
18 | disabledShaderPasses: []
19 | m_SavedProperties:
20 | serializedVersion: 3
21 | m_TexEnvs:
22 | - _BumpMap:
23 | m_Texture: {fileID: 0}
24 | m_Scale: {x: 1, y: 1}
25 | m_Offset: {x: 0, y: 0}
26 | - _DetailAlbedoMap:
27 | m_Texture: {fileID: 0}
28 | m_Scale: {x: 1, y: 1}
29 | m_Offset: {x: 0, y: 0}
30 | - _DetailMask:
31 | m_Texture: {fileID: 0}
32 | m_Scale: {x: 1, y: 1}
33 | m_Offset: {x: 0, y: 0}
34 | - _DetailNormalMap:
35 | m_Texture: {fileID: 0}
36 | m_Scale: {x: 1, y: 1}
37 | m_Offset: {x: 0, y: 0}
38 | - _EmissionMap:
39 | m_Texture: {fileID: 0}
40 | m_Scale: {x: 1, y: 1}
41 | m_Offset: {x: 0, y: 0}
42 | - _MainTex:
43 | m_Texture: {fileID: 0}
44 | m_Scale: {x: 1, y: 1}
45 | m_Offset: {x: 0, y: 0}
46 | - _MetallicGlossMap:
47 | m_Texture: {fileID: 0}
48 | m_Scale: {x: 1, y: 1}
49 | m_Offset: {x: 0, y: 0}
50 | - _OcclusionMap:
51 | m_Texture: {fileID: 0}
52 | m_Scale: {x: 1, y: 1}
53 | m_Offset: {x: 0, y: 0}
54 | - _ParallaxMap:
55 | m_Texture: {fileID: 0}
56 | m_Scale: {x: 1, y: 1}
57 | m_Offset: {x: 0, y: 0}
58 | m_Ints: []
59 | m_Floats:
60 | - _BumpScale: 1
61 | - _Cutoff: 0.5
62 | - _DetailNormalMapScale: 1
63 | - _DstBlend: 0
64 | - _GlossMapScale: 1
65 | - _Glossiness: 0.5
66 | - _GlossyReflections: 1
67 | - _Metallic: 0
68 | - _Mode: 0
69 | - _OcclusionStrength: 1
70 | - _Parallax: 0.02
71 | - _SmoothnessTextureChannel: 0
72 | - _SpecularHighlights: 1
73 | - _SrcBlend: 1
74 | - _UVSec: 0
75 | - _ZWrite: 1
76 | m_Colors:
77 | - _Color: {r: 1, g: 0, b: 0, a: 1}
78 | - _EmissionColor: {r: 1.4980392, g: 1.2, b: 0, a: 1}
79 | m_BuildTextureStacks: []
80 |
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Enviro/EnviroTimeFader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEngine;
4 | using static Rowlan.Fader.FadeConst;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | ///
9 | /// Example about how to fade Enviro's time in and out
10 | ///
11 | /// Important: Using Enviro requires this scripting symbol to be defined: ENVIRO. Or alternatively adjust the #if codeblock in .
12 | ///
13 | ///
14 | public class EnviroTimeFader : MonoBehaviour
15 | {
16 | #if ENVIRO
17 |
18 | #region Public Variables
19 |
20 | [Header( "Fade")]
21 |
22 | [Tooltip("The minimum hour offset. Note that if you want from midday to 3 hours past midnight, you should use e. g. from 12 to 27. The maximum hour offset. Note that if you want from midday to 3 hours past midnight, you should use e. g. from 12 to 27")]
23 | public FadeSettings propertyFadeSettings = new FadeSettings( 0f, 12f);
24 |
25 | [Tooltip("The fade duration in seconds")]
26 | public float duration = 5f;
27 |
28 | [Header("Input")]
29 |
30 | [Tooltip("The input key that triggers the fading")]
31 | public KeyCode toggleKeyCode = KeyCode.None;
32 |
33 | #endregion Public Variables
34 |
35 | #region Internal Variables
36 | private FadeDirection fadeDirection = FadeDirection.In;
37 |
38 | private InputToggleFader fader;
39 | #endregion Internal Variables
40 |
41 | #region Initialization
42 | void Start()
43 | {
44 | fader = new CustomFader( propertyFadeSettings);
45 | }
46 | #endregion Initialization
47 |
48 | #region Fade Trigger
49 | void Update()
50 | {
51 | // check if the toggle key got pressed and if so start the fading and toggle the fade direction afterwards
52 | fader.StartToggleOnInput(toggleKeyCode, this, ref fadeDirection, duration);
53 | }
54 | #endregion Fade Trigger
55 |
56 | #region Fade Logic
57 |
58 | public class CustomFader : InputToggleFader
59 | {
60 | private FadeSettings propertyFadeSettings;
61 |
62 | public CustomFader( FadeSettings propertyFadeSettings)
63 | {
64 | this.propertyFadeSettings = propertyFadeSettings;
65 | }
66 |
67 | public override void ApplyFade(float percentage)
68 | {
69 | float interpolatedValue = propertyFadeSettings.ease.Lerp(propertyFadeSettings.minimumValue, propertyFadeSettings.maximumValue, percentage);
70 |
71 | //EnviroSkyMgr.instance.SetTimeOfDay(EnviroSkyMgr.instance.GetUniversalTimeOfDay() + interpolatedValue);
72 | EnviroSkyMgr.instance.SetTimeOfDay(interpolatedValue);
73 | }
74 | }
75 |
76 | #endregion Fade Logic
77 |
78 | #endif
79 |
80 | }
81 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Object/MaterialObjectFader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using UnityEngine;
4 | using static Rowlan.Fader.FadeConst;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | ///
9 | /// Fade between two Materials using Unity's internal function:
10 | ///
11 | /// https://docs.unity3d.com/ScriptReference/Material.Lerp.html
12 | ///
13 | ///
14 | public class MaterialObjectFader : MonoBehaviour
15 | {
16 | #region Public Variables
17 |
18 | [Header("Renderer")]
19 |
20 | public Renderer gameObjectRenderer;
21 |
22 | [Header("Materials")]
23 |
24 | [Tooltip("The source material for fade in, target material for fade out")]
25 | public Material material1;
26 |
27 | [Tooltip("The target material for fade in, source material for fade out")]
28 | public Material material2;
29 |
30 | [Header("Fade")]
31 |
32 | [Tooltip("The minimum hour offset. Note that if you want from midday to 3 hours past midnight, you should use e. g. from 12 to 27")]
33 | public float minimumValue = 0f;
34 |
35 | [Tooltip("The maximum hour offset. Note that if you want from midday to 3 hours past midnight, you should use e. g. from 12 to 27")]
36 | public float maximumValue = 1f;
37 |
38 | [Tooltip("The fade duration in seconds")]
39 | public float duration = 2f;
40 |
41 | [Tooltip("The easing meachinsm")]
42 | public Ease ease = Ease.Linear;
43 |
44 | [Header("Input")]
45 |
46 | [Tooltip("The input key that triggers the fading")]
47 | public KeyCode toggleKeyCode = KeyCode.None;
48 |
49 | #endregion Public Variables
50 |
51 | #region Internal Variables
52 | private FadeDirection fadeDirection = FadeDirection.In;
53 |
54 | private InputToggleFader fader;
55 |
56 | #endregion Internal Variables
57 |
58 | #region Initialization
59 | void Start()
60 | {
61 | fader = new CustomFader(gameObjectRenderer, material1, material2);
62 | }
63 | #endregion Initialization
64 |
65 | #region Fade Trigger
66 | void Update()
67 | {
68 | // check if the toggle key got pressed and if so start the fading and toggle the fade direction afterwards
69 | fader.StartToggleOnInput(toggleKeyCode, this, ref fadeDirection, duration);
70 | }
71 | #endregion Fade Trigger
72 |
73 | #region Fade Logic
74 |
75 | public class CustomFader : InputToggleFader
76 | {
77 | Renderer renderer;
78 | Material material1;
79 | Material material2;
80 |
81 | public CustomFader(Renderer renderer, Material material1, Material material2)
82 | {
83 | this.renderer = renderer;
84 | this.material1 = material1;
85 | this.material2 = material2;
86 | }
87 |
88 | public override void ApplyFade(float percentage)
89 | {
90 | renderer.material.Lerp(material1, material2, percentage);
91 | }
92 | }
93 |
94 | #endregion Fade Logic
95 | }
96 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Property/MaterialPropertyFader.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 | using static Rowlan.Fader.FadeConst;
6 |
7 | namespace Rowlan.Fader
8 | {
9 | ///
10 | /// Fade one or more material property values and colors in and out with specified easing functions.
11 | ///
12 | /// Supported property types:
13 | /// + Float
14 | /// + Color
15 | ///
16 | ///
17 | public class MaterialPropertyFader : MonoBehaviour
18 | {
19 | #region Public Variables
20 |
21 | // [Header("GameObjects")]
22 |
23 | public List sceneGameObjects = new List(new GameObject[1]);
24 |
25 | // [Header("Material Settings")]
26 |
27 | public List propertyFadeSettings = new List( new FadeSettings[1]);
28 |
29 | // [Space]
30 |
31 | [Header("Interpolation")]
32 |
33 | [Tooltip("The fade duration in seconds")]
34 | public float duration = 1f;
35 |
36 | [Header("Input")]
37 |
38 | [Tooltip("The input key that triggers the fading")]
39 | public KeyCode toggleKeyCode = KeyCode.None;
40 |
41 | #endregion Public Variables
42 |
43 | #region Internal Variables
44 | private FadeDirection fadeDirection = FadeDirection.In;
45 |
46 | private InputToggleFader fader;
47 | #endregion Internal Variables
48 |
49 | #region Initialization
50 | void Start()
51 | {
52 | fader = new CustomFader(sceneGameObjects, propertyFadeSettings);
53 | }
54 |
55 | #endregion Initialization
56 |
57 | #region Fade Trigger
58 | void Update()
59 | {
60 | // check if the toggle key got pressed and if so start the fading and toggle the fade direction afterwards
61 | fader.StartToggleOnInput(toggleKeyCode, this, ref fadeDirection, duration);
62 | }
63 | #endregion Fade Trigger
64 |
65 | #region Fade Logic
66 |
67 | public class CustomFader : InputToggleFader
68 | {
69 | private readonly List fadeMaterials;
70 |
71 | public CustomFader(List sceneGameObjects, List propertyFadeSettings) {
72 | this.fadeMaterials = GetFadeMaterials(sceneGameObjects, propertyFadeSettings);
73 | }
74 |
75 | ///
76 | /// Collect all fade materials depending on the property type and name id
77 | ///
78 | ///
79 | ///
80 | ///
81 | ///
82 | private List GetFadeMaterials(List sceneGameObjects, List propertyFadeSettings)
83 | {
84 | List fadeMaterials = new List();
85 |
86 | foreach (GameObject sceneGameObject in sceneGameObjects)
87 | {
88 | Renderer[] rendererChildren = sceneGameObject.GetComponentsInChildren();
89 |
90 | foreach (Renderer renderer in rendererChildren)
91 | {
92 | FadeMaterial fadeMaterial = new FadeMaterial(renderer, propertyFadeSettings);
93 |
94 | if (fadeMaterial.IsValid())
95 | {
96 | fadeMaterials.Add(fadeMaterial);
97 | }
98 | }
99 | }
100 |
101 | return fadeMaterials;
102 | }
103 |
104 | public CustomFader(List fadeMaterials) {
105 | this.fadeMaterials = fadeMaterials;
106 | }
107 |
108 | public override void ApplyFade(float percentage)
109 | {
110 | foreach (FadeMaterial fadeMaterial in fadeMaterials)
111 | {
112 | fadeMaterial.UpdateMaterials(percentage);
113 | }
114 | }
115 | }
116 |
117 | #endregion Fade Logic
118 | }
119 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/Material/Material Property/FadeMaterial.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using UnityEngine;
5 |
6 | namespace Rowlan.Fader
7 | {
8 | public class FadeMaterial
9 | {
10 | protected List propertyFadeSettings;
11 |
12 | protected Renderer renderer;
13 | protected List materialBlocks = new List();
14 |
15 | public FadeMaterial(Renderer renderer, List propertyFadeSettings)
16 | {
17 | this.renderer = renderer;
18 | this.propertyFadeSettings = propertyFadeSettings;
19 |
20 | RegisterMaterials();
21 | }
22 |
23 | ///
24 | /// Collect all supported materials of the render. The supported ones are the ones which have the specified property name id.
25 | ///
26 | private void RegisterMaterials()
27 | {
28 |
29 | // create a list of all property name IDs in the settings
30 | List propertyNameIDs = propertyFadeSettings.ConvertAll(x => x.propertyNameID);
31 |
32 | Material[] materials = renderer.materials;
33 |
34 | for (int i = 0; i < materials.Length; i++)
35 | {
36 | Material material = materials[i];
37 |
38 | // ensure all property name ids exist, otherwise skip the material; useful if you have multiple different materials
39 | bool hasPropertyNameID = true;
40 |
41 | foreach (string propertyNameID in propertyNameIDs)
42 | {
43 | if (!material.HasProperty(propertyNameID))
44 | {
45 | hasPropertyNameID = false;
46 | break;
47 | }
48 | }
49 |
50 | if (!hasPropertyNameID)
51 | continue;
52 |
53 | // Create a material data container for fading
54 | MaterialBlockBase materialBlock = new MaterialBlockBase(i, material, propertyFadeSettings);
55 |
56 | materialBlocks.Add(materialBlock);
57 | }
58 | }
59 |
60 | ///
61 | /// Whether or not this material is supported for fading. It is valid if at least 1 material block has been registered.
62 | ///
63 | ///
64 | public bool IsValid()
65 | {
66 | return materialBlocks.Count > 0;
67 | }
68 |
69 | ///
70 | /// Process the material data containers and set the fade percentage.
71 | ///
72 | /// An interpolated value of [0,1] range which spans the duration
73 | public void UpdateMaterials(float percentage) {
74 |
75 | foreach(MaterialBlockBase materialBlock in materialBlocks) {
76 |
77 | List propertyFadeSettings = materialBlock.propertyFadeSettings;
78 |
79 | // store the initial values of all material property ids of the given material
80 | foreach (FadeSettings fadeSettings in propertyFadeSettings)
81 | {
82 |
83 | float interpolatedValue;
84 |
85 | switch (fadeSettings.propertyType)
86 | {
87 | case FadeConst.PropertyType.Float:
88 |
89 | interpolatedValue = fadeSettings.ease.Lerp(fadeSettings.minimumValue, fadeSettings.maximumValue, percentage);
90 |
91 | materialBlock.propertyBlock.SetFloat(fadeSettings.propertyNameID, interpolatedValue);
92 |
93 | break;
94 |
95 | case FadeConst.PropertyType.Color:
96 |
97 | interpolatedValue = fadeSettings.ease.Lerp(fadeSettings.minimumValue, fadeSettings.maximumValue, percentage);
98 |
99 | Color color = materialBlock.GetInitialColor( fadeSettings.propertyNameID) * interpolatedValue; // note about gamma: for gamma you could use baseColor * Mathf.LinearToGammaSpace( value)
100 |
101 | materialBlock.propertyBlock.SetColor(fadeSettings.propertyNameID, color);
102 |
103 | break;
104 |
105 | default:
106 | throw new ArgumentOutOfRangeException(string.Format("Unsupported property type {0}", fadeSettings.propertyType));
107 | }
108 |
109 | }
110 |
111 | renderer.SetPropertyBlock(materialBlock.propertyBlock, materialBlock.index);
112 |
113 | }
114 |
115 | }
116 |
117 | ///
118 | /// Material data container class per supported material. Supported materials are the ones which contain the given property name id
119 | ///
120 | public class MaterialBlockBase
121 | {
122 | ///
123 | /// The index of the material in the renderer's material list
124 | ///
125 | public int index;
126 | public MaterialPropertyBlock propertyBlock = new MaterialPropertyBlock();
127 |
128 | public Dictionary initialFloatMap = new Dictionary();
129 | public Dictionary initialColorMap = new Dictionary();
130 |
131 | public List propertyFadeSettings;
132 |
133 | public MaterialBlockBase(int index, Material material, List propertyFadeSettings)
134 | {
135 | this.index = index;
136 | // this.material = material;
137 | this.propertyFadeSettings = propertyFadeSettings;
138 |
139 | // save the initial values of all material property ids of the given material
140 | SaveInitialValues( material);
141 | }
142 |
143 | private void SaveInitialValues(Material material) {
144 |
145 | foreach (FadeSettings fadeSettings in propertyFadeSettings)
146 | {
147 |
148 | switch (fadeSettings.propertyType)
149 | {
150 | case FadeConst.PropertyType.Float:
151 | initialFloatMap.Add(fadeSettings.propertyNameID, material.GetFloat(fadeSettings.propertyNameID));
152 | break;
153 |
154 | case FadeConst.PropertyType.Color:
155 | initialColorMap.Add(fadeSettings.propertyNameID, material.GetColor(fadeSettings.propertyNameID));
156 | break;
157 |
158 | default:
159 | throw new ArgumentOutOfRangeException(string.Format("Unsupported property type {0}", fadeSettings.propertyType));
160 | }
161 |
162 | }
163 |
164 | }
165 |
166 | public float GetInitialFloat(string propertyNameID)
167 | {
168 | return initialFloatMap[propertyNameID];
169 | }
170 |
171 | public Color GetInitialColor( string propertyNameID) {
172 | return initialColorMap[propertyNameID];
173 | }
174 | }
175 | }
176 | }
--------------------------------------------------------------------------------
/Assets/Rowlan/Fader/_Demo/Fader Demo.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: 0}
41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
42 | m_UseRadianceAmbientProbe: 0
43 | --- !u!157 &3
44 | LightmapSettings:
45 | m_ObjectHideFlags: 0
46 | serializedVersion: 12
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: 512
79 | m_PVRBounces: 2
80 | m_PVREnvironmentSampleCount: 256
81 | m_PVREnvironmentReferencePointCount: 2048
82 | m_PVRFilteringMode: 1
83 | m_PVRDenoiserTypeDirect: 1
84 | m_PVRDenoiserTypeIndirect: 1
85 | m_PVRDenoiserTypeAO: 1
86 | m_PVRFilterTypeDirect: 0
87 | m_PVRFilterTypeIndirect: 0
88 | m_PVRFilterTypeAO: 0
89 | m_PVREnvironmentMIS: 1
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_LightingSettings: {fileID: 0}
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 | maxJobWorkers: 0
122 | preserveTilesOutsideBounds: 0
123 | debug:
124 | m_Flags: 0
125 | m_NavMeshData: {fileID: 0}
126 | --- !u!1 &97345989
127 | GameObject:
128 | m_ObjectHideFlags: 0
129 | m_CorrespondingSourceObject: {fileID: 0}
130 | m_PrefabInstance: {fileID: 0}
131 | m_PrefabAsset: {fileID: 0}
132 | serializedVersion: 6
133 | m_Component:
134 | - component: {fileID: 97345992}
135 | - component: {fileID: 97345991}
136 | - component: {fileID: 97345990}
137 | m_Layer: 0
138 | m_Name: EventSystem
139 | m_TagString: Untagged
140 | m_Icon: {fileID: 0}
141 | m_NavMeshLayer: 0
142 | m_StaticEditorFlags: 0
143 | m_IsActive: 1
144 | --- !u!114 &97345990
145 | MonoBehaviour:
146 | m_ObjectHideFlags: 0
147 | m_CorrespondingSourceObject: {fileID: 0}
148 | m_PrefabInstance: {fileID: 0}
149 | m_PrefabAsset: {fileID: 0}
150 | m_GameObject: {fileID: 97345989}
151 | m_Enabled: 1
152 | m_EditorHideFlags: 0
153 | m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
154 | m_Name:
155 | m_EditorClassIdentifier:
156 | m_HorizontalAxis: Horizontal
157 | m_VerticalAxis: Vertical
158 | m_SubmitButton: Submit
159 | m_CancelButton: Cancel
160 | m_InputActionsPerSecond: 10
161 | m_RepeatDelay: 0.5
162 | m_ForceModuleActive: 0
163 | --- !u!114 &97345991
164 | MonoBehaviour:
165 | m_ObjectHideFlags: 0
166 | m_CorrespondingSourceObject: {fileID: 0}
167 | m_PrefabInstance: {fileID: 0}
168 | m_PrefabAsset: {fileID: 0}
169 | m_GameObject: {fileID: 97345989}
170 | m_Enabled: 1
171 | m_EditorHideFlags: 0
172 | m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
173 | m_Name:
174 | m_EditorClassIdentifier:
175 | m_FirstSelected: {fileID: 0}
176 | m_sendNavigationEvents: 1
177 | m_DragThreshold: 10
178 | --- !u!4 &97345992
179 | Transform:
180 | m_ObjectHideFlags: 0
181 | m_CorrespondingSourceObject: {fileID: 0}
182 | m_PrefabInstance: {fileID: 0}
183 | m_PrefabAsset: {fileID: 0}
184 | m_GameObject: {fileID: 97345989}
185 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
186 | m_LocalPosition: {x: 0, y: 0, z: 0}
187 | m_LocalScale: {x: 1, y: 1, z: 1}
188 | m_Children: []
189 | m_Father: {fileID: 0}
190 | m_RootOrder: 4
191 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
192 | --- !u!1 &113772296
193 | GameObject:
194 | m_ObjectHideFlags: 0
195 | m_CorrespondingSourceObject: {fileID: 0}
196 | m_PrefabInstance: {fileID: 0}
197 | m_PrefabAsset: {fileID: 0}
198 | serializedVersion: 6
199 | m_Component:
200 | - component: {fileID: 113772297}
201 | - component: {fileID: 113772300}
202 | - component: {fileID: 113772299}
203 | - component: {fileID: 113772298}
204 | m_Layer: 0
205 | m_Name: Sphere (Float)
206 | m_TagString: Untagged
207 | m_Icon: {fileID: 0}
208 | m_NavMeshLayer: 0
209 | m_StaticEditorFlags: 0
210 | m_IsActive: 1
211 | --- !u!4 &113772297
212 | Transform:
213 | m_ObjectHideFlags: 0
214 | m_CorrespondingSourceObject: {fileID: 0}
215 | m_PrefabInstance: {fileID: 0}
216 | m_PrefabAsset: {fileID: 0}
217 | m_GameObject: {fileID: 113772296}
218 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
219 | m_LocalPosition: {x: 0.737, y: 0.5, z: 0}
220 | m_LocalScale: {x: 1, y: 1, z: 1}
221 | m_Children: []
222 | m_Father: {fileID: 2079810669}
223 | m_RootOrder: 2
224 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
225 | --- !u!135 &113772298
226 | SphereCollider:
227 | m_ObjectHideFlags: 0
228 | m_CorrespondingSourceObject: {fileID: 0}
229 | m_PrefabInstance: {fileID: 0}
230 | m_PrefabAsset: {fileID: 0}
231 | m_GameObject: {fileID: 113772296}
232 | m_Material: {fileID: 0}
233 | m_IsTrigger: 0
234 | m_Enabled: 1
235 | serializedVersion: 2
236 | m_Radius: 0.5
237 | m_Center: {x: 0, y: 0, z: 0}
238 | --- !u!23 &113772299
239 | MeshRenderer:
240 | m_ObjectHideFlags: 0
241 | m_CorrespondingSourceObject: {fileID: 0}
242 | m_PrefabInstance: {fileID: 0}
243 | m_PrefabAsset: {fileID: 0}
244 | m_GameObject: {fileID: 113772296}
245 | m_Enabled: 1
246 | m_CastShadows: 1
247 | m_ReceiveShadows: 1
248 | m_DynamicOccludee: 1
249 | m_StaticShadowCaster: 0
250 | m_MotionVectors: 1
251 | m_LightProbeUsage: 1
252 | m_ReflectionProbeUsage: 1
253 | m_RayTracingMode: 2
254 | m_RayTraceProcedural: 0
255 | m_RenderingLayerMask: 1
256 | m_RendererPriority: 0
257 | m_Materials:
258 | - {fileID: 2100000, guid: b09d87969730a4445ab035e3f9289b6d, type: 2}
259 | m_StaticBatchInfo:
260 | firstSubMesh: 0
261 | subMeshCount: 0
262 | m_StaticBatchRoot: {fileID: 0}
263 | m_ProbeAnchor: {fileID: 0}
264 | m_LightProbeVolumeOverride: {fileID: 0}
265 | m_ScaleInLightmap: 1
266 | m_ReceiveGI: 1
267 | m_PreserveUVs: 0
268 | m_IgnoreNormalsForChartDetection: 0
269 | m_ImportantGI: 0
270 | m_StitchLightmapSeams: 1
271 | m_SelectedEditorRenderState: 3
272 | m_MinimumChartSize: 4
273 | m_AutoUVMaxDistance: 0.5
274 | m_AutoUVMaxAngle: 89
275 | m_LightmapParameters: {fileID: 0}
276 | m_SortingLayerID: 0
277 | m_SortingLayer: 0
278 | m_SortingOrder: 0
279 | m_AdditionalVertexStreams: {fileID: 0}
280 | --- !u!33 &113772300
281 | MeshFilter:
282 | m_ObjectHideFlags: 0
283 | m_CorrespondingSourceObject: {fileID: 0}
284 | m_PrefabInstance: {fileID: 0}
285 | m_PrefabAsset: {fileID: 0}
286 | m_GameObject: {fileID: 113772296}
287 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
288 | --- !u!1 &124393356
289 | GameObject:
290 | m_ObjectHideFlags: 0
291 | m_CorrespondingSourceObject: {fileID: 0}
292 | m_PrefabInstance: {fileID: 0}
293 | m_PrefabAsset: {fileID: 0}
294 | serializedVersion: 6
295 | m_Component:
296 | - component: {fileID: 124393357}
297 | m_Layer: 0
298 | m_Name: --- Multi Material Multi Property
299 | m_TagString: Untagged
300 | m_Icon: {fileID: 0}
301 | m_NavMeshLayer: 0
302 | m_StaticEditorFlags: 0
303 | m_IsActive: 1
304 | --- !u!4 &124393357
305 | Transform:
306 | m_ObjectHideFlags: 0
307 | m_CorrespondingSourceObject: {fileID: 0}
308 | m_PrefabInstance: {fileID: 0}
309 | m_PrefabAsset: {fileID: 0}
310 | m_GameObject: {fileID: 124393356}
311 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
312 | m_LocalPosition: {x: 0, y: 0, z: 0}
313 | m_LocalScale: {x: 1, y: 1, z: 1}
314 | m_Children:
315 | - {fileID: 883804185}
316 | - {fileID: 1480313668}
317 | - {fileID: 684456809}
318 | m_Father: {fileID: 0}
319 | m_RootOrder: 7
320 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
321 | --- !u!1 &342609595
322 | GameObject:
323 | m_ObjectHideFlags: 0
324 | m_CorrespondingSourceObject: {fileID: 0}
325 | m_PrefabInstance: {fileID: 0}
326 | m_PrefabAsset: {fileID: 0}
327 | serializedVersion: 6
328 | m_Component:
329 | - component: {fileID: 342609597}
330 | - component: {fileID: 342609596}
331 | - component: {fileID: 342609598}
332 | m_Layer: 0
333 | m_Name: Fader
334 | m_TagString: Untagged
335 | m_Icon: {fileID: 0}
336 | m_NavMeshLayer: 0
337 | m_StaticEditorFlags: 0
338 | m_IsActive: 1
339 | --- !u!114 &342609596
340 | MonoBehaviour:
341 | m_ObjectHideFlags: 0
342 | m_CorrespondingSourceObject: {fileID: 0}
343 | m_PrefabInstance: {fileID: 0}
344 | m_PrefabAsset: {fileID: 0}
345 | m_GameObject: {fileID: 342609595}
346 | m_Enabled: 1
347 | m_EditorHideFlags: 0
348 | m_Script: {fileID: 11500000, guid: 4f87397aa812e53429bf9836e7e07494, type: 3}
349 | m_Name:
350 | m_EditorClassIdentifier:
351 | sceneGameObjects:
352 | - {fileID: 1445958946}
353 | propertyFadeSettings:
354 | - propertyType: 1
355 | propertyNameID: _EmissionColor
356 | minimumValue: 0
357 | maximumValue: 1
358 | ease: 0
359 | duration: 2
360 | toggleKeyCode: 32
361 | --- !u!4 &342609597
362 | Transform:
363 | m_ObjectHideFlags: 0
364 | m_CorrespondingSourceObject: {fileID: 0}
365 | m_PrefabInstance: {fileID: 0}
366 | m_PrefabAsset: {fileID: 0}
367 | m_GameObject: {fileID: 342609595}
368 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
369 | m_LocalPosition: {x: 0, y: 0, z: 0}
370 | m_LocalScale: {x: 1, y: 1, z: 1}
371 | m_Children: []
372 | m_Father: {fileID: 2079810669}
373 | m_RootOrder: 0
374 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
375 | --- !u!114 &342609598
376 | MonoBehaviour:
377 | m_ObjectHideFlags: 0
378 | m_CorrespondingSourceObject: {fileID: 0}
379 | m_PrefabInstance: {fileID: 0}
380 | m_PrefabAsset: {fileID: 0}
381 | m_GameObject: {fileID: 342609595}
382 | m_Enabled: 1
383 | m_EditorHideFlags: 0
384 | m_Script: {fileID: 11500000, guid: 4f87397aa812e53429bf9836e7e07494, type: 3}
385 | m_Name:
386 | m_EditorClassIdentifier:
387 | sceneGameObjects:
388 | - {fileID: 113772296}
389 | propertyFadeSettings:
390 | - propertyType: 0
391 | propertyNameID: _Metallic
392 | minimumValue: 0
393 | maximumValue: 1
394 | ease: 0
395 | duration: 2
396 | toggleKeyCode: 32
397 | --- !u!1 &414104291
398 | GameObject:
399 | m_ObjectHideFlags: 0
400 | m_CorrespondingSourceObject: {fileID: 0}
401 | m_PrefabInstance: {fileID: 0}
402 | m_PrefabAsset: {fileID: 0}
403 | serializedVersion: 6
404 | m_Component:
405 | - component: {fileID: 414104295}
406 | - component: {fileID: 414104294}
407 | - component: {fileID: 414104293}
408 | - component: {fileID: 414104292}
409 | m_Layer: 0
410 | m_Name: Plane
411 | m_TagString: Untagged
412 | m_Icon: {fileID: 0}
413 | m_NavMeshLayer: 0
414 | m_StaticEditorFlags: 0
415 | m_IsActive: 1
416 | --- !u!64 &414104292
417 | MeshCollider:
418 | m_ObjectHideFlags: 0
419 | m_CorrespondingSourceObject: {fileID: 0}
420 | m_PrefabInstance: {fileID: 0}
421 | m_PrefabAsset: {fileID: 0}
422 | m_GameObject: {fileID: 414104291}
423 | m_Material: {fileID: 0}
424 | m_IsTrigger: 0
425 | m_Enabled: 1
426 | serializedVersion: 4
427 | m_Convex: 0
428 | m_CookingOptions: 30
429 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
430 | --- !u!23 &414104293
431 | MeshRenderer:
432 | m_ObjectHideFlags: 0
433 | m_CorrespondingSourceObject: {fileID: 0}
434 | m_PrefabInstance: {fileID: 0}
435 | m_PrefabAsset: {fileID: 0}
436 | m_GameObject: {fileID: 414104291}
437 | m_Enabled: 1
438 | m_CastShadows: 1
439 | m_ReceiveShadows: 1
440 | m_DynamicOccludee: 1
441 | m_StaticShadowCaster: 0
442 | m_MotionVectors: 1
443 | m_LightProbeUsage: 1
444 | m_ReflectionProbeUsage: 1
445 | m_RayTracingMode: 2
446 | m_RayTraceProcedural: 0
447 | m_RenderingLayerMask: 1
448 | m_RendererPriority: 0
449 | m_Materials:
450 | - {fileID: 2100000, guid: fa936bf082d83fc4da86dc176f416011, type: 2}
451 | m_StaticBatchInfo:
452 | firstSubMesh: 0
453 | subMeshCount: 0
454 | m_StaticBatchRoot: {fileID: 0}
455 | m_ProbeAnchor: {fileID: 0}
456 | m_LightProbeVolumeOverride: {fileID: 0}
457 | m_ScaleInLightmap: 1
458 | m_ReceiveGI: 1
459 | m_PreserveUVs: 0
460 | m_IgnoreNormalsForChartDetection: 0
461 | m_ImportantGI: 0
462 | m_StitchLightmapSeams: 1
463 | m_SelectedEditorRenderState: 3
464 | m_MinimumChartSize: 4
465 | m_AutoUVMaxDistance: 0.5
466 | m_AutoUVMaxAngle: 89
467 | m_LightmapParameters: {fileID: 0}
468 | m_SortingLayerID: 0
469 | m_SortingLayer: 0
470 | m_SortingOrder: 0
471 | m_AdditionalVertexStreams: {fileID: 0}
472 | --- !u!33 &414104294
473 | MeshFilter:
474 | m_ObjectHideFlags: 0
475 | m_CorrespondingSourceObject: {fileID: 0}
476 | m_PrefabInstance: {fileID: 0}
477 | m_PrefabAsset: {fileID: 0}
478 | m_GameObject: {fileID: 414104291}
479 | m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
480 | --- !u!4 &414104295
481 | Transform:
482 | m_ObjectHideFlags: 0
483 | m_CorrespondingSourceObject: {fileID: 0}
484 | m_PrefabInstance: {fileID: 0}
485 | m_PrefabAsset: {fileID: 0}
486 | m_GameObject: {fileID: 414104291}
487 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
488 | m_LocalPosition: {x: 0, y: 0, z: 0}
489 | m_LocalScale: {x: 1, y: 1, z: 1}
490 | m_Children: []
491 | m_Father: {fileID: 0}
492 | m_RootOrder: 2
493 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
494 | --- !u!1 &612723336
495 | GameObject:
496 | m_ObjectHideFlags: 0
497 | m_CorrespondingSourceObject: {fileID: 0}
498 | m_PrefabInstance: {fileID: 0}
499 | m_PrefabAsset: {fileID: 0}
500 | serializedVersion: 6
501 | m_Component:
502 | - component: {fileID: 612723340}
503 | - component: {fileID: 612723339}
504 | - component: {fileID: 612723338}
505 | - component: {fileID: 612723337}
506 | m_Layer: 5
507 | m_Name: Canvas
508 | m_TagString: Untagged
509 | m_Icon: {fileID: 0}
510 | m_NavMeshLayer: 0
511 | m_StaticEditorFlags: 0
512 | m_IsActive: 1
513 | --- !u!114 &612723337
514 | MonoBehaviour:
515 | m_ObjectHideFlags: 0
516 | m_CorrespondingSourceObject: {fileID: 0}
517 | m_PrefabInstance: {fileID: 0}
518 | m_PrefabAsset: {fileID: 0}
519 | m_GameObject: {fileID: 612723336}
520 | m_Enabled: 1
521 | m_EditorHideFlags: 0
522 | m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
523 | m_Name:
524 | m_EditorClassIdentifier:
525 | m_IgnoreReversedGraphics: 1
526 | m_BlockingObjects: 0
527 | m_BlockingMask:
528 | serializedVersion: 2
529 | m_Bits: 4294967295
530 | --- !u!114 &612723338
531 | MonoBehaviour:
532 | m_ObjectHideFlags: 0
533 | m_CorrespondingSourceObject: {fileID: 0}
534 | m_PrefabInstance: {fileID: 0}
535 | m_PrefabAsset: {fileID: 0}
536 | m_GameObject: {fileID: 612723336}
537 | m_Enabled: 1
538 | m_EditorHideFlags: 0
539 | m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
540 | m_Name:
541 | m_EditorClassIdentifier:
542 | m_UiScaleMode: 0
543 | m_ReferencePixelsPerUnit: 100
544 | m_ScaleFactor: 1
545 | m_ReferenceResolution: {x: 800, y: 600}
546 | m_ScreenMatchMode: 0
547 | m_MatchWidthOrHeight: 0
548 | m_PhysicalUnit: 3
549 | m_FallbackScreenDPI: 96
550 | m_DefaultSpriteDPI: 96
551 | m_DynamicPixelsPerUnit: 1
552 | m_PresetInfoIsWorld: 0
553 | --- !u!223 &612723339
554 | Canvas:
555 | m_ObjectHideFlags: 0
556 | m_CorrespondingSourceObject: {fileID: 0}
557 | m_PrefabInstance: {fileID: 0}
558 | m_PrefabAsset: {fileID: 0}
559 | m_GameObject: {fileID: 612723336}
560 | m_Enabled: 1
561 | serializedVersion: 3
562 | m_RenderMode: 0
563 | m_Camera: {fileID: 0}
564 | m_PlaneDistance: 100
565 | m_PixelPerfect: 0
566 | m_ReceivesEvents: 1
567 | m_OverrideSorting: 0
568 | m_OverridePixelPerfect: 0
569 | m_SortingBucketNormalizedSize: 0
570 | m_AdditionalShaderChannelsFlag: 0
571 | m_SortingLayerID: 0
572 | m_SortingOrder: 0
573 | m_TargetDisplay: 0
574 | --- !u!224 &612723340
575 | RectTransform:
576 | m_ObjectHideFlags: 0
577 | m_CorrespondingSourceObject: {fileID: 0}
578 | m_PrefabInstance: {fileID: 0}
579 | m_PrefabAsset: {fileID: 0}
580 | m_GameObject: {fileID: 612723336}
581 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
582 | m_LocalPosition: {x: 0, y: 0, z: 0}
583 | m_LocalScale: {x: 0, y: 0, z: 0}
584 | m_Children:
585 | - {fileID: 1111118277}
586 | m_Father: {fileID: 0}
587 | m_RootOrder: 3
588 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
589 | m_AnchorMin: {x: 0, y: 0}
590 | m_AnchorMax: {x: 0, y: 0}
591 | m_AnchoredPosition: {x: 0, y: 0}
592 | m_SizeDelta: {x: 0, y: 0}
593 | m_Pivot: {x: 0, y: 0}
594 | --- !u!1 &684456808
595 | GameObject:
596 | m_ObjectHideFlags: 0
597 | m_CorrespondingSourceObject: {fileID: 0}
598 | m_PrefabInstance: {fileID: 0}
599 | m_PrefabAsset: {fileID: 0}
600 | serializedVersion: 6
601 | m_Component:
602 | - component: {fileID: 684456809}
603 | - component: {fileID: 684456812}
604 | - component: {fileID: 684456811}
605 | - component: {fileID: 684456810}
606 | m_Layer: 0
607 | m_Name: Cylinder
608 | m_TagString: Untagged
609 | m_Icon: {fileID: 0}
610 | m_NavMeshLayer: 0
611 | m_StaticEditorFlags: 0
612 | m_IsActive: 1
613 | --- !u!4 &684456809
614 | Transform:
615 | m_ObjectHideFlags: 0
616 | m_CorrespondingSourceObject: {fileID: 0}
617 | m_PrefabInstance: {fileID: 0}
618 | m_PrefabAsset: {fileID: 0}
619 | m_GameObject: {fileID: 684456808}
620 | m_LocalRotation: {x: 0, y: 0, z: 0.7071068, w: 0.7071068}
621 | m_LocalPosition: {x: 0.77, y: 0.5, z: -2.39}
622 | m_LocalScale: {x: 1, y: 1, z: 1}
623 | m_Children: []
624 | m_Father: {fileID: 124393357}
625 | m_RootOrder: 2
626 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 90}
627 | --- !u!136 &684456810
628 | CapsuleCollider:
629 | m_ObjectHideFlags: 0
630 | m_CorrespondingSourceObject: {fileID: 0}
631 | m_PrefabInstance: {fileID: 0}
632 | m_PrefabAsset: {fileID: 0}
633 | m_GameObject: {fileID: 684456808}
634 | m_Material: {fileID: 0}
635 | m_IsTrigger: 0
636 | m_Enabled: 1
637 | m_Radius: 0.5000001
638 | m_Height: 2
639 | m_Direction: 1
640 | m_Center: {x: 0.000000059604645, y: 0, z: -0.00000008940697}
641 | --- !u!23 &684456811
642 | MeshRenderer:
643 | m_ObjectHideFlags: 0
644 | m_CorrespondingSourceObject: {fileID: 0}
645 | m_PrefabInstance: {fileID: 0}
646 | m_PrefabAsset: {fileID: 0}
647 | m_GameObject: {fileID: 684456808}
648 | m_Enabled: 1
649 | m_CastShadows: 1
650 | m_ReceiveShadows: 1
651 | m_DynamicOccludee: 1
652 | m_StaticShadowCaster: 0
653 | m_MotionVectors: 1
654 | m_LightProbeUsage: 1
655 | m_ReflectionProbeUsage: 1
656 | m_RayTracingMode: 2
657 | m_RayTraceProcedural: 0
658 | m_RenderingLayerMask: 1
659 | m_RendererPriority: 0
660 | m_Materials:
661 | - {fileID: 2100000, guid: b03a5a59f64efd54e8087af55aacd805, type: 2}
662 | m_StaticBatchInfo:
663 | firstSubMesh: 0
664 | subMeshCount: 0
665 | m_StaticBatchRoot: {fileID: 0}
666 | m_ProbeAnchor: {fileID: 0}
667 | m_LightProbeVolumeOverride: {fileID: 0}
668 | m_ScaleInLightmap: 1
669 | m_ReceiveGI: 1
670 | m_PreserveUVs: 0
671 | m_IgnoreNormalsForChartDetection: 0
672 | m_ImportantGI: 0
673 | m_StitchLightmapSeams: 1
674 | m_SelectedEditorRenderState: 3
675 | m_MinimumChartSize: 4
676 | m_AutoUVMaxDistance: 0.5
677 | m_AutoUVMaxAngle: 89
678 | m_LightmapParameters: {fileID: 0}
679 | m_SortingLayerID: 0
680 | m_SortingLayer: 0
681 | m_SortingOrder: 0
682 | m_AdditionalVertexStreams: {fileID: 0}
683 | --- !u!33 &684456812
684 | MeshFilter:
685 | m_ObjectHideFlags: 0
686 | m_CorrespondingSourceObject: {fileID: 0}
687 | m_PrefabInstance: {fileID: 0}
688 | m_PrefabAsset: {fileID: 0}
689 | m_GameObject: {fileID: 684456808}
690 | m_Mesh: {fileID: 10206, guid: 0000000000000000e000000000000000, type: 0}
691 | --- !u!1 &737395475
692 | GameObject:
693 | m_ObjectHideFlags: 0
694 | m_CorrespondingSourceObject: {fileID: 0}
695 | m_PrefabInstance: {fileID: 0}
696 | m_PrefabAsset: {fileID: 0}
697 | serializedVersion: 6
698 | m_Component:
699 | - component: {fileID: 737395480}
700 | - component: {fileID: 737395479}
701 | - component: {fileID: 737395478}
702 | - component: {fileID: 737395477}
703 | - component: {fileID: 737395476}
704 | m_Layer: 0
705 | m_Name: Sphere (Material Fader)
706 | m_TagString: Untagged
707 | m_Icon: {fileID: 0}
708 | m_NavMeshLayer: 0
709 | m_StaticEditorFlags: 0
710 | m_IsActive: 1
711 | --- !u!114 &737395476
712 | MonoBehaviour:
713 | m_ObjectHideFlags: 0
714 | m_CorrespondingSourceObject: {fileID: 0}
715 | m_PrefabInstance: {fileID: 0}
716 | m_PrefabAsset: {fileID: 0}
717 | m_GameObject: {fileID: 737395475}
718 | m_Enabled: 1
719 | m_EditorHideFlags: 0
720 | m_Script: {fileID: 11500000, guid: 41c34e3906bb4e040a91bc07903ef717, type: 3}
721 | m_Name:
722 | m_EditorClassIdentifier:
723 | gameObjectRenderer: {fileID: 737395478}
724 | material1: {fileID: 2100000, guid: f29b7e3f917377c4894b8ef936422eed, type: 2}
725 | material2: {fileID: 2100000, guid: a140d81838cb5554997a6603b24e55d3, type: 2}
726 | minimumValue: 0
727 | maximumValue: 1
728 | duration: 2
729 | ease: 0
730 | toggleKeyCode: 32
731 | --- !u!135 &737395477
732 | SphereCollider:
733 | m_ObjectHideFlags: 0
734 | m_CorrespondingSourceObject: {fileID: 0}
735 | m_PrefabInstance: {fileID: 0}
736 | m_PrefabAsset: {fileID: 0}
737 | m_GameObject: {fileID: 737395475}
738 | m_Material: {fileID: 0}
739 | m_IsTrigger: 0
740 | m_Enabled: 1
741 | serializedVersion: 2
742 | m_Radius: 0.5
743 | m_Center: {x: 0, y: 0, z: 0}
744 | --- !u!23 &737395478
745 | MeshRenderer:
746 | m_ObjectHideFlags: 0
747 | m_CorrespondingSourceObject: {fileID: 0}
748 | m_PrefabInstance: {fileID: 0}
749 | m_PrefabAsset: {fileID: 0}
750 | m_GameObject: {fileID: 737395475}
751 | m_Enabled: 1
752 | m_CastShadows: 1
753 | m_ReceiveShadows: 1
754 | m_DynamicOccludee: 1
755 | m_StaticShadowCaster: 0
756 | m_MotionVectors: 1
757 | m_LightProbeUsage: 1
758 | m_ReflectionProbeUsage: 1
759 | m_RayTracingMode: 2
760 | m_RayTraceProcedural: 0
761 | m_RenderingLayerMask: 1
762 | m_RendererPriority: 0
763 | m_Materials:
764 | - {fileID: 2100000, guid: f29b7e3f917377c4894b8ef936422eed, type: 2}
765 | m_StaticBatchInfo:
766 | firstSubMesh: 0
767 | subMeshCount: 0
768 | m_StaticBatchRoot: {fileID: 0}
769 | m_ProbeAnchor: {fileID: 0}
770 | m_LightProbeVolumeOverride: {fileID: 0}
771 | m_ScaleInLightmap: 1
772 | m_ReceiveGI: 1
773 | m_PreserveUVs: 0
774 | m_IgnoreNormalsForChartDetection: 0
775 | m_ImportantGI: 0
776 | m_StitchLightmapSeams: 1
777 | m_SelectedEditorRenderState: 3
778 | m_MinimumChartSize: 4
779 | m_AutoUVMaxDistance: 0.5
780 | m_AutoUVMaxAngle: 89
781 | m_LightmapParameters: {fileID: 0}
782 | m_SortingLayerID: 0
783 | m_SortingLayer: 0
784 | m_SortingOrder: 0
785 | m_AdditionalVertexStreams: {fileID: 0}
786 | --- !u!33 &737395479
787 | MeshFilter:
788 | m_ObjectHideFlags: 0
789 | m_CorrespondingSourceObject: {fileID: 0}
790 | m_PrefabInstance: {fileID: 0}
791 | m_PrefabAsset: {fileID: 0}
792 | m_GameObject: {fileID: 737395475}
793 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
794 | --- !u!4 &737395480
795 | Transform:
796 | m_ObjectHideFlags: 0
797 | m_CorrespondingSourceObject: {fileID: 0}
798 | m_PrefabInstance: {fileID: 0}
799 | m_PrefabAsset: {fileID: 0}
800 | m_GameObject: {fileID: 737395475}
801 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
802 | m_LocalPosition: {x: -2.147, y: 0.5, z: 0}
803 | m_LocalScale: {x: 1, y: 1, z: 1}
804 | m_Children: []
805 | m_Father: {fileID: 1234158370}
806 | m_RootOrder: 0
807 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
808 | --- !u!1 &883804184
809 | GameObject:
810 | m_ObjectHideFlags: 0
811 | m_CorrespondingSourceObject: {fileID: 0}
812 | m_PrefabInstance: {fileID: 0}
813 | m_PrefabAsset: {fileID: 0}
814 | serializedVersion: 6
815 | m_Component:
816 | - component: {fileID: 883804185}
817 | - component: {fileID: 883804186}
818 | m_Layer: 0
819 | m_Name: Fader
820 | m_TagString: Untagged
821 | m_Icon: {fileID: 0}
822 | m_NavMeshLayer: 0
823 | m_StaticEditorFlags: 0
824 | m_IsActive: 1
825 | --- !u!4 &883804185
826 | Transform:
827 | m_ObjectHideFlags: 0
828 | m_CorrespondingSourceObject: {fileID: 0}
829 | m_PrefabInstance: {fileID: 0}
830 | m_PrefabAsset: {fileID: 0}
831 | m_GameObject: {fileID: 883804184}
832 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
833 | m_LocalPosition: {x: 0, y: 0, z: 0}
834 | m_LocalScale: {x: 1, y: 1, z: 1}
835 | m_Children: []
836 | m_Father: {fileID: 124393357}
837 | m_RootOrder: 0
838 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
839 | --- !u!114 &883804186
840 | MonoBehaviour:
841 | m_ObjectHideFlags: 0
842 | m_CorrespondingSourceObject: {fileID: 0}
843 | m_PrefabInstance: {fileID: 0}
844 | m_PrefabAsset: {fileID: 0}
845 | m_GameObject: {fileID: 883804184}
846 | m_Enabled: 1
847 | m_EditorHideFlags: 0
848 | m_Script: {fileID: 11500000, guid: 4f87397aa812e53429bf9836e7e07494, type: 3}
849 | m_Name:
850 | m_EditorClassIdentifier:
851 | sceneGameObjects:
852 | - {fileID: 1480313667}
853 | - {fileID: 684456808}
854 | propertyFadeSettings:
855 | - propertyType: 0
856 | propertyNameID: _Metallic
857 | minimumValue: 0
858 | maximumValue: 1
859 | ease: 0
860 | - propertyType: 0
861 | propertyNameID: _Glossiness
862 | minimumValue: 0
863 | maximumValue: 1
864 | ease: 0
865 | duration: 3
866 | toggleKeyCode: 32
867 | --- !u!1 &1111118276
868 | GameObject:
869 | m_ObjectHideFlags: 0
870 | m_CorrespondingSourceObject: {fileID: 0}
871 | m_PrefabInstance: {fileID: 0}
872 | m_PrefabAsset: {fileID: 0}
873 | serializedVersion: 6
874 | m_Component:
875 | - component: {fileID: 1111118277}
876 | - component: {fileID: 1111118279}
877 | - component: {fileID: 1111118278}
878 | m_Layer: 5
879 | m_Name: Text
880 | m_TagString: Untagged
881 | m_Icon: {fileID: 0}
882 | m_NavMeshLayer: 0
883 | m_StaticEditorFlags: 0
884 | m_IsActive: 1
885 | --- !u!224 &1111118277
886 | RectTransform:
887 | m_ObjectHideFlags: 0
888 | m_CorrespondingSourceObject: {fileID: 0}
889 | m_PrefabInstance: {fileID: 0}
890 | m_PrefabAsset: {fileID: 0}
891 | m_GameObject: {fileID: 1111118276}
892 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
893 | m_LocalPosition: {x: 0, y: 0, z: 0}
894 | m_LocalScale: {x: 1, y: 1, z: 1}
895 | m_Children: []
896 | m_Father: {fileID: 612723340}
897 | m_RootOrder: 0
898 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
899 | m_AnchorMin: {x: 0, y: 0}
900 | m_AnchorMax: {x: 1, y: 1}
901 | m_AnchoredPosition: {x: 0, y: 0}
902 | m_SizeDelta: {x: 0, y: 0}
903 | m_Pivot: {x: 0.5, y: 0.5}
904 | --- !u!114 &1111118278
905 | MonoBehaviour:
906 | m_ObjectHideFlags: 0
907 | m_CorrespondingSourceObject: {fileID: 0}
908 | m_PrefabInstance: {fileID: 0}
909 | m_PrefabAsset: {fileID: 0}
910 | m_GameObject: {fileID: 1111118276}
911 | m_Enabled: 1
912 | m_EditorHideFlags: 0
913 | m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
914 | m_Name:
915 | m_EditorClassIdentifier:
916 | m_Material: {fileID: 0}
917 | m_Color: {r: 1, g: 1, b: 1, a: 1}
918 | m_RaycastTarget: 1
919 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
920 | m_Maskable: 1
921 | m_OnCullStateChanged:
922 | m_PersistentCalls:
923 | m_Calls: []
924 | m_FontData:
925 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
926 | m_FontSize: 14
927 | m_FontStyle: 0
928 | m_BestFit: 0
929 | m_MinSize: 10
930 | m_MaxSize: 40
931 | m_Alignment: 0
932 | m_AlignByGeometry: 0
933 | m_RichText: 1
934 | m_HorizontalOverflow: 0
935 | m_VerticalOverflow: 0
936 | m_LineSpacing: 1
937 | m_Text: Press Space to toggle fading
938 | --- !u!222 &1111118279
939 | CanvasRenderer:
940 | m_ObjectHideFlags: 0
941 | m_CorrespondingSourceObject: {fileID: 0}
942 | m_PrefabInstance: {fileID: 0}
943 | m_PrefabAsset: {fileID: 0}
944 | m_GameObject: {fileID: 1111118276}
945 | m_CullTransparentMesh: 1
946 | --- !u!1 &1234158369
947 | GameObject:
948 | m_ObjectHideFlags: 0
949 | m_CorrespondingSourceObject: {fileID: 0}
950 | m_PrefabInstance: {fileID: 0}
951 | m_PrefabAsset: {fileID: 0}
952 | serializedVersion: 6
953 | m_Component:
954 | - component: {fileID: 1234158370}
955 | m_Layer: 0
956 | m_Name: --- Material Object
957 | m_TagString: Untagged
958 | m_Icon: {fileID: 0}
959 | m_NavMeshLayer: 0
960 | m_StaticEditorFlags: 0
961 | m_IsActive: 1
962 | --- !u!4 &1234158370
963 | Transform:
964 | m_ObjectHideFlags: 0
965 | m_CorrespondingSourceObject: {fileID: 0}
966 | m_PrefabInstance: {fileID: 0}
967 | m_PrefabAsset: {fileID: 0}
968 | m_GameObject: {fileID: 1234158369}
969 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
970 | m_LocalPosition: {x: 0, y: 0, z: 0}
971 | m_LocalScale: {x: 1, y: 1, z: 1}
972 | m_Children:
973 | - {fileID: 737395480}
974 | m_Father: {fileID: 0}
975 | m_RootOrder: 6
976 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
977 | --- !u!1 &1445958946
978 | GameObject:
979 | m_ObjectHideFlags: 0
980 | m_CorrespondingSourceObject: {fileID: 0}
981 | m_PrefabInstance: {fileID: 0}
982 | m_PrefabAsset: {fileID: 0}
983 | serializedVersion: 6
984 | m_Component:
985 | - component: {fileID: 1445958950}
986 | - component: {fileID: 1445958949}
987 | - component: {fileID: 1445958948}
988 | - component: {fileID: 1445958947}
989 | m_Layer: 0
990 | m_Name: Sphere (Color)
991 | m_TagString: Untagged
992 | m_Icon: {fileID: 0}
993 | m_NavMeshLayer: 0
994 | m_StaticEditorFlags: 0
995 | m_IsActive: 1
996 | --- !u!135 &1445958947
997 | SphereCollider:
998 | m_ObjectHideFlags: 0
999 | m_CorrespondingSourceObject: {fileID: 0}
1000 | m_PrefabInstance: {fileID: 0}
1001 | m_PrefabAsset: {fileID: 0}
1002 | m_GameObject: {fileID: 1445958946}
1003 | m_Material: {fileID: 0}
1004 | m_IsTrigger: 0
1005 | m_Enabled: 1
1006 | serializedVersion: 2
1007 | m_Radius: 0.5
1008 | m_Center: {x: 0, y: 0, z: 0}
1009 | --- !u!23 &1445958948
1010 | MeshRenderer:
1011 | m_ObjectHideFlags: 0
1012 | m_CorrespondingSourceObject: {fileID: 0}
1013 | m_PrefabInstance: {fileID: 0}
1014 | m_PrefabAsset: {fileID: 0}
1015 | m_GameObject: {fileID: 1445958946}
1016 | m_Enabled: 1
1017 | m_CastShadows: 1
1018 | m_ReceiveShadows: 1
1019 | m_DynamicOccludee: 1
1020 | m_StaticShadowCaster: 0
1021 | m_MotionVectors: 1
1022 | m_LightProbeUsage: 1
1023 | m_ReflectionProbeUsage: 1
1024 | m_RayTracingMode: 2
1025 | m_RayTraceProcedural: 0
1026 | m_RenderingLayerMask: 1
1027 | m_RendererPriority: 0
1028 | m_Materials:
1029 | - {fileID: 2100000, guid: 481386212bddce44bb28c539aaaaa474, type: 2}
1030 | m_StaticBatchInfo:
1031 | firstSubMesh: 0
1032 | subMeshCount: 0
1033 | m_StaticBatchRoot: {fileID: 0}
1034 | m_ProbeAnchor: {fileID: 0}
1035 | m_LightProbeVolumeOverride: {fileID: 0}
1036 | m_ScaleInLightmap: 1
1037 | m_ReceiveGI: 1
1038 | m_PreserveUVs: 0
1039 | m_IgnoreNormalsForChartDetection: 0
1040 | m_ImportantGI: 0
1041 | m_StitchLightmapSeams: 1
1042 | m_SelectedEditorRenderState: 3
1043 | m_MinimumChartSize: 4
1044 | m_AutoUVMaxDistance: 0.5
1045 | m_AutoUVMaxAngle: 89
1046 | m_LightmapParameters: {fileID: 0}
1047 | m_SortingLayerID: 0
1048 | m_SortingLayer: 0
1049 | m_SortingOrder: 0
1050 | m_AdditionalVertexStreams: {fileID: 0}
1051 | --- !u!33 &1445958949
1052 | MeshFilter:
1053 | m_ObjectHideFlags: 0
1054 | m_CorrespondingSourceObject: {fileID: 0}
1055 | m_PrefabInstance: {fileID: 0}
1056 | m_PrefabAsset: {fileID: 0}
1057 | m_GameObject: {fileID: 1445958946}
1058 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
1059 | --- !u!4 &1445958950
1060 | Transform:
1061 | m_ObjectHideFlags: 0
1062 | m_CorrespondingSourceObject: {fileID: 0}
1063 | m_PrefabInstance: {fileID: 0}
1064 | m_PrefabAsset: {fileID: 0}
1065 | m_GameObject: {fileID: 1445958946}
1066 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
1067 | m_LocalPosition: {x: 2.215, y: 0.5, z: 0}
1068 | m_LocalScale: {x: 1, y: 1, z: 1}
1069 | m_Children: []
1070 | m_Father: {fileID: 2079810669}
1071 | m_RootOrder: 1
1072 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1073 | --- !u!1 &1480313667
1074 | GameObject:
1075 | m_ObjectHideFlags: 0
1076 | m_CorrespondingSourceObject: {fileID: 0}
1077 | m_PrefabInstance: {fileID: 0}
1078 | m_PrefabAsset: {fileID: 0}
1079 | serializedVersion: 6
1080 | m_Component:
1081 | - component: {fileID: 1480313668}
1082 | - component: {fileID: 1480313671}
1083 | - component: {fileID: 1480313670}
1084 | - component: {fileID: 1480313669}
1085 | m_Layer: 0
1086 | m_Name: Sphere
1087 | m_TagString: Untagged
1088 | m_Icon: {fileID: 0}
1089 | m_NavMeshLayer: 0
1090 | m_StaticEditorFlags: 0
1091 | m_IsActive: 1
1092 | --- !u!4 &1480313668
1093 | Transform:
1094 | m_ObjectHideFlags: 0
1095 | m_CorrespondingSourceObject: {fileID: 0}
1096 | m_PrefabInstance: {fileID: 0}
1097 | m_PrefabAsset: {fileID: 0}
1098 | m_GameObject: {fileID: 1480313667}
1099 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
1100 | m_LocalPosition: {x: 2.701, y: 0.595, z: -2.26}
1101 | m_LocalScale: {x: 1, y: 1, z: 1}
1102 | m_Children: []
1103 | m_Father: {fileID: 124393357}
1104 | m_RootOrder: 1
1105 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1106 | --- !u!135 &1480313669
1107 | SphereCollider:
1108 | m_ObjectHideFlags: 0
1109 | m_CorrespondingSourceObject: {fileID: 0}
1110 | m_PrefabInstance: {fileID: 0}
1111 | m_PrefabAsset: {fileID: 0}
1112 | m_GameObject: {fileID: 1480313667}
1113 | m_Material: {fileID: 0}
1114 | m_IsTrigger: 0
1115 | m_Enabled: 1
1116 | serializedVersion: 2
1117 | m_Radius: 0.5
1118 | m_Center: {x: 0, y: 0, z: 0}
1119 | --- !u!23 &1480313670
1120 | MeshRenderer:
1121 | m_ObjectHideFlags: 0
1122 | m_CorrespondingSourceObject: {fileID: 0}
1123 | m_PrefabInstance: {fileID: 0}
1124 | m_PrefabAsset: {fileID: 0}
1125 | m_GameObject: {fileID: 1480313667}
1126 | m_Enabled: 1
1127 | m_CastShadows: 1
1128 | m_ReceiveShadows: 1
1129 | m_DynamicOccludee: 1
1130 | m_StaticShadowCaster: 0
1131 | m_MotionVectors: 1
1132 | m_LightProbeUsage: 1
1133 | m_ReflectionProbeUsage: 1
1134 | m_RayTracingMode: 2
1135 | m_RayTraceProcedural: 0
1136 | m_RenderingLayerMask: 1
1137 | m_RendererPriority: 0
1138 | m_Materials:
1139 | - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
1140 | m_StaticBatchInfo:
1141 | firstSubMesh: 0
1142 | subMeshCount: 0
1143 | m_StaticBatchRoot: {fileID: 0}
1144 | m_ProbeAnchor: {fileID: 0}
1145 | m_LightProbeVolumeOverride: {fileID: 0}
1146 | m_ScaleInLightmap: 1
1147 | m_ReceiveGI: 1
1148 | m_PreserveUVs: 0
1149 | m_IgnoreNormalsForChartDetection: 0
1150 | m_ImportantGI: 0
1151 | m_StitchLightmapSeams: 1
1152 | m_SelectedEditorRenderState: 3
1153 | m_MinimumChartSize: 4
1154 | m_AutoUVMaxDistance: 0.5
1155 | m_AutoUVMaxAngle: 89
1156 | m_LightmapParameters: {fileID: 0}
1157 | m_SortingLayerID: 0
1158 | m_SortingLayer: 0
1159 | m_SortingOrder: 0
1160 | m_AdditionalVertexStreams: {fileID: 0}
1161 | --- !u!33 &1480313671
1162 | MeshFilter:
1163 | m_ObjectHideFlags: 0
1164 | m_CorrespondingSourceObject: {fileID: 0}
1165 | m_PrefabInstance: {fileID: 0}
1166 | m_PrefabAsset: {fileID: 0}
1167 | m_GameObject: {fileID: 1480313667}
1168 | m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
1169 | --- !u!1 &1646273955
1170 | GameObject:
1171 | m_ObjectHideFlags: 0
1172 | m_CorrespondingSourceObject: {fileID: 0}
1173 | m_PrefabInstance: {fileID: 0}
1174 | m_PrefabAsset: {fileID: 0}
1175 | serializedVersion: 6
1176 | m_Component:
1177 | - component: {fileID: 1646273957}
1178 | - component: {fileID: 1646273956}
1179 | m_Layer: 0
1180 | m_Name: Directional Light
1181 | m_TagString: Untagged
1182 | m_Icon: {fileID: 0}
1183 | m_NavMeshLayer: 0
1184 | m_StaticEditorFlags: 0
1185 | m_IsActive: 1
1186 | --- !u!108 &1646273956
1187 | Light:
1188 | m_ObjectHideFlags: 0
1189 | m_CorrespondingSourceObject: {fileID: 0}
1190 | m_PrefabInstance: {fileID: 0}
1191 | m_PrefabAsset: {fileID: 0}
1192 | m_GameObject: {fileID: 1646273955}
1193 | m_Enabled: 1
1194 | serializedVersion: 10
1195 | m_Type: 1
1196 | m_Shape: 0
1197 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
1198 | m_Intensity: 1
1199 | m_Range: 10
1200 | m_SpotAngle: 30
1201 | m_InnerSpotAngle: 21.80208
1202 | m_CookieSize: 10
1203 | m_Shadows:
1204 | m_Type: 2
1205 | m_Resolution: -1
1206 | m_CustomResolution: -1
1207 | m_Strength: 1
1208 | m_Bias: 0.05
1209 | m_NormalBias: 0.4
1210 | m_NearPlane: 0.2
1211 | m_CullingMatrixOverride:
1212 | e00: 1
1213 | e01: 0
1214 | e02: 0
1215 | e03: 0
1216 | e10: 0
1217 | e11: 1
1218 | e12: 0
1219 | e13: 0
1220 | e20: 0
1221 | e21: 0
1222 | e22: 1
1223 | e23: 0
1224 | e30: 0
1225 | e31: 0
1226 | e32: 0
1227 | e33: 1
1228 | m_UseCullingMatrixOverride: 0
1229 | m_Cookie: {fileID: 0}
1230 | m_DrawHalo: 0
1231 | m_Flare: {fileID: 0}
1232 | m_RenderMode: 0
1233 | m_CullingMask:
1234 | serializedVersion: 2
1235 | m_Bits: 4294967295
1236 | m_RenderingLayerMask: 1
1237 | m_Lightmapping: 4
1238 | m_LightShadowCasterMode: 0
1239 | m_AreaSize: {x: 1, y: 1}
1240 | m_BounceIntensity: 1
1241 | m_ColorTemperature: 6570
1242 | m_UseColorTemperature: 0
1243 | m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
1244 | m_UseBoundingSphereOverride: 0
1245 | m_UseViewFrustumForShadowCasterCull: 1
1246 | m_ShadowRadius: 0
1247 | m_ShadowAngle: 0
1248 | --- !u!4 &1646273957
1249 | Transform:
1250 | m_ObjectHideFlags: 0
1251 | m_CorrespondingSourceObject: {fileID: 0}
1252 | m_PrefabInstance: {fileID: 0}
1253 | m_PrefabAsset: {fileID: 0}
1254 | m_GameObject: {fileID: 1646273955}
1255 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
1256 | m_LocalPosition: {x: 0, y: 3, z: 0}
1257 | m_LocalScale: {x: 1, y: 1, z: 1}
1258 | m_Children: []
1259 | m_Father: {fileID: 0}
1260 | m_RootOrder: 1
1261 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
1262 | --- !u!1 &1892459857
1263 | GameObject:
1264 | m_ObjectHideFlags: 0
1265 | m_CorrespondingSourceObject: {fileID: 0}
1266 | m_PrefabInstance: {fileID: 0}
1267 | m_PrefabAsset: {fileID: 0}
1268 | serializedVersion: 6
1269 | m_Component:
1270 | - component: {fileID: 1892459860}
1271 | - component: {fileID: 1892459859}
1272 | - component: {fileID: 1892459858}
1273 | m_Layer: 0
1274 | m_Name: Main Camera
1275 | m_TagString: MainCamera
1276 | m_Icon: {fileID: 0}
1277 | m_NavMeshLayer: 0
1278 | m_StaticEditorFlags: 0
1279 | m_IsActive: 1
1280 | --- !u!81 &1892459858
1281 | AudioListener:
1282 | m_ObjectHideFlags: 0
1283 | m_CorrespondingSourceObject: {fileID: 0}
1284 | m_PrefabInstance: {fileID: 0}
1285 | m_PrefabAsset: {fileID: 0}
1286 | m_GameObject: {fileID: 1892459857}
1287 | m_Enabled: 1
1288 | --- !u!20 &1892459859
1289 | Camera:
1290 | m_ObjectHideFlags: 0
1291 | m_CorrespondingSourceObject: {fileID: 0}
1292 | m_PrefabInstance: {fileID: 0}
1293 | m_PrefabAsset: {fileID: 0}
1294 | m_GameObject: {fileID: 1892459857}
1295 | m_Enabled: 1
1296 | serializedVersion: 2
1297 | m_ClearFlags: 1
1298 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
1299 | m_projectionMatrixMode: 1
1300 | m_GateFitMode: 2
1301 | m_FOVAxisMode: 0
1302 | m_SensorSize: {x: 36, y: 24}
1303 | m_LensShift: {x: 0, y: 0}
1304 | m_FocalLength: 50
1305 | m_NormalizedViewPortRect:
1306 | serializedVersion: 2
1307 | x: 0
1308 | y: 0
1309 | width: 1
1310 | height: 1
1311 | near clip plane: 0.3
1312 | far clip plane: 1000
1313 | field of view: 60
1314 | orthographic: 0
1315 | orthographic size: 5
1316 | m_Depth: -1
1317 | m_CullingMask:
1318 | serializedVersion: 2
1319 | m_Bits: 4294967295
1320 | m_RenderingPath: -1
1321 | m_TargetTexture: {fileID: 0}
1322 | m_TargetDisplay: 0
1323 | m_TargetEye: 3
1324 | m_HDR: 1
1325 | m_AllowMSAA: 1
1326 | m_AllowDynamicResolution: 0
1327 | m_ForceIntoRT: 0
1328 | m_OcclusionCulling: 1
1329 | m_StereoConvergence: 10
1330 | m_StereoSeparation: 0.022
1331 | --- !u!4 &1892459860
1332 | Transform:
1333 | m_ObjectHideFlags: 0
1334 | m_CorrespondingSourceObject: {fileID: 0}
1335 | m_PrefabInstance: {fileID: 0}
1336 | m_PrefabAsset: {fileID: 0}
1337 | m_GameObject: {fileID: 1892459857}
1338 | m_LocalRotation: {x: 0.008939376, y: 0.9295688, z: -0.36784706, w: 0.022593986}
1339 | m_LocalPosition: {x: -0.1892842, y: 4.6436243, z: 3.2196102}
1340 | m_LocalScale: {x: 1, y: 1, z: 1}
1341 | m_Children: []
1342 | m_Father: {fileID: 0}
1343 | m_RootOrder: 0
1344 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1345 | --- !u!1 &2079810668
1346 | GameObject:
1347 | m_ObjectHideFlags: 0
1348 | m_CorrespondingSourceObject: {fileID: 0}
1349 | m_PrefabInstance: {fileID: 0}
1350 | m_PrefabAsset: {fileID: 0}
1351 | serializedVersion: 6
1352 | m_Component:
1353 | - component: {fileID: 2079810669}
1354 | m_Layer: 0
1355 | m_Name: --- Single Material Property
1356 | m_TagString: Untagged
1357 | m_Icon: {fileID: 0}
1358 | m_NavMeshLayer: 0
1359 | m_StaticEditorFlags: 0
1360 | m_IsActive: 1
1361 | --- !u!4 &2079810669
1362 | Transform:
1363 | m_ObjectHideFlags: 0
1364 | m_CorrespondingSourceObject: {fileID: 0}
1365 | m_PrefabInstance: {fileID: 0}
1366 | m_PrefabAsset: {fileID: 0}
1367 | m_GameObject: {fileID: 2079810668}
1368 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
1369 | m_LocalPosition: {x: 0, y: 0, z: 0}
1370 | m_LocalScale: {x: 1, y: 1, z: 1}
1371 | m_Children:
1372 | - {fileID: 342609597}
1373 | - {fileID: 1445958950}
1374 | - {fileID: 113772297}
1375 | m_Father: {fileID: 0}
1376 | m_RootOrder: 5
1377 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
1378 |
--------------------------------------------------------------------------------