Thanks for the info on “How to apply code formatting within your post.” I did not know that!
As far as I can tell, my coding is exactly the same as in the lecture. I will try to find the Debug.Logs and see what they are doing. I am using Unity 2020.2.5f1 if that is a possible reason (it is newer than the one used in the course).
Here is a picture of my code maybe you can see the other problem I have that pops up every time I start Visual Studio Code.
This is the whole error log that displays each time I start Visual Studio in unity:
Starting OmniSharp server at 2/24/2021, 8:20:56 AM
Target: i:\Unity2\Unity 3D\Simple Obstacle Course\Simple Obstacle Course.sln
OmniSharp server started.
Path: c:\Users\Owner\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.6\OmniSharp.exe
PID: 17260
Starting OmniSharp on Windows 6.2.9200.0 (x64)
DotNetPath set to dotnet
Located 3 MSBuild instance(s)
1: Visual Studio Community 2017 15.5.27130.2010 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin"
2: Visual Studio Build Tools 2019 16.7.30413.136 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
3: StandAlone 16.8.0 - "c:\Users\Owner\.vscode\extensions\ms-dotnettools.csharp-1.23.9\.omnisharp\1.37.6\.msbuild\Current\Bin"
Registered MSBuild instance: Visual Studio Build Tools 2019 16.7.30413.136 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin"
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
Detecting Cake files in 'i:\Unity2\Unity 3D\Simple Obstacle Course'.
Could not find any Cake files
Detecting projects in 'i:\Unity2\Unity 3D\Simple Obstacle Course\Simple Obstacle Course.sln'.
Queue project update for 'i:\Unity2\Unity 3D\Simple Obstacle Course\Assembly-CSharp.csproj'
Detecting CSX files in 'i:\Unity2\Unity 3D\Simple Obstacle Course'.
Could not find any CSX files
Configuration finished.
Omnisharp server running using Stdio at location 'i:\Unity2\Unity 3D\Simple Obstacle Course' on host 16524.
Loading project: i:\Unity2\Unity 3D\Simple Obstacle Course\Assembly-CSharp.csproj
The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
Failed to load project file 'i:\Unity2\Unity 3D\Simple Obstacle Course\Assembly-CSharp.csproj'.
i:\Unity2\Unity 3D\Simple Obstacle Course\Assembly-CSharp.csproj
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1177,5): Error: The reference assemblies for .NETFramework,Version=v4.7.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
Attempted to update project that is not loaded: i:\Unity2\Unity 3D\Simple Obstacle Course\Assembly-CSharp.csproj