Unity Introduction

DrewDev·2023년 8월 12일
0

Creating a Project


Hierarchy

In Unity, a hierarchy refers to the structured arrangement of GameObjects within the scene. GameObjects are the basic building blocks of any Unity scene and can represent various entities like characters, props, lights, cameras, and more. The hierarchy provides a way to organize and manage these GameObjects within the scene.

The hierarchy in Unity is represented as a tree-like structure. At the root of the hierarchy, you have the "Scene" itself, and under that, you can have various GameObjects as children. Each GameObject can have its own children, creating a parent-child relationship between GameObjects. This hierarchy defines the spatial relationship between objects and can also be used to establish logical relationships.

Inspector

In Unity's development environment, the Inspector is a panel that provides detailed information and controls for the currently selected GameObject or Asset in the Scene or Project view. When you select a GameObject in the Hierarchy or an Asset in the Project view, its properties and components are displayed in the Inspector panel.

Assets

Assets in Unity are the files that make up your project's content. Assets can be anything from textures, models, audio files, scripts, prefabs, scenes, animations, and more. Assets are the building blocks that you assemble to create your game or interactive experience.

Components

In Unity, a component is a modular unit of functionality that can be attached to a GameObject to give it specific behaviors, properties, or functionalities. Components are the building blocks that allow you to add and customize features to GameObjects without having to write complex code from scratch. Unity's component-based architecture promotes reusability, modularity, and ease of development.

Sprites

In Unity, a sprite refers to a 2D graphic element that can be used to represent characters, objects, backgrounds, icons, and more within a 2D game or interactive application. Sprites are widely used to create the visual elements of 2D games, animations, user interfaces, and other graphical content.

Simple example of using tools in Unity:


 

Setting up Visual Studio Code


  1. Go to Edit -> Preferences and find the External Tools option and configure External Script Editor to Visual Studio Code (as mentioned before, you may need to install vscode editor on Unity's package manager).

  1. Right click on the Project section and create a C# script file. This will display a preview of the code on the side.

  1. Open vscode and install the C# and Unity Code Snippets for smooth support.

  1. Test that you vscode is linked with your Unity project by writing and displaying a message on the console. Make sure to drag your C# file to a game object.


profile
I LOVE GAMES

0개의 댓글