I have installed the latest versions of Unity (2017.3.1), Daydream SDKs (GVR SDK for Unity v1.130.0) and followed the steps here: https://developers.google.com/vr/develop/unity/get-started#configure_build_settings_and_player_settings
However when I press Play I get the following error, ideas on what is the reason & how to fix it?
Assets/GoogleVR/Editor/GvrBuildProcessor.cs(20,19): error CS0234: The type or namespace name ‘iOS’ does not exist in the namespace ‘UnityEditor’. Are you missing an assembly reference?
Edit: Issue fixed after a few hours of submission on GitHub with the release of GVR SDK for Unity v1.130.1
asked Mar 16, 2018 at 23:29
RehaReha
911 gold badge1 silver badge7 bronze badges
5
If you’re facing with this problem there are 2 steps to solve it:
- Make sure that «iOS Build Support» is checked in Unity Hub -> Installs as Adam mentioned (if U’re developing for iOS platform then this option most definitely is already checked).
- Place your script in Assets -> Editor folder. UnityEditor.iOS.Xcode namespace cannot be used in your main project. It works only in special Assembly-CSharp-Editor project intended to modify native Xcode project. (That’s the option that worked for me after searching a ton of forums).
answered Apr 4, 2020 at 10:55
ShpandShpand
6219 silver badges14 bronze badges
2
I went ahead and changed the «Current Platform» to «iOS» in Unity Hub, This is a quick fix and it works now.
Change «Current Platform» to iOS Image:
Nimantha
6,6716 gold badges27 silver badges66 bronze badges
answered Sep 12, 2019 at 17:02
If you have installed IOS build through unity hub while the project is open, try restarting Unity Hub and Unity Editor. This solved my issue.
iminiki
2,41112 gold badges34 silver badges44 bronze badges
answered Jan 10, 2022 at 10:06
I met this issue When useing unity-arkit-plugin to develop something, i did nothing but import this plugin it throw this error .
And after i installed UnitySetup-IOS-Support-for-Editor-2017.3.0f3.pkg ,the issue fixed.
answered Apr 1, 2018 at 1:31
This usually happens when iOS Build Support is not installed in Unity Hub
answered Dec 16, 2022 at 16:23
Mihai GalanMihai Galan
3384 silver badges12 bronze badges
#unity3d
Вопрос:
Я продолжаю получать «АктивыКартингСкриптыУтилитыMeshCombineUtility.cs(3,19): ошибка CS0234: Имя типа или пространства имен» Probuilder «не существует в пространстве имен «UnityEngine» (у вас отсутствует ссылка на сборку?) » В моей игре, которую я создаю поверх мини-игры по картингу по умолчанию, я не знаю, где возникла проблема, у кого-нибудь есть представление о том, что может происходить? У меня уже установлен pro builder.
Комментарии:
1. Использует ли проект определения сборок, и, возможно, вы не ссылались на соответствующее определение?
Ответ №1:
Pro builder-это встроенный пакет для прототипирования моделей в unity. Вы можете сделать окно->менеджер пакетов ->>встроенный unity, чтобы загрузить и импортировать пакет.
Комментарии:
1. Я установил его, но ошибка все еще там, нужно ли мне что-то сделать, чтобы мой unity распознал новый пакет?
2. @vittoriobelinelo Вы, вероятно, неправильно установили его, или у вас может быть старая версия unity, которая не поддерживает новейшую версию probilder.
I’m trying to make a simple button perform an action when pressed. Initially I was using vscode, but as I couldn’t solve the problem, I switched to visual studio 2017. For some reason the error persists.
The button has been removed from this link:
https://www.c-sharpcorner.com/article/unity-change-scene-on-button-click-using-c-sharp-scripts-in-unity/
Button code (internet sketch):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class SceneChanger: MonoBehaviour {
public void Scene1() {
SceneManager.LoadScene("Scene1");
}
public void Scene2() {
SceneManager.LoadScene("Scene2");
}
public void Scene3() {
SceneManager.LoadScene("Scene3");
}
}
Button code (my code):
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Windows.Forms;
public class botaoJogar : MonoBehaviour
{
public Button btn_Jogar;
void Start()
{
Button btn = btn_Jogar.GetComponent<Button>();
btn.onClick.AddListener(TaskOnClick);
}
void TaskOnClick()
{
Debug.Log("You have clicked the button!");
}
}
Image of the construction in unity:
Before, I was able to solve the CS0236 error using the answers from this link:
https://stackoverflow.com/questions/2883505/the-type-or-namespace-name-button-could-not-be-found-are-you-missing-a-using
The answer says to add the line using System.Windows.Forms;
to the button code, but for some reason, now in visual studio, this error doesn’t go away.
Errors:
Assetsbotajogar.cs(4,22): error CS0234: The type or namespace name
‘Forms’ does not exist in the namespace ‘System.Windows’ (are you
missing an assembly reference?)Assetsbotajogar.cs(8,12): error CS0246: The type or namespace name
‘Button’ could not be found (are you missing a using directive or an
assembly reference?)
Some community links, which I accessed:
https://stackoverflow.com/questions/42000798/how-do-i-add-assembly-references-in-visual-studio-code
https://stackoverflow.com/questions/49805204/adding-reference-to-another-project-from-visual-studio-code
https://stackoverflow.com/questions/2883505/the-type-or-namespace-name-button-could-not-be-found-are-you-missing-a-using
https://stackoverflow.com/questions/47412796/system-windows-forms-assembly-reference-in-vs-code
https://stackoverflow.com/questions/46582847/creating-a-windows-forms-application-in-c-sharp-using-dotnet-new
https://stackoverflow.com/questions/40562192/windows-form-application-on-visual-studio-code
https://stackoverflow.com/questions/48496542/forms-does-not-exist-in-the-namespace-system-windows
Other links:
https://docs.microsoft.com/en-us/visualstudio/ide/how-to-add-or-remove-references-by-using-the-reference-manager?view=vs-2019
https://docs.microsoft.com/pt-br/dotnet/csharp/language-reference/compiler-messages/cs0246
I don’t know what to do anymore, I feel like I tried to do everything I could, but windows forms simply don’t work. Visual studio 2017 has no bugs, just unity.
Installation I did in visual studio 2017: