To create an editor extension to allow pickup type (and parameters) to be changed at Design Time via a custom Inspector UI, follow these steps:
- Start with a new copy of mini-game Simple2Dgame_SpaceGirl.
- In the Project panel, create a new folder named EditorSprites. Move the following images from folder Sprites into this new folder: star, healthheart, icon_key_green_100, icon_key_green_32, icon_star_32, and icon_heart_32:
- In the Hierarchy panel, rename GameObject star to be named pickup.
- Edit the tags, changing tag Star to Pickup. Ensure the pickup GameObject now has the tag Pickup.
- Create C# script-class PickUp and add an ...