Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Getting Started with Unity 5
  • Table Of Contents Toc
Getting Started with Unity 5

Getting Started with Unity 5

By : Dr. Edward Lavieri Jr.
2.9 (27)
close
close
Getting Started with Unity 5

Getting Started with Unity 5

2.9 (27)
By: Dr. Edward Lavieri Jr.

Overview of this book

If you are a game developer interested in learning Unity 3D from scratch and becoming familiar with its core features, then this book is for you. No prior knowledge of Unity 3D is required.
Table of Contents (10 chapters)
close
close

Optimizing scripts


We want our scripts to be optimal in regards to memory usage and processing. A great approach to script optimization is to simply code your game and run it with the Profiler window open and select the CPU Usage tab from the left pane, as shown in the following screenshot:

Using this view, you can see what processes are taking the most CPU power. The visual graph makes it easy to spot significant jumps in CPU usage. The Overview section, which can be found below the visual graph, provides a very detailed view of how much CPU processing is allocated to each object and process.

Another section of the Profiler window is the Memory tab. Reviewing that tab's information can tell you how much memory is allocated, how much system memory is used, and counts of Textures, Meshes, Materials, AnimationClips, AudioClips, Assets, and GameObjects:

Once we know where our problems or potential issues are, we can do a few things to optimize our scripts:

  • We can destroy objects that we no longer...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Getting Started with Unity 5
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon