problems with decals

Decal.dCount++;

    var d : decal = gameObject.GetComponent("decal");

    d.affectedObjects = new GameObject[1];

    d.affectedObjects[0] = go;

    d.decalMode = DecalMode.MESH_COLLIDER;

    d.pushDistance = 0.009 + BulletMarkManager.Add(gameObject);

    var m : Material = new Material(d.decalMaterial);

    m.mainTexture = useTexture;

    d.decalMaterial = m;

    d.CalculateDecal();

i am having trouble with this script cos unity says decal (first time in second line) does not denote a valid type. i have the editor file in unity containing the decal editor and some other scripts but it doesn't go away could someone please help with this problem cos i need it done soon. thanx for any help u give

Decal is with a capital D.

In the line: `var d : decal = gameObject.GetComponent("decal");`

Where you are putting "decal" you need to insure that is the component's type. Chances are it is "Decal".

Since everything is case sensitive, it says that there is no class of type "decal" because there isn't, it is "Decal".

Try:

`var d : Decal = gameObject.GetComponent("Decal");`

Cheers

==

I figured it out the

-In standered assets folder

go to the folder that says "Decal System" and make sure you have the scripts

-"Decal"
-"DecalMode"
-"DecalPolygon"

Also make sure none of the script is edited out with "/*"

This should solve the problem it did for me good luck.

(anything else comment back)

I find problem why it doesn’t work it’s working only if decal scripts in Standard Assets folder.
(assets/Standard Assets)