Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sets the amount, type, flags, direction and position of parking spaces for props. Not tested or researched.
// m_parkingSpaces
// Sets the amount, type, flags, direction and position of parking spaces for props.
// I haven't tested or researched this at all.
var asset = ToolsModifierControl.toolController.m_editPrefabInfo as PropInfo;
var parkingSpaces = 1; // amount of parking spaces
PropInfo.ParkingSpace[] temp = new PropInfo.ParkingSpace[parkingSpaces];
// parking direction and position
temp[0].m_type = VehicleInfo.VehicleType.Car;
temp[0].m_direction = new Vector3(0, 0, 1);
temp[0].m_position = new Vector3(0.0f, 0.0f, 0.0f);
temp[0].m_size = new Vector3(3.0f, 2.0f, 6.0f); // not sure what this should be, or what it affects
//temp[0].m_flags = PropInfo.ParkingFlags.RequireElectric; // if you want electric only
// if you want want another one (increase amount on top as well)
//temp[1].m_type = VehicleType.Car;
//temp[1].m_direction = new Vector3(0, 0, 1);
//temp[1].m_position = new Vector3(0.0f, 0.0f, 0.0f);
//temp[1].m_size = new Vector3(3.0f, 2.0f, 6.0f); // not sure what this should be, or what it affects
//temp[1].m_flags = PropInfo.ParkingFlags.RequireElectric; // if you want electric only
asset.m_parkingSpaces = temp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.