"i work at blizzard"

This commit is contained in:
Tim
2025-07-17 22:19:24 +02:00
parent 74eb725db1
commit 828313ae3c
29 changed files with 250 additions and 251 deletions

View File

@@ -11,6 +11,7 @@ public class BaseModel : Model
{
}
public BaseModel(string nameHuman, string nameId, Mesh mesh, Material material, List<Port> ports, List<Color> colors = null)
: base(nameHuman, nameId, mesh, material, ports, colors)
{

View File

@@ -13,10 +13,7 @@ public class BaseModelBehaviour : ModelBehaviour
}
throw new InvalidCastException("model needs to be of type BaseModel");
}
set
{
Model = value;
}
set { Model = value; }
}

View File

@@ -17,10 +17,7 @@ public class ChildModelBehaviour : ModelBehaviour
}
throw new InvalidCastException("ChildModelBehaviour needs to be of type ChildModel");
}
internal set
{
Model = value;
}
internal set { Model = value; }
}
public ModelBehaviour Parent { get; set; }

View File

@@ -31,6 +31,7 @@ public class Model
this.Color = color;
this.Passthrough = passthrough;
}
public Model(string nameHuman, string nameId, Mesh mesh, Material material, List<Port> ports = null, List<Color> color = null, bool passthrough = false)
{
this.NameHuman = nameHuman;

View File

@@ -14,10 +14,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
internal Model Model
{
get
{
return _model;
}
get { return _model; }
set
{
UpdateModel(value);
@@ -43,10 +40,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
Color _color = Color.black;
Color Color
{
get
{
return _color;
}
get { return _color; }
set
{
var clonedMaterial = new Material(meshRenderer.material); //clone da sonst alle anderen mit dem mat auch colorchanged werden
@@ -218,7 +212,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
export += "\"baseModel\": true,";
}
export += $"\"modelId\": \"{Model.NameId}\"";
if(Model is ChildModel cm)
if (Model is ChildModel cm)
{
export += $", \"portId\": \"{cm.ParentPort}\"";
}
@@ -237,8 +231,8 @@ public class ModelBehaviour : MonoBehaviour, IResettable
{
continue;
}
export += "{ \"i\": " + i +", " + _children[i].GetComponent<ChildModelBehaviour>().ExportJsonBase() + "}";
if(i != Model.Ports.Count-1) //if not the last
export += "{ \"i\": " + i + ", " + _children[i].GetComponent<ChildModelBehaviour>().ExportJsonBase() + "}";
if (i != Model.Ports.Count - 1) //if not the last
{
export += ",";
}
@@ -266,6 +260,7 @@ public class ModelBehaviour : MonoBehaviour, IResettable
}
_children[portIndex].GetComponent<ChildModelBehaviour>().Color = color;
}
public void ClearChildren()
{
Debug.Log($"Removing Children of {name}...");

View File

@@ -3,15 +3,15 @@ using UnityEngine;
public class ModelElement
{
public string Port {get;}
public string NameHuman {get;}
public string NameId {get;}
public Material Mats {get;}
public Vector3 Offset {get;}
public Quaternion Rotation {get;}
public Vector3 Scale {get;}
public List<Port> Ports {get;}
public List<Color> Colors {get;}
public string Port { get; }
public string NameHuman { get; }
public string NameId { get; }
public Material Mats { get; }
public Vector3 Offset { get; }
public Quaternion Rotation { get; }
public Vector3 Scale { get; }
public List<Port> Ports { get; }
public List<Color> Colors { get; }
public ModelElement(string port, string nameHuman, string nameId, Material mats, Vector3 offset,
Quaternion rotation, Vector3 scale, List<Port> ports, List<Color> colors)

View File

@@ -24,13 +24,13 @@ public class ModelList
Port.Choosable("Back Frame", PortDef.BIKE_FRAME, "idBikeAttachments", Vector3.zero),
Port.Choosable("Frame", PortDef.BIKE_FRAME2, "idBikeFrame", Vector3.zero),
Port.Hidden(PortDef.BIKE_SPROCKET, "idBikeSprocket", new Vector3(0.007933f, 0.444f, -0.1614f), Quaternion.identity, 1f, new Vector3(0.5f, 0f, 0f)),
Port.Hidden( PortDef.BIKE_PEDAL_L, "idBikePedalL", new Vector3(-0.1252177f, 0.5490288f, -0.312027f), Quaternion.identity, 1f, new Vector3(-0.5f, 0f, 0f)),
Port.Hidden( PortDef.BIKE_PEDAL_R, "idBikePedalR", new Vector3(0.1410843f, 0.3393247f, -0.01154391f), Quaternion.identity, 1f, new Vector3(0.5f, 0f, 0f)),
Port.Hidden(PortDef.BIKE_PEDAL_L, "idBikePedalL", new Vector3(-0.1252177f, 0.5490288f, -0.312027f), Quaternion.identity, 1f, new Vector3(-0.5f, 0f, 0f)),
Port.Hidden(PortDef.BIKE_PEDAL_R, "idBikePedalR", new Vector3(0.1410843f, 0.3393247f, -0.01154391f), Quaternion.identity, 1f, new Vector3(0.5f, 0f, 0f)),
Port.Choosable("Handlebars", PortDef.BIKE_STEER, "idBikeHandlebars", new Vector3(0.002989591f, 1.214713f, 0.4860705f), Quaternion.Euler(-30f, 0f, 0f), 1f, new Vector3(0f, 0.5f, 1f)),
Port.Choosable("Back Rim", PortDef.BIKE_RIM, "idBikeRim_Back", new Vector3(-0.01431298f, 0.4673222f, -0.7874681f), Quaternion.identity, 1f, new Vector3(0f, 0f, -0.6f)),
Port.Hidden(PortDef.BIKE_TIRE, "idBikeTire_Back", new Vector3(-0.01431298f, 0.4673222f, -0.7874681f), Quaternion.identity, 1f, new Vector3(0f, 0f, -0.6f)),
Port.Choosable("Front Rim", PortDef.BIKE_RIM_FRONT, "idBikeRim_Front", new Vector3(0.01984263f, 0.4673225f, 0.9462124f), Quaternion.identity, 1f, new Vector3(0f, 0f, 0.6f)),
Port.Hidden( PortDef.BIKE_TIRE_FRONT, "idBikeTire_Front", new Vector3(0.01984263f, 0.4673225f, 0.9462124f), Quaternion.identity, 1f, new Vector3(0f, 0f, 0.6f)),
Port.Hidden(PortDef.BIKE_TIRE_FRONT, "idBikeTire_Front", new Vector3(0.01984263f, 0.4673225f, 0.9462124f), Quaternion.identity, 1f, new Vector3(0f, 0f, 0.6f)),
}
),
new BaseModel(
@@ -348,104 +348,104 @@ public class ModelList
ModelLoader.LoadChildFromPackedModel(ChildModels,
new List<ModelElement>
{
new ModelElement( PortDef.ERL_CABLE_1, "Erlbach Part 1", "idErlbachPart1", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_2, "Erlbach Part 2", "idErlbachPart2", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_3, "Erlbach Part 3", "idErlbachPart3", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_4, "Erlbach Part 4", "idErlbachPart4", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_5, "Erlbach Part 5", "idErlbachPart5", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_6, "Erlbach Part 6", "idErlbachPart6", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_7, "Erlbach Part 7", "idErlbachPart7", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_8, "Erlbach Part 8", "idErlbachPart8", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_9, "Erlbach Part 9", "idErlbachPart9", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_10, "Erlbach Part 10", "idErlbachPart10", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_11, "Erlbach Part 11", "idErlbachPart11", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_12, "Erlbach Part 12", "idErlbachPart12", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_13, "Erlbach Part 13", "idErlbachPart13", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_14, "Erlbach Part 14", "idErlbachPart14", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_15, "Erlbach Part 15", "idErlbachPart15", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_16, "Erlbach Part 16", "idErlbachPart16", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_17, "Erlbach Part 17", "idErlbachPart17", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_18, "Erlbach Part 18", "idErlbachPart18", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_19, "Erlbach Part 19", "idErlbachPart19", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_20, "Erlbach Part 20", "idErlbachPart20", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_21, "Erlbach Part 21", "idErlbachPart21", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_22, "Erlbach Part 22", "idErlbachPart22", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_23, "Erlbach Part 23", "idErlbachPart23", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_24, "Erlbach Part 24", "idErlbachPart24", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_25, "Erlbach Part 25", "idErlbachPart25", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_26, "Erlbach Part 26", "idErlbachPart26", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_27, "Erlbach Part 27", "idErlbachPart27", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_28, "Erlbach Part 28", "idErlbachPart28", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_29, "Erlbach Part 29", "idErlbachPart29", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_30, "Erlbach Part 30", "idErlbachPart30", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_31, "Erlbach Part 31", "idErlbachPart31", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_32, "Erlbach Part 32", "idErlbachPart32", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_33, "Erlbach Part 33", "idErlbachPart33", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_34, "Erlbach Part 34", "idErlbachPart34", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_35, "Erlbach Part 35", "idErlbachPart35", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_36, "Erlbach Part 36", "idErlbachPart36", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_37, "Erlbach Part 37", "idErlbachPart37", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_38, "Erlbach Part 38", "idErlbachPart38", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_39, "Erlbach Part 39", "idErlbachPart39", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CAP_40, "Erlbach Part 40", "idErlbachPart40", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_41, "Erlbach Part 41", "idErlbachPart41", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_42, "Erlbach Part 42", "idErlbachPart42", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_43, "Erlbach Part 43", "idErlbachPart43", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_44, "Erlbach Part 44", "idErlbachPart44", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_45, "Erlbach Part 45", "idErlbachPart45", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_46, "Erlbach Part 46", "idErlbachPart46", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_47, "Erlbach Part 47", "idErlbachPart47", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_48, "Erlbach Part 48", "idErlbachPart48", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_49, "Erlbach Part 49", "idErlbachPart49", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_50, "Erlbach Part 50", "idErlbachPart50", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_51, "Erlbach Part 51", "idErlbachPart51", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_52, "Erlbach Part 52", "idErlbachPart52", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_53, "Erlbach Part 53", "idErlbachPart53", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_54, "Erlbach Part 54", "idErlbachPart54", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_55, "Erlbach Part 55", "idErlbachPart55", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_56, "Erlbach Part 56", "idErlbachPart56", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_57, "Erlbach Part 57", "idErlbachPart57", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_58, "Erlbach Part 58", "idErlbachPart58", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_59, "Erlbach Part 59", "idErlbachPart59", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_60, "Erlbach Part 60", "idErlbachPart60", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_61, "Erlbach Part 61", "idErlbachPart61", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_62, "Erlbach Part 62", "idErlbachPart62", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_63, "Erlbach Part 63", "idErlbachPart63", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_64, "Erlbach Part 64", "idErlbachPart64", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_65, "Erlbach Part 65", "idErlbachPart65", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_66, "Erlbach Part 66", "idErlbachPart66", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_67, "Erlbach Part 67", "idErlbachPart67", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_68, "Erlbach Part 68", "idErlbachPart68", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_69, "Erlbach Part 69", "idErlbachPart69", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_70, "Erlbach Part 70", "idErlbachPart70", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_71, "Erlbach Part 71", "idErlbachPart71", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_72, "Erlbach Part 72", "idErlbachPart72", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_CABLE_73, "Erlbach Part 73", "idErlbachPart73", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_BASEPLATE, "Frame", "idErlbachBody_BasePlate", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_BASEPLATE_FRONT, "Front Axle", "idErlbachPart75", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_BATBOX, "Battery Box", "idErlbachBatBox_Big", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_PLATINE, "Erlbach Part 77", "idErlbachPart77", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_ROD_78, "Erlbach Part 78", "idErlbachPart78", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_ROD_79, "Erlbach Part 79", "idErlbachPart79", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_TIRE_LH, "Tire LH", "erlTire1_LH", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_RIM_LH, "Standard Rim", "erlRim1_LH", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched ),
new ModelElement( PortDef.ERL_TIRE_LV, "Tire LV", "erlTire1_LV", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_RIM_LV, "Standard Rim", "erlRim1_LV", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched ),
new ModelElement( PortDef.ERL_TIRE_RH, "Tire RH", "erlTire1_RH", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_RIM_RH, "Standard Rim", "erlRim1_RH", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched ),
new ModelElement( PortDef.ERL_TIRE_RV, "Tire RV", "erlTire1_RV", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_RIM_RV, "Standard Rim", "erlRim1_RV", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched ),
new ModelElement( PortDef.ERL_BODY, "Body", "idErlbachPart84", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished ),
new ModelElement( PortDef.ERL_BUMPER_BACK, "Rear Bumper", "idErlbachPart85", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished ),
new ModelElement( PortDef.ERL_DRL_OUTLINE, "Front Bumper", "idErlbachPart86", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished ),
new ModelElement( PortDef.ERL_BADGE, "Number", "idErlbachPart87", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched ),
new ModelElement( PortDef.ERL_LP_BASE, "License Plate", "idErlbachPart88", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished ),
new ModelElement( PortDef.ERL_LP_TEXT, "License Plate Content", "idErlbachPart89", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_LP_COUNTRY, "Erlbach Part 90", "idErlbachPart90", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_GRILL, "Standard Grill", "erlGrill_1", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumBrushed ),
new ModelElement( PortDef.ERL_BUMPER_FRONT, "Headlight Cover", "idErlbachPart92", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumBrushed ),
new ModelElement( PortDef.ERL_DRL_PLATE, "Headlight", "idErlbachPart93", Resources.Load<Material>($"Material/MetalMesh"), Vector3.zero, Quaternion.identity, Vector3.one, null, null ),
new ModelElement( PortDef.ERL_WINDOW, "Fenster", "idErlbachGlas", Resources.Load<Material>($"Material/Glas"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorGlass),
new ModelElement(PortDef.ERL_CABLE_1, "Erlbach Part 1", "idErlbachPart1", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_2, "Erlbach Part 2", "idErlbachPart2", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_3, "Erlbach Part 3", "idErlbachPart3", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_4, "Erlbach Part 4", "idErlbachPart4", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_5, "Erlbach Part 5", "idErlbachPart5", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_6, "Erlbach Part 6", "idErlbachPart6", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_7, "Erlbach Part 7", "idErlbachPart7", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_8, "Erlbach Part 8", "idErlbachPart8", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_9, "Erlbach Part 9", "idErlbachPart9", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_10, "Erlbach Part 10", "idErlbachPart10", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_11, "Erlbach Part 11", "idErlbachPart11", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_12, "Erlbach Part 12", "idErlbachPart12", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_13, "Erlbach Part 13", "idErlbachPart13", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_14, "Erlbach Part 14", "idErlbachPart14", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_15, "Erlbach Part 15", "idErlbachPart15", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_16, "Erlbach Part 16", "idErlbachPart16", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_17, "Erlbach Part 17", "idErlbachPart17", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_18, "Erlbach Part 18", "idErlbachPart18", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_19, "Erlbach Part 19", "idErlbachPart19", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_20, "Erlbach Part 20", "idErlbachPart20", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_21, "Erlbach Part 21", "idErlbachPart21", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_22, "Erlbach Part 22", "idErlbachPart22", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_23, "Erlbach Part 23", "idErlbachPart23", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_24, "Erlbach Part 24", "idErlbachPart24", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_25, "Erlbach Part 25", "idErlbachPart25", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_26, "Erlbach Part 26", "idErlbachPart26", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_27, "Erlbach Part 27", "idErlbachPart27", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_28, "Erlbach Part 28", "idErlbachPart28", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_29, "Erlbach Part 29", "idErlbachPart29", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_30, "Erlbach Part 30", "idErlbachPart30", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_31, "Erlbach Part 31", "idErlbachPart31", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_32, "Erlbach Part 32", "idErlbachPart32", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_33, "Erlbach Part 33", "idErlbachPart33", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_34, "Erlbach Part 34", "idErlbachPart34", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_35, "Erlbach Part 35", "idErlbachPart35", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_36, "Erlbach Part 36", "idErlbachPart36", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_37, "Erlbach Part 37", "idErlbachPart37", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_38, "Erlbach Part 38", "idErlbachPart38", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_39, "Erlbach Part 39", "idErlbachPart39", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CAP_40, "Erlbach Part 40", "idErlbachPart40", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_41, "Erlbach Part 41", "idErlbachPart41", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_42, "Erlbach Part 42", "idErlbachPart42", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_43, "Erlbach Part 43", "idErlbachPart43", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_44, "Erlbach Part 44", "idErlbachPart44", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_45, "Erlbach Part 45", "idErlbachPart45", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_46, "Erlbach Part 46", "idErlbachPart46", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_47, "Erlbach Part 47", "idErlbachPart47", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_48, "Erlbach Part 48", "idErlbachPart48", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_49, "Erlbach Part 49", "idErlbachPart49", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_50, "Erlbach Part 50", "idErlbachPart50", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_51, "Erlbach Part 51", "idErlbachPart51", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_52, "Erlbach Part 52", "idErlbachPart52", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_53, "Erlbach Part 53", "idErlbachPart53", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_54, "Erlbach Part 54", "idErlbachPart54", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_55, "Erlbach Part 55", "idErlbachPart55", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_56, "Erlbach Part 56", "idErlbachPart56", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_57, "Erlbach Part 57", "idErlbachPart57", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_58, "Erlbach Part 58", "idErlbachPart58", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_59, "Erlbach Part 59", "idErlbachPart59", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_60, "Erlbach Part 60", "idErlbachPart60", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_61, "Erlbach Part 61", "idErlbachPart61", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_62, "Erlbach Part 62", "idErlbachPart62", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_63, "Erlbach Part 63", "idErlbachPart63", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_64, "Erlbach Part 64", "idErlbachPart64", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_65, "Erlbach Part 65", "idErlbachPart65", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_66, "Erlbach Part 66", "idErlbachPart66", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_67, "Erlbach Part 67", "idErlbachPart67", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_68, "Erlbach Part 68", "idErlbachPart68", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_69, "Erlbach Part 69", "idErlbachPart69", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_70, "Erlbach Part 70", "idErlbachPart70", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_71, "Erlbach Part 71", "idErlbachPart71", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_72, "Erlbach Part 72", "idErlbachPart72", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_CABLE_73, "Erlbach Part 73", "idErlbachPart73", Resources.Load<Material>($"Material/PlasticCable"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_BASEPLATE, "Frame", "idErlbachBody_BasePlate", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_BASEPLATE_FRONT, "Front Axle", "idErlbachPart75", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_BATBOX, "Battery Box", "idErlbachBatBox_Big", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_PLATINE, "Erlbach Part 77", "idErlbachPart77", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_ROD_78, "Erlbach Part 78", "idErlbachPart78", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_ROD_79, "Erlbach Part 79", "idErlbachPart79", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_TIRE_LH, "Tire LH", "erlTire1_LH", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_RIM_LH, "Standard Rim", "erlRim1_LH", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched),
new ModelElement(PortDef.ERL_TIRE_LV, "Tire LV", "erlTire1_LV", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_RIM_LV, "Standard Rim", "erlRim1_LV", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched),
new ModelElement(PortDef.ERL_TIRE_RH, "Tire RH", "erlTire1_RH", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_RIM_RH, "Standard Rim", "erlRim1_RH", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched),
new ModelElement(PortDef.ERL_TIRE_RV, "Tire RV", "erlTire1_RV", Resources.Load<Material>($"Material/CarTire"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_RIM_RV, "Standard Rim", "erlRim1_RV", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched),
new ModelElement(PortDef.ERL_BODY, "Body", "idErlbachPart84", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished),
new ModelElement(PortDef.ERL_BUMPER_BACK, "Rear Bumper", "idErlbachPart85", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished),
new ModelElement(PortDef.ERL_DRL_OUTLINE, "Front Bumper", "idErlbachPart86", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished),
new ModelElement(PortDef.ERL_BADGE, "Number", "idErlbachPart87", Resources.Load<Material>($"Material/AluminiumScratched"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumScratched),
new ModelElement(PortDef.ERL_LP_BASE, "License Plate", "idErlbachPart88", Resources.Load<Material>($"Material/AluminiumPolished"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumPolished),
new ModelElement(PortDef.ERL_LP_TEXT, "License Plate Content", "idErlbachPart89", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_LP_COUNTRY, "Erlbach Part 90", "idErlbachPart90", Resources.Load<Material>($"Material/PVC"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_GRILL, "Standard Grill", "erlGrill_1", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumBrushed),
new ModelElement(PortDef.ERL_BUMPER_FRONT, "Headlight Cover", "idErlbachPart92", Resources.Load<Material>($"Material/AluminiumBrushed"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorAluminiumBrushed),
new ModelElement(PortDef.ERL_DRL_PLATE, "Headlight", "idErlbachPart93", Resources.Load<Material>($"Material/MetalMesh"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_WINDOW, "Fenster", "idErlbachGlas", Resources.Load<Material>($"Material/Glas"), Vector3.zero, Quaternion.identity, Vector3.one, null, ModelListColors.ColorGlass),
},
Resources.LoadAll<Mesh>($"Model/ERLbach/ERLBach_mit_Fenster"),
1 //skip basemodel

View File

@@ -74,6 +74,7 @@ public class Exploder : MonoBehaviour, IResettable, IPointerDownHandler
models.Add(new ExploderModel(port, cmb.ChildModel, cmb));
}
}
void UpdateModelList()
{
List<ExploderModel> modelss = new List<ExploderModel>();

View File

@@ -4,7 +4,7 @@ using UnityEngine.UI;
namespace UI
{
public class ARToggleButton: MonoBehaviour, IPointerDownHandler
public class ARToggleButton : MonoBehaviour, IPointerDownHandler
{
public OVRPassthroughLayer passthroughLayer;
private bool pressed = false; //efix variable da button 2 mal pressed wird ??
@@ -21,6 +21,7 @@ namespace UI
lastClickTime = Time.time;
TogglePassthrough();
}
void Start()
{
gameObject.GetComponent<Button>().onClick.AddListener(TogglePassthrough);

View File

@@ -19,14 +19,8 @@ public class ChildModelSelector : MonoBehaviour, IResettable
private string portId { set; get; }
public string PortID
{
set
{
portId = value;
}
get
{
return portId;
}
set { portId = value; }
get { return portId; }
}
public int PortIndex { set; get; }
@@ -92,4 +86,3 @@ public class ChildModelSelector : MonoBehaviour, IResettable
Buttons.Clear();
}
}

View File

@@ -6,7 +6,7 @@ public class PortSelector : MonoBehaviour, IResettable
public ModelManager modelManager;
public GameObject prefab;
public Vector3 offset = new Vector3(0,48,0);
public Vector3 offset = new Vector3(0, 48, 0);
public List<GameObject> portGOs = new List<GameObject>();
public List<PortSelectorButton> listPSB = new List<PortSelectorButton>();

View File

@@ -16,6 +16,7 @@ public class PortSelectorButton : MonoBehaviour
{
this.GetOrAddComponent<Button>().onClick.AddListener(OnClick);
}
public void OnClick()
{
Debug.Log($"Changing Port to {this}");

View File

@@ -1,4 +1,5 @@
using UnityEngine;
public class Marker : MonoBehaviour
{
//this script doesn't do anything else than allow for getcomponentsinchildren to find a targeted feature

View File

@@ -33,10 +33,10 @@ public class ModelLoader
int i = 0;
for (int meshIndex = 0; meshIndex < toMesh - fromMesh; meshIndex++)
{
Debug.Log($"Mesh {fromMesh} to {toMesh} :: {toMesh-fromMesh} with index {meshIndex}");
Debug.Log($"Mesh {fromMesh} to {toMesh} :: {toMesh - fromMesh} with index {meshIndex}");
Mesh mesh = meshes[fromMesh + meshIndex];
bool getSubMesh = useSubmeshes && mesh.subMeshCount > 1;
List<Mesh> subMeshes = getSubMesh ? GetSubmeshes(mesh) : new List<Mesh>{mesh};
List<Mesh> subMeshes = getSubMesh ? GetSubmeshes(mesh) : new List<Mesh> { mesh };
if (getSubMesh)
{
Debug.Log($"{i}. {subMeshes.Count} SubMeshes Found {nameId[i]}:{nameHuman[i]}");
@@ -98,9 +98,20 @@ public class ModelLoader
ports.Add(modelElement.Ports);
colors.Add(modelElement.Colors);
}
LoadChildModelsFromPackedModel(appendList, port.ToArray(), nameHuman.ToArray(), nameId.ToArray(),
meshes, mats.ToArray(), offset.ToArray(), rotation.ToArray(),
scale.ToArray(), ports.ToArray(), colors.ToArray(), fromMesh, toMesh, useSubmeshes);
LoadChildModelsFromPackedModel(appendList,
port.ToArray(),
nameHuman.ToArray(),
nameId.ToArray(),
meshes,
mats.ToArray(),
offset.ToArray(),
rotation.ToArray(),
scale.ToArray(),
ports.ToArray(),
colors.ToArray(),
fromMesh,
toMesh,
useSubmeshes);
}
static List<Mesh> GetSubmeshes(Mesh mesh)