Introducere in Unity


Realizarea unui Main Menu

  • Creati o scena de Main Menu
  • Adaugati un Buton de Start Game
  • La apasarea butonului de Start Game din Main Menu trebuie sa se lanseze scena de joc
  • Creati o noua scena de joc cu minim:
    • un teren cu vegetatie
    • cladiri importate dintr-un pachet de pe asset store

Documentatie video

Gasiti pe MS Teams inregistrat

Documentatie extinsa text


Folders  inside unity

Unity reserves some project folder names to indicate that the contents have a special purpose. There are a number of folder names that Unity interprets as an instruction that the folder's contents should be treated in a special way. Some of these folders have an effect on the order of script compilation. These folder names are:

  • Assets: The Assets folder is the main folder that contains the Assets used by a Unity project.
  • Editor: Scripts placed in a folder called Editorare treated as Editor scripts rather than runtime scripts. These scripts add functionality to the Editor during development, and are not available in buildsat runtime.
  • Editor default resources:Editor scripts can make use of Asset files loaded on-demand using the [EditorGUIUtility.Load]( function. This function looks for the Asset files in a folder called Editor Default Resources.
  • Gizmos: [Gizmos]( allow you to add graphics to the Scene Viewto help visualise design details that are otherwise invisible.
  • Plugins: You can add [plug-ins]( to your Project to extend Unity's features. Plug-ins are native DLLs that are typically written in C/C++. They can access third-party code libraries, system calls and other Unity built-in functionality.
  • Resources:You can load Assets on-demand from a script instead of creating instances of Assets in a Scene for use in gameplay. You do this by placing the Assets in a folder called Resources. Load these Assets by using the [Resources.Load]( function.
  • Standard Assets: When you import a Standard Asset package (menu: Assets > Import Package) the Assets are placed in a folder called Standard Assets
  • StreamingAssets: You may want the Asset to be available as a separate file in its original format although it is more common to directly incorporate Assets into a build. To do so, place a file in a folder called StreamingAssets, so it is copied unchanged to the target machine, where it is then available from a specific folder.
Asset Bundles, Resources and StreamingAssets

There are several ways to serve up resources to Unity at runtime, and each method has its place in game development: asset bundles, resource folders, and streaming assets.

# Asset Bundles:

Asset bundles let you deliver content to your application outside of your Unity build. Generally, you'd host these files on a remote web server for users to access dynamically. Asset bundles can contain anything from individual assets to entire scenes, which also makes them ideal for delivering downloadable content (DLC) for your game.

# Resource Folders:

The Resource folders are bundled managed assets. That means they will be compressed by Unity, following the settings you apply in the IDE. Unlike Asset bundles, resource folders are baked into the Unity Player as part of the game. You can do this by adding the required assets to a folder named Resources in your assets directory.

# Streaming Assets:

Like Resource Folders, a Streaming Assets directory can be created by intuitively creating a folder named StreamingAssetsthat, that you can use to put bundled un-managed assets. Unlike Resource folders, this directory remains intact and accessible in the Unity player. This creates a unique access point for users to add their own files to the game.

Prefabs In Unity 3d

Prefab in Unity 3D is referred for pre-fabricated object template (Class combining objects and scripts). At design time, a prefab can be dragged from project window into the scene window and added the scene's hierarchy of game objects. If desired the object then can be edited.

At the runtime, a script can cause a new object instance to be created at a given location or with a given transform set of properties.

pjv/laboratoare/2023/01.txt · Last modified: 2023/10/23 09:40 by alexandru.gradinaru
CC Attribution-Share Alike 3.0 Unported Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0