Unable to select Unity C# Project when building Vuforia project on Unity 2017.2.0

So after updating Unity to 2017.2.0, when I try to create a simple object recognition app for the HoloLens, it won’t build. I followed the simple tutorial of just uploading the Vuforia image target to Unity, and when I ran it on the editor, it recognized the image fine. However when I build, it won’t allow me to select the “Unity C# Project” button under the Debugging section.
I saw a similar post that stated that one possible solution was to select the scripting backend setting to .NET, which I followed, but was then not allowed to build because of this error: “UnityException: Build path contains project built with IL2CPP scripting backend, while current project is using .NET scripting backend.”. Not sure how to fix this, please help, thanks!

2 Answers

2

I have the exact same problem - hope somebody can help?

I just solved this issue: Don't use the same folder for the new build. If you create a new folder it works.

public class HitPlayer : MonoBehaviour { public CharacterStat characterStat; public EnemyAttack enemyAttack; private void Awake() { characterStat = GetComponent<CharacterStat>(); enemyAttack = GetComponent<EnemyAttack>(); } private void Update() { RaycastHit hit; if ((Physics.Raycast(transform.position, transform.right, out hit, (transform.position - enemyAttack.destination).magnitude))) { if (hit.collider.tag == "Player") { CharacterStat.TakeHeart(); Destroy(gameObject); } } } }

File → build settings → player settings → Other settings → under configuration → scripting backend → select IL2CPP

its works for me…

Ok, I've solved it finally. I have replaced enemyAttack.destination for EnemyAttack.destination - I have created static variable and it works nice.