Enabled Scripts

Hi,
I dont know why, i did it a lot of times, but in unity 3 i got problem in Enabled script to true.
this is what i write:Camera1.GetComponent<"SmoothFollow">().enabled=true;
and this is what the error says: error CS1525: Unexpected symbol `)'

well i know something is fishy but i cant point what… :face_with_spiral_eyes:
REALY thanks for the helpers:)

Remove the quotation marks.

–Eric

  1. you need this quotation marks for doing this active. (http://unity3d.com/support/documentation/ScriptReference/Behaviour-enabled.html)
  2. if i do it it change to
error CS1525: Unexpected symbol `.'

The example on that link doesn’t use quotes. What gives you the idea that you need them?
(You don’t by the way, the GetComponent function takes a generic which has to be a class, not a string.)

Well, i understand you didnt read the 2 . If i remove those quoatation marks it replace there from ‘)’ to ‘.’ .
it doesnt help to remove those quoatation.

I read the two, I just have no reason to believe it won’t work except for the fact that you said it doesn’t work.

I think this same problem was answered here.

http://forum.unity3d.com/threads/73122-Unexpected-Symbol-quot-quot