SHARE
TWEET

Untitled

a guest Apr 20th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var prefabNames = new string[]
  2. {
  3.     "Pedestrian Connection",
  4.     "Pedestrian Connection Surface",
  5.     "Pedestrian Connection Inside",
  6.     "Pedestrian Connection Underground"
  7. };
  8. foreach (var prefabName in prefabNames)
  9. {
  10.     var prefab = PrefabCollection<NetInfo>.FindLoaded(prefabName);
  11.     prefab.m_class.m_layer = ItemClass.Layer.Default;
  12.     //prefab.m_createPavement = true;
  13.     prefab.m_netLayers = 512;
  14.     prefab.m_hasTerrainHeightProps = true;
  15.     prefab.m_maxPropDistance = 1000f;
  16.     var laneProps = prefab.m_lanes[0].m_laneProps = ScriptableObject.CreateInstance<NetLaneProps>();
  17.     laneProps.m_props = new NetLaneProps.Prop[1];
  18.     laneProps.m_props[0] = new NetLaneProps.Prop()
  19.     {
  20.         m_prop = PrefabCollection<PropInfo>.FindLoaded("Barrel 01"),
  21.         m_finalProp = PrefabCollection<PropInfo>.FindLoaded("Barrel 01"),
  22.         m_flagsRequired = NetLane.Flags.Created,
  23.         m_probability = 100,
  24.         m_repeatDistance = 2,
  25.         //m_segmentOffset = -1,
  26.         m_position = new Vector3(0, 0f, 0)
  27.     };
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top