FindObjectOfType is obsolete?

When I type in the code to get the PlayerController DisableControls I get this squiggly line with this message:

If I then click and choose for it to fix it, it then adds this:

Can I just ignore this, or should I do something else instead?

You can ignore it for now, but it will eventually be removed. The replacement is
FindAnyObjectByType - Unity - Scripting API: Object.FindAnyObjectByType
or
FindFirstObjectByType - Unity - Scripting API: Object.FindFirstObjectByType

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms