Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Python 4.0.0-pre. 1 Warning: No script asset for PythonSettings

Discussion in 'Formats & External Tools Previews' started by Rosenbel, Jan 13, 2022.

  1. Rosenbel

    Rosenbel

    Joined:
    Jan 10, 2022
    Posts:
    1
    Hi, I'm using the Unity Editor Version 2021.2.3f1 and I successfully installed Python 4.0.0-pre. 1 for my Project. However when I try to start my Application I get the following warning:
    "No script asset for PythonSettings. Check that the definition is in a file of the same name."
    I try to access Python from my Script, but the Warning appears everytime as soon as I write the Line "using UnityEditor.Scripting.Python;" in my Code.

    The Project Runs fine, but as soon as I try to build my Project I get this Error:
    "error CS0234: The type or namespace name 'Scripting' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)"

    Has anybody experienced something similar or found a solution for this problem?
    Any kind of help is appreciated. Thank you!
    -LR


     
    RuiyuZhang_Unity and wwaero like this.
  2. wwaero

    wwaero

    Joined:
    Feb 18, 2020
    Posts:
    42
    Hitting a similar issue
     
  3. vaibhavTrigensoft

    vaibhavTrigensoft

    Joined:
    Nov 15, 2021
    Posts:
    10
    Hitting a similar issue...
     
  4. RuiyuZhang_Unity

    RuiyuZhang_Unity

    Unity Technologies

    Joined:
    Mar 17, 2021
    Posts:
    11
    Have you added the "com.unity.scripting.python.editor" to the assembly file? (an .asmdef file in the folder that has compile errors), I had the exact same issue earlier, and I fixed it by
    1. make sure python for unity is properly installed
    2. find the .asmdef file that has to deal with the c# script where you are using the python and having compile error
    3. click on the .asmdef file, check out the inspector, under Assembly Definition Reference, click the + sign to search for com.unity.scripting.python.editor and add it
    4. In the end don't forget to click on Apply button at the very end of the inspector to apply the changes

    I hope that helps!
    upload_2022-4-12_23-25-31.png
     
  5. Tegast

    Tegast

    Joined:
    Feb 19, 2022
    Posts:
    1
    The same mistake, the solution did not help. Everything was done according to the instructions. Is it possible to record a video of the solution?

    Version: 6.0.0
     
    OKB1030, soranhanmul and masakatsu like this.
  6. yiranzhang2023

    yiranzhang2023

    Joined:
    Nov 9, 2021
    Posts:
    1
    I also have the same problem and the major thing is that the python package is not appear in package management when I tried to add it. Is there any alternative way of adding python for Unity?
     
  7. MMaquite

    MMaquite

    Joined:
    Feb 10, 2024
    Posts:
    1
    I just fix the issue by clicking the "Build" or "Build and Run" button in the "Build Settings" and remove the python scripting in the package Manager. Just select "Window" - "Package Manager" - "Packages: Unity Registry" and search for "python scripting" and remove it or don't remove it if you don't want.

    Screenshot 2024-02-20 182051.png Screenshot 2024-02-20 182108.png