GameObject Brush | 2D Tilemap Extras | 1.5.0-preview
docs.unity3d.com
    Show / Hide Table of Contents

    GameObject Brush

    This Brush instances, places and manipulates GameObjects onto the scene. Use this as an example to create brushes which targets objects other than tiles for manipulation.

    Usage

    To pick GameObjects, change to the Pick tool and pick GameObjects from the Scene. Note that the GameObjects must be a child of the active Grid.

    When painting with the GameObject Brush, the GameObject Brush will instantiate GameObjects picked onto the Scene.

    Scene View with GameObject Brush

    Implementation

    The GameObjectBrush inherits from the GridBrush. It overrides the Paint method to paint a GameObject. It overrides the Erase method to be able to erase the GameObjects from the Scene. It overrides the BoxFill method to paint a GameObject in each cell defined by the Box tool. It overrides the Move methods to be able to move GameObjects in the Scene. It overrides the Flip methods to be able to flip GameObjects in the picked selection.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023