Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Can't add script behaviour CallbackExecutor

Discussion in 'Scripting' started by manastewani, Feb 28, 2019.

  1. manastewani

    manastewani

    Joined:
    Feb 27, 2019
    Posts:
    1
    Hello!

    I am currently facing trouble in adding the script to the main camera. I am getting an error of Can't add script behaviour CallbackExecutor. The script needs to derive from Monobehaviour.

    I read through multiple forums and checked for possible solutions. But even after making sure that the public class name and file name are same, my error was not getting resolved.

    I am uploading an image for reference and have highlighted the errors. Any help is appreciated.

    Thank You.
    Error.JPG
     
    KeithBOT likes this.
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,947
    Sure looks good in that screenshot... maybe try right-click in the project and Reimport All ?
     
  3. Aspirity

    Aspirity

    Joined:
    Jul 25, 2019
    Posts:
    1
    Did you manage to solve the problem? I'm having a similar issue and have no idea how to fix it
     
    KeithBOT and jdavidromo like this.
  4. GrayDwarf

    GrayDwarf

    Joined:
    May 6, 2015
    Posts:
    9
  5. BracketThornProd

    BracketThornProd

    Joined:
    Oct 11, 2021
    Posts:
    1
    Your problem might be that the C# script name has a space for example Player Movement and the code doesn't allow space in the name so in the script it will be PlayerMovement so the fix for some of you is to just rename the file without a space
     
    mets_on_unity likes this.
  6. TinyGiraffes

    TinyGiraffes

    Joined:
    May 27, 2017
    Posts:
    4
    Having the same issue. It fixed itself once but I can't wait 15min every time I make a file. Everything is correct. No space in the name, same class and file name. I think it has something to do with my using NotePad++