Hey ok so this is a really weird one i have never encountered before. set up my scripts, check they are working in the editor then create a build. load it up and find the script i have been working on today no longer works. open up the editor and the exact same thing.
the thing is if i bullet point the scripts it hits all the places its supposed to. which is to instantiate a prefab then delete a gameobject in the scene. except even though the code is being hit nothing happens. an object is not instantiated and the gameobject is not destroyed. i swear it was all working 100% perfectly as intended before i built. i even tried closing unity and restarting my PC and this is still happening.
will include code snippets even though before i built they worked as intended.
anyone have any ideas?
UPDATE: ok so i tried to role back to 2018.2.21f1 and created a new project. which i dont mind saying was a b. thankfully there wasnt too much to the scene so only took about 20 mins. worked perfectly again. until i decided to do another build. then the scripts i had been working on today all broke again. just those. other older scripts i had written still work. weird thing is i even zipped up a backup copy of the project. unzip and thats broken as well. i have to assume something is going on in the background here. this is extremely frustrating i would appreciate any help with this thanks you in advance.
Additional Update: ok so this is something interesting. within one of my newer script i have a layer being set from 8 to 9. i put a breakpoint on it and within visual studio when i hit that point the value is changed. yet it immediately resets the value when you continue and i assume the rest of the values within these classes
Even more Updates: ok so did a load of stuff, uninstalled unity, striped it from appdata etc. nothing. what i have found though. which is really bizarre is that the application seems to be just ignoring parts of the script for no discernible reason. ok so at one point on an Update im checking to see if an object is null and if so to return if not check to see if mouse left click. i set up breakpoints and its null. yet it skips it anyway and goes straight onto mouse clicked like it isnt even there. then it ends up adding multiples of the same script to an object. which i didnt think was even possible. then to further compound the strangeness that Pickup() function i have imaged. if you comment out m_Cells*.ClearCellData the rest of it works, including destroy. yet if you breakpoint it will jump into that script no problem. its like my compiler has had a stroke or something. this is bizarre. just doesnt seem to be a reason why certain things are working and others are not. yet its not throwing up and errors into the console and when you use breakpoints it goes through showing all the data which resets back the moment you continue. blowing my mind*