diff --git a/3d Prototyp/Assets/Editor/ReplaceWithPrefab.cs b/3d Prototyp/Assets/Editor/ReplaceWithPrefab.cs index 4abcfacd..ff083bc3 100644 --- a/3d Prototyp/Assets/Editor/ReplaceWithPrefab.cs +++ b/3d Prototyp/Assets/Editor/ReplaceWithPrefab.cs @@ -1,57 +1,65 @@ -using UnityEngine; using UnityEditor; +using UnityEngine; -public class ReplaceWithPrefab : EditorWindow +namespace GameVsJam.Editor { - [SerializeField] private GameObject prefab; - - [MenuItem("Tools/Replace With Prefab")] - static void CreateReplaceWithPrefab() + public class ReplaceWithPrefab : EditorWindow { - EditorWindow.GetWindow(); - } + [SerializeField] private GameObject prefab; - private void OnGUI() - { - prefab = (GameObject)EditorGUILayout.ObjectField("Prefab", prefab, typeof(GameObject), false); - - if (GUILayout.Button("Replace")) + [MenuItem("Tools/Replace With Prefab")] + static void CreateReplaceWithPrefab() { - var selection = Selection.gameObjects; - - for (var i = selection.Length - 1; i >= 0; --i) - { - var selected = selection[i]; - var prefabType = PrefabUtility.GetPrefabType(prefab); - GameObject newObject; - - if (prefabType == PrefabType.Prefab) - { - newObject = (GameObject)PrefabUtility.InstantiatePrefab(prefab); - } - else - { - newObject = Instantiate(prefab); - newObject.name = prefab.name; - } - - if (newObject == null) - { - Debug.LogError("Error instantiating prefab"); - break; - } - - Undo.RegisterCreatedObjectUndo(newObject, "Replace With Prefabs"); - newObject.transform.parent = selected.transform.parent; - newObject.transform.localPosition = selected.transform.localPosition; - newObject.transform.localRotation = selected.transform.localRotation; - newObject.transform.localScale = selected.transform.localScale; - newObject.transform.SetSiblingIndex(selected.transform.GetSiblingIndex()); - Undo.DestroyObjectImmediate(selected); - } + ReplaceWithPrefab v = EditorWindow.GetWindow(); + } - GUI.enabled = false; - EditorGUILayout.LabelField("Selection count: " + Selection.objects.Length); + private void OnGUI() + { + prefab = (GameObject)EditorGUILayout.ObjectField("Prefab", prefab, typeof(GameObject), false); + + if (GUILayout.Button("Replace")) + { + var selection = Selection.gameObjects; + + for (var i = selection.Length - 1; i >= 0; --i) + { + var selected = selection[i]; + var prefabType = PrefabUtility.GetPrefabType(prefab); + GameObject newObject; + + if (prefabType == PrefabType.Prefab) + { + newObject = (GameObject)PrefabUtility.InstantiatePrefab(prefab); + } + else + { + newObject = Instantiate(prefab); + newObject.name = prefab.name; + } + + if (newObject == null) + { + Debug.LogError("Error instantiating prefab"); + break; + } + + Undo.RegisterCreatedObjectUndo(newObject, "Replace With Prefabs"); + newObject.transform.parent = selected.transform.parent; + newObject.transform.localPosition = selected.transform.localPosition; + newObject.transform.localRotation = selected.transform.localRotation; + newObject.transform.localScale = selected.transform.localScale; + newObject.transform.SetSiblingIndex(selected.transform.GetSiblingIndex()); + Undo.DestroyObjectImmediate(selected); + } + } + + GUI.enabled = false; + EditorGUILayout.LabelField("Selection count: " + Selection.objects.Length); + } + + // private void OnLostFocus() { + // GetWindow().Close(); + // } } } diff --git a/3d Prototyp/Assets/Models/OfficeAberBesser.meta b/3d Prototyp/Assets/Models/OfficeAberBesser.meta new file mode 100644 index 00000000..066b620c --- /dev/null +++ b/3d Prototyp/Assets/Models/OfficeAberBesser.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 865b71c9c453d214ab262090a2df6bbc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.fbx b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.fbx new file mode 100644 index 00000000..94b4d521 Binary files /dev/null and b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.fbx differ diff --git a/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.fbx.meta b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.fbx.meta new file mode 100644 index 00000000..a3ff6765 --- /dev/null +++ b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.fbx.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 21114d87a18670d458fef18c5c955cb7 +ModelImporter: + serializedVersion: 20200 + internalIDToNameTable: [] + externalObjects: {} + materials: + materialImportMode: 0 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + motionNodeName: + rigImportErrors: + rigImportWarnings: + 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 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + 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 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.mat b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.mat new file mode 100644 index 00000000..4463cdee --- /dev/null +++ b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.mat @@ -0,0 +1,85 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Fenster + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: + - _ALPHAPREMULTIPLY_ON + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: 3000 + stringTagMap: + RenderType: Transparent + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + 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} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 10 + - _GlossMapScale: 1 + - _Glossiness: 1 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 3 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 0 + m_Colors: + - _Color: {r: 0.8254717, g: 1, b: 0.9822426, a: 0.078431375} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.mat.meta b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.mat.meta new file mode 100644 index 00000000..cfac12bf --- /dev/null +++ b/3d Prototyp/Assets/Models/OfficeAberBesser/Fenster.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd0053515345ee842b17c74821aa6f21 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Prefabs/Office.meta b/3d Prototyp/Assets/Prefabs/Office.meta new file mode 100644 index 00000000..d1da2fcd --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 403ea8b4fbd69de43aa6d83cf867acca +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Prefabs/Office/Fenster.prefab b/3d Prototyp/Assets/Prefabs/Office/Fenster.prefab new file mode 100644 index 00000000..350e65d6 --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office/Fenster.prefab @@ -0,0 +1,285 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &1421600764683966730 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4806166398382453994} + - component: {fileID: 5525564577096015395} + - component: {fileID: 6690717389782187281} + m_Layer: 0 + m_Name: Quad + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4806166398382453994 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1421600764683966730} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1, y: 0.98, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4971677286009819382} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!33 &5525564577096015395 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1421600764683966730} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &6690717389782187281 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1421600764683966730} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fd0053515345ee842b17c74821aa6f21, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1 &8738108847560669925 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 674068033296295013} + - component: {fileID: 7587083590336440717} + - component: {fileID: 1449372998064691898} + m_Layer: 0 + m_Name: Quad (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &674068033296295013 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8738108847560669925} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: -1, y: 0.98, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 4971677286009819382} + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!33 &7587083590336440717 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8738108847560669925} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &1449372998064691898 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8738108847560669925} + m_Enabled: 1 + m_CastShadows: 0 + m_ReceiveShadows: 0 + m_DynamicOccludee: 1 + m_StaticShadowCaster: 0 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RayTracingMode: 2 + m_RayTraceProcedural: 0 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: fd0053515345ee842b17c74821aa6f21, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_ReceiveGI: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 1 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 + m_AdditionalVertexStreams: {fileID: 0} +--- !u!1001 &4860592756160149277 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalPosition.x + value: -44.360016 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalPosition.z + value: -12.389995 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalRotation.w + value: 0.70710653 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalRotation.y + value: -0.70710707 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: fcdb7a99237c6417a9e5766d641a824c, type: 2} + - target: {fileID: -5754084199372789682, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_Mesh + value: + objectReference: {fileID: -4272914438286383875, guid: 21114d87a18670d458fef18c5c955cb7, type: 3} + - target: {fileID: 919132149155446097, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_Name + value: Fenster + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: + - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + insertIndex: -1 + addedObject: {fileID: 4806166398382453994} + - targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + insertIndex: -1 + addedObject: {fileID: 674068033296295013} + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + insertIndex: -1 + addedObject: {fileID: 7865481622492072961} + m_SourcePrefab: {fileID: 100100000, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} +--- !u!4 &4971677286009819382 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + m_PrefabInstance: {fileID: 4860592756160149277} + m_PrefabAsset: {fileID: 0} +--- !u!1 &5743534876163705420 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 4fefcaeb826ad4ef1a6c87b8434a6185, type: 3} + m_PrefabInstance: {fileID: 4860592756160149277} + m_PrefabAsset: {fileID: 0} +--- !u!65 &7865481622492072961 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5743534876163705420} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 2, y: 2, z: 0.5} + m_Center: {x: -0.9999995, y: 1, z: -0.000000007450581} diff --git a/3d Prototyp/Assets/Prefabs/Office/Fenster.prefab.meta b/3d Prototyp/Assets/Prefabs/Office/Fenster.prefab.meta new file mode 100644 index 00000000..ad3c5fde --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office/Fenster.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8b405645f944e0042afcad997d3a5866 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Prefabs/Office/Office_Boden.prefab b/3d Prototyp/Assets/Prefabs/Office/Office_Boden.prefab new file mode 100644 index 00000000..d7da5b72 --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office/Office_Boden.prefab @@ -0,0 +1,100 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &8637557813474652368 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalPosition.x + value: 5.104243 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalPosition.z + value: 4.601245 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalRotation.w + value: 0.7071068 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalRotation.y + value: -0.70710677 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: -90 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 96c8f49ed5da83645a2e95d7af1a1dd6, type: 2} + - target: {fileID: 919132149155446097, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_Name + value: toon__office_tile_ground_low_4x4 (2) + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + propertyPath: m_Layer + value: 3 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + insertIndex: -1 + addedObject: {fileID: 6961330016171024643} + m_SourcePrefab: {fileID: 100100000, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} +--- !u!1 &8871999734445985153 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: b2a58bff693e940b0bd58bc12b2218be, type: 3} + m_PrefabInstance: {fileID: 8637557813474652368} + m_PrefabAsset: {fileID: 0} +--- !u!65 &6961330016171024643 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8871999734445985153} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 4.028, y: 0.5, z: 4.028} + m_Center: {x: 0, y: 0.25, z: 0} diff --git a/3d Prototyp/Assets/Prefabs/Office/Office_Boden.prefab.meta b/3d Prototyp/Assets/Prefabs/Office/Office_Boden.prefab.meta new file mode 100644 index 00000000..0456c0ec --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office/Office_Boden.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c7a42191588ac434e9b5b79a90c53a02 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Prefabs/toon_office_tile_wall_door_swingy.prefab b/3d Prototyp/Assets/Prefabs/Office/Tür.prefab similarity index 100% rename from 3d Prototyp/Assets/Prefabs/toon_office_tile_wall_door_swingy.prefab rename to 3d Prototyp/Assets/Prefabs/Office/Tür.prefab diff --git a/3d Prototyp/Assets/Prefabs/toon_office_tile_wall_door_swingy.prefab.meta b/3d Prototyp/Assets/Prefabs/Office/Tür.prefab.meta similarity index 100% rename from 3d Prototyp/Assets/Prefabs/toon_office_tile_wall_door_swingy.prefab.meta rename to 3d Prototyp/Assets/Prefabs/Office/Tür.prefab.meta diff --git a/3d Prototyp/Assets/Prefabs/Office/Wand.prefab b/3d Prototyp/Assets/Prefabs/Office/Wand.prefab new file mode 100644 index 00000000..cdf61fad --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office/Wand.prefab @@ -0,0 +1,96 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &3518204058149100962 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalPosition.x + value: 7.1042433 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalPosition.z + value: 2.801247 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: fcdb7a99237c6417a9e5766d641a824c, type: 2} + - target: {fileID: 919132149155446097, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + propertyPath: m_Name + value: toon_office_tile_wall (4) + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: + - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + insertIndex: -1 + addedObject: {fileID: 2858800668281746676} + m_SourcePrefab: {fileID: 100100000, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} +--- !u!1 &4328594908762710259 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 661d685e026c547f0a6c2f2d0c859fe7, type: 3} + m_PrefabInstance: {fileID: 3518204058149100962} + m_PrefabAsset: {fileID: 0} +--- !u!65 &2858800668281746676 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4328594908762710259} + m_Material: {fileID: 0} + m_IncludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_ExcludeLayers: + serializedVersion: 2 + m_Bits: 0 + m_LayerOverridePriority: 0 + m_IsTrigger: 0 + m_ProvidesContacts: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Size: {x: 2, y: 2, z: 0.5} + m_Center: {x: -0.9999995, y: 1, z: -0.000000007450581} diff --git a/3d Prototyp/Assets/Prefabs/Office/Wand.prefab.meta b/3d Prototyp/Assets/Prefabs/Office/Wand.prefab.meta new file mode 100644 index 00000000..087191a1 --- /dev/null +++ b/3d Prototyp/Assets/Prefabs/Office/Wand.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8bd66cb211eed644bb969b2145b61c45 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Scripts/CameraScript.cs b/3d Prototyp/Assets/Scripts/CameraScript.cs new file mode 100644 index 00000000..d15edb95 --- /dev/null +++ b/3d Prototyp/Assets/Scripts/CameraScript.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CameraScript : MonoBehaviour +{ + [SerializeField] + private Character _character; + + [SerializeField] + private Camera _camera; + + public float Distance = 5.0f; + + void Start() + { + Vector4 position = new Vector4(0, 0, -Distance, 1.0f); + + Matrix4x4 mat = Matrix4x4.Rotate(Quaternion.Euler(45, 0, 0)); + + _camera.transform.localPosition = mat * position; + transform.position = _character.transform.position; + } + + // Update is called once per frame + void Update() + { + transform.position = _character.transform.position; + } + + private void OnValidate() + { + Start(); + } +} diff --git a/3d Prototyp/Assets/Scripts/CameraScript.cs.meta b/3d Prototyp/Assets/Scripts/CameraScript.cs.meta new file mode 100644 index 00000000..3a835743 --- /dev/null +++ b/3d Prototyp/Assets/Scripts/CameraScript.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 69662b2e17f93e54d8e52fca91af8c51 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/3d Prototyp/Assets/Scripts/Developer.cs b/3d Prototyp/Assets/Scripts/Developer.cs index c175d1dd..63b12db3 100644 --- a/3d Prototyp/Assets/Scripts/Developer.cs +++ b/3d Prototyp/Assets/Scripts/Developer.cs @@ -148,6 +148,7 @@ public class Developer : MonoBehaviour _talkTimer = Random.Range(5.0f, 15.0f); _fingersLeft = _baseStats.Fingers; _privateContextBuffer = new CircularBuffer(_maxPrivateContextBufferSize); + } private void Update() diff --git a/3d Prototyp/License.txt b/3d Prototyp/License.txt index 99f2dae6..33a73132 100644 --- a/3d Prototyp/License.txt +++ b/3d Prototyp/License.txt @@ -1,2 +1,4 @@ TODO: Zu erwähnende Credits: -"Pizza" by Rigsters: https://sketchfab.com/3d-models/pizza-40d50989fec1460f8838b608d999ccd0 \ No newline at end of file +"Pizza" by Rigsters: https://sketchfab.com/3d-models/pizza-40d50989fec1460f8838b608d999ccd0 +"Flasche" by gelmi.com.br: https://sketchfab.com/3d-models/beer-bottle-c3de7f8b092e4092aef14d4ffc9fac7f +Vending Machine by Marcel van Duijn: https://sketchfab.com/3d-models/empty-vending-machine-5839da52996147cbb3a4a2364b1bf894 \ No newline at end of file