That is how it started. We got to know each other names, got in the bus and got moving. Time to surf in Ireland!
The weather was great, beautiful cloudy sky and constant drizzle, typical Ireland. We had a long way ahead of us, and it was kind of a quiet and fragile atmosphere inside the bus, no one really chatting too much yet. The destination for the day was Galway and the Cliffs of Moher; a site well known for its outstanding natural beauty. As we approached the Cliffs, the shock! Visibility for 25 meters at most, we felt like we are inside a cloud. But another surprise, 15 minutes after we got our tickets, the fog disappeared completely! It was wonderful to see Cliffs in their full glory, huge towering rock faces rising straight from the sea, that place is truly breathtaking.
By the time we left the Cliffs, everyone had met and mingled, and people were happily chatting away and making new friends. Later on we enjoyed lovely food and drinks in Galway, where the Street Performance Festival was taking place giving us some lovely entertainment while we ate. Excellent musicians and jugglers pulled in the crowds giving the city a carnival atmosphere. It was a cosy hostel we stayed in too, Galway City Hostel, fresh and funky place, cool spot right at the corner of main square!
Second day; off to Conemara for exploring, hiking, oysters, and the Coffin Ships Memorial, and everything else that comes with the North-West coast of Ireland. We had another fantastic stop; the Kylemore Abbey and St Patrick Stack, or as the others preferred 'The Reek', a highly significant mountain in CountyMayo for religious reasons. In fact every year it is climbed by pilgrims on the last Sunday in July. I'm just glad they did make us go all the way up! The day finished in Bundoran, again food and drinks with a savage sunset, and some craic in the local Pub.
Now, day three; time to surf in Ireland! The day was most spectacular of them all. Especially for all those amateurs like me that were looking forward to seeing what this surfing thing was all about. I'm just going to say that it was extremely good day and I think the rest of the group will completely agree with me. All the crew of Turf n Surf were amazing, great people, well organized and chilled, not even mentioning how skilled surfers and instructors they were. They got all of the newbies standing and surfing within the first hour, and those with some experience got a chance to head further out and catch some of the real waves.
Last two days of the tour we were hanging around Northern Ireland. Giants Causway and Belfast were our main destinations, but we stopped in some wacky places on the way including The Dark Hedges. Much of the second episode from second season of Games of Thrones was shot there. Definitely one to check out GoT fans.
Last spot on our journey was Belfast; it's obvious from arrival that it is great city. Very different from Dublin, you can still feel that there was something going on there, or it is just my imagination? I think there is something in the air. Anyways, the people who went to do Black Taxi Tour around revolutionary spots, like Shankil and Falls Roads were touched deeply by driver stories and direct connection with victims (not included). Some went to TitanicMuseum, which is another excellent choice, but out in the Shipyard, away from City Centre it's a bit of a commute to get there. There's a great vibe in Belfast during the regular weekday, with fresh food street markets, good coffee and as always – craic.
As we were spending more time with each other on the bus, in the hostels and around the destinations the bond between us was getting tighter. We all had great time on our last night in Belfast, getting some food in an Italian restaurant and then some drinks in another local Pub, where we got a drinks voucher (thanks Turf n Surf) that got us started on our hangovers.
Anyways beautiful people, if you are tired with the city, and want to check some more of this stunning GreenIsland with a small crew of cool people, check out Turf n Surf. A lot of companies provide tours around Ireland, but none surfs with, hangs with you, and enjoy the craic with you like you were BFFs from childhood apart from TnS.
Big thanks to everyone at Turf n Surf – Killian, Kate, Paul, Brian , Giles, Joe, and all the others, sorry I forgot some names, you all are great people, very committed and cool as hell!


#1 NEW YORK TIMES BESTSELLER • The outspoken actress, talk show host, and reality television star offers up a no-holds-barred memoir, including an eye-opening insider account of her tumultuous and heart-wrenching thirty-year-plus association with the Church of Scientology.
in to Seinfeld every week. The network changed our time slot for the second season. With that, Fired Up lost its audience. Our last episode aired in February 1998. The death of that show represented yet another failure as an actress and as a Scientologist. At twenty-seven years old, I was having to go back to the drawing board once again. There were so many starts and stops in my career, ups and downs, moments of triumph and then heartbreak. It always felt like "This is it" and then it wasn't.


