0% found this document useful (0 votes)
7 views7 pages

Unity 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views7 pages

Unity 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

SECOND SEMESTER UNIVERSITY EXAMINATION - AUG 2024

M.Sc. (GAME DESIGNING , DEVELOPMENT AND VIRTUAL REALITY)

UNITY I
Time: 3 Hours Max. Marks: 70

Instruction: Answer all sections

SECTION – A

I. Answer any FIVE questions. Each question carries TWO marks. [2x5=10]
1.Explain what Unity 3D is?
Unity 3D is a game development engine used to create 2D and 3D interactive content,
including games and simulations. It supports cross-platform development and uses C# for
scripting, offering advanced graphics and a vast asset store for resources.

2.Name the main components of Unity 3D?


The main components of Unity 3d are:
Scene
GameObject
Component
Assets
Inspector
Hierarchy

3.What are properties in C#?


Properties in C# are special class members that provide a flexible mechanism to read, write,
or compute the values of private fields.
That are:
Encapsulation
Get/set Assessor
Auto-Implemented

4.What are practical classes in C#?

Practical Classes in C#

i. Collections: Manage groups of objects (e.g., `List<T>`, `Dictionary<TKey, TValue>`).


ii. File I/O: Handle file operations (e.g., `File`, `StreamReader`).
iii. DateTime: Manage dates and times.
iv. String: Manipulate and format text.
v. Math: Perform mathematical operations (`Math.Sqrt()`, `Math.Pow()`).
5. How is C# different from c?

C# C

Object-oriented Procedural

Memory Management: Memory Management:

Automatic garbage collection. Manual memory management.

Standard Library: Standard Library:

Extensive .NET library. Basic standard library.

Platform: Platform:

Primarily for Windows (.NET Portable across platforms


framework).

6. What are the extension methods in C#?

Extension methods in C# are a way to add new methods to existing types without modifying
their source code.

Syntax:

‘this’

7. Does making a game in unity require C#?

 Primary Language: Unity uses C# for scripting and game logic.


 Requirement: Yes, C# is required to develop games in Unity.

SECTION – B

II. Answer any FOUR questions. Each question carries five marks. [5x6=30]

9. What are the main advantages of using Unity 3D?

1. Cross-Platform: Supports development for PC, consoles, mobile, VR/AR, and web.
2. User-Friendly: Intuitive interface and tools suitable for beginners and experts.
3. Real-Time Rendering: Provides high-quality graphics and real-time rendering capabilities.
4. Asset Store: Access to a vast library of assets, plugins, and tools to speed up development.
5. C# Scripting: Uses C# for scripting, offering powerful and flexible programming options.
6. Strong Community: Large user community and extensive resources for support and learning.

10. Explain what Asset Bundle does in Unity 3D?

1. Purpose: Manage and load assets dynamically at runtime.


2. Packaging: Groups assets into a single package for efficient handling.
3. Dynamic Loading: Loads assets as needed, reducing initial app size.
4. Version Control: Updates assets without full game re-builds.
5. Resource Management: Optimizes memory by loading only necessary assets.
6. Flexibility: Allows for on-demand asset downloads and updates.
11. Explain what Unity 3D files are?

1. Scene Files (`.unity`): Store scene layouts and objects.

2. Script Files (`.cs`): Contain C# code for game logic.

3. Prefab Files (`.prefab`): Define reusable object templates.

4. Asset Files: Include textures, models, and audio.

5. Project Settings (`.asset`, `.settings`): Manage configuration and preferences.

6. Material Files (`.mat`): Define visual properties of objects.

12 How to import an object to unity engine?

1. Prepare the File: Ensure it's in a compatible format (e.g., `.fbx`, `.obj`).
2. Open Unity: Start or open your Unity project.
3. Import: Drag and drop the file into the Project window or use Assets > Import New Asset....
4. Adjust Settings: Configure import settings in the Inspector.
5. Add to Scene: Drag the asset into the **Scene** view or **Hierarchy**.
6. **Position and Use**: Adjust the object's placement and apply necessary components.

13 Summarize different class types in C# .

1. Regular Class: Standard class with fields, properties, methods, and constructors.
2. Abstract Class: Cannot be instantiated; serves as a base with abstract methods.
3. Static Class: Contains only static members; cannot be instantiated.
4. Partial Class: Allows splitting class definition across multiple files.
5. Sealed Class: Cannot be inherited; prevents further subclassing.
6. Derived Class: Inherits members from a base class, allowing reuse and extension of
functionality.

SECTION –C

III.Answer any FOUR questions. Each question carries TEN marks. [10x4=40]
15. What are the main differences between UE4 and Unity 3D?

UE4 UNITY 3D

 High-Fidelity Graphics: Superior visual  Versatile Graphics: Supports a wide range


