What is <missing>?

Hi. As you can see in the screenshot, we are using a script function in an event list, but on OnDisable the function is marked as “”. I don’t understand why and why not also on OnEnable.

Here is the function (excerpt):

import { Behaviour, GameObject } from "@needle-tools/engine";

import { Object3D, Vector3 } from "three";
import { OrbitControls } from "@needle-tools/engine";
import { Transform } from "@needle-tools/engine";
import { WaitForSeconds } from "@needle-tools/engine";

export class OrbitControlsAdvanced extends Behaviour {

  [...]

  public startLerpCameraToTarget(target: Object3D) {
    this._lerpPosition = target?.position;
  }

  [...]
}

Original Post on Discord

by user 689743366355025931

That is how Unity displays when a method has changed and can’t be found anymore - did you rename the methods in your OrbitControlsAdvanced script?

It’s certainly strange that the method can be found in OnEnable but not found in OnDisable, but looks like a Unity weirdness…
Can you try just selecting it again for the event fields where it shows “missing”?

I can apply something to it without any problem, but it still says . I just restarted Unity now and it’s gone. #weird

by user 689743366355025931

Hmmm strange. Thanks for the update. Sounds like a Unity weirdness to me :frowning_with_open_mouth:

Ok, I see. There is a .cs script generated that has the data type Transform for a variable that is Object3D in the .ts script. I don’t know why, but this variable now had a GameObject on it. I guess that Unity is able to convert the GameObject internally into a Transform and so the linked GameObject can stay on the variable. But it is just displayed with . To apply the correct data type it is not enough to drag the object again to the insertion, but the entry in the UnityEvent (EventList) must be created again and then the Transform must be dragged from the hierarchy onto it agin.

by user 689743366355025931

That’s good to know!