Fix Missing Materials in Blender FBX Exports to Unity

There’s a bug in the FBX exporter for Blender 3.x (and now 4.x) that doesn’t export materials on instanced meshes. While the original mesh imports into Unity just fine (and remaps materials correctly under the importer’s Materials tab) duplicate instances of the same mesh import with only the default Lit material. If you’re (perhaps oldschool) like me, and use a lot of instancing to save disk space, this is a problem.

Here’s a Unity Editor script to fix things: FBXFixerScripts.zip

It supports Undo, regular and skinned meshes, and will walk down the hierarchy as far as it needs to. Can take a few seconds to grind through big hierarchies. Works on my ultra-complex Lighthouse prefab, and all the others I’ve thus far thrown at it. If you find a bug, let me know!

Here’s how to use it:

  1. Download & unzip the files.
  2. Add FixFBXImportMatsUI.cs to your project’s Editor folder. (If your project doesn’t currently have one, add a folder named “Editor” to your Assets folder.)
  3. Add FixFBXImportMats.cs to your project, wherever makes the most sense.
  4. After importing an FBX with missing Materials, open the Prefab or drag it into a Scene, and add a FixFBXImportMats Component to the root of the import’s hierarchy.
  5. Assign the Default Material you need replaced to the Component’s slot.
    • The default Material will vary depending on your render pipeline and import settings.
    • If using URP, it’s usually the Lit material, located in Packages: Universal RP: Runtime: Materials.
    • A quick way to find it is the select an instanced mesh in the hierarchy, and click on the Material shown in the Editor.
  6. Leave Clean Up After checked to have the Component remove itself after running.
  7. Click Fix Materials.

Board Game: Fair Verona (v0.1)

If you have a chess board, you can play chess or checkers. If you have a deck of cards, you can play any number of games. But if you have a Carcassonne set, you can only play Carcassonne. As every modern geek has one, I thought we needed another game to play with it.

You play the aunts and uncles of the polymath Verona in the dangerous and romantic city states of classical Italy. Verona is brilliant, scatter-brained, obsessive, creative, charming, a magnet for trouble–and all of 17 years old. Having promised her dearly-departed parents to look after her, it’s up to you to do the legwork of the latest mystery she’s stumbled upon.

Objective

Four players cooperate to build a board of Carcassonne tiles while trying to locate and return Clue Tokens to the starting tile. Card value based Encounters hinder you and advance the game.

You Will Need

  • A Carcassonne Game (including the standard River expansion)
  • A standard deck of playing cards

Setup

Shuffle the deck of cards, including the two jokers. Find the “all city” Carcassonne tile–the Old Town, where Verona lives–and place it in the center of your play surface. Deal each player an Identity card face up. Each player selects a meeple color, placing one of that color on the starting tile, and one on their Identity card. Deal one additional card–the Clue Card–face-up beside the deck, and put a meeple of the unused color atop it as a Clue Token. Randomize the remainder of the normal Carcassonne tiles and set them aside. Randomize the River tiles, and prepare to start with them.

  • Easy Game: Put out 5 more Clue Tokens, for a total of 6. Deal each player 2 more cards, sight-unseen, to be placed beneath their Identity Card–these are their first two Friend cards. (Explained below.)
  • Medium Game: Put out 6 more Clue Tokens, for a total of 7. Deal each player 1 Friend card.
  • Hard Game: Put out 7 more Clue Tokens, for a total of 8. Deal no starting Friend cards.

The Identity Card

Each card in play represents a unique person. Your Identity card is your player character. The face value represents a person’s role in the social hierarchy, from the cutpurse and con artist (2-3) through the city leaders and geniuses (J, Q, K, A).

Card suits represent specialties:

  • Spades: Alchemy, painting, invention, dance, poetry.
  • Clubs: The sword, the lance, the grapple, the fist.
  • Diamonds: Gold, debt, silver, ships at sea.
  • Hearts: Love, family, desire, comradery.

Play

Play proceeds clockwise from the dealer. Each turn has three phases:

  1. Tile Placement
  2. Encounter Clearing
  3. Movement

Tile Placement

At the beginning of a turn, the player always attempts to place a tile–either a face down tile, or an unplayed (face-up) tile. Tile placement rules are identical to normal Carcassonne (including the need to start with the River tiles) except for one major change: A tile must be placed on a space adjacent to the one your meeple currently occupies, horizontally, vertically, or along a diagonal.

If you place a tile with a shield (pennant), or complete a city, you have made a Friend. Draw a card from the deck and place it beneath your Identity card, sight-unseen. (Note that you don’t make a Friend from drawing a shield tile, only from playing it!)

If a tile can be played, it must be. You may not select a face-up tile that can not be played, but nothing requires you to select a playable tile if face-down tiles remain.

If a tile can not be played, it is placed face-up beside your Identity card, and an Encounter is triggered for the next player: Draw a card from the deck and hand it to the next player.


Encounters