quality. of styles.

 C++ and Blueprint: Uses C++ and visual  C# Scripting: Easier to learn and use.
scripting.
 Steeper Learning Curve: More complex  User-Friendly: Gentler learning curve.
for beginners.

 Royalty-Based Licensing: Free with  No Royalties: Free and paid versions


royalties on commercial use. available.

 Advanced Physics/AI: Strong built-in  Cross-Platform: Strong multi-platform


systems. support.

16. Explain what the inspector does in Unity 3D?

I. Shows Object Properties: Displays selected GameObject's components.


II. Edit Values: Allows modification of component settings.
III. Add/Remove Components: Easily manage components on GameObjects.
IV. Real-Time Updates: Reflects changes instantly.
V. Nested Details: Provides access to detailed settings of components.

18.What is an array in C#?

1. An array in C# is a collection of elements of the same type stored in memory locations.


2. It has a fixed size,
3. it is defined at the time of creation.
4. elements are accessed using an index starting from zero.
5. Arrays are useful for storing multiple related values, such as a list of integers or strings.
6. declared with a specific type, like `int[] numbers = new int[5];`.
7. Can be initialized with values, e.g., `int[] numbers = {1, 2, 3, 4, 5};`.
8. Elements are accessed using their index, e.g., `numbers[0]` retrieves the first element.
9. It is a Multidimensional Arrays. Supports arrays with more than one dimension, e.g., `int[,]
matrix = new int[3, 3];`.
10. Can be iterated using loops, such as `for` or `foreach`, to process each element.

10. What is Abstract class?

An abstract class in C# is a base class that cannot be instantiated directly.

It is designed to provide a common foundation for derived classes, containing both fully implemented
methods and abstract methods that must be implemented by those derived classes.

This structure ensures consistency and enforces specific behaviors across different classes that inherit
from it.

Eg:

#region

public abstract class abstractModifier

private int id;


public int ID

get { return id; }

set { id = value; }

internal abstract void Add();

#endregion

12 . What does the project panel do in the Unity editor?

Project Panel in Unity Editor

1. Displays Assets: Shows all the assets in your project.


2. Organizes Files: Helps organize assets into folders.
3. Import Functionality: Allows you to import new assets.
4. Search Feature: Enables quick search of specific assets.
5. Asset Creation: Lets you create new assets like materials and prefabs directly in the panel.

14. Name some disadvantages of using Unity 3D?

Disadvantages of Using Unity 3D:

i. Performance Overhead: Can struggle with optimization in complex projects.


ii. Graphics Quality: Lower visual fidelity compared to Unreal Engine.
iii. Asset Store Dependence: Relies on third-party assets, which may vary in quality.
iv. Large Project Management: Difficult to manage large-scale projects efficiently.
v. Frequent Updates: Updates can introduce bugs or compatibility issues.
vi. Memory Management: Can be challenging, especially in mobile development.
vii. Limited Built-In Tools: Requires plugins or custom scripting for advanced features.
viii. Licensing Costs: Pro version and advanced features can be expensive.
ix. Learning Curve: Advanced features require significant learning.
x. Weak Networking: Built-in multiplayer solutions are less robust.

10. Explain what Asset Bundle does in Unity 3D?

Asset Bundle in Unity 3D

1. Efficient Management: Packages and loads assets separately from the main app.

2. Dynamic Updates: Allows adding new content without updating the whole app.

3. Streaming: Supports on-demand loading of large assets.

4. Platform-Specific: Creates bundles optimized for different platforms.

5. Version Control: Simplifies updating assets and managing versions.

12 How to import an object to unity engine?


Ans: Importing an Object to Unity Engine

 Prepare the File: Ensure the object is in a supported format (e.g., .fbx, .obj).
 Drag and Drop: Drag the file directly into the Unity Project Panel.
 Import Settings: Adjust import settings in the Inspector for the object, if necessary.
 Place in Scene: Drag the imported object from the Project Panel into the Scene view to add it
to the game.
 Apply Changes: Make any additional modifications or apply materials as needed.

Q.14. Difference between abstract class and interface.

Q.18. What is C#?

 C# is pronounced "C-Sharp".
 It is an object-oriented programming language created by Microsoft that runs on the .NET
Framework.
 C# has roots from the C family, and the language is close to other popular languages like C+
+ and Java.
 The first version was released in year 2002. The latest version, C# 12, was released in November
2023.
 C# is used for:
 Mobile applications
 Desktop applications
 Web applications
 Web services
 Web sites
 Games
 VR
 Database applications
 And much, much more!
 It is one of the most popular programming languages in the world
 It is easy to learn and simple to use
 It has huge community support
 C# is an object-oriented language which gives a clear structure to programs and allows code to
be reused, lowering development costs
 As C# is close to C, C++ and Java, it makes it easy for programmers to switch to C# or vice
versa

****************************

You might also like