Forum rules - please read before posting.

In game Photocamera

Is it possible to use an AC menu to dynamically crop a screenshot for an in-game photograph?

This is what I am trying to do. Create an in-game camera that can take pictures of whatever the viewfinder is over. Since I want the background to be able to shrink and expand to fit the width of the frame, the background is a separate graphic that uses the same background image script from the foreground problem.

Also, is it possible to combine two images (A picture frame and a cropped screenshotted image) together through a script?

Thanks!

Comments

  • Is it possible to use an AC menu to dynamically crop a screenshot for an in-game photograph?

    A Graphic element will show the whole supplied texture. The cropping would have to be done through script, and then the result set as the Graphic's texture:

    (AC.PlayerMenus.GetElementWithName ("MyMenu", "MyGraphic") as MenuGraphic).SetNormalGraphicTexture (myCroppedTexture);
    

    It is possible to only partially show a portion of a texture with the Drag element, but this involves the player dragging the texture around - see this tutorial. But, it's pretty complicated and I'd recommend using a custom script with Unity UI to handle the panning/cropping.

    Also, is it possible to combine two images (A picture frame and a cropped screenshotted image) together through a script?

    I expect so, but this isn't a question for AC - the Unity forums may have sample scripts to demo this.

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.