- Home /
Minimap with no shadow?
So I made a Minimap by creating another camera and using a render texture. But I don't want shadows displaying on the minimap. How do I do that? Sorry i'm still new with Unity.
Comment
Best Answer
Answer by Fariborzzn · May 01, 2021 at 10:36 AM
Hey @Hisukurifu24 Attach this script to your minimap camera :
using UnityEngine;
public class CameraWithNoShadow: MonoBehaviour {
float storedShadowDistance;
void OnPreRender() {
storedShadowDistance = QualitySettings.shadowDistance;
QualitySettings.shadowDistance = 0;
}
void OnPostRender() {
QualitySettings.shadowDistance = storedShadowDistance;
}
For mode detail check MonoBehaviour.OnPreRender() best regards Fariborz
Your answer
Follow this Question
Related Questions
Shadows problem with big and small objects 0 Answers
Extending the Light Class to select Shadow Colour 0 Answers
How to get hard pixelated shadows? 0 Answers
Camera Scaled Up Breaks/Bugs Shadows 0 Answers
3D model not affected by darkness? 2 Answers