Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sets the amount, direction and position of sitting places for benches.
// m_specialPlaces (SittingDown)
// Sets the amount, direction and position of sitting places for benches.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
var specialPlaces = 1; // amount of sitting positions
PropInfo.SpecialPlace[] temp = new PropInfo.SpecialPlace[specialPlaces];
// sitting direction and position
temp[0].m_direction = new Vector3(0, 0, 1);
temp[0].m_position = new Vector3(-0.5f, 0, -0.5f);
temp[0].m_specialFlags.value__ = 65536;
// if you want want another one
//temp[1].m_direction = new Vector3(0, 0, -1);
//temp[1].m_position = new Vector3(0.5f, 0, 0.5f);
//temp[1].m_specialFlags.value__ = 65536;
// and another one...
//temp[2].m_direction = new Vector3(0, 0, -1);
//temp[2].m_position = new Vector3(0.5f, 0, 0.5f);
//temp[2].m_specialFlags.value__ = 65536;
asset.m_specialPlaces = temp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment