I am finding that a lot of the methods from 3.5 do not work in 4. Is there a tutorial site out there for scripting that deals with version 4 specifically? Thanks!
Give some examples please, be specific.
There’s almost nothing from 3.5 that won’t work in 4.0. The only thing I can think of offhand is GameObject.active, and even that technically still works for now, it just generates a warning.
–Eric
Apologies, here are the code snippets from the tutorial that will no longer work.
function Start () {
}
var switchToTarget : Transform;
function Update () {
if (Input.GetButtonDown("Jump"))
GetComponent(Follow).target = switchToTarget;
}
and this one:
function Start () {
}
var target : Transform;
function Update () {
target.LookAt(target);
}
It worked when I initially put them in but when I reloaded the project, it detected errors and will not let me drag them to the objects because of compilations errors:
Assets/follow.js(9,25): BCE0019: 'Unknown identifier: ‘Follow’.
Embarrased: I had uppercase Follow and not lowercase. Very sorry.