Static member question, CapsuleCollider access

Hey everyone, I did a search and found alot of instance X access non-static member..., i am having the same error, but im not trying to access another script which the other threads are...

I have an EnemyScript on a GameObject, this has a CapsuleColldier... when the attack method of my script gets fired, i have;

collider.direction = 0;

in PC mode, this changes the capsules property as you'd imagine (i got that from the docs). But in Android mode, the same codes gives me;

direction is not member of unity.gameobject.collider .... GRRR!!!! ok, so i know its unique to capsule colliders...

but i change it to CapsuleCollider... and i get the former problem... GRR again... what am i doing wrong?

Sorry if its been covered or stupid, please feel free to fell good and have a chuckle, i'll give you a beer.

Matty

P.S. by former i mean "...instance X access non-static member..."

the script; http://cid-2904f67158e7be1c.office.live.com/self.aspx/.Public/EnemyScript.js

Regarding your first question:

A Collider doesn’t have a direction… that’s why unity complains. the collider property returns the type Collider. It’s almost the same problem as

Your second question:

The version of GetComponent you are using returns (like you might suggest from the name) a reference to a Component. A Component doesn’t have an enabled property either. There are some components that have it, but no in general.

You need to cast the returned reference into the right type, or use the generic version of `GetComponent<>`

var effect : BlurEffect = GetComponent(BlurEffect); // implicit casting
effect.enabled = true;

var myCapsule : CapsuleCollider = collider; // implicit casting
myCapsule.direction = 0;

or

(GetComponent(BlurEffect) as BlurEffect).enabled = true; // explicit casting

(collider as CapsuleCollider).direction = 0; // explicit casting

or

GetComponent.<BlurEffect>().enabled = true; // generic version

GetComponent.<CapsuleCollider>().direction = 0; // generic version

ps. that's all UnityScript (JS)

Using GetComponent or the shortcut property (.collider) doesn’t make any difference. The .collider property does internally execute GetComponent.

Ok this isn't an answer, BUT it's the only way i can get this post bumped (and i dont want to start a new question)

I've added, to the main question, my script (its been revised heavily now but doesnt matter for this purpose)... so people can look at it for any question they might have.

AND also that i'm getting the same issue with;

GetComponent(BlurEffect).enabled = true;

this is a different method i tried.. it works fine on PC build, doesnt work on mobile.. i get the not a member of etc... exactly i get not a member of Unity.Component....

what am i doing wrong referencing these components?