Chapter 23. Functions and Parameters
In this chapter, you learn to take advantage of the immense power of functions. You write your own custom functions which can take any kind of variables as input arguments and can return a single variable as the function’s result. We also explore some special cases of parameters for function input like function overloading, optional parameters, and the params keyword modifier, all of which will help you to write more effective, modular, reusable, and flexible code.
Set Up the Function Examples Project
In Appendix A, “Standard Project Setup Procedure,” detailed instructions show you how to set up Unity projects for the chapters in this book. At the start of each project, you will also see a sidebar like the ...
Get Introduction to Game Design, Prototyping, and Development: From Concept to Playable Game with Unity and C# 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.