cannot build player while editor is importing assets or compiling scripts что делать

Error when Building Project: Error building Player because scripts have compile errors in the editor

I have the Tiled2Unity plugin. When I begin to build a version of my game in Unity, be it standalone version or anything else,i get the following error, «Error building Player because scripts have compile errors in the editor»

Then it points me to this class

Can someone please help me figure out what is the problem?

2 Answers 2

You cannot build any your script that contains using UnityEditor; or class/API from the UnityEditor namespace. This is why you should put any script that contains any of these in a folder called Editor.

When Unity is building your project, it ignores any script placed in this folder since it considers them as an Editor script or plugin.

You have three choices:

Remove using UnityEditor; from your script.

Place your script in a folder called Editor.

Use Unity’s preprocessor directive to determie when not to compile with using UnityEditor;

You can do that by replacing:

I would go with #2. Create a different script for any Editor stuff and place it in the Editor folder. Note that Unity will not compile any script in this folder when building your project. Scripts in this folder are meant to run in the Editor only.

I was having the same problem however easily found a fix.

I have no idea why they are there and what type of problem they seemed to cause however I can now build my project to android problem free now.

Источник

При компиляции выдает вот такие ошибки:
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlaye r (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuild Methods.cs:187
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuild Methods.cs:94
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Скриншот сцены и ошибок прикрепила.

Пожалуйста, помогите мне.

Помощь в написании контрольных, курсовых и дипломных работ здесь.

Unity & Vuforia Engine
После того, как я создал приложение дополненной реальности, я запустил его на ПК, оно работало.

Читайте также:  К чему снится что рожаешь тройню мальчиков

Отслеживание объектов Vuforia и Unity
Здравствуйте, на этом видео, показано как создать сканирование и отслеживание объектов с помощью.

Простая сцена на HGE
Доброго времени суток! Мы молодая команда из 2-х студентов, хотим разработать игру из жанра.

И это странно, ведь я ни одного скрипта (кроме импортированных плагином вуфории) не написала.
Мне нужно простое отображение 3d-модели на определенной поверхности.

Добавлено через 37 минут
Я сменила JDK на более раннюю версию (по ссылке двумя постами выше), но, увы, ошибки остались:

Assets/Vuforia/Scripts/Utilities/VRIntegrationHelper.cs(99,29): error CS1061: Type `UnityEngine.Camera’ does not contain a definition for `SetStereoProjectionMatrices’ and no extension method `SetStereoProjectionMatrices’ of type `UnityEngine.Camera’ could be found. Are you missing an assembly reference?

Assets/Vuforia/Scripts/Utilities/VRIntegrationHelper.cs(100,30): error CS1061: Type `UnityEngine.Camera’ does not contain a definition for `SetStereoProjectionMatrices’ and no extension method `SetStereoProjectionMatrices’ of type `UnityEngine.Camera’ could be found. Are you missing an assembly reference?

Error building Player because scripts had compiler errors

Источник

Error building Player because scripts have compile errors in the editor #88

Comments

javiertorres7 commented May 15, 2017

I am trying to complete the building step, but it says that I need to fix some compile errors in the scripts, even though, I did not mess with code in the scripts. I also I do not know how to look for the errors in the scripts. I am using Visual Studio 2015 as my editor and I don’t see any errors.

The text was updated successfully, but these errors were encountered:

javiertorres7 commented May 15, 2017

I am using Unity 5.50f3 (64bit) by the way.

timGerken commented May 22, 2017

timGerken commented May 22, 2017

@javiertorres7
Hmm. I’m not seeing the screenshot.

javiertorres7 commented May 25, 2017

timGerken commented May 30, 2017

@javiertorres7
You are probably being affected by the details described in this thread. I just made a commit in Master to work with Unity 5.5.1p4 and Visual Studio 2017. Please let me know if these changes also resolve the issue you describe here.

Читайте также:  к чему снится красиво петь во сне самой

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Google Mobile Ads Unity Plugin v6.0.0 #1613

Comments

MeAtPros commented May 18, 2021

Exception: Failed running /Applications/Unity/Hub/Editor/2021.1.4f1/Unity.app/Contents/il2cpp/build/deploy/netcoreapp3.1/UnityLinker @»/Unity/Temp/StagingArea/assets/bin/Data/Managed/response.rsp»

The text was updated successfully, but these errors were encountered:

NilokiloxD commented May 18, 2021

Can confirm this, any fix planned?
Also Unity is complaining that the assembly can not be the same name as the dll.

adnanse-hadali commented May 18, 2021

Got the same error using Unity version 2021.1.6
Solution will be a great help.
Thanks

rajabilal555 commented May 19, 2021

Got the same error.
Unity version: 2021.1.5f1
Hope this gets fixed soon.

Screenshot of Player Settings:

JillSong commented May 20, 2021

Hey everybody, I’m tackling the issue with our team. I’m able to reproduce the issue only on 2021.1 version (2020.2 works fine) Does anyone have issue on Unity 2020?

JillSong commented May 20, 2021

For a quick fix, you can import the source code Asset into your project. https://github.com/googleads/googleads-mobile-unity/tree/master/source/plugin/Assets This will get rid of the exception.

shirokurohitsuji commented May 21, 2021

Hey everybody, I’m tackling the issue with our team. I’m able to reproduce the issue only on 2021.1 version (2020.2 works fine) Does anyone have issue on Unity 2020?

I don’t have this compile error in 2020.3.8f1.
In 2020, there just seems to be a build error (#1616)

nomibuilder commented May 22, 2021

Got the same error using Unity version 2021.1.6
Please fix this.

Читайте также:  prk sw на магнитоле что это такое

horoeil commented Jun 3, 2021 •

I have the same problem. Q口Q
Unity version 2021.1.9f1

p-inemu commented Jun 7, 2021

2021.1.10f. Same problem

joshpeterson commented Jun 8, 2021

Hey everybody, I’m tackling the issue with our team. I’m able to reproduce the issue only on 2021.1 version (2020.2 works fine) Does anyone have issue on Unity 2020?

Источник

Как скомпилировать проект unity?

Не получается скомпилировать в apk файл android проект. Как исправить?

Текст ошибки:
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

1)
Build completed with a result of ‘Failed’
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

FAILURE: Build failed with an exception.

* Where:
Build file ‘C:\Users\�\Desktop\PT\UnityVersion\PT\Temp\gradleOut\build.gradle’ line: 26

* What went wrong:
A problem occurred evaluating root project ‘gradleOut’.
> Failed to apply plugin [id ‘com.android.application’]
> Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See b.android.com/95744 for details. This warning can be disabled by adding the line ‘android.overridePathCheck=true’ to gradle.properties file in the project directory.

BUILD FAILED in 7s
]
stdout[

]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at :0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at :0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at :0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at :0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at :0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

/Как исправить ошибку не меняя имя папки администратора? Ибо эта чертовка не желает поддаваться изменениям

Источник

Обзорно-познавательный сайт