Someone else had this issue previously, so big ‘Thank you’ to @zavy and @Nina for the fix, located here:
Like Zavy, my code would not compile. The only thing that I did differently from Rick was that I named my paddle script as “PaddleController.cs” rather than “Paddle.cs” so it would be a little more clear to me.
Because of this, Unity could not find the reference to the “Paddle.cs” script and would not compile.
Once I renamed my serialize field to “PaddleController”, everything compiled as expected.
Thank you @Nina and @zavy for solving this and posting the solution!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BallPosition : MonoBehaviour
{
[SerializeField] PaddleController paddle1;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}