Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Strange Error Don't know how to fix it

Discussion in 'Editor & General Support' started by MikielSG, Aug 12, 2019.

  1. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    I am unable to add any scripts (previously working) to objects in my project.

    No, The names are not missed matched, so please do not try to suggest this is the issue.
    Iv even tried completely clean projects, with blank classes (create c# and leaving class/file name defaulted).

    Nothing works. Trying to reinstall now.
    Any suggestions would be great.
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Are there any console errors? All compile errors have to be resolved first. What Unity version are you using?
     
  3. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    Yes, Blank Errors. upload_2019-8-12_10-59-0.png

    Though i think this has something to do with API cap level, as i had this before i did fresh install (of os) and it was fixed by shifting it off 4.0 (I just reset that as we speak).

    Im using the most recent version

    There is no errors. The scripts i imported worked perfectly on my laptop, but not on pc.
    Even blank, fresh C# Scripts do not work.

    its refusing to let me add stuff to objects in game. Class and file names match. No compiler errors.
     
    Last edited: Aug 12, 2019
  4. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    Update, I created a new project in 3d with extra's and i was able to assign scripts. after deleting the example assets and objects in the scene my ability to add scripts went away, and added an unknown error (blank)

    it should be noted that normal 2d/3d projects created did produce the errors when trying to apply scripts.
     
    Last edited: Aug 12, 2019
  5. MikielSG

    MikielSG

    Joined:
    Dec 26, 2016
    Posts:
    47
    I did some digging in editor developer mode and i got this

    Script 'Packages/com.unity.package-manager-ui/Editor/Sources/Services/Common/ThreadedDelay.cs' will not be compiled because it exists outside the Assets folder and does not to belong to any assembly definition file.
    UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogWarning(Object)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilation:CompileScripts(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget) (at C:\buildslave\unity\build\Editor\Mono\Scripting\ScriptCompilation\EditorCompilation.cs:1286)
    UnityEditor.Scripting.ScriptCompilation.<CompileScripts>c__AnonStorey3:<>m__0() (at C:\buildslave\unity\build\Editor\Mono\Scripting\ScriptCompilation\EditorCompilationInterface.cs:310)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:EmitExceptionAsError(Func`1, CompileStatus) (at C:\buildslave\unity\build\Editor\Mono\Scripting\ScriptCompilation\EditorCompilationInterface.cs:97)
    UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts(EditorScriptCompilationOptions, BuildTargetGroup, BuildTarget) (at C:\buildslave\unity\build\Editor\Mono\Scripting\ScriptCompilation\EditorCompilationInterface.cs:310)

    (Filename: C:/buildslave/unity/build/Editor/Mono/Scripting/ScriptCompilation/EditorCompilation.cs Line: 1286)