0
\$\begingroup\$

I have a Paddle scene with an attached script. Within my game I want 2 paddles, one on the left and one on the right. I can instance the Paddle scene into LeftPaddle and RightPaddle no problem, but the script for the left paddle needs to be a little different from the script for the right paddle. Unfortunately, I can only see the base Paddle script in the script editor.

Is there a way to instance a script?

\$\endgroup\$
  • \$\begingroup\$ You probably could use inheritance for that. Create a basic paddle script that shares the funcionality for both paddles, then extend that script, for the left and right paddle each. \$\endgroup\$ – Ignatiamus Jun 21 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.