public static Mesh GetShadowMesh(float baseWidth, float baseHeight, float tallness) { int key = HashOf(baseWidth, baseHeight, tallness); if (!shadowMeshDict.TryGetValue(key, out var value)) { value = MeshMakerShadows.NewShadowMesh(baseWidth, baseHeight, tallness); shadowMeshDict.Add(key, value); } return(value); }
public static Mesh GetShadowMesh(float baseWidth, float baseHeight, float tallness) { int key = ShadowMeshPool.HashOf(baseWidth, baseHeight, tallness); Mesh mesh = default(Mesh); if (!ShadowMeshPool.shadowMeshDict.TryGetValue(key, out mesh)) { mesh = MeshMakerShadows.NewShadowMesh(baseWidth, baseHeight, tallness); ShadowMeshPool.shadowMeshDict.Add(key, mesh); } return(mesh); }