text:
HomeAuthorsResourcesContactSubscribe
New York Business Divorce
Commentary on Dissolution and Other Disputes Among Co-Owners of Closely Held Business Entities
Home » Bending the Rules of Standing: The De Facto Merger Doctrine
Bending the Rules of Standing: The De Facto Merger Doctrine
By Franklin C. McRoberts on February 17, 2020
Posted in Discovery
Business Divorce 101: To be entitled to an accounting of a closely-held business, the plaintiff or petitioner must demonstrate the existence of a fiduciary relationship giving rise to a duty to account. Almost always, that requires establishing ownership status in the business — the existence of a general partnership, ownership of shares of stock in a corporation, possession of a membership interest in an LLC, etc.
Can one obtain a judicially-imposed accounting of a closely-held business in which one is not an owner? That was the question decided two weeks ago by a Brooklyn appeals court in Bonanni v Horizons Invs. Corp., 2020 NY Slip Op 00563 [2d Dept Jan. 29, 2020]. The answer may surprise you.
The MRI Business
In 2001, four investors formed MRI Enterprises, LLC (the "Company") with the following stakes to provide magnetic resonance imaging services to local hospitals:
20% – Plaintiff Bonanni, through his wholly-owned corporation, Plaintiff MRI Enterprises, Inc. ("MRI Inc.")
40% – Defendant Fernandez through his wholly-owned corporation, Defendant Horizons Investors Corp. ("Horizons")
20% – Defendant Kalish through his wholly-owned corporation, Defendant Adex Management Corp. ("Adex")
20% – Defendant Hausknecht
To comply with New York law, which prohibits the practice of medicine without a medical license, Hausknecht, a physician, formed Comprehensive Imaging of New York, PLLC ("CINY"), an entity in which Bonanni and MRI Inc. had no membership interest, to provide medical services associated with the Company's machines.
The Falling Out
For years, Bonanni managed the day-to-day operations of the Company. In 2005, a dispute arose among the members, Kalish assumed Bonanni's managerial duties, Bonanni was excluded from management, and he ceased to receive membership distributions. Bonanni and MRI Inc., individually and as a member of the Company, sued the remaining members alleging that they froze him out of the business and misappropriated his 20% pro rata share of the LLC's distributions.
The Litigation
In the ensuing 15-year litigation, Bonanni twice graced the pages of this blog.
In our first post (the first ever published on this blog), Suffolk County Commercial Division Justice Elizabeth H. Emerson dismissed Bonanni's claim to dissolve the Company, ruling that his allegations of "illegal," "fraudulent," and "oppressive" conduct might be enough to dissolve a corporation under Section 1104-a of the Business Corporation Law, but they do not suffice under the more particular, contract-based standard for LLC dissolution found in Section 702 of the Limited Liability Company Law.
In our second post, published nearly a decade after the first, Justice Emerson ruled after a bench trial that Bonanni's co-members unlawfully froze him out of the Company, converted his 20% membership interest, and misappropriated Bonanni's 20% profit distributions. The Court awarded money damages and entered judgment accordingly.
The Accounting Holding
In a brief passage in Justice Emerson's post-trial decision, which you can read here, the Court also granted Bonanni/MRI Inc. a post-trial accounting of CINY, the professional LLC separately formed by Hausknecht, ruling:
The court finds that, as a member of [the Company], MRI Inc. is entitled to an accounting of any and all payments from [the Company] to [Fernandez, Horizons, Kalish, Adex, and Hausknecht] after October 1, 2013, the last day for which information was available at trial. The court also finds that MRI Inc. is entitled to an accounting of any and all payments from CINY, [the Company]'s alter ego and successor-in-interest, to [Fernandez, Horizons, Kalish, Adex, and Hausknecht] for the same period of time.
CINY and Hausknecht appealed Justice Emerson's ruling requiring CINY to account to Bonanni and MRI Inc., arguing that MRI was "not entitled to an accounting from CINY because MRI Inc. never held a membership interest in CINY."
On its face, the argument seem compelling. In Jacobs v Cartalemi, the Court held that the "right to an accounting is premised upon the existence of a confidential or fiduciary relationship and a breach of the duty imposed by that relationship respecting property in which the party seeking the accounting has an interest." For an LLC, that means membership status, a contractual right to an accounting under an operating agreement, or both.
But lawyers love to find exceptions to hard and fast rules. Enter the de facto merger doctrine. The appeals court started with a basic premise: "Generally, a corporation which acquires the assets of another is not liable for the torts of its predecessor." But, the Court continued:
[S]uch liability may arise if . . . there was a consolidation or merger of seller and purchaser, the purchaser corporation was a mere continuation of the seller corporation, or the transaction was entered into fraudulently to escape such obligations. Accordingly, a transaction structured as a purchase of assets may be deemed to fall within this exception as a de facto merger. [Citations omitted.]
The court identified four "hallmarks of a de facto merger":
continuity of ownership
cessation of ordinary business and dissolution of the predecessor entity
assumption by the successor entity of the liabilities ordinarily necessary for the uninterrupted continuation of the acquired entity's business; and
continuity of management, personnel, physical location, assets, and general business operation.
Applying these factors, the court concluded:
[I]n early 2012, [the Company]'s assets and employees were transferred to CINY, [the Company]'s business ceased, and CINY provided the services to the client hospitals that MRI LLC had previously performed. The equipment, assets, business operation, management, and some of the personnel remained unchanged. The forensic accountant who testified on behalf of the plaintiffs identified numerous transactions that were 'questionable' or 'highly unusual,' and others that were indicative of self-dealing. Most notably, [the Company] transferred an MRI scanner to CINY at a price significantly less than its fair market value. Accordingly, the Supreme Court's conclusion that in late 2012/early 2013 there was a de facto merger between [the Company] and CINY was supported by the record. Therefore, MRI Inc. was entitled to an accounting from CINY.
Room for Future Litigation
The de facto merger doctrine — like its cousin, the doctrine of veil piercing — is commonly used by a plaintiff to attempt to obtain a money judgment against an entity or individual owner closely related to the primary wrongdoer. Bonanni appears to be the first New York appellate decision to grant the non-monetary equitable remedy of an accounting against an entity in which the plaintiff lacked an ownership interest or fiduciary relationship based upon the de facto merger doctrine. It will be interesting to see if future litigants rely upon Bonanni to expand the de facto merger doctrine in business divorce cases to other kinds of non-monetary remedies, such as injunctive or declaratory remedies against the successor entity.
Another interesting feature of Bonanni – CINY was not a money judgment debtor. Article 52 of the New York Civil Practice Law and Rules governs enforcement of money judgments. It authorizes post-judgment asset discovery, including the issuance of subpoenas to third-parties who may have received assets transferred from a judgment debtor. By granting Bonanni and MRI Inc. an accounting of transactions involving a third-party transferee, the Court in effect ordered an accelerated form of post-judgment asset discovery. Perhaps other courts may eventually follow Bonnani's lead and order similar relief in the business divorce context.
Tags: accounting, Bonanni, Comprehensive Imaging of New York, Emerson, MRI Enterprises, standing
Summer Shorts: For-Cause Termination of LLC Member and Other Decisions of Interest
Disclosure of Estate Tax Stock Appraisals in Shareholder Disputes
Accounting Unchained: Is the Closely Held Business Owner's Right to an Accounting Absolute?
Decision in Dissenting Limited Partner Case Directs Fair Value Hearing, Grants Discovery
The High Price of Bungled Expert Disclosure in Valuation Cases
RSS LinkedIn
Business Divorce Roundtable Podcast
Topics Select Category Access to Books and Records Accountants/Experts Advancement and Indemnification Annual Top 10 Cases Arbitration and Mediation Attorney Disqualification Attorney's Fees Bankruptcy Buyout Capital Call Co-op Corporations Common Law Dissolution Compulsory Buyout Corporate Governance Deadlock Delaware Derivative Actions Discovery Dissenting Shareholder Appraisal Dissolution Basics Dissolution Defenses Dissolution Procedure Expulsion and Removal Fair Market Value vs. Fair Value Family-Owned Businesses Federal vs. State Court Foreign Business Entities Freeze-Out Merger Grounds for Dissolution Interim Remedies Interviews Limited Liability Partnerships Liquidation LLCs Not-For-Profit Corporations Operating Agreement Partnerships Phantom Income Podcast Episodes Professional Corporations Professional Service LLCs Receivership Restrictive Covenants RULLCA Settlement Standing Stock Dilution Stock Transfer Restrictions Summer Shorts Surcharge Uncategorized Valuation Valuation Discounts Winter Case Notes
Archives Select Month January 2021 December 2020 November 2020 October 2020 September 2020 August 2020 July 2020 June 2020 May 2020 April 2020 March 2020 February 2020 January 2020 December 2019 November 2019 October 2019 September 2019 August 2019 July 2019 June 2019 May 2019 April 2019 March 2019 February 2019 January 2019 December 2018 November 2018 October 2018 September 2018 August 2018 July 2018 June 2018 May 2018 April 2018 March 2018 February 2018 January 2018 December 2017 November 2017 October 2017 September 2017 August 2017 July 2017 June 2017 May 2017 April 2017 March 2017 February 2017 January 2017 December 2016 November 2016 October 2016 September 2016 August 2016 July 2016 June 2016 May 2016 April 2016 March 2016 February 2016 January 2016 December 2015 November 2015 October 2015 September 2015 August 2015 July 2015 June 2015 May 2015 April 2015 March 2015 February 2015 January 2015 December 2014 November 2014 October 2014 September 2014 August 2014 July 2014 June 2014 May 2014 April 2014 March 2014 February 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 February 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 April 2010 March 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007
Tweets by @PeterMahlerEsq
Groundbreaking Appellate Ruling Boosts LLC Cash-Out Mergers
The Duty to Disclose Third-Party Offers Amidst Buy-Out Negotiations, Revisited
The Injunction Remedy in Business Divorce Cases
Top 10 Business Divorce Cases of 2020
It Takes Two to Remove a Tiebreaker
All About eDiscovery
Business Law Basics
Cunningham on LLC Agreements
Delaware Corporate and Commercial Litigation
Federal Government Civil Litigation
Kentucky Business Entity Blog
Long Island Land Use & Zoning
N. Car. Business Litigation Report
NY Commercial Division Practice
NY Health Law
NY Trusts & Estates Litigation
NY Venture Hub
Tax Law for the Closely-Held Business
Winstead Business Divorce
Copyright © 2021, Farrell Fritz, P.C. All Rights Reserved.
Farrell Fritz, P.C. (main office): 400 RXR Plaza, Uniondale, NY 11556-3826 (516) 227-0700

