I have an error in a script. It’s not mine script but I think its is a script from Unity itself (I downloaded AngryBots from the asset store). Everything went well, but maybe I deleted smt.
And if I put this script in comments, there only comes more errors in the place!
#pragma strict
public var qualityThreshhold : Quality = Quality.High;
function Start () {
if (QualityManager.quality < qualityThreshhold)
{
gameObject.SetActive (false);
}
enabled = false;
}
error: Assets/Scripts/Fx/DeactivatorOnLowQuality.js(4,32): BCE0018: The name ‘Quality’ does not denote a valid type (‘not found’)
warnings:
invalid character
strict, var and : expected
2 Answers
2
Based off the Implementation, you should have an enum some where that i know at least has a value of High. Looks like:
enum Quality
{
High,
OtherValue1,
OtherValue2,
Etc
}
Other than High, i’m just adding filler. This enum type is missing or can’t be found(renamed?). With that said, you’re declaring a variable of that type on this line:
public var qualityThreshhold : Quality = Quality.High;
and you’re setting it to the enum value of High, but again it can’t find it. Replace it, find it or define it and you’re good to go.
Note: there are a couple other options that are unlikely but possible that i won’t get into. You said you didn’t write this, go to the source and get the missing implementation if necessary.
It worked! My thanks to you sir!
Please format your code. Edit your question, select your code, and use the 101/010 button.
– robertbu