You've created a trait for the unit and the building, and you've assigned the unit and the building to these traits, but you've never assigned the trait to either your civilization or your leader. They are therefore not assigned to anyone as a Unique.
example for a building:
Code:
<GameInfo>
<Types>
<Row Type="BUILDING_EARLYBUMP1" Kind="KIND_BUILDING" />
<Row Type="TRAIT_CIVILIZATION_BUILDING_ROMAN_FORUM" Kind="KIND_TRAIT" />
<Row Type="BUILDING_ROMAN_FORUM" Kind="KIND_BUILDING"/>
</Types>
<Traits>
<Row TraitType="TRAIT_CIVILIZATION_BUILDING_ROMAN_FORUM" Name="LOC_TRAIT_CIVILIZATION_BUILDING_ROMAN_FORUM_NAME"/>
</Traits>
<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_ROME" TraitType="TRAIT_CIVILIZATION_BUILDING_ROMAN_FORUM"/>
</CivilizationTraits>
<BuildingReplaces>
<Row CivUniqueBuildingType="BUILDING_ROMAN_FORUM" ReplacesBuildingType="BUILDING_EARLYBUMP1"/>
</BuildingReplaces>
<Buildings>
<!-- Town Square -->
<Row BuildingType="BUILDING_EARLYBUMP1"
Name="LOC_BUILDING_EARLYBUMP1"
Description="LOC_BUILDING_EARLYBUMP1_DESC"
PrereqDistrict="DISTRICT_CITY_CENTER"
PrereqTech="TECH_POTTERY"
Cost="60"
PurchaseYield="YIELD_GOLD"
AdvisorType="ADVISOR_GENERIC"
Maintenance="1" />
<!-- Forum -->
<Row BuildingType="BUILDING_ROMAN_FORUM"
Name="LOC_BUILDING_ROMAN_FORUM_NAME"
Description="LOC_BUILDING_ROMAN_FORUM_DESCRIPTION"
PrereqDistrict="DISTRICT_CITY_CENTER"
Cost="65"
PurchaseYield="YIELD_GOLD"
AdvisorType="ADVISOR_GENERIC"
Entertainment="2"
Maintenance="0"
Housing="2"
TraitType="TRAIT_CIVILIZATION_BUILDING_ROMAN_FORUM"/>
</Buildings>
<Building_YieldChanges>
<Row BuildingType="BUILDING_EARLYBUMP1" YieldType="YIELD_FOOD" YieldChange="1"/>
<Row BuildingType="BUILDING_EARLYBUMP1" YieldType="YIELD_PRODUCTION" YieldChange="1"/>
<Row BuildingType="BUILDING_EARLYBUMP1" YieldType="YIELD_CULTURE" YieldChange="1"/>
<Row BuildingType="BUILDING_ROMAN_FORUM" YieldType="YIELD_FOOD" YieldChange="1"/>
<Row BuildingType="BUILDING_ROMAN_FORUM" YieldType="YIELD_PRODUCTION" YieldChange="1"/>
<Row BuildingType="BUILDING_ROMAN_FORUM" YieldType="YIELD_CULTURE" YieldChange="1"/>
</Building_YieldChanges>
</GameInfo>
You are missing this part
Code:
<CivilizationTraits>
<Row CivilizationType="CIVILIZATION_ROME" TraitType="TRAIT_CIVILIZATION_BUILDING_ROMAN_FORUM"/>
</CivilizationTraits>
You can assign the unit-trait and building-trait either to the leader or the civilization, but but without assigning to one or the other the unit and building are not treated as uniques.