Tag: Unity

GameDev with Unity on Linux

Notes to set up for GameDev with Unity on Linux. Install unity, and around sdk, then set up VSCode VSCode.

 [ Unity Linux ]

Take same size Screenshots regardless of resolutions - Unity

When we create a game, we often support the multiple-device. Even if the screen resolutions are different, canvas config can realize it easily. It changes the UI ratio to fit each resolution.
To take a screenshot on a part of a screen, we need input a resolution but we cannot know the object size on each device. Do we need calculate each device ratio for taking a screenshot on a game result and a user profile?
No. We can do it just with using another canvas or changing CanvasScaler by a script.

 [ Unity ]

Create the button getting a input by various ways – Unity

Mobile game get player inputs by the buttons, each with a specific function, or by its attribute like tap or long tap. The former is simple. It just calls each public method. However, the latter case need manage flags as many as the number of commands, then it`s likely to complicate. The corutine make this easier.

 [ Unity ]

Switch an animation from any state – Unity

When creating an action game or a battle game, you may want to link a key input to an animation. All animation need transition from anywhere. If each state were connected with all others, Animator should become hard to see. In such case you can use “Any State” of Animator.

 [ Unity ]