Hello all… after a limited amount of sleep last night I am really stuggling with some script today. I’ve written some code that sets the lighting solution based on which quality settings you have chosen. (and I’m pretty pleased with it!)
The problem I am having is that I can’t seem to enable/disable my Blob shadow.
//This script is in place to alter the game settings based on quality. At the start of the level the script is run
//in order to alter the lighting settings based on the visual quality chosen
var shadow : GameObject;
var level : Terrain;
function Start ()
{
if (QualitySettings.currentLevel == QualityLevel.Simple || QualitySettings.currentLevel == QualityLevel.Fast || QualitySettings.currentLevel == QualityLevel.Fastest)
{
level.lighting = 1; //lightmap solution
Debug.Log (level.lighting);
shadow.Projector.enabled = true; //stab in the dark that doesnt work
}
else
{
level.lighting = 2;//pixel lighting solution
Debug.Log (level.lighting);
shadow.Projector.enabled = false;
}
}
I know its probably something really simple, but I’ve scoured the docs and can’t find a solution… Help me obi wan kenobi! you’re our only hope!