售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