redpajama_set_name: RedPajamaCommonCrawl


text:
NHL, NHLPA Declare a Truce, but the Battle May be Far From Over
The two sides have agreed to not renegotiate the CBA, but there's still an enormous elephant in the room - prorated salaries - that will have to be resolved if the NHL and its union want labor peace.
If multiple reports are to be believed, the NHL and the NHL Players' Association have worked out all of their monetary issues with respect to the collective bargaining agreement and all that's left to do now is to plan how the 2020-21 season is going to be played starting Jan. 13.
Not so fast, said one prominent NHL player agent. "That's not how I see it," Anton Thun told TheHockeyNews.com. "I think that perception is B.S. My reading of the situation is that each of the parties has essentially reverted back to the terms of the memorandum of understanding (MOU), which I don't see as the solution to the issues that have been discussed. It seems to me that, unfortunately, it appears to leave these issues unresolved."
In fact, the reality may very well be that nothing has been sorted out between the two sides when it comes to their economic stalemate and that they have basically gone back to their battle stations. No, there will be no increase in the 20 percent escrow to which the players agreed, nor will the players be required to defer any more than 10 percent of their salaries in 2020-21. That was all agreed upon in the extension of the CBA in the summer, yet the owners came back with an attempt to bump escrow for this season up to 25 percent and salary deferral to 26 percent.
But the fact that apparently won't happen doesn't prevent the NHL from pressing to prorate player salaries next season. Nor does it necessarily prevent the league from invoking a force majeure to try to get concessions from the players. And what you know of the NHL and how it operates, do you really think it is going to agree to a scheme in which the players play 68 percent of a full season (56 games) and are paid 100 percent of their salaries, less escrow and salary deferral (for a total of 72 percent)? In fact, I posed that precise question to NHL deputy commissioner Bill Daly in the following way: "In the league's talks with the NHLPA about this season, has it been firmly established that player salaries will not be prorated this season, despite the fact the schedule will be 56 games (68 percent of a normal season) and not 82? Does the league believe it has the right to prorate salaries for 2020-21? Have the two sides found common ground on this?"
Daly's reply: "I would rather not comment on this, at least until we have something to announce regarding the entirety of our plans for next season."
In fact, there are those who believe that the landscape changed, not because the NHL backed down from its original gambit to receive concessions from the players, but because of something that happened in the National Basketball Association recently. In late November and early December, the NBA went to the private markets to secure $900 million at discounted interest rates that it is distributing to each of its teams. So each team will receive $30 million from the league to cover pandemic-related costs and help make up for lost revenues. "In my opinion, the players got bolstered when the NBA found a solution that the NHL hasn't been talking about," Thun said.
So where does this leave everything? Well, probably back where it started. And it still has to do with the MOU, which both sides will say works in their favour. When asked whether not the NHLPA had received, in writing, assurances that the league would definitely not prorate salaries this season, a players' association spokesman replied, "The MOU sets forth the terms for the NHL and the PA."
The only problem is that MOU could be interpreted one way by the NHL and another way by the players. And that creates a number of elephants in the room. Can the league prorate salaries? And can it still use Paragraph 17 of the Standard Player's Contract or Article 5 of the CBA, both of which deal with the league's ability to cease or suspend play and dictate the terms of the season? The league would likely argue it can. And the players would claim the opposite is true.
Of course, it's also possible that the owners have thrown up their hands and want to get the season going and are content to have the players take more years to make up for lost revenues, but that flies in the face of the league's attempt to renegotiate in the first place. It actually seems that both sides are deliberately avoiding talking about this to avoid conflict. But it is going to arise sooner or later. For example, what happens if the league cuts the first paychecks to the players with prorated amounts? What will happen is the matter will fall to an arbitrator or the National Labor Relations Board.
"If the PA is correct in its interpretation of the MOU, they would have to argue to the NLRB or arbitrator that the players get 72 percent of their salaries, even if the season is only one game," said Richard Rodier, a lawyer who has consulted both for a prospective NHL owner and the NHLPA. "That would be a very difficult argument to make. I would be surprised if the NHL owners have agreed to that."
And the longer the players and owners go without addressing that elephant in the room, the bigger it's going to get.
nhlReturn to playCollective bargaining agreementNHLPA
Maple Leafs have Trio of Issues Creep Up in Loss to Senators
Three issues that became of a point of emphasis this summer for the Toronto Maple Leafs to correct were brought to the surface after their loss to the Ottawa Senators.
By David Alter


