public override void InitializeData() { if (!LocalVector3Coords.Any()) { LocalVector3Coords = new List <Vector3> { new Vector3(-1, 1, 0), new Vector3(1, 1, 0), new Vector3(1, -1, 0), new Vector3(-1, -1, 0) }; } }
public override void InitializeData() { if (!LocalVector3Coords.Any()) { LocalVector3Coords = new List <Vector3> { new Vector3(-1, 1, 0), new Vector3(1, 1, 0), }; var edgeCollider = gameObject.GetComponent <EdgeCollider2D>(); edgeCollider.edgeRadius = 0.05f; } }
public override void InitializeData() { if (!LocalVector3Coords.Any()) { LocalVector3Coords = new List <Vector3> { new Vector3(-1, 1, 0), new Vector3(1, 1, 0), new Vector3(1, -1, 0), new Vector3(-1, -1, 0) }; var meshCollider = GetComponent <MeshCollider>(); var meshFilter = GetComponent <MeshFilter>(); meshFilter.mesh = new Mesh(); meshCollider.sharedMesh = meshFilter.sharedMesh; meshCollider.convex = true; _meshHeightChecker = MeshHeight; } }