Mock Magic · Use case

Generate names and text at runtime

Create names, usernames, emails, addresses, lorem ipsum, reviews and terminal-style phrases at runtime, and know when a dedicated name generator fits better.

Robert WetzoldPublished 5 min read

Mock Magic Generator in Stable mode with seed 2026: the Values workspace with the data type list filtered by name, Name selected, and ten generated full names, each with a Copy button

Games and apps need throwaway text in more places than expected: name tags above NPCs, a lobby full of players, a fake inbox, a terminal that scrolls technical nonsense behind the hero. Mock Magic generates each of these with one call at runtime, through a static API with no Editor dependency. This page shows what those calls return, how big the pools behind them are, and when a dedicated name generator is the better tool.

Names

string name = Mock.Name(); // first and last name
string title = Mock.Honorific(); // Mr., Dr., Capt. and 11 more
string[] crowd = Mock.Names(30);
MockPerson person = MockPerson.New(); // e-mail and username built from the same name
Debug.Log($"{person.FullName} <{person.Email}> @{person.Username}");

Mock.Name() joins a random first name and a random last name, and FirstName() and LastName() return the parts. The names come from many regions and include accents, hyphens and multi-word last names, so Lucía de la Cruz and Min-jun van den Berg turn up next to Emma Rossi, a good test for fonts, sorting and truncation. Honorific() draws from 14 titles, from Mr. and Ms. to Capt. and Gen. Neither names nor titles carry a gender, so combining them can produce “Mr. Emma Rossi”; keep your own lists when that matters. MockPerson.New() builds a whole person around one name: Email and Username are derived from it, next to a phone number, a US address, company and job title.

Usernames and e-mail addresses

Mock.Username() puts one of 24 prefixes such as swift, lucky or clever in front of a first name and a number from 1 to 998, so handles like luckymateo417 are 6 to 20 characters long. Mock.Email() draws its own first and last name, joins them with or without a dot, adds a number from 1 to 99 about three times in ten and picks one of 25 mail provider domains such as gmail.com, outlook.com or protonmail.com.

Both fold names to lowercase ASCII: accents lose their marks, ß becomes ss, and apostrophes, hyphens and spaces disappear, so José de la Cruz becomes jose.delacruz@gmail.com. Every address passes an ASCII-only validator, so add internationalized ones such as müller@example.de by hand if your form must accept them. The name inside Mock.Email() is unrelated to a separate Mock.Name() call; use MockPerson when they must match.

Because those domains belong to real providers, swap in the reserved example.com domain for anything public, such as store screenshots:

MockPerson person = MockPerson.New();
string email = person.Email.Split('@')[0] + "@example.com"; // keeps the ASCII name part

MockPerson itself uses generated domains such as cloudpulse.io, which can still match real websites.

Cities, countries and addresses

Mock.City() picks from 50 cities, 20 in the US and 30 elsewhere, Mock.Country() from 50 countries and Mock.State() from the 50 US states, each on its own, so a city and a state drawn separately rarely belong together. Mock.FullAddress() keeps them together: it combines a street from 40 street names with one of 72 US cities, at least one per state, that city’s state and a ZIP code with the city’s own three-digit prefix, as in 1234 Oak Ave, Seattle, WA 98101. Mock.ZipCode() uses the same prefixes, and MockPerson fills its city, state and ZIP code the same way and always lists the United States as its country. The street itself is invented, so an address will not resolve on a map.

