Paddle and PaddleControl

I noticed that when i tried to serialize Paddle paddle1 it shows me an error Severity
Code Error CS0246 The type or namespace name ‘Paddle’ could not be found (are you missing a using directive or an assembly reference?) Assembly-CSharp E:\Projects\UNITY\Block Breaker\Assets\Ball.cs 8 Active

I have tried with GameObject paddle1 , no error, but still doesn,t work.

I managed to make it work using PaddleControl paddle1.

I use unity 2019.4.4 or something like this, has unity changed or am i missing something ?

1 Like

Hi Zavy,

Since PaddleControl worked, could it be that there was no Paddle class inside the Paddle.cs? The class name must match the file name. If that was the case, does/did MonoBehaviour have the same colour as your classname? If not, there might be a problem with Visual Studio. Please watch lecture “Fixing Visual Studio Problems” (currently #4).

1 Like

yes , i figured it out now that i need the same file name ( my paddle script is named " PaddleControl"). Sorry for a useless topic but happens when you are a moron :))

1 Like

I’m glad the solution was so simple. Making mistakes is normal, and your thread is still useful because other students will be able to benefit from it. So don’t worry and enjoy working on your project. :slight_smile:

1 Like

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

Privacy & Terms