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

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

2 Likes

Hitting a similar issue

Hitting a similar issue…

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!

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

3 Likes

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?

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.

9653798--1373732--Screenshot 2024-02-20 182051.png