Change ChildModels

This commit is contained in:
Max
2025-06-07 15:42:41 +02:00
parent 5702cbb451
commit 4823525bbc
17 changed files with 1044666 additions and 1590856 deletions

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7d091ba49d734dc45a2632302572f35a
guid: 4623b64bb5abdf4438d1803aeb39ad76
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: 3c49d586ee6ebcb4abab30d0a3901797
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: f275eabe312e60247a181ad76ebc428c
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: f7a1a40d16dc8364da14ef6b86884eac
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,107 @@
fileFormatVersion: 2
guid: dfc44d5258a259342a181d96a6bb3944
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -6900,7 +6900,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &527859712
@@ -8438,6 +8438,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fd4fcdc40e7716b4fb712ddf70bf60d0, type: 3}
m_Name:
m_EditorClassIdentifier:
ModelManager: {fileID: 0}
--- !u!1 &650883385
GameObject:
m_ObjectHideFlags: 0
@@ -13644,8 +13645,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
prefab: {fileID: 2134871360}
offset: {x: 0, y: 30, z: 0}
colors: []
--- !u!224 &1119562572
RectTransform:
m_ObjectHideFlags: 0
@@ -18238,7 +18237,6 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
baseModelGO: {fileID: 645201570}
BaseModelBehaviour: {fileID: 645201572}
baseModelSelector: {fileID: 624025131}
childPositions: []
--- !u!4 &1519836176
@@ -25547,9 +25545,9 @@ RectTransform:
m_Children: []
m_Father: {fileID: 6345901853915414384}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 79.8, y: -8}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 12, y: 16}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2049336861
@@ -28156,7 +28154,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -16, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1}
--- !u!1 &6345901853109154231
GameObject:
@@ -28265,9 +28263,9 @@ RectTransform:
- {fileID: 6345901854311680397}
m_Father: {fileID: 6345901853915414384}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 431.6, y: -246.65}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 624, y: 493.3}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &6345901853639355131
@@ -28482,10 +28480,10 @@ RectTransform:
- {fileID: 6345901853639355130}
m_Father: {fileID: 6345901854739878354}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 395.80002, y: -270.65}
m_SizeDelta: {x: 743.60004, y: 493.3}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &6345901853915414385
GameObject:
@@ -28589,9 +28587,9 @@ RectTransform:
- {fileID: 853287853803370243}
m_Father: {fileID: 6345901853915414384}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 20, y: -194.7}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 40, y: 389.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6345901854251329130
@@ -28766,10 +28764,10 @@ RectTransform:
- {fileID: 6345901854403353661}
m_Father: {fileID: 6345901853639355130}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 312, y: -246.65}
m_SizeDelta: {x: 624, y: 493.3}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6345901854311680398
CanvasRenderer:
@@ -29131,7 +29129,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!114 &6345901854734501749
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -29157,7 +29155,7 @@ Transform:
m_GameObject: {fileID: 6345901854734501745}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0.28739327, z: -0, w: 0.9578127}
m_LocalPosition: {x: -1, y: 2.3, z: 0.645}
m_LocalPosition: {x: -0.5, y: 2, z: 0.645}
m_LocalScale: {x: 2, y: 2, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
@@ -29183,7 +29181,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 745, y: -607}
m_SizeDelta: {x: 779.60004, y: 541.3}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0}
--- !u!1 &6345901854739878355
GameObject:
@@ -29486,8 +29484,8 @@ RectTransform:
m_Children: []
m_Father: {fileID: 6345901854472455887}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.55339396}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}

View File

@@ -101,7 +101,10 @@ public class Definitions
public const string PORT_ERLBACH_77 = "portErlbach77";
public const string PORT_ERLBACH_78 = "portErlbach78";
public const string PORT_ERLBACH_79 = "portErlbach79";
public const string PORT_ERLBACH_Wheel = "wheel";
public const string Port_Erlbach_Wheel_LH = "wheel_LH";
public const string Port_Erlbach_Wheel_LV = "wheel_LV";
public const string PORT_ERLBACH_Wheel_RV = "wheel_RV";
public const string PORT_ERLBACH_Wheel_RH= "wheel_RH";
public const string PORT_ERLBACH_Body = "body";
public const string PORT_ERLBACH_Bumper = "portErlbach85";
public const string PORT_ERLBACH_FrontBumper = "portErlbach86";

View File

