Skip to content

Invalid visibility data #4

@AntonPetrov83

Description

@AntonPetrov83

Hi!

From the documentation:

public bool IsVisible(int index);

Note that this method uses the most recently computed visibility states. Visibility is updated immediately before rendering, so using this method in Update/LateUpdate will provide results based on calculations from the previous frame.

IndexOf and all its usages, including IsVisible return invalid results because of indices mismatch between current m_Targets list and CullingGroup latest culling results on the frame when m_Targets is being modified.

Consider using EraseSwapBack group of methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions