public static void DrawRect(CommandBuffer commandBuffer, Rect rect, Vector3 scale, Color color) { _mesh.vertices = new Vector3[] { new Vector3(0, 0, 0), new Vector3(rect.width, 0, 0), new Vector3(rect.width, rect.height, 0), new Vector3(0, rect.height, 0), }; _mesh.colors = Enumerable.Repeat(color, 4).ToArray(); _mesh.SetIndices(new int[] { 0, 1, 2, 3 }, MeshTopology.Quads, 0); Matrix4x4 matrix = Matrix4x4.TRS(rect.position, Quaternion.Euler(180, 0, 0), scale); commandBuffer.DrawMesh(_mesh, matrix, OpenTibiaUnity.GameManager.InternalColoredMaterial); }
public static void DrawTexture(CommandBuffer commandBuffer, Matrix4x4 transformation, Material mat, MaterialPropertyBlock props) { commandBuffer.DrawMesh(s_texMesh, transformation, mat, 0, 0, props); }
public static void DrawTexture(CommandBuffer commandBuffer, Matrix4x4 transformation, Material mat) { commandBuffer.DrawMesh(s_texMesh, transformation, mat, 0); }