0
0
Unityframework~10 mins

Post-processing effects in Unity - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a post-processing volume component to the camera.

Unity
Camera.main.gameObject.AddComponent<[1]>();
Drag options to blanks, or click blank then click option'
ARigidbody
BPostProcessVolume
CAudioSource
DLight
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated components like Rigidbody or AudioSource.
Forgetting to add the component to the camera game object.
2fill in blank
medium

Complete the code to enable the post-processing volume after adding it.

Unity
var volume = Camera.main.gameObject.GetComponent<PostProcessVolume>();
volume.[1] = true;
Drag options to blanks, or click blank then click option'
Aenabled
BisActive
CisEnabled
Dactive
Attempts:
3 left
💡 Hint
Common Mistakes
Using properties that do not exist on components.
Trying to call methods instead of setting a property.
3fill in blank
hard

Fix the error in the code to correctly set the weight of the post-processing volume.

Unity
var volume = Camera.main.GetComponent<PostProcessVolume>();
volume.weight [1] 1.0f;
Drag options to blanks, or click blank then click option'
A==
B+=
C=
D=>
Attempts:
3 left
💡 Hint
Common Mistakes
Using comparison operator instead of assignment.
Using lambda arrow instead of assignment.
4fill in blank
hard

Fill both blanks to create a new post-processing profile and assign it to the volume.

Unity
var profile = ScriptableObject.CreateInstance<[1]>();
volume.[2] = profile;
Drag options to blanks, or click blank then click option'
APostProcessProfile
BPostProcessVolume
Cprofile
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing the volume and profile types.
Assigning the wrong variable to the profile property.
5fill in blank
hard

Fill all three blanks to add a bloom effect to the profile and enable it.

Unity
var bloom = profile.AddSettings<[1]>();
bloom.[2].value = 1.0f;
bloom.[3].value = true;
Drag options to blanks, or click blank then click option'
ABloom
Bintensity
Cactive
Denabled
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong property names like 'active' instead of 'enabled'.
Forgetting to set the intensity value.