Fixed Ui and Render
8
vr-configurator/Assets/Prefabs.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d1866531f44b5244912932d552c54d9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1239
vr-configurator/Assets/Prefabs/Prefab_Start Variant.prefab
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8f19560d962e1d41a27e39da3801bbe
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
148
vr-configurator/Assets/Resources/Model/Universal_Material.mat
Normal file
@@ -0,0 +1,148 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-6650246278199664053
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Universal_Material
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHAPREMULTIPLY_ON
|
||||
- _SURFACE_TYPE_TRANSPARENT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses:
|
||||
- SHADOWCASTER
|
||||
- DepthOnly
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ClearCoatMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BlendOp: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoat: 0
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _DstBlendAlpha: 10
|
||||
- _EnvironmentDepthBias: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _SampleGI: 0
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 1
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea8eb01250e51944baebadd61947dd36
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
vr-configurator/Assets/Resources/sprites.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57b8dfe2ca74e8040b69a4dc6abcce5d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 306 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 112 KiB |
BIN
vr-configurator/Assets/Resources/sprites/bike.png
Normal file
|
After Width: | Height: | Size: 101 KiB |
130
vr-configurator/Assets/Resources/sprites/bike.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef565f154d7c6c6469edd21da03171d1
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 5
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
vr-configurator/Assets/Resources/sprites/erlbach.png
Normal file
|
After Width: | Height: | Size: 114 KiB |
130
vr-configurator/Assets/Resources/sprites/erlbach.png.meta
Normal file
@@ -0,0 +1,130 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b48ee41a96447be4a9cc9d2c8dfd9b52
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 5
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
@@ -14,7 +14,7 @@ public class ModelList
|
||||
"Fahrrad",
|
||||
"bike",
|
||||
Resources.Load<Mesh>("Model/Bicycle/Models/Low-Poly Bicycle"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Vector3.zero,
|
||||
Quaternion.Euler(0,90,0),
|
||||
Vector3.one,
|
||||
@@ -34,7 +34,7 @@ public class ModelList
|
||||
"ERL-Bach",
|
||||
"erlbach",
|
||||
Resources.Load<Mesh>("Model/ERLbach/02.01.98.0000-ERLbach_vereinfacht"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
new Vector3(0,0,4f), //big car needs big space
|
||||
Quaternion.Euler(-90f,0f,0f), //rotate correctly
|
||||
new Vector3(0.03f,0.03f,0.03f), //model bisschen groß
|
||||
@@ -144,7 +144,7 @@ public class ModelList
|
||||
"Bacteria",
|
||||
"bacteria",
|
||||
Resources.Load<Mesh>("Plagues/Mesh/bacteria"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
null
|
||||
),
|
||||
new ChildModel(
|
||||
@@ -152,7 +152,7 @@ public class ModelList
|
||||
"ICBM",
|
||||
"nuke",
|
||||
Resources.Load<Mesh>("Plagues/Mesh/Nuke"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
null
|
||||
),
|
||||
new ChildModel(
|
||||
@@ -160,7 +160,7 @@ public class ModelList
|
||||
"30 Zoller MehrSpeicherFelge",
|
||||
"bike30inchAlloy",
|
||||
Resources.Load<Mesh>("Plagues/Mesh/Hex"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
null
|
||||
),
|
||||
new ChildModel(
|
||||
@@ -168,7 +168,7 @@ public class ModelList
|
||||
"Pedal Rechts",
|
||||
"bikePedalR",
|
||||
Resources.Load<Mesh>("Plagues/Mesh/Hex"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
null
|
||||
),
|
||||
new ChildModel(
|
||||
@@ -176,7 +176,7 @@ public class ModelList
|
||||
"Pedal Links",
|
||||
"bikePedalL",
|
||||
Resources.Load<Mesh>("Plagues/Mesh/Hex"),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
null
|
||||
)
|
||||
};
|
||||
@@ -224,12 +224,14 @@ public class ModelList
|
||||
Resources.LoadAll<Mesh>($"Model/Bicycle/Models/Low-Poly Bicycle"),
|
||||
new Material[6] //mat
|
||||
{
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
|
||||
|
||||
},
|
||||
new List<Port>[6] // ports
|
||||
{
|
||||
@@ -549,100 +551,104 @@ public class ModelList
|
||||
Resources.LoadAll<Mesh>($"Model/ERLbach/02.01.98.0000-ERLbach_vereinfacht"),
|
||||
new Material[94] //mat
|
||||
{
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
new Material(Shader.Find("VR/SpatialMapping/Occlusion")),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
Resources.Load<Material>($"Model/Universal_Material"),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
new List<Port>[94] // ports
|
||||
|
||||
@@ -101,6 +101,7 @@ public class ModelManager : MonoBehaviour
|
||||
{
|
||||
// Neues GameObject für das BaseModel erstellen
|
||||
this.baseModel = new GameObject(baseModel.nameId);
|
||||
this.baseModel.name = baseModel.nameId;
|
||||
this.baseModel.AddComponent<BaseModelBehaviour>();
|
||||
// Positionieren
|
||||
this.baseModel.transform.position = new Vector3(0, 0, 1);
|
||||
@@ -108,6 +109,7 @@ public class ModelManager : MonoBehaviour
|
||||
}
|
||||
|
||||
this.baseModel.GetComponent<BaseModelBehaviour>().baseModel = baseModel;
|
||||
this.baseModel.name = baseModel.nameId;
|
||||
Debug.Log($"Modell {baseModel.nameHuman} geladen und platziert.");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
@@ -17,8 +19,7 @@ public class BaseModelSelector : MonoBehaviour
|
||||
{
|
||||
SetupEventSystem();
|
||||
SetupCanvas();
|
||||
SetupButtonPrefab();
|
||||
CreateButtons();
|
||||
CreatePrefabButtons();
|
||||
}
|
||||
|
||||
void SetupEventSystem()
|
||||
@@ -101,7 +102,10 @@ public class BaseModelSelector : MonoBehaviour
|
||||
|
||||
foreach (var baseModel in ModelList.BaseModels)
|
||||
{
|
||||
Sprite buttonBackground = Resources.Load<Sprite>("UI/"+baseModel.nameId); // ohne .png
|
||||
GameObject buttonGO = Instantiate(buttonPrefab, canvas.transform);
|
||||
Image image = buttonGO.GetComponent<Image>();
|
||||
image.sprite = buttonBackground;
|
||||
buttonGO.SetActive(true);
|
||||
var collider = buttonGO.AddComponent<BoxCollider>();
|
||||
RectTransform rt = buttonGO.GetComponent<RectTransform>();
|
||||
@@ -110,6 +114,8 @@ public class BaseModelSelector : MonoBehaviour
|
||||
rt.localPosition = new Vector3(0, startY, 0); // Position im Canvas
|
||||
rt.localRotation = Quaternion.identity;
|
||||
|
||||
|
||||
|
||||
// Collider richtig setzen
|
||||
collider.size = new Vector3(rt.sizeDelta.x * rt.localScale.x, rt.sizeDelta.y * rt.localScale.y, 1f);
|
||||
collider.center = Vector3.zero;
|
||||
@@ -127,6 +133,31 @@ public class BaseModelSelector : MonoBehaviour
|
||||
startY -= buttonHeight; // Nächster Button weiter unten
|
||||
}
|
||||
}
|
||||
|
||||
void CreatePrefabButtons()
|
||||
{
|
||||
float startY = 0; // Anfangsposition auf Y-Achse
|
||||
float buttonHeight = 0.5f; // Abstand zwischen den Buttons
|
||||
foreach (var baseModel in ModelList.BaseModels)
|
||||
{
|
||||
GameObject buttonGO = SetupPrefab(baseModel);
|
||||
buttonGO.transform.SetParent(canvas.transform);
|
||||
RectTransform rt = buttonGO.GetComponent<RectTransform>();
|
||||
var collider = buttonGO.AddComponent<BoxCollider>();
|
||||
rt.sizeDelta = new Vector2(300, 50);
|
||||
rt.localScale = Vector3.one * 0.005f;// Größe des Buttons
|
||||
rt.localPosition = new Vector3(0, startY, 0); // Position im Canvas
|
||||
rt.localRotation = Quaternion.identity;
|
||||
|
||||
// Collider richtig setzen
|
||||
collider.size = new Vector3(rt.sizeDelta.x * rt.localScale.x, rt.sizeDelta.y * rt.localScale.y, 1f);
|
||||
collider.center = Vector3.zero;
|
||||
|
||||
buttonGO.GetComponent<Button>().onClick.AddListener(() => OnModelButtonClicked(baseModel));
|
||||
startY -= buttonHeight; // Nächster Button weiter unten
|
||||
}
|
||||
|
||||
}
|
||||
// Wenn ein Button geklickt wird
|
||||
public void OnModelButtonClicked(BaseModel model)
|
||||
{
|
||||
@@ -153,6 +184,58 @@ public class BaseModelSelector : MonoBehaviour
|
||||
{
|
||||
return selectedModel;
|
||||
}
|
||||
|
||||
public static GameObject SetupPrefab(BaseModel model)
|
||||
{
|
||||
// Hauptobjekt
|
||||
GameObject buttonGO = new GameObject("ModelButton_" + model.nameId);
|
||||
buttonGO.AddComponent<RectTransform>();
|
||||
|
||||
var button = buttonGO.AddComponent<Button>();
|
||||
|
||||
var image = buttonGO.AddComponent<Image>();
|
||||
|
||||
// Lade individuellen Hintergrund aus Resources/UI/ButtonBackgrounds/
|
||||
var backgroundSprite = Resources.Load<Sprite>($"sprites/default");
|
||||
if (backgroundSprite != null)
|
||||
image.sprite = backgroundSprite;
|
||||
else
|
||||
image.color = new Color(0.2f, 0.2f, 0.2f, 0.8f); // Fallback-Farbe
|
||||
|
||||
// Größe
|
||||
RectTransform rt = buttonGO.GetComponent<RectTransform>();
|
||||
rt.sizeDelta = new Vector2(300, 100);
|
||||
|
||||
// === Icon ===
|
||||
GameObject iconGO = new GameObject("Icon");
|
||||
iconGO.transform.SetParent(buttonGO.transform, false);
|
||||
var iconImage = iconGO.AddComponent<Image>();
|
||||
iconImage.sprite = Resources.Load<Sprite>($"sprites/"+model.nameId);
|
||||
|
||||
RectTransform iconRT = iconGO.GetComponent<RectTransform>();
|
||||
iconRT.anchorMin = new Vector2(0, 0.5f);
|
||||
iconRT.anchorMax = new Vector2(0, 0.5f);
|
||||
iconRT.pivot = new Vector2(0, 0.5f);
|
||||
iconRT.anchoredPosition = new Vector2(10, 0);
|
||||
iconRT.sizeDelta = new Vector2(44, 22);
|
||||
|
||||
// === Titel ===
|
||||
GameObject titleGO = new GameObject("TitleText");
|
||||
titleGO.transform.SetParent(buttonGO.transform, false);
|
||||
var titleText = titleGO.AddComponent<TextMeshProUGUI>();
|
||||
titleText.text = model.nameHuman;
|
||||
titleText.fontSize = 24;
|
||||
|
||||
RectTransform titleRT = titleGO.GetComponent<RectTransform>();
|
||||
titleRT.anchorMin = new Vector2(0, 1);
|
||||
titleRT.anchorMax = new Vector2(1, 1);
|
||||
titleRT.pivot = new Vector2(0, 1);
|
||||
titleRT.anchoredPosition = new Vector2(60, -10);
|
||||
titleRT.sizeDelta = new Vector2(-70, 30);
|
||||
|
||||
return buttonGO;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ QualitySettings:
|
||||
globalTextureMipmapLimit: 0
|
||||
textureMipmapLimitSettings: []
|
||||
anisotropicTextures: 1
|
||||
antiAliasing: 2
|
||||
antiAliasing: 0
|
||||
softParticles: 0
|
||||
softVegetation: 1
|
||||
realtimeReflectionProbes: 0
|
||||
|
||||