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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Script-error in build

Discussion in 'Scripting' started by YodelYum, Jul 15, 2013.

  1. YodelYum

    YodelYum

    Joined:
    Apr 3, 2013
    Posts:
    44
    hi,
    So I am having a really strange problem I have never seen before. It's all about the camera getting autoatically attached to some scripts to behave correctley when the my player-vehicle spawns. This works well in Untiy itself. But when I make a Build from the game it suddenly doesnt work anymore. Everything else also works in the build. Like loading the level itself all the assets etc. and any other script-related behaviour. But still.. inthe build the camera wont be attached as it should.

    I actually have no idea where I should start to find the problem especially because I don't get any errors.
    I do get some Warnings, but still why would it work in Unity itself but not in the build?

    I really hope for some ideas
    ty
     
  2. Benjamindavid

    Benjamindavid

    Joined:
    Sep 25, 2012
    Posts:
    68
    May be you can re check the references and the code to attach the Camera or check which build are you publishing to.

    Hope it helps..
     
  3. YodelYum

    YodelYum

    Joined:
    Apr 3, 2013
    Posts:
    44
    Well I did that several times ; ) but thanks for the comment.

    I kinda solved it now although I am still not sure what the actual problem was.
    Shortly before that 'Error' I switched from Unity's Networkingengine to PhotonCloud and I started converting every script from JS to C#.
    As a last try I delete every JS-Script I could find, and suddenley it worked in the build to. So my guess is that the cause of the problem was somewhere in 'file-conversion-process'.

    But still: It's not really clear why it happened because as I said, in Unity itself the game worked as it should..

    Weird..