Benny Kok
Beginning Unity Editor Scripting
Create and Publish Your Game Tools
1st ed.
Logo of the publisher
Benny Kok
Hong Kong, China
ISBN 978-1-4842-7166-7 e-ISBN 978-1-4842-7167-4
https://doi.org/10.1007/978-1-4842-7167-4
Benny Kok 2021
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
For those who try to make their editor look better and forget to finish their game.
Introduction
This book is about beginning editor scripting in Unity. I will go from very basic and simple methods of editor customization, such as using built-in attributes in your component script, to advanced methods like using UIToolkit and creating a custom EditorWindow in the later part of the book.
I will begin by introducing Unity and the Unity Package Manager in Chapter . Ill go over the current view of Unitys package and Asset Store ecosystem, and I will briefly talk about my experience with asset publishing.
Next, I will talk about using attributes and coding your custom editor with IMGUI and UIToolkit for your MonoBehaviour component in Chapters , you will create an Object Spawner Tool and look into the EditorTool API and using ScriptableObject.
Next, in Chapters , I will go through the details of my two assets, ProArray and Rhythm Game Starter, including the sales stats, how I prepared for the Asset Store submission, and the technical details of each asset.
Chapters will be mostly about package workflow such as using Git with your Unity package, creating online documentation with GitBook or DocFX, and lastly distributing your package to platforms like GitHub, Open UPM, and the Asset Store.
So, what are you waiting for? Its time to create your game tool.
Acknowledgments
Writing a book is hard. It really is. But all of this wouldnt be even possible without Spandana Chatterjee first inviting me to write a book. Also, big thanks to Divya Modi, Matthew Moodie, and the technical reviewers and team at Apress! Finally, thanks to the Unity community, I would not be here writing this book without the motivation and supportive atmosphere from all of the peer developers.
Table of Contents
About the Author
Benny Kok
is primarily a Unity asset publisher, indie game developer, and music producer. He is a creative individual who loves creating tools for Unity. He has published ProArray, Rhythm Game Starter, and BoneTool on the Unity Asset Store. He also dedicates his time to sharing open-source Unity tools on GitHub for the community.
Besides Unity, he has experience with app development, web development, 3D modeling, and music production. Previously, he created multiple open-source Android applications including OpenLauncher, PixerStudio, and River.
About the Technical Reviewers
Simon Jackson
is a long-time software engineer and architect with many years of Unity game development experience. Hes also an author of several Unity Game development titles. He loves to create Unity projects and he loves to lend a hand to help educate others, whether its via a blog, vlog, user group, or major speaking event.
His primary focus at the moment is with the XRTK (Mixed Reality Toolkit) project. The goal of this project is to build a cross-platform Mixed Reality framework to enable both VR and AR developers to build efficient solutions in Unity and then distribute them to as many platforms as possible.
Sebastiano Cossu
is a software engineer and game developer. He has worked on many AAA games on consoles, PCs, and mobile. He also contributed to the making of Total War: Rome Remastered. He is a lecturer at a prestigious Italian academy. He authored the Apress books Game Development with GameMaker Studio 2 (2019) and Beginning Game AI with Unity (2021).
Abhiram A
An immersive technology entrepreneur, Abhiram A is cofounder of Odyn Reality, an XR Tech startup. He is a Unity3D Ambassador for Unity India and doubles as an XR Coach for Pupilfirst Facebook School of Innovation. He was also part of Future Technologies Lab, Kochi as a Research Fellow in VR. He is a Udacity VR Nanodegree graduate and a Unity Certified Developer.
The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
B. Kok Beginning Unity Editor Scripting https://doi.org/10.1007/978-1-4842-7167-4_1
1. Getting Started
If you are reading this book about custom editor scripting in Unity, I will assume you have already used Unity to create projects or games. Unity is one of the most popular 3D/2D cross-platform game engines in the game development market, and it is the foundation of many successful mobile, desktop, and even console game titles that you might have come across.