Skip to content

Instantly share code, notes, and snippets.

@ronyx69
Created May 29, 2018 17:17
Show Gist options
  • Save ronyx69/f35852275958b5bbcf6807b3992fef9a to your computer and use it in GitHub Desktop.
Save ronyx69/f35852275958b5bbcf6807b3992fef9a to your computer and use it in GitHub Desktop.
Change the flags of a building sub mesh in asset editor.
var subMesh = 0; // sub mesh id, order as in ui, starting from 0
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as BuildingInfo;
// required and forbidden flags, use | to set multiple flags
asset.m_subMeshes[subMesh].m_flagsRequired = Building.Flags.Created | Building.Flags.Active;
asset.m_subMeshes[subMesh].m_flagsForbidden = Building.Flags.Abandoned;
// all building flags:
/*
None
Created
Deleted
Original
CustomName
Untouchable
FixedHeight
Incoming
Outgoing
IncomingOutgoing
CapacityStep1
CapacityStep2
CapacityFull
RateReduced
HighDensity
LevelUpEducation
LevelUpLandValue
RoadAccessFailed
Evacuating
Completed
Active
Abandoned
Demolishing
ZonesUpdated
Downgrading
Collapsed
BurnedDown
Upgrading
Loading1
Loading2
SecondaryLoading
Hidden
EventActive
Flooded
All
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment