© Casey Hardman  2020
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-5656-5_9

9. Working with Objects

Casey Hardman1 
(1)
West Palm Beach, FL, USA
 

Remember when we talked about how programming is largely concerned with organizing and manipulating data? We interact with data as objects . A single piece of data is called an object, and an object might have other objects stored inside it – as we described in our previous examples, a data type resembling a “Person” might have a first name, last name, birthdate, and so on. We’ve already dealt with some basic objects: bool, int, float, and string are all objects as well. Now let’s learn about creating our own objects and dealing with other, less basic types of data.

Classes ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.