Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Strange build errors

Discussion in 'Windows' started by bakno, Apr 17, 2014.

  1. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    595
    The project has a mix of javascripts in the Scripts folder and C#scripts in the Standard Assets folder.

    There is a javascript that declares a variable as a class which is publicly declared in a C# script.

    The project runs fine in the editor, but it throws the following error when building for Win 8.0 (Windows Store Apps):

    The name 'PublicClass' does not denote a valid type ('not found').

    It seems to me that when building for Net, the script compilation order is different.

    Does anybody know why this happens and how can it be solved?
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,627
    Go to player preferences and select compilation override to either "Use .NET Core partially' or 'None'.
    With 'Use .NET Core' (the default) JS scripts don't see classes from C# scripts.
     
  3. bakno

    bakno

    Joined:
    Mar 18, 2007
    Posts:
    595
    Thanks Aurimas. I just found your post explaining this as well on another thread...

    http://forum.unity3d.com/threads/199968-Windows-8-1-amp-Visual-Studio-2013/page2

    In fact, the project builds if I select NET Core partially, but now my problem is that I cannot use the "LegacySystem.IO class" to access files and directory functions.

    I will create a new thread for this. I hope you can help on that one as well. Here it is...

    http://forum.unity3d.com/threads/241210-File-and-Directory-limitations?p=1597759#post1597759
     
    Last edited: Apr 17, 2014