Classic Collection Holidays offer a variety of luxury hotels in Portugal. A country of sunshine, vineyards and good food, it provides the perfect escape from grey skies and chilly temperatures. With hotels spread along the length of the country, visitors can decide between the hot temperatures of the south, in regions such as the Algarve and Madeira, or the cooler temperatures of the north, in regions such as Porto and Douro Valley.
Fly out to the sub-tropical floating garden of Madeira. With a variety of hotels available you are sure to find a hotel which meets your needs, whether you a family looking for an all inclusive hotel or a couple looking for an adult only, golf or spa retreat.
For a cooler setting in the countryside, stay in one of the luxury hotels in the majestic region of Douro Valley. With rolling hills, steep sided valleys, locks, dams and lakes to explore, this region offers an idyllic romantic getaway for couples and an exciting adventure for families who wish to soak up the sun and explore the area.
The first property in Europe by the prestigious Anantara brand and boasting panoramic views over the beautiful fairways of one of Europe's best courses, Anantara Vilamoura Resort provides luxurious holidays to everyone who visits.


The Tivoli Resort - 2 marinas and a hotel complex set in the beautiful Algarve town of Portimão between Lagos and Faro with great friendly English speaking staff.
Lovely helpful staff! Good location and great facilities! Lots of nice things to do and places to go nearby.
Added by Linda Brown on 25/11/2018 11:08:48.
Last updated by Steve Neal on 23/12/2018 11:54:15.


text:
Can You Predict a Panic Attack?
A clinical psychologist breaks down how cognitive behavioral therapy alleviates panic attacks and disorders.
By Sara NovakOct 12, 2022 8:00 AM
(Credit: AstroStar/Shutterstock)
It can feel like you're having a heart attack: Your chest tightens, you have trouble catching your breath and nausea starts to take over. You might feel shaky or disoriented. Something's wrong — and the more you think about it, the worse the feeling becomes.
Each year, around 11 percent of Americans report having a panic attack, a sudden attack of fear that results in physical symptoms. Those who regularly experience them may also have a panic disorder, which includes the fear of having a panic attack and the resulting loss of control.
Read More: OCD, PTSD, Generalized Anxiety Disorder and More: What's the Difference?
But while panic attacks may seem unexpected, says Kevin Chapman, director of the Kentucky Center for Anxiety and Related Disorders, you can predict them. "One of the myths with panic attacks is that they occur 'out of the blue.' For the majority of people with panic disorders, they're not abrupt — most of us are just unaware of the triggers," he says.
Predicting an Attack
The three components of a panic attack — cognitive, physical and behavioral — can help us predict when one is brewing. The cognitive is what someone says to themself during an ongoing attack; the physical is how they feel about what's happening in the body; and the behavioral is how they react. "Most of the time, when people have a pattern of panic, they have learned associations that can be subtle but may set off a cascade effect," says Chapman.
For example, if your heart skips a beat or you feel that lump in your throat, it can kick the cognitive, physical and behavioral components into gear and cause the body to go into fight-or-flight mode. Since fighting isn't usually an option, says Chapman, most of us attempt to flee. That's why a panic disorder is often accompanied by agoraphobia, or the fear of being in crowded places. "We start to think 'here we go again' and it sends us into a cycle of panic," Chapman continues.
The research backs this up. A preprint study to be published in JMIR Medical Informatics found that wearable devices can ascertain the signals the body gives off before a panic attack. Study participants wore smartwatches that collected data on sleep patterns, heart rate, activity level, and anxiety and depression scores. Participants also regularly completed questionnaires over the course of a year. Using these indicators, researchers were able to predict a panic attack with up to 81.3 percent accuracy.
A 2016 study published in the journal PLOS ONE also used questionnaires to predict an attack. By asking questions like "In the last two weeks, did you have an anxiety attack or sudden feeling of panic?" researchers were able to discern with 74 percent accuracy who would have a panic attack in the future. And by knowing when they're coming on, you may be able to slow or stop a panic attack, says Chapman.
Stopping Panic Attacks
For starters, it's important to note that panic disorders run in families. "Children who have an anxious parent are roughly three to seven times more likely than a child of non-anxious parents to develop an anxiety disorder," says Chapman.
So, if you're a parent who suffers from anxiety, it's important to ensure that you're seeking the help you need and modeling that behavior in front of your children. "The gold standard when it comes to treating panic disorders is cognitive behavioral therapy," explains Chapman.
CBT involves teaching the patient that panic isn't going to kill them. Recognizing that a panic attack is harmless is the first step in reducing the cycle of attacks. Next, patients should start monitoring the occurrence of attacks in their own life. "Once you start monitoring them, you notice that they're not out of the blue and can be predicted based upon mood states," says Chapman.
Another important aspect of CBT is cognitive restructuring, or teaching the patient to "de-catastrophize their thoughts" and understand that, for example, "just because I'm having trouble breathing, I know I am not going to pass out."
The final aspect of the therapy is exposure, or having a person face their fear: Chapman has had some patients drink an espresso and then drive on the highway, putting themselves into the situation that causes an attack while helping to restructure their response. He notes, however, that it's extremely important to seek professional help before embarking on a CBT treatment such as this.
In short, dissecting a panic attack is part of predicting when it will happen and ultimately stopping the cycle. It's about teaching people that their worst thoughts and fears are unlikely to come true. "In the end, it's about understanding that your thoughts are hypothesis, not fact," Chapman says, "which allows us to be more rational in our responses."
Try These 6 Science-Backed Secrets to Happiness
How "Fitspiration" Social Posts Can Actually Discourage Exercise
4 Science-Backed Diets to Improve Your Health


