Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

[ERROR] Exported game doesnt work

Discussion in 'Getting Started' started by Blazingshadow17, Oct 1, 2019.

  1. Blazingshadow17

    Blazingshadow17

    Joined:
    Sep 12, 2019
    Posts:
    1
    https://pastebin.com/cKRXF4XY (Player Script)

    https://pastebin.com/jH64tFUx (Enemy Script)

    This is my first program, I need help, it works in the editor, but not when I Export it... (In any of them), in the debug mode it says there is also something wrong with line 30 of the enemy script. Please help as simply and soon as possible.

    It works fine in the editor, but not when it is exported...

    (Error in the editor when a player is destroyed:
    NullReferenceException: Object reference not set to an instance of an object
    SquareEnemy.Start () (at Assets/GameScripts/SquareEnemy.cs:20))
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    5,829
    Please don't use external links, use the Code tag from the little editor bar above ^^