/// <summary> /// Gets the ProjectedRect in Screen space for a Game Object. /// Override this method if you want to calculate the World to Screen projected /// rectangle for the game object some other way. /// </summary> /// <returns></returns> protected virtual ProjectedRect GetProjectedRect() { if (_boxCollider != null) { return(ProjectedRect.GetProjectedRect(_boxCollider, Camera.main, AllowOverlap())); } return(ProjectedRect.GetProjectedRect(GetRenderer().bounds, Camera.main, AllowOverlap())); }
/// <summary> /// Gets the ProjectedRect in Screen space for a Game Object. /// Override this method if you want to calculate the World to Screen projected /// rectangle for the game object some other way. /// </summary> /// <returns></returns> protected virtual ProjectedRect GetProjectedRect() { if (_boxCollider != null) { return ProjectedRect.GetProjectedRect(_boxCollider, Camera.main); } return ProjectedRect.GetProjectedRect(GetRenderer().bounds, Camera.main); }
protected override ProjectedRect GetProjectedRect() { return(ProjectedRect.GetProjectedRect(this.GetComponent <Collider2D>().bounds, Camera.main)); }