I just wanted to point out that the Random.Range function that the teacher is using is part of the namespace UnityEngine. I noticed that my Visual Studio 2022 app warning me about an ambiguous reference between UnityEngine’s Random function and the namespace System’s Random function. The solution to clear the warning, according to Visual Studio 2022, which worked, is having an alias statement like the following:
using Random = UnityEngine.Random;
of course this statement is not entirely necessary for the code to compile properly and can be left out. Apparently I did not see Visual Studio Code flag this in the video, so maybe not all IDE programs complain about this ambiguity. For more information you can go to this webpage to learn about Unity’s Random function: Unity - Scripting API: Random