Forum rules - please read before posting.

Close-Ups

Hi all, 

I have an art gallery
scene in my game. When player clicks a painting a full screen image
of the painting appears. Clicking again returns to the main scene
view. There are ~40 painting so I want to make sure I am implementing
this in a way that avoids loading the close-up images unnecessarily.



I was thinking of
creating a menu with all the close-ups as separate graphic elements
that could be enabled/disabled as necessary, but I'm unsure if all
element would be loaded each time the menu is enabled?



Would it be better to
use separate menus for each close-up? Or put them each in a separate
scene? Or is there a more elegant solution I'm not seeing?



Thanks.

Comments

  • If this one scene is the only place the player will look at them, you
    could place them all off the edge of the screen and put game cameras in
    front of them and switch to the appropriate camera. That's assuming the
    ones in the main part of the scene aren't full resolution already. If they are, you can just put game cameras in front of them right there.

    But as far as putting them in a UI, I don't really know how the legacy AC UI does things. I have never used it. But if you are using Unity UI prefabs (which you probably should pretty much all the time anyway), the UIs are all added in the beginning, so it's not loading anything when you turn on a menu. They're already there in the scene.
  • Welcome to the community, @Joemcr.

    I would recommend using a simple Menu that's linked to Unity UI, and given an Appear type of Manual so that you can control when it is displayed with the Menu: Change state Action.  A tutorial on linking Unity UI to AC can be found here.

    Inside your UI canvas, create an Image that is used to store a single painting.  Then add an Animator component, and create a single-frame animation for each painting by just changing the Image's Sprite. You can then use the Object: Animate Action to play a different animation each time the Menu is opened - whether by calling the animation name directly, or by altering an Animator parameter.

    To save you having to run both these Actions each time you want to look at a painting, you could then place them in an ActionList asset that uses Parameters to change the parameter value dynamically.  See this tutorial for more on parameters, but that's a next step - get the animation working as required before adding this complexity.
  • Thanks for the quick responses guys! Animations inside a menu sounds like good solution :)
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.