Volume and Profile
- Game Development course
- Advanced
- Lesson 8/71
- 4 min
Learn the Volume and Profile structure.
What are Volume and Profile?
A Volume is the component that decides in which region of the scene the effects apply. A Profile is the asset that stores the effect settings. A Volume uses the effects by having a Profile attached.
volume.profile = profil;
profil.overrideState = true;Overlapping volumes blend with each other to decide the result.
The concept of override
An override is enabling an effect inside that Profile and changing its values. When the override is off, the effect runs with its default values or is not applied at all. In the Inspector, every effect has an override option at its top.
profil.efekt.overrideState = true;
profil.efekt.intensity.value = 0.6f;This way you can use any effect at any value you want.
Practice Profile record
In a class named ProfilKaydi, define a string bolge field with the value "AnaBolge" and a string profil field with the value "SahneProfili". In the Start method, print the pieces "Volume: ", bolge, " Profil: " and profil joined together with Debug.Log.
Starter code
using UnityEngine;
public class ProfilKaydi : MonoBehaviour
{
// string bolge alanini "AnaBolge" degeriyle tanimla
// string profil alanini "SahneProfili" degeriyle tanimla
void Start()
{
// "Volume: " + bolge + " Profil: " + profil biciminde yazdir
}
}Sample solution
using UnityEngine;
public class ProfilKaydi : MonoBehaviour
{
string bolge = "AnaBolge";
string profil = "SahneProfili";
void Start()
{
Debug.Log("Volume: " + bolge + " Profil: " + profil);
}
}Expected output
Volume: AnaBolge Profil: SahneProfili
Questions and answers
Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.
1 Which structure stores the effect settings?
- Camera
- Profile Correct answer
- Material
- Volume
Explanation: A Profile holds the values of the effects; a Volume only decides the region where those settings apply.
2 Enable the override
profil.____ = true;
profil.overrideState = true;
Explanation: The overrideState property enables the effect inside the Profile and makes its values valid.
3 Volume and Profile terms
| Term | Meaning |
|---|---|
Volume |
Region where effects are applied |
Profile |
Asset holding effect settings |
Override |
Enable effect and change its value |
Inspector |
Window for editing settings |