Mock.Phone() returns North American numbers in the form +1 (###) ###-####. Area codes and exchanges start with 2 to 9 and never end in 11, so service codes such as 911 do not appear. Addresses, ZIP codes and phone numbers are US-only; there is no setting for other countries.

Filler text

string blurb = Mock.LoremIpsum(20); // 20 random words, no capital, no period
string line = Mock.Sentence(3, 8); // 3 to 8 words, capitalized, with a period
string body = Mock.Paragraph(4); // four sentences of 5 to 15 words each
string review = Mock.Review(); // Great value for the price. Shipping was fast.
  • Word() and LoremIpsum(wordCount) draw from 80 classic lorem ipsum words, 2 to 13 letters long, in random order. There is no capital letter, no period and no fixed opening, and the default length is 50 words.
  • Sentence(minWords, maxWords) capitalizes the first letter and adds a period, with 5 to 15 words by default.
  • Paragraph(sentenceCount) joins default-length sentences, five unless you pass another count.
  • Review(minWords, maxWords) is readable English: an opener and a reason, followed by short remarks until the minimum length is reached, for 8 to 17 words with the defaults. It draws from 16 openers, 11 reasons and 10 remarks, so a long list of reviews will repeat itself.

Terminal and hacker phrases

Mock.HackerPhrase() fills one of five sentence templates from 24 tech adjectives, 24 nouns and 18 verbs, in the style of movie computer jargon:

Use the encrypted firewall, then you can parse the quantum matrix!

Every phrase starts with a capital letter and ends with an exclamation mark, which suits a dramatic dialogue line more than a log. For a scrolling terminal, the building blocks are often more useful. HackerAdjective(), HackerNoun(), HackerVerb() and HackerIngVerb() combine with times, IP addresses and hashes into log lines:

string log = $"[{Mock.Time()}] {Mock.IpAddress()} {Mock.HackerIngVerb()} {Mock.HackerNoun()} {Mock.Hash(8)}";
// [03:14:07] 182.33.7.201 rebooting firewall 9f3a1c0e

Picking from your own lists

When the built-in pools do not fit, your own lists work with the same seeded generator:

string faction = Mock.Pick("Ironclad", "Verdant", "Ashborn");
string greeting = Mock.PickWeighted((5f, "Hello"), (3f, "Hey"), (1f, "Well met, traveler"));
Biome biome = Mock.Enum<Biome>();
string[] squad = Mock.Subset(new[] { "Vex", "Orla", "Tamsin", "Brick", "Juno" }, 3); // three different names
List<string> crew = new List<string> { "Vex", "Orla", "Tamsin", "Brick" };
string pilot = crew.PickRandom();
crew.Shuffle();

PickWeighted weights do not need to add up to 1, Enum<T>() works with any enum, and Subset(array, count) returns distinct items. All of them repeat after Mock.Seed(int), which also re-seeds UnityEngine.Random. To turn a list into a {{token}} for templates, see templates and custom data types.

How big the pools are

The pools are inline arrays. That keeps the package light and the output predictable, but repeats come sooner than you might expect:

PoolEntries
First names431 from many regions, 17 with accents such as Lucía and José, 6 hyphenated such as Min-jun
Last names489, 16 with accents such as Núñez and Müller, 6 multi-word such as de la Cruz, 3 with an apostrophe such as O’Connor
Full names210,759 combinations
Cities for Mock.City()50, 20 of them in the US
US cities for addresses72, at least one per state
Countries, US states50 each
Street names40
Lorem ipsum words80
E-mail domains25
Username prefixes24
Honorifics14

The birthday problem still applies. In a group of 25, the chance that two people share a first name is about 50 percent, and at 50 it is 95 percent. Full names last much longer: 200 NPCs have a 9 percent chance of one duplicate, a crowd of 541 an even chance, and 1,000 NPCs a 91 percent chance. When names must be unique, draw until a HashSet accepts the name:

HashSet<string> used = new HashSet<string>();
string[] npcs = new string[1000];
for (int i = 0; i < npcs.Length; i++)
{
string candidate;
do candidate = Mock.Name(); while (!used.Add(candidate));
npcs[i] = candidate;
}

This works as long as you need far fewer names than the 210,759 combinations. Pair the names with Mock.Seed(int) and the same 1,000 NPCs come back on every run.

When a dedicated name generator fits better

Mock Magic’s names are made for test and placeholder data, next to e-mail addresses, prices, chart series and exports that all repeat from one seed. When players will read the names as part of your world, a dedicated generator usually fits better:

  • Fantasy, sci-fi and gamer tags. Random Generator 2.0 bundles 124 generators, including fantasy races and 19 cultural name sets.
  • Names that fit a culture. NameFactory produces culture-aware names for 198 countries.
  • Sheer volume. Character Name Generator ships 61,896 given names and 158,024 family names.

The comparison of random and name generator assets covers prices and trade-offs. For other locales inside Mock Magic’s own templates, a token can call Bogus, as shown in templates and custom data types, and the Simple Data page of the manual lists every type the Generator offers.

Frequently asked questions

How do I generate a random name in Unity?

With Mock Magic imported, call Mock.Name() for a first and last name, Mock.Names(30) for a batch, or MockPerson.New() for a person whose e-mail address and username match the name. Call Mock.Seed(int) first when the names must repeat.

How many different names can Mock Magic generate?

It combines 431 first names with 489 last names, which gives 210,759 full names. First names still repeat quickly: in a group of 25 people, the chance that two share a first name is about one in two.

Does Mock Magic generate fantasy or non-English names?

It has no fantasy names. Its names come from many regions and include accented, hyphenated and multi-word names, but you cannot ask for names from one culture. Register your own token with name lists, or use a dedicated name generator asset for fantasy and culture-specific names.

Is the lorem ipsum the classic Lorem ipsum dolor sit amet text?

It uses the familiar words but draws them at random from a pool of 80, so the text does not start with the classic opening. Sentence and Paragraph add capital letters and periods.

Mock Magic

Realistic fake data for Unity, from one value to a live stream.