0
\$\begingroup\$

I appreciate this is a pretty broad question but I'm not sure of a way to go about this. I have read some other questions on adding minigames but they don't all quite answer what I want.

I essentially want "minigames" to be able to happen within my main game. I have a layout of what I'm trying to describe below

enter image description here

A couple of solutions I thought of could be

  • Using a canvas and just overlaying it
  • Rendering the minigame in another part of the "world space" and using another camera while disabling the main camera
  • Another scene (Seems a bit overkill to me)

I understand how to get a camera viewport cropped in the top corner and such like that, I am more concerned with how to go around achieving this layout.

Are there any other ways I can go about this?

\$\endgroup\$
7
  • \$\begingroup\$ The layout can be achieved by just anchoring your smaller screens. It will depend a bit of your mini game. Some simple clicking? No problem for the canvas. A mini version of Doom in a canvas? Well... \$\endgroup\$
    – Zibelas
    Commented Jul 1, 2022 at 18:39
  • \$\begingroup\$ @Zibelas Would this be by positioning the components in different parts of the world space? They are pretty basic ones yeah. \$\endgroup\$
    – Emobe
    Commented Jul 1, 2022 at 18:43
  • \$\begingroup\$ For things that dont move, I would probably use a Screenspace Option and not Worldspace. That way regardless how you move around, it stays fixed. Worldspace is great if you want HP bars over enemies \$\endgroup\$
    – Zibelas
    Commented Jul 1, 2022 at 18:53
  • \$\begingroup\$ @Zibelas Would that be using a canvas or converting everything to screenspace? I know this is getting to become "too many questions", do you have any references on this? \$\endgroup\$
    – Emobe
    Commented Jul 1, 2022 at 18:58
  • \$\begingroup\$ Each of your layout boxes can be its own canvas, you can have a chat one and a mini game one or one for each minigame as well. You design it inside the canvas and would not care about your main game, it stays in front of the camera. As for reference, the docu gives examples and talks about all components you can use that help with scaling, stretching and co docs.unity3d.com/Packages/[email protected]/manual/… \$\endgroup\$
    – Zibelas
    Commented Jul 1, 2022 at 19:07

1 Answer 1

0
\$\begingroup\$

Use a screen space canvas. I’ve done this with multiple games. Using a camera is cool if it’s a 3d mini game but else it’s just wasted resources.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .