Search Unity

Scripts not Updating

Discussion in 'iOS and tvOS' started by benheyderman_unity, Sep 9, 2020.

  1. benheyderman_unity

    benheyderman_unity

    Joined:
    Jan 13, 2020
    Posts:
    4
    Hi guys!
    Thanks in advance for your help!! I'm fairly new to unity so appreciate your patience.

    I have created a game for IOS which I am able to load to my iPhone successful and it works perfectly other than one really specific issue. When I reinstall the app on my phone, most of the app updates apart from one script that appears to be running an un-updated version.

    The script has an array of routes through the map and even though I have changed the routes in the CS file, which updates the game when I build within Unity, when I run it on the iPhone it is returning old routes that are no longer in the script?

    Do I have to reimport the scripts before building or something?

    Here is how I declare the array.

    Code (CSharp):
    1. int[][] routes =
    2.     new int [][]{
    3.         new int[] { 2, 12 }, //0
    4.         new int[] { 2 },
    5.         new int[] { 0},
    6.         new int[] { 2, 13},
    7.         new int[] { 13, 5},
    8.         new int[] { 16, 17 },//5
    9.         new int[] { 17, 19, 9},
    10.         new int[] { 14, 16 },
    11.         new int[] { 14, 16, 9},
    12.         new int[] { 10, 8, 6 },
    13.         new int[] { 11, 14, 9 },//10
    14.         new int[] { 12, 10 },
    15.         new int[] { 11},
    16.         new int[] { 4, 3 },
    17.         new int[] { 7, 8, 10 },
    18.         new int[] { 16, 5 },//15
    19.         new int[] { 7, 5, 8 },
    20.         new int[] { 5, 6, 18 },
    21.         new int[] { 19, 17},
    22.         new int[] { 18, 6 },
    23.         new int[] { 21, 18 },//20
    24.         new int[] { 20, 19 },
    25.         new int[] { 12, 23 },
    26.         new int[] { 22, 11 }
    27.  
    28.     };
    Thanks again,
    Ben!