@@ -7,7 +7,20 @@ using UnityEngine;
/// </summary>
public class ModelList
{
public static List<Color> DefaultColors;
public static List<Color> DefaultColors = new List<Color>()
{
Color.black,
Color.gray,
Color.white,
Color.blue,
Color.green,
Color.red,
Color.yellow,
Color.magenta,
Color.cyan,
};
public static readonly List<BaseModel> BaseModels = new List<BaseModel>()
{
@@ -37,7 +50,7 @@ public class ModelList
new BaseModel(
"ERL-Bach",
"erlbach",
Resources.Load<Mesh>("Model/ERLbach/02.01.98.0000-ERLbach_vereinfacht"),
Resources.Load<Mesh>("Model/ERLbach/02.01.98.0000-ERLbach_vereinfacht (1)"),
Resources.Load<Material>($"Material/Default"),
new Vector3(0,0,4f), //big car needs big space
Quaternion.Euler(-90f,0f,0f), //rotate correctly
@@ -124,10 +137,10 @@ public class ModelList
new Port(Definitions.PORT_ERLBACH_77, new Vector3(0f, 0f, 0f), "idErlbachPart77", false),
new Port(Definitions.PORT_ERLBACH_78, new Vector3(0f, 0f, 0f), "idErlbachPart78", false),
new Port(Definitions.PORT_ERLBACH_79, new Vector3(0f, 0f, 0f), "idErlbachPart79", false),
new Port(Definitions.PORT_ERLBACH_Wheel, new Vector3(0f, 0f, 0f), "idErlbachWheel_LH", true, new Vector3(0f,-1f,0f)),
new Port(Definitions.PORT_ERLBACH_Wheel, new Vector3(0f, 0f, 0f), "idErlbachWheel_LV",true, new Vector3(0f,-1f,0f)),
new Port(Definitions.PORT_ERLBACH_Wheel, new Vector3(0f, 0f, 0f), "idErlbachWheel_RH",true, new Vector3(0f,1f,0f)),
new Port(Definitions.PORT_ERLBACH_Wheel, new Vector3(0f, 0f, 0f), "idErlbachWheel_RV",true, new Vector3(0f,1f,0f)),
new Port(Definitions.Port_Erlbach_Wheel_LH, new Vector3(0f, 0f, 0f), "idErlbachWheel_LH", true, new Vector3(0f,-1f,0f)),
new Port(Definitions.Port_Erlbach_Wheel_LV, new Vector3(0f, 0f, 0f), "idErlbachWheel_LV",true, new Vector3(0f,-1f,0f)),
new Port(Definitions.PORT_ERLBACH_Wheel_RH, new Vector3(0f, 0f, 0f), "idErlbachWheel_RH",true, new Vector3(0f,1f,0f)),
new Port(Definitions.PORT_ERLBACH_Wheel_RV, new Vector3(0f, 0f, 0f), "idErlbachWheel_RV",true, new Vector3(0f,1f,0f)),
new Port(Definitions.PORT_ERLBACH_Body, new Vector3(0f, 0f, 0f), "idErlbachPart84",true, new Vector3(0f,0f,1f)),
new Port(Definitions.PORT_ERLBACH_Bumper, new Vector3(0f, 0f, 0f), "idErlbachPart85",true, new Vector3(1f,0f,0f)),
new Port(Definitions.PORT_ERLBACH_FrontBumper, new Vector3(0f, 0f, 0f), "idErlbachPart86",true, new Vector3(-1f,0f,0f)),
@@ -207,18 +220,165 @@ public class ModelList
Resources.Load<Material>($"Material/Default"),
null
),
//Felge 1
new ChildModel(
Definitions.PORT_ERLBACH_Wheel,
"Wheel",
"rad20",
Resources.Load<Mesh>($"Model/ERLbach/02.01.05.0000-Rad_5Speichen"),
Resources.Load<Material>($"Material/Default"),
Definitions.PORT_ERLBACH_Wheel_RH,
"Felge 1",
"radRH",
Resources.Load<Mesh>($"Model/ERLbach/Felge1"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(60f, 65f, -15f), // offset to the port
Quaternion.Euler(0, 0, 0),
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
)
),
new ChildModel(
Definitions.PORT_ERLBACH_Wheel_RV,
"Felge 1",
"radRV",
Resources.Load<Mesh>($"Model/ERLbach/Felge1"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-105f, 65f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.Port_Erlbach_Wheel_LV,
"Felge 1",
"radLV",
Resources.Load<Mesh>($"Model/ERLbach/Felge1"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-105f, -30f, -15f), // offset to the port
Quaternion.Euler(0, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.Port_Erlbach_Wheel_LH,
"Felge 1",
"radLH",
Resources.Load<Mesh>($"Model/ERLbach/Felge1"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-60f, -30f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
//Felge 2
new ChildModel(
Definitions.PORT_ERLBACH_Wheel_RH,
"Felge 2",
"radRH2",
Resources.Load<Mesh>($"Model/ERLbach/Felge2"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(60f, 65f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.PORT_ERLBACH_Wheel_RV,
"Felge 2",
"radRV2",
Resources.Load<Mesh>($"Model/ERLbach/Felge2"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-105f, 65f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.Port_Erlbach_Wheel_LV,
"Felge 2",
"radLV2",
Resources.Load<Mesh>($"Model/ERLbach/Felge2"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-105f, -30f, -15f), // offset to the port
Quaternion.Euler(0, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.Port_Erlbach_Wheel_LH,
"Felge 2",
"radLH2",
Resources.Load<Mesh>($"Model/ERLbach/Felge2"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-60f, -30f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
//Felge 3
new ChildModel(
Definitions.PORT_ERLBACH_Wheel_RH,
"Felge 3",
"radRH3",
Resources.Load<Mesh>($"Model/ERLbach/Felge3"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(60f, 65f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.PORT_ERLBACH_Wheel_RV,
"Felge 3",
"radRV3",
Resources.Load<Mesh>($"Model/ERLbach/Felge3"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-105f, 65f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.Port_Erlbach_Wheel_LV,
"Felge 3",
"radLV3",
Resources.Load<Mesh>($"Model/ERLbach/Felge3"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-105f, -30f, -15f), // offset to the port
Quaternion.Euler(0, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.Port_Erlbach_Wheel_LH,
"Felge 3",
"radLH3",
Resources.Load<Mesh>($"Model/ERLbach/Felge3"),
Resources.Load<Material>($"Material/CarTire"),
new Vector3(-60f, -30f, -15f), // offset to the port
Quaternion.Euler(-180, 0, 0),
new Vector3(1f, 1f, 1f),
null,
DefaultColors
),
new ChildModel(
Definitions.PORT_ERLBACH_Grill,
"Grill",
"idErlbachGrill",
Resources.Load<Mesh>("Model/ERLbach/Grill1"),
Resources.Load<Material>("Material/Universal"),
new Vector3(-145f, -35f, 25f), // offset to the port
Quaternion.Euler(0f, 180f, -90f), // no rotation
new Vector3(1f, 1f, 1f), // scale
null, // no children
DefaultColors // default colors
)
};
static ModelList()
@@ -228,19 +388,7 @@ public class ModelList
Debug.LogError("Who messed the Hex code up?");
return;
}
DefaultColors = new List<Color>
{
Color.black,
Color.gray,
Color.white,
Color.blue,
Color.green,
Color.red,
Color.yellow,
Color.magenta,
Color.cyan,
purple
};
/*
* ██████ ██ ██ ██ ███████
@@ -356,10 +504,10 @@ public class ModelList
Definitions.PORT_ERLBACH_77,
Definitions.PORT_ERLBACH_78,
Definitions.PORT_ERLBACH_79,
Definitions.PORT_ERLBACH_Wheel,
Definitions.PORT_ERLBACH_Wheel,
Definitions.PORT_ERLBACH_Wheel,
Definitions.PORT_ERLBACH_Wheel,
Definitions.Port_Erlbach_Wheel_LH,
Definitions.Port_Erlbach_Wheel_LV,
Definitions.PORT_ERLBACH_Wheel_RH,
Definitions.PORT_ERLBACH_Wheel_RV,
Definitions.PORT_ERLBACH_Body,
Definitions.PORT_ERLBACH_Bumper,
Definitions.PORT_ERLBACH_FrontBumper,
@@ -567,7 +715,7 @@ public class ModelList
"idErlbachPart93",
},
Resources.LoadAll<Mesh>($"Model/ERLbach/02.01.98.0000-ERLbach_vereinfacht"),
Resources.LoadAll<Mesh>($"Model/ERLbach/02.01.98.0000-ERLbach_vereinfacht (1)"),
new Material[94] //mat
{
Resources.Load<Material>($"Material/Default"),
@@ -750,7 +898,7 @@ public class ModelList
Vector3.zero,
Vector3.zero,
Vector3.zero,
new Vector3(-60,-65,15), // wheel RH
Vector3.zero, // wheel RH
Vector3.zero,
Vector3.zero,
Vector3.zero,

View File

@@ -164,12 +164,13 @@ public class ModelManager : MonoBehaviour
var childModels = GetChildModelsForPort(port.PortID);
if (childModels.Contains(childModel))
{
if (port.DefaultId == childModel.NameId)
{
return port;
}
}
}
Debug.Log($"No child model found for port {childModel.Port}");
return null;
}

View File

@@ -37,7 +37,7 @@ public class ExplodeModel : MonoBehaviour
Debug.Log("Richtung Pos" + richtung*10);
child.localPosition = richtung*10;
child.localPosition += richtung*10;
}
}
gameObject.SetActive(false);

View File

@@ -68,6 +68,7 @@ public class ChildModelSelector : MonoBehaviour
public void OnClick(ChildModel model)
{
modelManager.BaseModelBehaviour.UpdateChild(PortIndex, model.NameId);
colorSelector.GenerateButtons(model, PortIndex);
}
}

View File

@@ -33,6 +33,15 @@ public class PortSelector : MonoBehaviour
var go = Spawn.GO(prefab, transform, off, port.PortID + i);
ports.Add(go);
go.SetActive(true);
var text = go.GetComponentInChildren<TMPro.TextMeshProUGUI>();
if (text != null)
{
text.text = port.PortID;
}
else
{
Debug.LogWarning($"No TextMeshProUGUI found in {go.name}, cannot set PortID text.");
}
var psb = go.GetComponent<PortSelectorButton>();
psb.PortID = port.PortID;
psb.PortIndex = index;