万本电子书0元读

万本电子书0元读

顶部广告

Extending Unity with Editor Scripting电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:Angelo Tadres

出  版  社:Packt Publishing

出版时间:2015-09-21

字       数:87.8万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Put Unity to use for your video games by creating your own custom tools with editor *ing About This Book Acquire a good understanding of extending Unity’s editor capabilities for a platformer game by using Gizmos, custom inspectors, editor windows, *able objects, and more Learn to configure and get control over your asset import pipeline using asset preprocessors A step-by-step, comprehensible guide to creating and customizing a build pipeline that fits the necessities of your video game development team Who This Book Is For This book is for anyone who has a basic knowledge of Unity programming using C# and wants to learn how to extend and create custom tools using Unity editor *ing to improve the development workflow and make video game development easier. What You Will Learn Use Gizmos to create visual aids for debugging Extend the editor capabilities using custom inspectors, property and decorator drawers, editor windows, and handles Save your video game data in a persistent way using *able objects Improve the look and feel of your custom tools using GUIStyles and GUISkins Configure and control the asset import pipeline Improve the build creation pipeline Distribute the custom tools in your team or publish them in the Asset Store In Detail One of Unity's most powerful features is the extensible editor it has. With editor *ing, it is possible to extend or create functionalities to make video game development easier. For a Unity developer, this is an important topic to know and understand because adapting Unity editor *ing to video games saves a great deal of time and resources. This book is designed to cover all the basic concepts of Unity editor *ing using a functional platformer video game that requires workflow improvement. You will commence with the basics of editor *ing, exploring its implementation with the help of an example project, a level editor, before moving on to the usage of visual cues for debugging with Gizmos in the scene view. Next, you will learn how to create custom inspectors and editor windows and implement custom GUI. Furthermore, you will discover how to change the look and feel of the editor using editor GUIStyles and editor GUISkins. You will then explore the usage of editor *ing in order to improve the development pipeline of a video game in Unity by designing ad hoc editor tools, customizing the way the editor imports assets, and getting control over the build creation process. Step by step, you will use and learn all the key concepts while creating and developing a pipeline for a simple platform video game. As a bonus, the final chapter will help you to understand how to share content in the Asset Store that shows the creation of custom tools as a possible new business. By the end of the book, you will easily be able to extend all the concepts to other projects. Style and approach This book uses a step-by-step approach that will help you finish with a level editor tool, a custom configuration for the asset import pipeline, and a build pipeline totally adjusted to the video game.
目录展开

Extending Unity with Editor Scripting

Table of Contents

Extending Unity with Editor Scripting

Credits

Foreword

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers, and more

Why subscribe?

Free access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Getting Started with Editor Scripting

Overview

Editor scripting basics

What is an editor script?

The Editor folder

Introducing Run & Jump

Playing the video game

Creating a new level

The Level Creator tool

Defining the chapter goals

Preparing the environment

Performing automation

Summary

2. Using Gizmos in the Scene View

Overview

Defining the chapter goals

Creating gizmos through code

The OnDrawGizmos and OnDrawGizmosSelected methods

Adding gizmos using the DrawGizmo attribute

The Gizmos class

DrawCube

DrawWireCube

DrawSphere

DrawWireSphere

DrawRay

DrawLine

DrawIcon

DrawGUITexture

DrawFrustrum

Adding a structure to our levels

Implementing the gizmo grid

Implementing the snap to grid behaviour

Summary

3. Creating Custom Inspectors

Overview

Defining the chapter goals

Upgrading the Level class

Understanding how an inspector works

Creating a custom inspector

Using the CustomEditor attribute

Playing with the inspector message methods and target variable

Adding the GUI elements

Implementing the resize feature

Using buttons to trigger actions

Working with layouts

Creating complex layouts

Improving the inspector without custom inspectors

What is a Property Drawer?

Built-in Property Drawers

Range

Multiline

TextArea

ContextMenu

ContextMenuItem

Built-in Decorator Drawers

Header

Space

Tooltip

Creating you own Property Drawers

Using drawers inside a custom inspector

Using SerializedObject and SerializedProperty

Summary

4. Creating Editor Windows

Overview

Defining the chapter goals

Creating the base for an editor window

Using the EditorWindow class

Playing with the EditorWindow message methods

Using Hotkeys to trigger menu items

Implementing the Palette

Creating a category system

Finding assets using the AssetDatabase class

Implementing the GUI for the Palette

Creating tabs

Creating a scrollable area

Integrating the Palette with the Level Creator tool

Creating an event

Subscribing to an event

Summary

5. Customizing the Scene View

Overview

Defining the chapter goals

Defining the Editor modes

Customizing the Scene View

Using the OnSeceneGUI message method

Playing with the Scene View tools

Controlling the focus over our game objects

Detecting Scene View events

Getting the mouse position

Capturing mouse events

Implementing the Level Creator modes

The View mode

The Paint mode

The Erase mode

The Edit mode

Using the Handles class

Adding the final details to Level Creator

Using hiding flags

Summary

6. Changing the Look and Feel of the Editor with GUI Styles and GUI Skins

Overview

Defining the chapter goals

Changing the look and feel of the Level Creator tool

Using GUIStyles in our GUI components

Working with the GUIStyleState instances

Changing the look and feel using a simpler approach

Creating a GUISkin asset

Integrating and using a GUISkin

Summary

7. Saving Data in a Persistent Way with Scriptable Objects

Overview

Defining the chapter goals

Preparing the environment

Updatable gravity in levels

Playing with gravity

Implementing a Scriptable Object

Creating the data class

Generating an asset to contain the data class

Integrating the Scriptable Object with the level

Updating the Level and the LevelInspector class

Tweaking the level settings in the play mode

Summary

8. Controlling the Import Pipeline Using AssetPostprocessor Scripts

Overview

Defining the chapter goals

Using the AssetPostprocessor class

Improving the import pipeline

Overwriting the background and level piece assets settings

Using a DLL file for the AssetPostprocessors

Creating and setting up a DLL project

Integrating the DLL file to the main project

Summary

9. Improving the Build Pipeline

Overview

Defining the chapter goals

Preparing the environment

Automating the BuildPipeline class

Adjusting the player settings

Using the BuildPipeline class

Creating an editor window and learning about EditorPrefs to persist data

Adding version control to your project

Interacting with external scripts

Displaying the build information in the video game

Using the bash script in our pipeline

Distributing your video game using AppBlade

Creating an AppBlade account

Uploading the build

Summary

10. Distributing Your Tools

Overview

Defining the chapter goals

Preparing the environment

Sharing code using a Unity Package

Creating a package

Importing a package

Sharing code using Git submodules

Creating a submodule

Using a submodule

Publishing in the Asset Store

Installing the Asset Store Tools

Becoming a publisher

Uploading the package

Using the Mass Labeler

Uploading and submitting the project

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部