Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

game can perform properly but after build (windows) it has problem

Discussion in 'Windows' started by Gary-dog, Jun 21, 2017.

  1. Gary-dog

    Gary-dog

    Joined:
    Jun 21, 2017
    Posts:
    6

    Attached Files:

  2. Gary-dog

    Gary-dog

    Joined:
    Jun 21, 2017
    Posts:
    6
    after build
    this is the alert message
     

    Attached Files:

    • dede.PNG
      dede.PNG
      File size:
      494.2 KB
      Views:
      767
  3. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    Are the gameobject tags still defined after first editor rest?
     
  4. Gary-dog

    Gary-dog

    Joined:
    Jun 21, 2017
    Posts:
    6
    below is My code ...btw I am sure that there are tag which called Court in the scene.
    sorry I am extreme novice...

    var aim:GUITexture;
    function OnControllerColliderHit(hit:ControllerColliderHit){

    if(hit.gameObject.tag=="Court"){
    Debug.Log(hit.gameObject.tag);
    BallThrow.onPlate=true;
    aim.GetComponent.<GUITexture>().enabled=true;
    }
    /*else
    {
    BallThrow.onPlate=false;
    aim.GetComponent.<GUITexture>().enabled=false;
    }*/
    }
     
  5. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    could just be
    Code (CSharp):
    1. Debug.Log("Court");
    since the if statement already established that you've hit the court. No need for another access to gameobject.

    Do a "Development build" (this will attach unity as a debugger to your build) to see more exception specifics.
     
  6. Gary-dog

    Gary-dog

    Joined:
    Jun 21, 2017
    Posts:
    6
    thanks... after changing the code
    problem still in the .exe file
    and my cursor freeze when I close the window
     

    Attached Files:

  7. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    What does unity editor console say?
     
  8. Gary-dog

    Gary-dog

    Joined:
    Jun 21, 2017
    Posts:
    6
    on the picture I upload....
     
  9. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    Those are just prints from editor console (you can't click them and find out more about error).
    Check the actual editor console.
     
  10. Gary-dog

    Gary-dog

    Joined:
    Jun 21, 2017
    Posts:
    6
    in the very beginning it showed this
    but now there is nothing besides this
     

    Attached Files:

    • 777.PNG
      777.PNG
      File size:
      45.5 KB
      Views:
      783
  11. FMark92

    FMark92

    Joined:
    May 18, 2017
    Posts:
    1,243
    The first image you posted are just "obsolete" warnings. Those can be calmly ingored :D

    But this last image you posted is more revealing.
    It says you're missing audio refenrence, not court reference.
    So start checking tags on audio gameobject and confirm that it still exists (if you switched scene).