License Plate correct model + Color change

This commit is contained in:
Tim
2025-07-17 23:11:29 +02:00
parent 9143518b41
commit 78ccb2369d
7 changed files with 84 additions and 62 deletions

View File

@@ -79,4 +79,7 @@ crashlytics-build.properties
TempAssembly.dll
# Max eternal git struggle
export.json
export.json
/build_apk/
*.py

View File

@@ -135,7 +135,7 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.016976064, b: 0, a: 1}
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 1, g: 0.016976064, b: 0, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}

View File

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 316 KiB

View File

@@ -1,5 +1,4 @@
using System.Collections.Generic;
using Models;
using UnityEngine;
/// <summary>
@@ -131,9 +130,8 @@ public class ModelList
Port.Choosable("Rear Bumper", PortDef.ERL_BUMPER_BACK, "idErlbachPart85", Vector3.zero, Quaternion.identity, 1f, new Vector3(20f, 0f, 0f)),
Port.Choosable("Front Bumper", PortDef.ERL_DRL_OUTLINE, "idErlbachPart86", new Vector3(2.1f, 0f, 0f), Quaternion.identity, 1f, new Vector3(-10f, 0f, 0f)),
Port.Hidden(PortDef.ERL_BADGE, "idErlbachPart87", Vector3.zero, Quaternion.identity, 1f, new Vector3(50f, 0f, 0f)),
Port.Choosable("License Plate", PortDef.ERL_LP_BASE, "idErlbachPart88", Vector3.zero, Quaternion.identity, 1f, new Vector3(20f, 0f, 0f)),
Port.Hidden(PortDef.ERL_LP_TEXT, "idErlbachPart89", Vector3.zero, Quaternion.identity, 1f, new Vector3(20f, 0f, 0f)),
Port.Hidden(PortDef.ERL_LP_COUNTRY, "idErlbachPart90", Vector3.zero, Quaternion.identity, 1f, new Vector3(20f, 0f, 0f)),
Port.Hidden(PortDef.ERL_LP_BASE, "idErlbachPart88", Vector3.zero, Quaternion.identity, 1f, new Vector3(20f, 0f, 0f)),
Port.Choosable("License Plate", PortDef.ERL_LP_TC, "erlLP", Vector3.zero, Quaternion.identity, 1f, new Vector3(20f, 0f, 0f)),
Port.Choosable("Grill", PortDef.ERL_GRILL, "erlGrill_1", new Vector3(2.5f, 0f, -0.5f), Quaternion.identity, 1f, new Vector3(-20f, 0f, 0f)),
Port.Choosable("Headlight Cover", PortDef.ERL_BUMPER_FRONT, "idErlbachPart92", new Vector3(2.4f, 0f, -5.1f), Quaternion.identity, 1f, new Vector3(-20f, 0f, 0f)),
Port.Hidden(PortDef.ERL_DRL_PLATE, "idErlbachPart93", new Vector3(2.1f, 0f, -5.3f), Quaternion.identity, 1f, new Vector3(-20f, 0f, 0f)),
@@ -308,7 +306,24 @@ public class ModelList
new Vector3(1f, 1f, 1f), // scale
null, // no children
ModelListColors.ColorAluminiumBrushed // default colors
)
),
new ChildModel(
PortDef.ERL_LP_TC,
"License Plate",
"erlLP",
Resources.Load<Material>("Material/Universal"),
Vector3.zero,
Quaternion.Euler(0f, 0f, 0f), // no rotation
new Vector3(1f, 1f, 1f),
new List<Port>
{
Port.Hidden(PortDef.ERL_LP_TEXT, "idErlbachPart89", Vector3.zero, Quaternion.identity),
Port.Hidden(PortDef.ERL_LP_COUNTRY, "idErlbachPart90", Vector3.zero, Quaternion.identity),
},
ModelListColors.ColorLicensePlate,
true
),
};
static ModelList()
@@ -440,8 +455,8 @@ public class ModelList
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_LP_TEXT, "License Plate Content", "idErlbachPart89", Resources.Load<Material>($"Material/Universal"), Vector3.zero, Quaternion.identity, Vector3.one, null, null),
new ModelElement(PortDef.ERL_LP_COUNTRY, "Erlbach Part 90", "idErlbachPart90", Resources.Load<Material>($"Material/Universal"), 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),

