How do you cast and/or access GameObject from component

I am really stuck trying to figure out how to cast. Specifically, I have an Enemy component that is added to a GameObject and I am trying to call iTween on itself.

“iTween.MoveTo(this…” does not work, I get something like “expecting GameObject, not Enemy”

So how do I get the GameObject?

I tried “iTween.MoveTo(this as GameObject” and I get back “this is not a GameObject”

I tried:
“var go : GameObject = this;”
“iTween.MoveTo(this…”
This compiles and runs, but crashes with the same “not expecting an Enemy”

And this does not compile either
“var go : GameObject = this.GetComponent(GameObject);”
I realize it should not compile, but I am grasping at straws at this point.

Did you try just using the .gameObject member/shortcut?

If you’re trying to access the GameObject of the object that the script you are currently editing is attached to (which I think you are, but I can’t really tell from your post), it would just be “this.gameObject” or simply “gameObject”.

Nope, that was exactly what I was looking for. Thanks.