microsoft / Microsoft.Unity.Analyzers

Roslyn analyzers for Unity game developers
MIT License
689 stars 74 forks source link

[WIP] add lint: Allocating properties of Mesh should not be get in loop #358

Open KisaragiEffective opened 1 month ago

KisaragiEffective commented 1 month ago

Fixes #52

Checklist

Short description of what this resolves:

I'll make this PR will:

  1. Address #52 (use mesh.vertexCount instead of mesh.vertices.Count)
  2. about Binding "Allocating-properties":
    1. Warn about
    2. Move it to outer scope that does not surrounded by loop construct

However this is incomplete, and will be convered in later commits.

Changes proposed in this pull request: