Forum rules - please read before posting.

"Remember Visibility" doesn't remember alpha value of sprites.

Hi,

There's an old post of 2015 in which someone confirms that fact, but I thought that something like that would have been addressed by now... but it's still the case as of today.

Is there a technical reason because that script doesn't save alpha values? I've just realized this and it represents a world of pain to change everything to make sure all sprites are saved correctly.

Thanks.

Comments

  • Which version are you using?  If the component is attached to a Sprite Renderer, but not a Sprite Fader, a Save colour/alpha? option will appear in the Inspector.  If a Sprite Fader is attached, the alpha will be saved automatically.
  • Hi Chris,

    Thanks to your reply I think I've realized what is happening...

    I need Sprite Faders in most sprites, so I never saw that additional option you mentioned. But it's there as you say, when you add a Remember Visibility component to a Sprite Renderer-only object.

    Thing is, I wasn't adding the Remember Visibility component to the sprites themselves, but their parents, with the "Affect children?" option checked AND their "Visibility on start" set to Off. I didn't see the Alpha option because those parents are empty objects used to organize things only.

    The only way I've been able to make this work is to assign a Remember Visibility component to EACH sprite individually with its "Visibility on start" option set to On. And then, regardless of the conflicts generated by their parent's own Remember Visibility components, their Active flags and Alpha values were restored to their savegame versions. :)

    So... I'm wondering if maybe it would be desirable to remove that check for a Sprite Renderer for the Save color/alpha values? So we can check it or not, regardless.

    Btw, I'm using Unity 5.5.3f1 and AC 1.56g atm. I'd like to avoid updates but I could do it if needed, up to 1.58 maximum, as those changes in the save system will break my implementation for sure. ;)

    Many thanks for your clarifications.
  • So... I'm wondering if maybe it
    would be desirable to remove that check for a Sprite Renderer for the
    Save color/alpha values? So we can check it or not, regardless.

    I think for safety, probably not.  The "Affect children" option should only be used if all work the same way - so if you need independence from any of them it's best to just treat them all individually.

    Bear in mind that the Sprite Fader component is more of a convenience tool than anything - the same thing can be achieved with an Animator (and saved with the Remember Animator component).  That may be an alternative to consider if you have a particularly complex sprite chain.

    Btw,
    I'm using Unity 5.5.3f1 and AC 1.56g atm. I'd like to avoid updates but
    I could do it if needed, up to 1.58 maximum, as those changes in the
    save system will break my implementation for sure.

    Why, which platform are you building to?  It may be difficult to adapt any changes you made, but it'd be a cleaner project for it.  One of the changes the new system brings is the concept of delayed saving/loading, i.e. the file handling is now a background process that doesn't lock the game while it occurs.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.