public static void Draw(Rect rect, Vector2 offset) { if (_inst == null) { _inst = new DrawGrid(); _inst.InitTexture(); } GUI.DrawTextureWithTexCoords(rect, _inst._gridTexture, new Rect(-offset.x / TextureSize, (offset.y - rect.height) / TextureSize, rect.width / TextureSize, rect.height / TextureSize), false); }