text:
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public static class GUIUtils
{
    private static GameObject mainCanvas;

    public static Sprite CreateSprite(Texture2D texture)
    {
        if (texture == null)
            return null;

        return Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), Vector3.zero);
    }

    public static GameObject MainCanvas
    {
        get
        {
            if (mainCanvas == null)
            {
                var canvas = MonoBehaviour.FindObjectOfType<Canvas>();
                if (canvas != null)
                    mainCanvas = canvas.gameObject;
            }
            return mainCanvas;
        }
    }

    public static void SetCanvasToWorldSpace(Canvas canvas, Transform parent, float depth, float scale, float y = 0.0f)
    {
        canvas.renderMode = RenderMode.WorldSpace;
        canvas.worldCamera = Camera.main;
        var canvasTransform = canvas.GetComponent<RectTransform>();
        canvasTransform.SetParent(parent);

        var canvasScaler = canvas.GetComponent<CanvasScaler>();
        if (canvasScaler != null)
        {
            canvasTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, canvasScaler.referenceResolution.x);
            canvasTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, canvasScaler.referenceResolution.y);
        }

        canvasTransform.localPosition = new Vector3(0.0f, y, depth);
        canvasTransform.localRotation = Quaternion.identity;
        canvasTransform.localScale = new Vector3(scale, scale, scale);
    }

    /*
    public static Font Arial
    {
        get
        {
            if (_Arial == null)
            {
                _Arial = Resources.GetBuiltinResource<Font>("Arial.ttf");
            }

            return _Arial;
        }
    }

    public static Sprite backgroundImg
    {
        get
        {
            return TESUnity.TESManager.instance.UIBackgroundImg;
        }
    }
    public static Sprite checkmarkImg
    {
        get
        {
            return TESUnity.TESManager.instance.UICheckmarkImg;
        }
    }
    public static Sprite dropdownArrowImg
    {
        get
        {
            return TESUnity.TESManager.instance.UIDropdownArrowImg;
        }
    }
    public static Sprite inputFieldBackgroundImg
    {
        get
        {
            return TESUnity.TESManager.instance.UIInputFieldBackgroundImg;
        }
    }
    public static Sprite knobImg
    {
        get
        {
            return TESUnity.TESManager.instance.UIKnobImg;
        }
    }
    public static Sprite maskImg
    {
        get
        {
            return TESUnity.TESManager.instance.UIMaskImg;
        }
    }
    public static Sprite spriteImg
    {
        get
        {
            return TESUnity.TESManager.instance.UISpriteImg;
        }
    }
    */

    /*
    /// <summary>
    /// Create a canvas node.
    /// </summary>
    /// <param name="isMainCanvas">Indicates if this canvas will be the main canvas.</param>
    /// <returns>Returns the GameObject that contains the Canvas element.</returns>
    public static GameObject CreateCanvas(bool isMainCanvas = true)
    {
        var canvasGO = CreateUIObject("Canvas");
        var canvas = canvasGO.AddComponent<Canvas>();
        canvas.renderMode = RenderMode.ScreenSpaceOverlay;

        var scaler = canvasGO.AddComponent<CanvasScaler>();
        scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
        scaler.referenceResolution = new Vector2(1280, 720);
        scaler.matchWidthOrHeight = 1.0f;

        canvasGO.AddComponent<GraphicRaycaster>();

        if (isMainCanvas)
            mainCanvas = canvasGO;

        return canvasGO;
    }
    */

    /*
    public static GameObject CreateEventSystem()
    {
        if (EventSystem.current != null)
            return EventSystem.current.gameObject;

        var eventSystem = new GameObject("EventSystem");
        eventSystem.AddComponent<EventSystem>();
        eventSystem.AddComponent<StandaloneInputModule>();

        return eventSystem;
    }

    public static GameObject CreateText(string text, GameObject parent)
    {
        var textObject = CreateUIObject("Text", parent);
        textObject.AddComponent<CanvasRenderer>();

        var textComponent = textObject.AddComponent<Text>();
        textComponent.font = Arial;
        textComponent.text = text;
        textComponent.color = new Color32(50, 50, 50, 255);

        textObject.GetComponent<RectTransform>().sizeDelta = new Vector2(160, 30);

        return textObject;
    }
    public static GameObject CreateButton(GameObject parent)
    {
        var button = CreateUIObject("Button", parent);
        button.AddComponent<CanvasRenderer>();

        var buttonImage = button.AddComponent<Image>();
        buttonImage.sprite = spriteImg;
        buttonImage.type = Image.Type.Sliced;

        button.AddComponent<Button>();
        button.GetComponent<RectTransform>().sizeDelta = new Vector2(160, 30);

        return button;
    }
    public static GameObject CreateTextButton(string text, GameObject parent)
    {
        var button = CreateButton(parent);

        var textObj = CreateText(text, button);
        var textObjTransform = textObj.GetComponent<RectTransform>();
        textObjTransform.anchorMin = Vector2.zero;
        textObjTransform.anchorMax = Vector2.one;
        textObjTransform.offsetMin = Vector2.zero;
        textObjTransform.offsetMax = Vector2.zero;

        textObj.GetComponent<Text>().alignment = TextAnchor.MiddleCenter;

        return button;
    }

    public static GameObject CreateImage(Sprite sprite, GameObject parent, int width = 0, int height = 0)
    {
        var gameObject = CreateUIObject("Image", parent);
        gameObject.AddComponent<CanvasRenderer>();

        var image = gameObject.AddComponent<Image>();
        image.sprite = sprite;

        if (width > 0)
            image.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, width);

        if (height > 0)
            image.rectTransform.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, height);

        return gameObject;
    }
    public static GameObject CreateRawImage(Texture texture, GameObject parent)
    {
        var rawImage = CreateUIObject("Raw Image", parent);
        rawImage.AddComponent<CanvasRenderer>();
        rawImage.AddComponent<RawImage>().texture = texture;

        return rawImage;
    }*/

    /*
    public static GameObject CreatePanel(GameObject parent)
    {
        var panel = CreateUIObject("Panel", parent);
        panel.AddComponent<CanvasRenderer>();

        var image = panel.AddComponent<Image>();
        image.sprite = backgroundImg;
        image.type = Image.Type.Sliced;
        image.color = new Color32(255, 255, 255, 100);

        var transform = panel.GetComponent<RectTransform>();
        transform.anchorMin = Vector2.zero;
        transform.anchorMax = Vector2.one;
        transform.offsetMin = Vector2.zero;
        transform.offsetMax = Vector2.zero;

        return panel;
    }

    public static GameObject CreateScrollBar(Scrollbar.Direction direction, GameObject parent)
    {
        // Create the scroll bar object.
        var scrollBar = CreateUIObject("Scrollbar", parent);
        scrollBar.AddComponent<CanvasRenderer>();

        var isHorizontal = (direction == Scrollbar.Direction.LeftToRight) || (direction == Scrollbar.Direction.RightToLeft);
        float length = 160;
        scrollBar.GetComponent<RectTransform>().sizeDelta = isHorizontal ? new Vector2(length, 20) : new Vector2(20, length);

        var scrollBarImage = scrollBar.AddComponent<Image>();
        scrollBarImage.sprite = backgroundImg;
        scrollBarImage.type = Image.Type.Sliced;

        var scrollBarComponent = scrollBar.AddComponent<Scrollbar>();
        scrollBarComponent.direction = direction;

        // Create the sliding area.
        var slidingArea = CreateUIObject("Sliding Area", scrollBar);

        var slidingAreaRectTransform = slidingArea.GetComponent<RectTransform>();
        slidingAreaRectTransform.anchorMin = Vector2.zero;
        slidingAreaRectTransform.anchorMax = Vector2.one;
        slidingAreaRectTransform.offsetMin = new Vector2(10, 10);
        slidingAreaRectTransform.offsetMax = new Vector2(-10, -10);

        // Create the handle.
        var handle = CreateUIObject("Handle", slidingArea);
        handle.AddComponent<CanvasRenderer>();

        var handleImage = handle.AddComponent<Image>();
        handleImage.sprite = spriteImg;
        handleImage.type = Image.Type.Sliced;

        var handleRectTransform = handle.GetComponent<RectTransform>();
        handleRectTransform.offsetMin = new Vector2(-10, -10);
        handleRectTransform.offsetMax = new Vector2(10, 10);

        // Link everything together.
        scrollBarComponent.handleRect = handle.GetComponent<RectTransform>();
        scrollBarComponent.targetGraphic = handle.GetComponent<Image>();

        return scrollBar;
    }
    public static GameObject CreateHorizontalScrollBar(GameObject parent)
    {
        return CreateScrollBar(Scrollbar.Direction.LeftToRight, parent);
    }
    public static GameObject CreateVerticalScrollBar(GameObject parent)
    {
        return CreateScrollBar(Scrollbar.Direction.BottomToTop, parent);
    }

    public static GameObject CreateScrollView(GameObject parent)
    {
        // Create the scroll view.
        var scrollView = CreateUIObject("Scroll View", parent);
        var scrollViewScrollRect = scrollView.AddComponent<ScrollRect>();
        scrollView.AddComponent<CanvasRenderer>();

        var scrollViewImage = scrollView.AddComponent<Image>();
        scrollViewImage.sprite = backgroundImg;
        scrollViewImage.type = Image.Type.Sliced;
        scrollViewImage.color = new Color32(255, 255, 255, 100);

        var scrollViewTransform = scrollView.GetComponent<RectTransform>();
        scrollViewTransform.sizeDelta = new Vector2(200, 200);

        // Create the viewport.
        var viewport = CreateUIObject("Viewport", scrollView);
        viewport.AddComponent<Mask>().showMaskGraphic = false;

        var viewportImage = viewport.AddComponent<Image>();
        viewportImage.sprite = maskImg;
        viewportImage.type = Image.Type.Sliced;

        var viewportRectTransform = viewport.GetComponent<RectTransform>();
        viewportRectTransform.pivot = Vector2.up;

        // Create the content container.
        var content = CreateUIObject("Content", viewport);
        var contentRectTransform = content.GetComponent<RectTransform>();
        contentRectTransform.anchorMin = Vector2.up;
        contentRectTransform.anchorMax = Vector2.one;
        contentRectTransform.pivot = Vector2.up;
        contentRectTransform.sizeDelta = new Vector2(0, 300);

        // Create the scroll bars.
        var horizontalScrollBar = CreateHorizontalScrollBar(scrollView);
        horizontalScrollBar.name = "Scrollbar Horizontal";

        var horizontalScrollBarTransform = horizontalScrollBar.GetComponent<RectTransform>();
        horizontalScrollBarTransform.anchorMin = Vector2.zero;
        horizontalScrollBarTransform.anchorMax = Vector2.right;
        horizontalScrollBarTransform.pivot = Vector2.zero;

        var verticalScrollBar = CreateVerticalScrollBar(scrollView);
        verticalScrollBar.name = "Scrollbar Vertical";

        var verticalScrollBarTransform = verticalScrollBar.GetComponent<RectTransform>();
        verticalScrollBarTransform.anchorMin = Vector2.right;
        verticalScrollBarTransform.anchorMax = Vector2.one;
        verticalScrollBarTransform.pivot = Vector2.one;

        // Link everything together.
        scrollViewScrollRect.viewport = viewport.GetComponent<RectTransform>();
        scrollViewScrollRect.content = content.GetComponent<RectTransform>();

        scrollViewScrollRect.horizontalScrollbar = horizontalScrollBar.GetComponent<Scrollbar>();
        scrollViewScrollRect.horizontalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
        scrollViewScrollRect.horizontalScrollbarSpacing = -3;

        scrollViewScrollRect.verticalScrollbar = verticalScrollBar.GetComponent<Scrollbar>();
        scrollViewScrollRect.verticalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport;
        scrollViewScrollRect.verticalScrollbarSpacing = -3;

        return scrollView;
    }

    public static void AddToScrollView(GameObject UIObject)
    {
        UIObject.transform.SetParent(UIObject.transform, false);
    }
    public static GameObject GetScrollViewContent(GameObject scrollView)
    {
        return scrollView.transform.Find("Viewport/Content").gameObject;
    }

    public static GameObject CreateDropdown(GameObject parent)
    {
        // Create the dropdown object.
        var dropdown = CreateUIObject("Dropdown", parent);
        dropdown.AddComponent<CanvasRenderer>();

        var image = dropdown.AddComponent<Image>();
        image.sprite = spriteImg;
        image.type = Image.Type.Sliced;

        var dropdownComponent = dropdown.AddComponent<Dropdown>();
        dropdownComponent.targetGraphic = image;

        dropdownComponent.options = new System.Collections.Generic.List<Dropdown.OptionData>();
        dropdownComponent.options.Add(new Dropdown.OptionData("Option A"));
        dropdownComponent.options.Add(new Dropdown.OptionData("Option B"));
        dropdownComponent.options.Add(new Dropdown.OptionData("Option C"));

        dropdown.GetComponent<RectTransform>().sizeDelta = new Vector2(160, 30);

        // Create the label.
        var label = CreateText("", dropdown);
        label.name = "Label";

        var labelTransform = label.GetComponent<RectTransform>();
        labelTransform.anchorMin = Vector2.zero;
        labelTransform.anchorMax = Vector2.one;
        labelTransform.offsetMin = new Vector2(10, 6);
        labelTransform.offsetMax = new Vector2(-25, -7);

        label.GetComponent<Text>().alignment = TextAnchor.MiddleLeft;

        // Create the arrow.
        var arrow = CreateImage(dropdownArrowImg, dropdown);
        arrow.name = "Arrow";

        var arrowTransform = arrow.GetComponent<RectTransform>();
        arrowTransform.anchorMin = new Vector2(1, 0.5f);
        arrowTransform.anchorMax = new Vector2(1, 0.5f);
        arrowTransform.anchoredPosition = new Vector2(-15, 0);
        arrowTransform.sizeDelta = new Vector2(20, 20);

        // Create the scroll view.
        var scrollView = CreateScrollView(dropdown);
        scrollView.name = "Template";

        var scrollViewTransform = scrollView.GetComponent<RectTransform>();
        scrollViewTransform.anchorMin = Vector2.zero;
        scrollViewTransform.anchorMax = new Vector2(1, 0);
        scrollViewTransform.pivot = new Vector2(0.5f, 1);
        scrollViewTransform.offsetMin = Vector2.zero;
        scrollViewTransform.anchoredPosition = new Vector2(0, 2);
        scrollViewTransform.sizeDelta = new Vector2(0, 150);

        var scrollViewImage = scrollView.GetComponent<Image>();
        scrollViewImage.sprite = spriteImg;
        scrollViewImage.color = new Color32(255, 255, 255, 255);

        var scrollViewScrollRect = scrollView.GetComponent<ScrollRect>();
        scrollViewScrollRect.horizontal = false;
        scrollViewScrollRect.movementType = ScrollRect.MovementType.Clamped;

        var scrollViewContent = GetScrollViewContent(scrollView);
        var scrollViewContentTransform = scrollViewContent.GetComponent<RectTransform>();
        scrollViewContentTransform.sizeDelta = new Vector2(0, 28);
        scrollViewContentTransform.pivot = new Vector2(0.5f, 1);

        scrollView.SetActive(false);

        // Create the dropdown item.
        var item = CreateDropdownItem("Option A", GetScrollViewContent(scrollView));

        // Link everything together.
        dropdownComponent.template = scrollView.GetComponent<RectTransform>();
        dropdownComponent.captionText = label.GetComponent<Text>();
        dropdownComponent.itemText = item.transform.Find("Item Label").gameObject.GetComponent<Text>();

        return dropdown;
    }
    public static GameObject CreateDropdownItem(string text, GameObject parent)
    {
        // Create the item object.
        var item = CreateUIObject("Item", parent);

        var itemTransform = item.GetComponent<RectTransform>();
        itemTransform.anchorMin = new Vector2(0, 0.5f);
        itemTransform.anchorMax = new Vector2(1, 0.5f);
        itemTransform.offsetMin = Vector2.zero;
        itemTransform.offsetMax = Vector2.zero;
        itemTransform.sizeDelta = new Vector2(0, 20);

        var itemToggle = item.AddComponent<Toggle>();

        // Create the item background.
        var itemBackground = CreateImage(null, item);
        itemBackground.name = "Item Background";

        var itemBackgroundTransform = itemBackground.GetComponent<RectTransform>();
        itemBackgroundTransform.anchorMin = Vector2.zero;
        itemBackgroundTransform.anchorMax = Vector2.one;
        itemBackgroundTransform.offsetMin = Vector2.zero;
        itemBackgroundTransform.offsetMax = Vector2.zero;

        // Create the item checkmark.
        var itemCheckmark = CreateImage(checkmarkImg, item);
        itemCheckmark.name = "Item Checkmark";

        var itemCheckmarkTransform = itemCheckmark.GetComponent<RectTransform>();
        itemCheckmarkTransform.anchorMin = new Vector2(0, 0.5f);
        itemCheckmarkTransform.anchorMax = new Vector2(0, 0.5f);
        itemCheckmarkTransform.sizeDelta = new Vector2(20, 20);
        itemCheckmarkTransform.anchoredPosition = new Vector2(10, 0);

        // Create the item label.
        var itemLabel = CreateText(text, item);
        itemLabel.name = "Item Label";

        var itemLabelTransform = itemLabel.GetComponent<RectTransform>();
        itemLabelTransform.anchorMin = Vector2.zero;
        itemLabelTransform.anchorMax = Vector2.one;
        itemLabelTransform.offsetMin = new Vector2(20, 1);
        itemLabelTransform.offsetMax = new Vector2(-10, -2);

        itemLabel.GetComponent<Text>().alignment = TextAnchor.MiddleLeft;

        // Link everything together.
        itemToggle.targetGraphic = itemBackground.GetComponent<Image>();
        itemToggle.graphic = itemCheckmark.GetComponent<Image>();
        itemToggle.isOn = true;

        return item;
    }

    public static GameObject CreateInputField(string value, Vector3 position, Vector2 size, GameObject parent)
    {
        var inputField = CreateUIObject("Input Field", parent);

        var inputFieldTransform = inputField.GetComponent<RectTransform>();
        inputFieldTransform.anchoredPosition = position;
        inputFieldTransform.sizeDelta = size;

        inputField.AddComponent<CanvasRenderer>();

        var inputFieldImage = inputField.AddComponent<Image>();
        inputFieldImage.sprite = inputFieldBackgroundImg;
        inputFieldImage.type = Image.Type.Sliced;

        var inputFieldComponent = inputField.AddComponent<InputField>();

        // Create the caret.
        var caret = CreateUIObject("Input Caret", inputField);
        caret.AddComponent<CanvasRenderer>();
        caret.AddComponent<LayoutElement>().ignoreLayout = true;

        var caretTransform = caret.GetComponent<RectTransform>();
        caretTransform.anchorMin = Vector2.zero;
        caretTransform.anchorMax = Vector2.one;
        caretTransform.offsetMin = new Vector2(10, 6);
        caretTransform.offsetMax = new Vector2(-10, -7);

        // Create the placeholder text.
        var placeholderText = CreateText("Enter text...", inputField);
        placeholderText.name = "Placeholder";

        var placeholderTextTransform = placeholderText.GetComponent<RectTransform>();
        placeholderTextTransform.anchorMin = Vector2.zero;
        placeholderTextTransform.anchorMax = Vector2.one;
        placeholderTextTransform.offsetMin = new Vector2(10, 6);
        placeholderTextTransform.offsetMax = new Vector2(-10, -7);

        var placeholderTextTextComponent = placeholderText.GetComponent<Text>();
        placeholderTextTextComponent.fontStyle = FontStyle.Italic;
        placeholderTextTextComponent.color = new Color32(50, 50, 50, 128);

        // Create the text.
        var text = CreateText("", inputField);

        var textTextTransform = text.GetComponent<RectTransform>();
        textTextTransform.anchorMin = Vector2.zero;
        textTextTransform.anchorMax = Vector2.one;
        textTextTransform.offsetMin = new Vector2(10, 6);
        textTextTransform.offsetMax = new Vector2(-10, -7);

        var textTextComponent = text.GetComponent<Text>();
        textTextComponent.supportRichText = false;

        // Link everything together.
        inputFieldComponent.textComponent = textTextComponent;
        inputFieldComponent.placeholder = placeholderTextTextComponent;
        inputFieldComponent.text = value;

        return inputField;
    }

    public static GameObject CreateSlider(GameObject parent)
    {
        var slider = CreateUIObject("Slider", parent);
        slider.GetComponent<RectTransform>().sizeDelta = new Vector2(160, 20);
        var sliderComponent = slider.AddComponent<Slider>();

        // Create the background.
        var background = CreateImage(backgroundImg, slider);
        background.name = "Background";

        var backgroundTransform = background.GetComponent<RectTransform>();
        backgroundTransform.anchorMin = new Vector2(0, 0.25f);
        backgroundTransform.anchorMax = new Vector2(1, 0.75f);
        backgroundTransform.offsetMin = Vector2.zero;
        backgroundTransform.offsetMax = Vector2.zero;

        background.GetComponent<Image>().type = Image.Type.Sliced;

        // Create the fill area.
        var fillArea = CreateUIObject("Fill Area", slider);

        var fillAreaTransform = fillArea.GetComponent<RectTransform>();
        fillAreaTransform.anchorMin = new Vector2(0, 0.25f);
        fillAreaTransform.anchorMax = new Vector2(1, 0.75f);
        fillAreaTransform.offsetMin = new Vector2(5, 0);
        fillAreaTransform.offsetMax = new Vector2(-15, 0);

        // Create the fill.
        var fill = CreateImage(spriteImg, fillArea);
        fill.name = "Fill";

        var fillTransform = fill.GetComponent<RectTransform>();
        fillTransform.anchoredPosition = Vector2.zero;
        fillTransform.offsetMin = Vector2.zero;
        fillTransform.offsetMax = Vector2.zero;
        fillTransform.sizeDelta = new Vector2(10, 0);

        fill.GetComponent<Image>().type = Image.Type.Sliced;

        // Create the handle slide area.
        var handleSlideArea = CreateUIObject("Handle Slide Area", slider);

        var handleSlideAreaTransform = handleSlideArea.GetComponent<RectTransform>();
        handleSlideAreaTransform.anchorMin = Vector2.zero;
        handleSlideAreaTransform.anchorMax = Vector2.one;
        handleSlideAreaTransform.offsetMin = new Vector2(10, 0);
        handleSlideAreaTransform.offsetMax = new Vector2(-10, 0);

        // Create the handle.
        var handle = CreateImage(knobImg, handleSlideArea);
        handle.name = "Handle";

        var handleTransform = handle.GetComponent<RectTransform>();
        handleTransform.anchoredPosition = Vector2.zero;
        handleTransform.offsetMin = Vector2.zero;
        handleTransform.offsetMax = Vector2.zero;
        handleTransform.sizeDelta = new Vector2(20, 0);

        // Link everything together.
        sliderComponent.targetGraphic = handle.GetComponent<Image>();
        sliderComponent.fillRect = fill.GetComponent<RectTransform>();
        sliderComponent.handleRect = handle.GetComponent<RectTransform>();

        return slider;
    }

    public static GameObject CreateToggle(string labelContent, GameObject parent)
    {
        var toggle = CreateUIObject("Toggle", parent);
        toggle.GetComponent<RectTransform>().sizeDelta = new Vector2(160, 20);

        var toggleComponent = toggle.AddComponent<Toggle>();
        toggleComponent.isOn = true;

        // Create the background.
        var background = CreateImage(spriteImg, toggle);
        background.name = "Background";

        var backgroundTransform = background.GetComponent<RectTransform>();
        backgroundTransform.sizeDelta = new Vector2(20, 20);
        backgroundTransform.anchorMin = new Vector2(0, 1);
        backgroundTransform.anchorMax = new Vector2(0, 1);
        backgroundTransform.anchoredPosition = new Vector2(10, -10);

        background.GetComponent<Image>().type = Image.Type.Sliced;

        // Create the checkmark.
        var checkmark = CreateImage(checkmarkImg, background);
        checkmark.name = "Checkmark";

        checkmark.GetComponent<RectTransform>().sizeDelta = new Vector2(20, 20);

        // Create the label.
        var label = CreateText(labelContent, toggle);
        label.name = "Label";

        var labelTransform = label.GetComponent<RectTransform>();
        labelTransform.anchorMin = Vector2.zero;
        labelTransform.anchorMax = Vector2.one;
        labelTransform.offsetMin = new Vector2(23, 1);
        labelTransform.offsetMax = new Vector2(-5, -2);

        // Link everything together.
        toggleComponent.targetGraphic = background.GetComponent<Image>();
        toggleComponent.graphic = checkmark.GetComponent<Image>();

        return toggle;
    }

    private static Font _Arial;

    private static GameObject CreateUIObject(string name, GameObject parent = null)
    {
        var UIObject = new GameObject(name);
        UIObject.layer = LayerMask.NameToLayer("UI");
        UIObject.AddComponent<RectTransform>();

        if (parent != null)
        {
            UIObject.transform.SetParent(parent.transform, false);
        }

        return UIObject;
    }*/
}

redpajama_set_name: RedPajamaGithub