View File

@@ -1,59 +1,62 @@
using System.Collections.Generic;
using UnityEngine;
namespace Models
public class ModelListColors
{
public class ModelListColors
public static readonly List<Color> DefaultColors = new List<Color>
{
public static List<Color> DefaultColors = new List<Color>()
{
Color.black,
Color.gray,
Color.blue,
Color.red,
Color.yellow,
};
public static List<Color> ColorGlass = new List<Color>()
{
Resources.Load<Material>($"Material/Glas").color,
new Color(0f, 0f, 0f, 0f),
new Color(0.2f, 0.2f, 0.2f, 0.45f),
new Color(0.1f, 0.1f, 0.1f, 0.65f),
new Color(0.05f, 0.05f, 0.05f, 0.80f),
};
public static List<Color> ColorAluminiumPolished = new List<Color>()
{
Color.black,
Resources.Load<Material>($"Material/AluminiumPolished").color,
Color.blue,
Color.red,
Color.yellow,
};
public static List<Color> ColorAluminiumScratched = new List<Color>()
{
Color.black,
Resources.Load<Material>($"Material/AluminiumScratched").color,
Color.blue,
Color.red,
Color.yellow,
};
public static List<Color> ColorAluminiumBrushed = new List<Color>()
{
Color.black,
Resources.Load<Material>($"Material/AluminiumBrushed").color,
Color.blue,
Color.red,
Color.yellow,
};
public static List<Color> ColorPVC = new List<Color>()
{
Resources.Load<Material>($"Material/PVC").color,
Color.blue,
Color.gray,
Color.red,
Color.yellow,
};
}
Color.black,
Color.gray,
Color.blue,
Color.red,
Color.yellow,
};
public static readonly List<Color> ColorGlass = new List<Color>
{
Resources.Load<Material>("Material/Glas").color,
new Color(0f, 0f, 0f, 0f),
new Color(0.2f, 0.2f, 0.2f, 0.45f),
new Color(0.1f, 0.1f, 0.1f, 0.65f),
new Color(0.05f, 0.05f, 0.05f, 0.80f),
};
public static readonly List<Color> ColorAluminiumPolished = new List<Color>
{
Color.black,
Resources.Load<Material>("Material/AluminiumPolished").color,
Color.blue,
Color.red,
Color.yellow,
};
public static readonly List<Color> ColorAluminiumScratched = new List<Color>
{
Color.black,
Resources.Load<Material>("Material/AluminiumScratched").color,
Color.blue,
Color.red,
Color.yellow,
};
public static readonly List<Color> ColorAluminiumBrushed = new List<Color>
{
Color.black,
Resources.Load<Material>("Material/AluminiumBrushed").color,
Color.blue,
Color.red,
Color.yellow,
};
public static readonly List<Color> ColorPVC = new List<Color>
{
Resources.Load<Material>("Material/PVC").color,
Color.blue,
Color.gray,
Color.red,
Color.yellow,
};
public static readonly List<Color> ColorLicensePlate = new List<Color>
{
Color.black,
Color.blue,
Color.red,
Color.yellow,
Color.green,
};
}

View File

@@ -109,6 +109,7 @@ public class PortDef
public const string ERL_BUMPER_FRONT = "erlBumperFront86";
public const string ERL_BADGE = "erlBadge87";
public const string ERL_LP_BASE = "erlLPBase88";
public const string ERL_LP_TC = "erlLPpickableu";
public const string ERL_LP_TEXT = "erlLPText89";
public const string ERL_LP_COUNTRY = "erlLPCountry90";
public const string ERL_GRILL = "portErlbach91";