Компиляция игры под Android на Unity
Здраствуйте высоко уважаемые профессионалы. Я делаю игру под андройд в школу ко дню родного языка. Игра по типу викторины. Когда я начал компилировать игру начали появляться вот такие ошибки. FAILURE: Build failed with an exception. Build file 'C:\Users\123\Desktop\тест родного языка\Temp\gradleOut\launcher\build.gradle' line: 3
- What went wrong: A problem occurred evaluating project ':launcher'.
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 http://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.
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
CommandInvokationFailure: Gradle build failed. C:/Program Files/Unity/Hub/Editor/2019.4.13f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.4.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
Build completed with a result of 'Failed' in 96 seconds (95686 ms)
UnityEditor.BuildPlayerWindow+BuildMethodException: 20 errors
Вот основные скрипты:
Этот код отвечает за то какой сейчас вопрос, какие варианты ответов и какой ответ правильный
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Taks : MonoBehaviour
{
public TextAsset All;
string Text;
public string TasK;
public string Answers;
public Text Tesk;
public Text a1;
public Text a2;
public Text a3;
public Text a4;
public string True;
void Start()
{
Text = All.text;
string[] s = Text.Split('/');
TasK = s[0];
Answers = s[1];
True = s[2];
Tesk.text = TasK;
string[] A = Answers.Split(';');
a1.text = A[0];
a2.text = A[1];
a3.text = A[2];
a4.text = A[3];
}
void Update()
{
}
}
Этот код отвечает за то чтобы при нажатии на неё определить правильный вариант ответа или нет
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class BTN_TXT : MonoBehaviour
{
public GameObject VPR;
public Color gr;
public Color fl;
public Image th;
public Text t;
public Taks task;
public TRUE tru;
void Start()
{
}
public void check()
{
if (t.text == task.True)
{
th.color = gr;
StartCoroutine(Wait());
tru.Score = tru.Score + 1;
}
else
{
th.color = fl;
StartCoroutine(Wait());
}
}
IEnumerator Wait()
{
yield return new WaitForSeconds(1);
VPR.active = false;
}
}
А этот код отвечает за то чтобы вопросы были в рандомном порядке
public class LIST : MonoBehaviour
{
public int I;
public GameObject[] tasks;
public int T = 0;
public GameObject FIN;
void Start()
{
tasks = GameObject.FindGameObjectsWithTag("TASK");
I = Random.Range(0, tasks.Length);
tasks[I].transform.GetChild(0).gameObject.active = true;
FIN.active = false;
}
public void Randowm()
{
StartCoroutine(N());
StartCoroutine(R());
}
IEnumerator N()
{
yield return new WaitForSeconds(1);
tasks = null;
tasks = GameObject.FindGameObjectsWithTag("TASK");
I = Random.Range(0, tasks.Length);
tasks[I].transform.GetChild(0).gameObject.active = true;
}
IEnumerator R()
{
yield return new WaitForSeconds(1);
if (tasks.Length == 1)
{
tasks[I].transform.GetChild(0).gameObject.active = false;
FIN.active = true;
}
}
}
Я ещё только начинающий. Помогите пожaлуйста.
Ответы (1 шт):
В пути к проекту не должно быть русских символов
FAILURE: Build failed with an exception. Build file 'C:\Users\123\Desktop\тест родного языка\Temp\gradleOut\launcher\build.gradle