Search Unity

Question URGENT need of help for University project.

Discussion in 'Editor & General Support' started by Flokoshel, May 12, 2020.

  1. Flokoshel

    Flokoshel

    Joined:
    May 10, 2020
    Posts:
    4
    Hello. I really need help fast for my homework for University.
    So basically i had to do a drone delivery simulator. I worked for a few days and did it, and it works perfectly FINE.

    Now, I need to send my teacher and .exe file. What build do I need to use?

    I tried PC, Mac & Linux Standalone, Target Platform : Windows x86_64. When i'm trying to build, I get a lot of errors which I will put below:

    (RED) Errors:
    Assets\Scripts\StateDisplay.cs(4,7): error CS0246: The type or namespace name 'UnityEditorInternal' could not be found (are you missing a using directive or an assembly reference?)

    Error building Player because scripts had compiler errors

    Build completed with a result of 'Failed' in 5 seconds (4876 ms)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    (Yellow) Warnings:
    BestFit is only supported for dynamic fonts. Font 'ThaleahFat' is not dynamic.
    UnityEngine.Canvas:SendWillRenderCanvases()

    Assets\Scripts\StateDisplay.cs(10,35): warning CS0649: Field 'StateDisplay.States' is never assigned to, and will always have its default value null

    Assets\Scripts\Drone.cs(11,38): warning CS0649: Field 'Drone.DCoordinates' is never assigned to, and will always have its default value null

    Assets\Scripts\StateDisplay.cs(11,27): warning CS0649: Field 'StateDisplay.CurrentState' is never assigned to, and will always have its default value null

    Assets\Scripts\Drone.cs(12,38): warning CS0649: Field 'Drone.ECoordinates' is never assigned to, and will always have its default value null

    Please help me fast:) Thank you
     
    valy_rody likes this.
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Warnings are not critical but you may like to look at them.
    For the errors:
    "StateDisplay.cs(4,7): error CS0246: The type or namespace name 'UnityEditorInternal' could not be found"
    The namesapce UnityEditorInternal can onoy be used in the the editor and editor scripts.
    You have to remove if from the StateDisplay.cs (line 7) or use the editor define to keep i only in the editor like this:

    #if UNITY_EDITOR
    //Editor only code
    #endif
     
    Last edited: May 12, 2020
  3. Flokoshel

    Flokoshel

    Joined:
    May 10, 2020
    Posts:
    4
    Problem SOLVED. Idk how the namespace appeared there but who knows:D.

    Thank you.
     
    fffMalzbier likes this.