Instantly share code, notes, and snippets.

Embed
What would you like to do?
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