I’m making my first game, and when I hover over the red line, it says “cannot implicitly convert type UnityEngine.GameObject to UnityEngine.GameObject”
Any Ideas on how to fix this?
I’m making my first game, and when I hover over the red line, it says “cannot implicitly convert type UnityEngine.GameObject to UnityEngine.GameObject”
Any Ideas on how to fix this?
GameObject.FindGameObjectsWithTag
returns an array of game objects, as there might be many objects with the same tag.
Try using GameObject.FindWithTag
instead, that returns the first game object with that tag.
There’s an example in the docs here.