Forum rules - please read before posting.

Sprite Renderer deactivated on Play

I followed the 2.5D tutorial with my test scene, but when it comes to put the mask sprites on the scene I did it all fine an all, following instructions on the video. 
The thing is that when I hit PLAY the Sprite Renderer component gets "unticked" like deactivated and the sprites mask disappear. If I turn them on again "during play" they work fine. but as soon as I stop the game and play it again it happens all over again. 
Why is this happening? Does the sprite masks have to be sorted in a special layer or something or this is a bug? 
Thanks.  

Comments

  • Welcome to the forum, @Diego.

    At which point in the video are you referring to, and which sprite mask are you working with?

    The sprite masks have a LimitVisibility component attached to them, because generally you'll only want them to be shown when a particular camera is active.  Make sure that you have the right GameCamera assigned in the component's Limit To Camera field, or remove the component if you want to show it at all times.

    Otherwise, please post screenshots of the object in question so we can try to help further.
  • edited May 2016
    Hi, thanks for your reply. I'm making my own game not replicating the tutorial with the tutorial files. 
    I added in both fields the same camera which is "officeCam" Maybe with these shots you can see what I'm doing wrong. Cause I can't see what it is, I double checked all the steps with the tutorial, and I did the exact same thing, maybe is something related to the sorting order or the field of view or something. But as you can see the player appears in his start point, which is behind those sprites, but the sprites, and only the sprites get erased from scene. 

    This is how it looks on edit mode


    And this is what happens when I hit play, all 3 sprites disappear.
    I noticed in the video that the Sprite renderer gets unchecked to the person making the tutorial while playing so I guess this isn't the issue. 
  • If someone was following this one. I resolved it turning off the Limit visibility component. I think it's not working properly because when activated I feed it with the camera that is supposed to look at these sprites and they weren't showing. I don't get it. but well, unchecked that and works like a charm.
  • Glad to hear it.
  • The same thing happened to me, and I followed your advice and it worked thanks. but now I also fear that in a different camera the sprite may appear

  • @Doncha If it does, post details of the issue and we can look into it.

  • I have like 300 sprites, and now I don't remember which one it was. But basically it was the same problem as Diego, it was not shown to me by camera, but when I deactivated limit visility, it worked correctly.a hug!

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.