Danger and intrigue are ever present! Clearing Encounters is the second phase of a turn. When dealt an Encounter card, place it above your Identity card. You may not move until all your Encounters have been cleared. If you are on the same tile as a player with an Encounter card, you may help clear one of theirs. You clear an Encounter by bringing to bear a higher total value than the Encounter card itself.

You determine your total strength (value) in an Encounter as follows:

  • Your Identity card’s face value
    • Plus or minus any Distance Bonus
    • Times any Suit Multiplier
  • Plus any other player on the same tile’s face value
    • Plus or minus any Distance Bonus of theirs
    • Times any Suit Multiplier of theirs
  • Plus the face value of a Friend card, if you choose to play one
Distance Bonus

The wealthy and famous are at their strongest in the Old Town, while the lower classes are better out in the hinterlands. To find your Distance Bonus, count your current distance from Verona, either horizontally or vertically (whichever is greater).

  • Face Cards and Aces: Your value drops by 1 per tile away from Verona. For example:
    • A Queen 3 tiles north [and 1 tile east] of Verona is worth 9.
      • Queen minus 3 = J… 10… 9.
    • An Ace [2 tiles south and] 6 tiles east of Verona is worth 8.
      • Ace minus 6 = K… Q… J… 10… 9… 8.
  • Number Cards: Your value grows by 1 per tile away from Verona beyond your face value–in practice, this means your value is the greater of your face value or your distance from Verona. For example:
    • A Two 7 tiles south [and 6 tiles east] of Verona is worth 7.
    • An Eight [3 tiles south and] 9 tiles east of Verona is worth 9.
    • A Five 2 tiles north [and 1 tile west] of Verona is still worth 5.
Suit Multiplier

Your Identity card’s suit is your specialty. In an Encounter against the same suit, your face value (plus or minus any Distance Bonus) is doubled. For example:

  • A 7♦ can not clear an Encounter with a Q♠.
    • 7 (♦) is not greater than Q (♠).
  • A 10♥ can not clear an Encounter with a 10♣.
    • 10 (♥) is not greater than 10 (♣).
  • A 4♠ can clear an encounter with a 7♠.
    • 4♠ times 2 = 8(♠). 8 (♠) is greater than 7 (♠).
Friends

In an Encounter, you may optionally call on a Friend if you have one available. Turn one of your Friend cards over, and add its value to your Encounter. (Your friend gets no Bonuses or Multipliers). Regardless of whether it helps you clear the Encounter or not, the Friend card is then discarded.

Clues

Some Encounters include a Clue Token, which goes to you after the Encounter is cleared, and must then be returned to Verona.

At the start of the game, the first Clue Card was turned over, and a Clue Token (meeple of the unused color) was placed atop it. The Clue Card is what Verona knows about the person who holds the next piece of the puzzle. She’s never quite right.

When an Encounter is triggered with a Clue Card in play, the suit and value of the Encounter card and Clue Card are compared. If either the suit or face match, the Clue Token becomes the prize of the Encounter. Discard the current Clue Card and move the Clue Token onto the Encounter card. When you clear this Encounter, move the Clue Token onto your Identity Card. Your objective is now to return it to Verona.

Clue Tokens may be handed off from one player to another on the same tile at any time. When the Clue Token is returned to Verona’s tile, stack it atop the others, draw a new Clue Card, and place a Clue Token on it. Having received the clue and figured out what it means, Verona dispatches you to find the next piece of the puzzle. You (and Verona) win the game by collecting all of the Clue Tokens in play.

Cleared Encounters

On clearing an Encounter, discard the Encounter card. If you have no more Encounter cards, you may proceed to the Movement phase. If you still have Encounters uncleared, your turn is over.


Movement

In the third and final phase of a turn, the player may move their meeple from tile to tile (horizontally or vertically) by one of the three methods below. The player may elect to start from any terrain feature (road, city or field) on their starting tile.

  • Any Terrain: Up to 2 Tiles
  • Through City: Up to 4 Tiles
  • Along Road: Up to 6 tiles

In city or road movement, terrain barriers may not be crossed. Thus, you may not “jump” from one city to another across a stretch of farmland, even if both city walls lie on the same tile. Rivers, likewise, may only be crossed at a bridge or at a River’s beginning or end tile. (Be sure to place your meeple on the correct bank.)


Jokers

If at any time in play a Joker is drawn, all Clue hunting halts. Cover any Clue Card in play with the Joker. Young Verona has fallen head over heels for some flashy young fool, losing track of everything else, and one of the players must return to talk her out of it. The Clue Card is out of play until a player returns to the starting tile, at which point the Joker is discarded, and normal play resumes.

End Game

The conspirators are trying to box you in. Thus you lose if:

  • Every player is mired in an Encounter they can’t clear
    • or
  • Every player has 2 or more unused tiles.

Verona must put together all the pieces of the mystery–with a little help from her family. Thus you win when:

  • You return the final Clue Token to Verona.