Search Results for

    Show / Hide Table of Contents

    Grid Search Handler

    Role

    Separates the terrain of a map scene into searchable cells to allow other components to launch searches (for entities to interact with) within a limited space of the map (specific cells depending on the search source position and range) instead of having to go through the whole map.

    Setup

    • Essential manager component:
      • Must be present in each map scene.
      • Must be attached to a game object that is a child of the Game Manager object.

    Inspector

    image

    Property Description
    Lower Left Corner Defines the lower-left corner of the search grid where search cells will be generated.
    Upper Right Corner Defines the upper-right corner of the search grid where search cells will be generated.
    Cell Size The size of each individual cell. Must be >= 1.

    Notes

    • Make sure that you define the Lower Left Corner and Upper Right Corner fields accordingly to the terrain area that entities can interact launch searches in.
    • The Cell Size can be set up to suit the search ranges that you assign to your entity components. A small Cell Size would generate more cells, meaning that the searches would be more localized. A high Cell Size would generate a small amount of cells which might make the search operations more computationally expensive as the search inspects every entity within a cell.
    In This Article
    Back to top Unity RTS Engine Documentation