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