0
Fixed

Scene Varible Reverting Back To Previous GameObject ON AOT Pre-Build

IzLet 3 years ago updated by Lazlo Bonin (Lead Developer) 3 years ago 5

Hi,

I'm having an issue whereby I have a Scene Game Object variable, but when I change the reference to another Game Object the moment I do an AOT Pre-Build, it reverts to a previous Game Object that was linked there. I've tried deleting the variable and doing it again, but it STILL reverts back to the previous Game Object that was selected?

Cheers

Iz

Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Hi IzLet,

This might seem silly, but are you saving your scene before doing an AOT pre-build? The pre-build wizard has to load each scene individually to look for members to stub, so it will unload your current scene in the process. In theory, it should prompt you to save if any object is dirty, but maybe there's a bug with this detection.

Let me know if hitting before pre-build Ctrl+S helps!

Sorry for the delay in getting back to you. Yes, I've been saving before each AOT pre-build. Every time it would just jump back to the previous Game Object reference, even when I removed the variable completely  it would put it back. It fixed itself when I removed the offending variable and added a new variable with a different name, saved and did a pre-build. Like the pre-build needed more of a change to work? No idea!

Hi IzLet,

Which Bolt version are you using? There was a variable change issue in v.1.3b2 that will be fixed for b3. 

Hi, it's the latest version on the asset store with the latest version of Unity