private void BridgeAdd_BottomBase(float tHorizSep = 0f, float tVertRaise = -1.01f, string tMat = "Assets/RoadArchitect/Materials/GSDConcrete2.mat", bool bOverridePrefab = false, string OverridePrefab = ""){ SMM = tNode.AddSplinatedObject(); string tBridgeBottomBaseToAdd = ""; string tName = ""; if(tNode.GSDSpline.tRoad.opt_Lanes == 2){ if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase2){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase2-18w-5l-3d.fbx"; tName = "BridgeBase2"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase3){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase3-18w-5l-5d.fbx"; tName = "BridgeBase3"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase4){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase4-18w-5l-5d.fbx"; tName = "BridgeBase4"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase5){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase5-18w-5l-5d.fbx"; tName = "BridgeBase5"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase6){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase6-2L.fbx"; tName = "BridgeArchBeam80"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase7){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase7-2L.fbx"; tName = "BridgeArchSolid80"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase8){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase8-2L.fbx"; tName = "BridgeArchSolid180"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBaseGrid){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBaseGrid-18w-5l-5d.fbx"; tName = "BridgeGrid"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeSteel){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBaseSteelBeam-18w-20l-3d.fbx"; tName = "BridgeSteelBeams"; } }else if(tNode.GSDSpline.tRoad.opt_Lanes == 4){ if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase2){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase2-28w-5l-3d.fbx"; tName = "BridgeBase2"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase3){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase3-28w-5l-5d.fbx"; tName = "BridgeBase3"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase4){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase4-28w-5l-5d.fbx"; tName = "BridgeBase4"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase5){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase5-28w-5l-5d.fbx"; tName = "BridgeBase5"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase6){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase6-4L.fbx"; tName = "BridgeArchBeam80"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase7){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase7-4L.fbx"; tName = "BridgeArchSolid80"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase8){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase8-4L.fbx"; tName = "BridgeArchSolid180"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBaseGrid){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBaseGrid-28w-5l-5d.fbx"; tName = "BridgeGrid"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeSteel){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBaseSteelBeam-28w-20l-3d.fbx"; tName = "BridgeSteelBeams"; } }else{ if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase2){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase2-38w-5l-3d.fbx"; tName = "BridgeBase2"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase3){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase3-38w-5l-5d.fbx"; tName = "BridgeBase3"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase4){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase4-38w-5l-5d.fbx"; tName = "BridgeBase4"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase5){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase5-38w-5l-5d.fbx"; tName = "BridgeBase5"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase6){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase6-6L.fbx"; tName = "BridgeArchBeam80"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase7){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase7-6L.fbx"; tName = "BridgeArchSolid80"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase8){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase8-6L.fbx"; tName = "BridgeArchSolid180"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBaseGrid){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBaseGrid-38w-5l-5d.fbx"; tName = "BridgeGrid"; }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeSteel){ tBridgeBottomBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBaseSteelBeam-38w-20l-3d.fbx"; tName = "BridgeBeams"; } } if(bOverridePrefab){ tBridgeBottomBaseToAdd = OverridePrefab; } SMM.CurrentSplination = (GameObject)UnityEditor.AssetDatabase.LoadAssetAtPath(tBridgeBottomBaseToAdd, typeof(GameObject)); SMM.HorizontalSep = tHorizSep; SMM.VerticalRaise = tVertRaise; SMM.bMaterialOverride = true; SMM.tName = tName; if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase2){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase3){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase4){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase5){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase6){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase7){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBase8){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeBaseGrid){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial("Assets/RoadArchitect/Materials/GSDSteel7.mat"); }else if(tBridgeBottomBaseQuickAdd == BridgeBottomBaseDefaultsEnum.BridgeSteel){ SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial("Assets/RoadArchitect/Materials/GSDSteel7.mat"); } SMM.Axis = GSD.Roads.Splination.AxisTypeEnum.Z; tBridgeTopBaseQuickAdd = BridgeTopBaseDefaultsEnum.None; if(SMM.StartTime < tNode.MinSplination){ SMM.StartTime = tNode.MinSplination; } if(SMM.EndTime > tNode.MaxSplination){ SMM.EndTime = tNode.MaxSplination; } }
private void BridgeAdd_TopBase(float tHorizSep = 0f, float tVertRaise = -0.01f, string tMat = "Assets/RoadArchitect/Materials/GSDConcrete2.mat", bool bOverridePrefab = false, string OverridePrefab = ""){ SMM = tNode.AddSplinatedObject(); string tBridgeTopBaseToAdd = ""; string tName = ""; if(tNode.GSDSpline.tRoad.opt_Lanes == 2){ if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base1MOver){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-19w-5l-1d.fbx"; tName = "BridgeTop1M-1M"; }else if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base2MOver){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-20w-5l-1d.fbx"; tName = "BridgeTop2M-1M"; }else if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base3MDeep){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-18w-5l-3d.fbx"; tName = "BridgeTop0M-3M"; }else{ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-18w-5l-1d.fbx"; tName = "BridgeTop0M-1M"; } }else if(tNode.GSDSpline.tRoad.opt_Lanes == 4){ if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base1MOver){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-29w-5l-1d.fbx"; tName = "BridgeTop1M-1M"; }else if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base2MOver){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-30w-5l-1d.fbx"; tName = "BridgeTop2M-1M"; }else if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base3MDeep){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-28w-5l-3d.fbx"; tName = "BridgeTop0M-3M"; }else{ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-28w-5l-1d.fbx"; tName = "BridgeTop0M-1M"; } }else{ if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base1MOver){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-39w-5l-1d.fbx"; tName = "BridgeTop1M-1M"; }else if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base2MOver){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-40w-5l-1d.fbx"; tName = "BridgeTop2M-1M"; }else if(tBridgeTopBaseQuickAdd == BridgeTopBaseDefaultsEnum.Base3MDeep){ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-38w-5l-3d.fbx"; tName = "BridgeTop0M-3M"; }else{ tBridgeTopBaseToAdd = "Assets/RoadArchitect/Mesh/RoadObj/Bridges/BridgeBase-38w-5l-1d.fbx"; tName = "BridgeTop0M-1M"; } } if(bOverridePrefab){ tBridgeTopBaseToAdd = OverridePrefab; } SMM.tName = tName; SMM.CurrentSplination = (GameObject)UnityEditor.AssetDatabase.LoadAssetAtPath(tBridgeTopBaseToAdd, typeof(GameObject)); SMM.HorizontalSep = tHorizSep; SMM.VerticalRaise = tVertRaise; SMM.bMaterialOverride = true; SMM.SplinatedMaterial1 = GSD.Roads.GSDRoadUtilityEditor.GiveMaterial(tMat); SMM.Axis = GSD.Roads.Splination.AxisTypeEnum.Z; tBridgeTopBaseQuickAdd = BridgeTopBaseDefaultsEnum.None; if(SMM.StartTime < tNode.MinSplination){ SMM.StartTime = tNode.MinSplination; } if(SMM.EndTime > tNode.MaxSplination){ SMM.EndTime = tNode.MaxSplination; } }