Compare commits

..

13 Commits

Author SHA1 Message Date
trey 9dfcee6159 add doug to island scene, fix textures 2026-05-18 21:40:53 -05:00
Dylon 9db5d65278 added block out island 2026-05-18 20:42:39 -05:00
trey 9948d82dc7 dithering, close cam, rain 2026-05-17 21:23:31 -05:00
trey 0e652c6cc0 save scene 2026-05-14 21:58:44 -05:00
trey 7259fe8d67 remove ortho, fix zoom, add dithering 2026-05-14 21:58:23 -05:00
trey 8fef9c25d7 free rotate camera 2026-05-13 21:01:50 -05:00
trey aee3fe9ea7 add volume mixer 2026-05-06 18:44:52 -05:00
trey b414bd391c minor scene cleanup 2026-05-05 21:02:06 -05:00
trey 343a27936c organize scripts 2026-05-05 21:01:16 -05:00
trey f4be1941d3 add map menu 2026-05-05 20:59:36 -05:00
trey a689d76de7 better pause menu system 2026-05-03 12:19:08 -05:00
trey 9ba1ff4a1f started sound settings menu, still in progress 2026-04-24 22:13:53 -05:00
trey 8dd61407cd fade to correct scene when current scene doesn't match save file on load 2026-04-17 21:21:42 -05:00
53 changed files with 9286 additions and 440 deletions
+144
View File
@@ -0,0 +1,144 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!243 &-5985036292871575848
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Music
m_AudioMixer: {fileID: 24100000}
m_GroupID: 5bdfe230200494b4dba2d07588c7c60d
m_Children: []
m_Volume: 831694893cecc104e83cd13eec93d28c
m_Pitch: 5aeb6a175f195024a87861062e2ec1b0
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: -5067953075322291121}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &-5067953075322291121
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 87ce651d7c89cfa44afcecbb0fff4abd
m_EffectName: Attenuation
m_MixLevel: df4b34f13069a454cb0de1361d5c4099
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!241 &24100000
AudioMixerController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: AudioMixer
m_OutputGroup: {fileID: 0}
m_MasterGroup: {fileID: 24300002}
m_Snapshots:
- {fileID: 24500006}
m_StartSnapshot: {fileID: 24500006}
m_SuspendThreshold: -80
m_EnableSuspend: 1
m_UpdateMode: 0
m_ExposedParameters:
- guid: 8e54073feec66d24c8b5b5321b86da6f
name: MasterVolume
- guid: 831694893cecc104e83cd13eec93d28c
name: MusicVolume
- guid: 97cc39ce50c2b85439b8361ceae3f4c6
name: SFXVolume
m_AudioMixerGroupViews:
- guids:
- 1647cf21931ffb4409abd5f86b5ba22b
- 5bdfe230200494b4dba2d07588c7c60d
- 306f67f3e059d2c4aaaef306930b737e
name: View
m_CurrentViewIndex: 0
m_TargetSnapshot: {fileID: 24500006}
--- !u!243 &24300002
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Master
m_AudioMixer: {fileID: 24100000}
m_GroupID: 1647cf21931ffb4409abd5f86b5ba22b
m_Children:
- {fileID: -5985036292871575848}
- {fileID: 3079392121493439853}
m_Volume: 8e54073feec66d24c8b5b5321b86da6f
m_Pitch: f023bc3b372a9df469e34b83fc9efc66
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 24400004}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &24400004
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: bdd917cc2a7b59c45a66df37be3e3489
m_EffectName: Attenuation
m_MixLevel: c9d36b6a18286a8449cc204da4cc3140
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!245 &24500006
AudioMixerSnapshotController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Snapshot
m_AudioMixer: {fileID: 24100000}
m_SnapshotID: 8474d9129ecb5954ea867453e7561687
m_FloatValues: {}
m_TransitionOverrides: {}
--- !u!243 &3079392121493439853
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SFX
m_AudioMixer: {fileID: 24100000}
m_GroupID: 306f67f3e059d2c4aaaef306930b737e
m_Children: []
m_Volume: 97cc39ce50c2b85439b8361ceae3f4c6
m_Pitch: 9119b1dfcb88e4e4c917090c57fa1680
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 5127884578886668124}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &5127884578886668124
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 0f75e42fe6e091c4ca36a6aa676fff0f
m_EffectName: Attenuation
m_MixLevel: 45c4e84286ed5a345b779472c0df9874
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3490106d3e6edc143b9179d3107780dd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 24100000
userData:
assetBundleName:
assetBundleVariant:
+190
View File
@@ -0,0 +1,190 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4309010032443068981
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7306326942743672910}
- component: {fileID: 1001616692551291424}
- component: {fileID: 8608724141738220055}
- component: {fileID: 5427514152406774277}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7306326942743672910
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4309010032443068981}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2225573246702167059}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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, y: 0}
--- !u!223 &1001616692551291424
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4309010032443068981}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &8608724141738220055
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4309010032443068981}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 1
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!114 &5427514152406774277
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4309010032443068981}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1001 &4657271629088206950
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 7306326942743672910}
m_Modifications:
- target: {fileID: 818899427131401759, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1376587328550839904, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_Name
value: UI
objectReference: {fileID: 0}
- target: {fileID: 2975696880262954876, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4264548731807291060, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5101319162034548862, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5514935285560916770, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7535213278904715570, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
--- !u!4 &2225573246702167059 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 4657271629088206950}
m_PrefabAsset: {fileID: 0}
+7
View File
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bbc6f24d8835c954e9ac0321983d48f7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+50
View File
@@ -0,0 +1,50 @@
using UnityEngine;
public static class DebugUtilities
{
/// <summary>
/// Draws a wire sphere using Debug.DrawLine for runtime visibility.
/// </summary>
public static void DrawWireSphere(Vector3 center, float radius, Color color, float duration, int quality = 3)
{
quality = Mathf.Clamp(quality, 1, 10);
int segments = quality << 2;
int subdivisions = quality << 3;
int halfSegments = segments >> 1;
float strideAngle = 360f / subdivisions;
float segmentStride = 180f / segments;
Vector3 first;
Vector3 next;
// Draw meridians (vertical circles)
for (int i = 0; i < segments; i++)
{
first = (Vector3.forward * radius);
first = Quaternion.AngleAxis(segmentStride * (i - halfSegments), Vector3.right) * first;
for (int j = 0; j < subdivisions; j++)
{
next = Quaternion.AngleAxis(strideAngle, Vector3.up) * first;
Debug.DrawLine(first + center, next + center, color, duration);
first = next;
}
}
// Draw parallels (horizontal circles)
Vector3 axis;
for (int i = 0; i < segments; i++)
{
first = (Vector3.forward * radius);
first = Quaternion.AngleAxis(segmentStride * (i - halfSegments), Vector3.up) * first;
axis = Quaternion.AngleAxis(90f, Vector3.up) * first;
for (int j = 0; j < subdivisions; j++)
{
next = Quaternion.AngleAxis(strideAngle, axis) * first;
Debug.DrawLine(first + center, next + center, color, duration);
first = next;
}
}
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 933aa2a82d546964cb7e1a8e7a1e007f
+27 -7
View File
@@ -1545,14 +1545,14 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4310657189086097289}
serializedVersion: 2
m_LocalRotation: {x: 0.30070576, y: -0, z: -0, w: 0.953717}
m_LocalPosition: {x: -0.35901004, y: 47.8, z: -70.2}
m_LocalScale: {x: 1, y: 0.78067374, z: 1.6579802}
m_LocalRotation: {x: 0.1947668, y: 0.05645799, z: -0.01123019, w: 0.979159}
m_LocalPosition: {x: -2.5, y: 11.5, z: -21}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6872729306491234319}
m_Father: {fileID: 5526037850913171920}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 22.5, y: 6.6, z: 0}
--- !u!1 &4324082620616441630
GameObject:
m_ObjectHideFlags: 0
@@ -2147,13 +2147,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5784121484016646142}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0.000000028422978, z: 0.000000008961729, w: 1}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2119885955527004040}
m_LocalEulerAnglesHint: {x: 35, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &7814557473141052265
Camera:
m_ObjectHideFlags: 0
@@ -2188,7 +2188,7 @@ Camera:
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic: 0
orthographic size: 2.3
m_Depth: -1
m_CullingMask:
@@ -3155,6 +3155,26 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 34a2af7866b6ecc4ab5f2b6222f7dbe2, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::CameraController
MainCamera: {fileID: 7814557473141052265}
mouseSensitivity: 1000
minPitch: 10
maxPitch: 60
distance: 4
followSpeed: 1000
maxDistance: 6
minDistance: 1
zoomSpeed: 5
heightOffset: -0.75
collisionRadius: 0.3
collisionOffset: 0.2
collisionMask:
serializedVersion: 2
m_Bits: 8
obstructionMask:
serializedVersion: 2
m_Bits: 4294967295
fadedAlpha: 0.25
fadeSpeed: 5
playerCamHome: {fileID: 2119885955527004040}
--- !u!114 &5412473048133157928
MonoBehaviour:
+14
View File
@@ -438,6 +438,7 @@ GameObject:
- component: {fileID: 7681847596368765025}
- component: {fileID: 4444498079052879519}
- component: {fileID: 5173819118098093347}
- component: {fileID: 1410439939888368689}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
@@ -560,3 +561,16 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PlayerManager
CurrentToolIndex: 0
--- !u!114 &1410439939888368689
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8685480739473632986}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab14394efecbd6540af369ced75e81d0, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SoundSettingManager
audioMixer: {fileID: 24100000, guid: 3490106d3e6edc143b9179d3107780dd, type: 2}
+137
View File
@@ -0,0 +1,137 @@
%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: Island_Temp_Shader
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses:
- 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}
- _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
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.6226415, g: 0.56533194, b: 0.502225, a: 1}
- _Color: {r: 0.62264144, g: 0.5653319, b: 0.5022249, 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
--- !u!114 &4647237875860341337
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: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b74fa76d3c3551d478f93b2a251df8f8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.
+110
View File
@@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: 5d4389ebffbf7bd458488fd3ea3fc492
ModelImporter:
serializedVersion: 24200
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
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -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:
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eaa54bb6b383cee45b061dbca1a69945
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,50 @@
%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: ParticlesUnlit Variant
m_Shader: {fileID: 4800000, guid: 0406db5a14f94604a8c57ccfbc9f3b46, type: 3}
m_Parent: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _SURFACE_TYPE_TRANSPARENT
m_InvalidKeywords:
- _FLIPBOOKBLENDING_OFF
- _RECEIVE_SHADOWS_OFF
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Transparent
disabledShaderPasses:
- ALWAYS
- SHADOWCASTER
- DepthOnly
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats: []
m_Colors: []
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &3897461806608698219
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: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 64ca3a2884aa8954cb1fb6d2ce25a60c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+39
View File
@@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: MiniMapRenderTexture
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 6
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 90
m_ColorFormat: 4
m_MipMap: 1
m_GenerateMips: 1
m_SRGB: 1
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 93d78654fc891634d9bbf8c77c58e435
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:
+141
View File
@@ -0,0 +1,141 @@
%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: OccludeTest
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:
- MOTIONVECTORS
- DepthOnly
- SHADOWCASTER
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}
- _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
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _DstBlendAlpha: 10
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 1
- _WorkflowMode: 1
- _XRMotionVectorsPass: 1
- _ZWrite: 0
m_Colors:
- _BaseColor: {r: 0.509434, g: 0.509434, b: 0.509434, a: 1}
- _Color: {r: 0.509434, g: 0.509434, b: 0.509434, 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
--- !u!114 &3531991361068812674
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: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 78be8f8bd251f244ab82d30f189c8824
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
+147 -238
View File
@@ -131,7 +131,7 @@ GameObject:
- component: {fileID: 12216330}
- component: {fileID: 12216329}
- component: {fileID: 12216328}
m_Layer: 0
m_Layer: 3
m_Name: Floor (4)
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -511,7 +511,7 @@ GameObject:
- component: {fileID: 56102396}
- component: {fileID: 56102395}
- component: {fileID: 56102394}
m_Layer: 0
m_Layer: 3
m_Name: Floor (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -1123,8 +1123,8 @@ MonoBehaviour:
closeDoor: {fileID: 7400000, guid: 0651f9c0ca66bb140b1209461bc72ee2, type: 2}
--- !u!114 &343477994 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1541025269782341902, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_CorrespondingSourceObject: {fileID: 6179820009079462248, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
m_PrefabInstance: {fileID: 326371242261754978}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@@ -1637,8 +1637,8 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &434479293 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 6759794757451891124, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_CorrespondingSourceObject: {fileID: 2120753812904440274, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
m_PrefabInstance: {fileID: 326371242261754978}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@@ -2803,8 +2803,8 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!95 &1187986794 stripped
Animator:
m_CorrespondingSourceObject: {fileID: 4764338753481762575, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_CorrespondingSourceObject: {fileID: 198060551172446057, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
m_PrefabInstance: {fileID: 326371242261754978}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1210745723
GameObject:
@@ -2984,17 +2984,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1286273673}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!114 &1299342542 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 7112063300641303959, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
--- !u!1 &1316688875
GameObject:
m_ObjectHideFlags: 0
@@ -3149,17 +3138,6 @@ Transform:
- {fileID: 813193272}
m_Father: {fileID: 265036979}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1366274845 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1356069847872831277, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
--- !u!1 &1378316137
GameObject:
m_ObjectHideFlags: 0
@@ -3388,8 +3366,8 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 46.475, z: 0}
--- !u!114 &1475998730 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2105373198117421570, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_CorrespondingSourceObject: {fileID: 6743641383080587876, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
m_PrefabInstance: {fileID: 326371242261754978}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@@ -3530,119 +3508,6 @@ Transform:
m_Children: []
m_Father: {fileID: 562959766}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1704696506
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1704696510}
- component: {fileID: 1704696509}
- component: {fileID: 1704696508}
- component: {fileID: 1704696507}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1704696507
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1704696506}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1704696508
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1704696506}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1920, y: 1080}
m_ScreenMatchMode: 1
m_MatchWidthOrHeight: 0.5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0
--- !u!223 &1704696509
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1704696506}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_VertexColorAlwaysGammaSpace: 0
m_AdditionalShaderChannelsFlag: 25
m_UpdateRectTransformForStandalone: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &1704696510
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1704696506}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6325623361260993108}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
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, y: 0}
--- !u!114 &1733921841 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5478143440182735446, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
m_PrefabInstance: {fileID: 7959480261809233915}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 34a2af7866b6ecc4ab5f2b6222f7dbe2, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::CameraController
--- !u!1 &1735546792
GameObject:
m_ObjectHideFlags: 0
@@ -3723,7 +3588,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2}
- {fileID: 2100000, guid: 78be8f8bd251f244ab82d30f189c8824, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@@ -4112,8 +3977,8 @@ Animation:
m_CullingType: 0
--- !u!114 &2063514703 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8838503056769211799, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_CorrespondingSourceObject: {fileID: 4181970952933895665, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
m_PrefabInstance: {fileID: 326371242261754978}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@@ -4156,17 +4021,6 @@ Transform:
- {fileID: 441147620}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2079108456 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 4694531887666682614, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
--- !u!1 &2146681811
GameObject:
m_ObjectHideFlags: 0
@@ -4323,6 +4177,127 @@ Transform:
- {fileID: 208561167}
m_Father: {fileID: 1854015638}
m_LocalEulerAnglesHint: {x: 0, y: -45.476, z: 0}
--- !u!1001 &326371242261754978
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 462310970840629272, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 876248864736054084, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2896807775237749076, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4309010032443068981, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_Name
value: Canvas
objectReference: {fileID: 0}
- target: {fileID: 5475430946909886073, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_Pivot.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_Pivot.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7306326942743672910, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7631982152317472538, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8903418160594151122, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bbc6f24d8835c954e9ac0321983d48f7, type: 3}
--- !u!1001 &4756260184839797824
PrefabInstance:
m_ObjectHideFlags: 0
@@ -4351,6 +4326,10 @@ PrefabInstance:
propertyPath: dialogueText
value:
objectReference: {fileID: 2063514703}
- target: {fileID: 1410439939888368689, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: audioMixer
value:
objectReference: {fileID: 24100000, guid: 3490106d3e6edc143b9179d3107780dd, type: 2}
- target: {fileID: 5519027142145697695, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
propertyPath: m_LocalPosition.x
value: 0
@@ -4400,80 +4379,6 @@ PrefabInstance:
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 9f59bbee72927d649b032622c1c0f2f5, type: 3}
--- !u!1001 &6325623361260993107
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1704696510}
m_Modifications:
- target: {fileID: 1376587328550839904, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_Name
value: UI
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8504793874200787636, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: QuitButton
value:
objectReference: {fileID: 2079108456}
- target: {fileID: 8504793874200787636, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: SaveButton
value:
objectReference: {fileID: 1366274845}
- target: {fileID: 8504793874200787636, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
propertyPath: DeleteSaveButton
value:
objectReference: {fileID: 1299342542}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
--- !u!4 &6325623361260993108 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 6792308726050395253, guid: 6d1ef2b53d3ef0446852da522af66b73, type: 3}
m_PrefabInstance: {fileID: 6325623361260993107}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &7959480261809233915
PrefabInstance:
m_ObjectHideFlags: 0
@@ -4482,10 +4387,14 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 1480974628599415149, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
propertyPath: cameraController
value:
objectReference: {fileID: 1733921841}
- target: {fileID: 5478143440182735446, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
propertyPath: heightOffset
value: -0.75
objectReference: {fileID: 0}
- target: {fileID: 5478143440182735446, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
propertyPath: collisionMask.m_Bits
value: 8
objectReference: {fileID: 0}
- target: {fileID: 5526037850913171920, guid: 0fd9b22e9158e474a96c42de5ee0d85f, type: 3}
propertyPath: m_LocalPosition.x
value: -0.60945
@@ -4541,7 +4450,7 @@ SceneRoots:
m_Roots:
- {fileID: 4756260184839797824}
- {fileID: 410087041}
- {fileID: 1704696510}
- {fileID: 326371242261754978}
- {fileID: 832575519}
- {fileID: 1433016472}
- {fileID: 200551575}
File diff suppressed because it is too large Load Diff
+290 -5
View File
@@ -2,17 +2,76 @@
using System.Linq;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UIElements;
using static Unity.Cinemachine.CinemachineTargetGroup;
using static UnityEngine.GraphicsBuffer;
public class CameraController : MonoBehaviour
{
public float camTargetRotation { get; private set; } = 0;
public CameraControlMode CamControlMode { get; private set; } = CameraControlMode.SnapRotate;
public Camera MainCamera;
private bool isCamRotating = false;
[Header("Rotation")]
public float mouseSensitivity = 200f;
public float minPitch = -30f;
public float maxPitch = 60f;
public float distance = 5f;
private float yaw;
private float pitch;
[Header("Zoom")]
public float followSpeed = 10f;
public float maxDistance = 6f;
public float minDistance = 1f;
public float zoomSpeed = 5f;
public float heightOffset = -0.5f;
private float currentDistance;
private float distanceVelocity;
[Header("Collision")]
public float collisionRadius = 0.3f;
public float collisionOffset = 0.2f;
public LayerMask collisionMask;
[Header("Occlusion Settings")]
public LayerMask obstructionMask;
public float fadedAlpha = 0.25f;
public float fadeSpeed = 5f;
private Dictionary<Renderer, float> currentAlpha =
new Dictionary<Renderer, float>();
private Dictionary<Renderer, float> targetAlpha =
new Dictionary<Renderer, float>();
public Transform playerCamHome;
Transform dougBody;
private void Update()
{
HandleCamRotation();
UpdateOcclusion();
UpdateFade();
if (Input.GetMouseButton(1))
{
HandleFreeCamRotation();
}
else
{
CamAvoidCollisions();
}
}
void Start()
{
Vector3 angles = playerCamHome.transform.eulerAngles;
yaw = angles.y;
pitch = angles.x;
currentDistance = distance;
}
/// <summary>
@@ -31,7 +90,9 @@ public void RotateCam()
/// <summary>
/// Set cam rotation immediately
/// </summary>
public void SnapToRotation(float rotation)
void SnapToRotation(float rotation)
{
if (CamControlMode == CameraControlMode.SnapRotate)
{
playerCamHome.RotateAround(
transform.position,
@@ -41,16 +102,15 @@ public void SnapToRotation(float rotation)
camTargetRotation = rotation;
}
}
/// <summary>
/// Move cam to desired rotation (every frame)
/// </summary>
void HandleCamRotation()
void HandleSnapCamRotation()
{
float currentY = playerCamHome.transform.rotation.eulerAngles.y;
float step = 200 * Time.deltaTime;
float newY = Mathf.MoveTowardsAngle(currentY, camTargetRotation, step);
playerCamHome.RotateAround(
@@ -64,4 +124,229 @@ void HandleCamRotation()
isCamRotating = false;
}
}
/// <summary>
/// Move cam to desired free rotation (every frame)
/// </summary>
void HandleFreeCamRotation()
{
if (dougBody == null)
{
if (GameManager.Instance.PlayerController.DougBody != null)
dougBody = GameManager.Instance.PlayerController.DougBody.transform;
else
return;
}
Vector3 target = new Vector3(dougBody.position.x, dougBody.position.y + heightOffset, dougBody.position.z);
// Mouse Input
float mouseX = Input.GetAxis("Mouse X");
float mouseY = Input.GetAxis("Mouse Y");
yaw += mouseX * mouseSensitivity * Time.deltaTime;
pitch -= mouseY * mouseSensitivity * Time.deltaTime;
pitch = Mathf.Clamp(pitch, minPitch, maxPitch);
// Rotation
Quaternion rotation = Quaternion.Euler(pitch, yaw, 0);
// Zoom
float scroll = Input.GetAxis("Mouse ScrollWheel");
if (Mathf.Abs(scroll) > 0.0001f)
{
distance -= scroll * zoomSpeed;
distance = Mathf.Clamp(distance, minDistance, maxDistance);
}
currentDistance = Mathf.SmoothDamp(
currentDistance,
distance,
ref distanceVelocity,
0.05f);
float adjustedDistance = currentDistance;
Vector3 desiredDirection =
rotation * Vector3.back;
// Camera obstruction handling
if (Physics.SphereCast(
target,
collisionRadius,
desiredDirection,
out RaycastHit hit,
currentDistance,
collisionMask,
QueryTriggerInteraction.Ignore))
{
adjustedDistance =
Mathf.Max(
hit.distance - collisionOffset,
minDistance);
}
// Desired Position
Vector3 offset = rotation * Vector3.forward * -adjustedDistance;
Vector3 desiredPosition = target + offset;
if (desiredPosition.y < dougBody.position.y)
{
desiredPosition.y = dougBody.position.y;
}
// Smooth Follow
playerCamHome.transform.position = Vector3.Lerp(
playerCamHome.transform.position,
desiredPosition,
followSpeed * Time.deltaTime
);
// Look at player
playerCamHome.transform.LookAt(target + Vector3.up);
}
void CamAvoidCollisions()
{
if (dougBody == null)
{
if (GameManager.Instance.PlayerController.DougBody != null)
dougBody = GameManager.Instance.PlayerController.DougBody.transform;
else
return;
}
Vector3 target = new Vector3(dougBody.position.x, dougBody.position.y + heightOffset, dougBody.position.z);
Quaternion rotation = Quaternion.Euler(pitch, yaw, 0);
Vector3 desiredDirection = rotation * Vector3.back;
float adjustedDistance = currentDistance;
if (Physics.SphereCast(
target,
collisionRadius,
desiredDirection,
out RaycastHit hit,
currentDistance,
collisionMask,
QueryTriggerInteraction.Ignore))
{
adjustedDistance =
Mathf.Max(
hit.distance - collisionOffset,
minDistance);
}
// Desired Position
Vector3 offset = rotation * Vector3.forward * -adjustedDistance;
Vector3 desiredPosition = target + offset;
if (desiredPosition.y < dougBody.position.y)
{
desiredPosition.y = dougBody.position.y;
}
// Smooth Follow
playerCamHome.transform.position = Vector3.Lerp(
playerCamHome.transform.position,
desiredPosition,
followSpeed * Time.deltaTime
);
// Look at player
playerCamHome.transform.LookAt(target + Vector3.up);
}
void UpdateOcclusion()
{
if (dougBody == null)
{
if (GameManager.Instance.PlayerController.DougBody != null)
dougBody = GameManager.Instance.PlayerController.DougBody.transform;
else
return;
}
// Reset all renderers to visible
foreach (Renderer r in new List<Renderer>(targetAlpha.Keys))
{
targetAlpha[r] = 1f;
}
Vector3 dir =
MainCamera.transform.position - dougBody.position;
float dist = dir.magnitude;
RaycastHit[] hits = Physics.RaycastAll(
dougBody.position,
dir.normalized,
dist,
obstructionMask,
QueryTriggerInteraction.Ignore);
foreach (RaycastHit hit in hits)
{
Renderer r = hit.collider.GetComponent<Renderer>();
if (r == null)
continue;
if (!currentAlpha.ContainsKey(r))
{
currentAlpha[r] = 1f;
targetAlpha[r] = 1f;
}
targetAlpha[r] = fadedAlpha;
}
}
void UpdateFade()
{
List<Renderer> renderers =
new List<Renderer>(currentAlpha.Keys);
foreach (Renderer r in renderers)
{
float current = currentAlpha[r];
float target = targetAlpha[r];
current = Mathf.Lerp(
current,
target,
Time.deltaTime * fadeSpeed);
currentAlpha[r] = current;
foreach (Material mat in r.materials)
{
Color c = mat.color;
c.a = current;
if (Mathf.Abs(current - targetAlpha[r]) < 0.05f)
{
c.a = targetAlpha[r];
}
mat.color = c;
}
// Cleanup once fully restored
if (Mathf.Abs(current - 1f) < 0.01f &&
Mathf.Abs(target - 1f) < 0.01f)
{
currentAlpha.Remove(r);
targetAlpha.Remove(r);
}
}
}
}
public enum CameraControlMode
{
SnapRotate,
FreeRotate
}
+28 -10
View File
@@ -14,7 +14,8 @@ public class GameManager : MonoBehaviour
public PlayerManager PlayerManager { get; private set; }
public Inventory Inventory { get; private set; }
public Storybools Storybools { get; private set; }
public PauseMenu PauseMenu { get; private set; }
public MenuController MenuController { get; private set; }
public SoundSettingManager SoundSettingManager { get; private set; }
public PlayerController PlayerController { get; private set; }
public Image BlackScreen { get; private set; }
@@ -44,7 +45,6 @@ private void Awake()
private void Start()
{
SaveSystem.Load();
SaveSystem.Save(); // save off any corruption fixes
}
/// <summary>
@@ -57,28 +57,30 @@ private void ReloadReferences()
Instance.DialogueManager = GetComponent<DialogueManager>();
Instance.DialogueManager.ReloadReferences();
Instance.PauseMenu = GameObject.FindWithTag("PauseMenu").GetComponent<PauseMenu>();
Instance.PauseMenu.ReloadReferences();
Instance.PauseMenu.gameObject.SetActive(false);
Instance.Inventory = GetComponent<Inventory>();
Instance.TimeManager = GetComponent<TimeManager>();
Instance.PlayerManager = GetComponent<PlayerManager>();
Instance.SoundSettingManager = GetComponent<SoundSettingManager>();
Instance.SoundSettingManager.ReloadReferences();
Instance.MenuController = GameObject.FindWithTag("MenuController").GetComponent<MenuController>();
Instance.MenuController.HideAllScreens();
}
#region Map Load Handling
/// <summary>
/// Triggers transition to a map point
/// </summary>
public void GoToMapPoint(MapPoint mapPoint)
public void GoToMapPoint(MapPoint mapPoint, bool instantBlackScreen = false)
{
StartCoroutine(GoToMapPointCoroutine(mapPoint));
StartCoroutine(GoToMapPointCoroutine(mapPoint, instantBlackScreen));
}
/// <summary>
/// Executes transition to map point (scene and location)
/// </summary>
private IEnumerator GoToMapPointCoroutine(MapPoint mapPoint)
private IEnumerator GoToMapPointCoroutine(MapPoint mapPoint, bool instantBlackScreen)
{
Instance.isTransitioningScenes = true;
Instance.PlayerController.SetCharacterControl(false);
@@ -89,6 +91,9 @@ private IEnumerator GoToMapPointCoroutine(MapPoint mapPoint)
float fadeTime = 0;
Color blackScreenColor = Color.black;
// Fade to black when instantBlackScreen is false
if (!instantBlackScreen)
{
while (fadeTime < fadeDuration)
{
blackScreenColor.a = Mathf.Lerp(0, 1, fadeTime / fadeDuration);
@@ -97,7 +102,13 @@ private IEnumerator GoToMapPointCoroutine(MapPoint mapPoint)
yield return null;
}
fadeTime = 0;
}
else
{
// instantly make screen black before scene transition
blackScreenColor.a = 1;
Instance.BlackScreen.color = blackScreenColor;
}
AsyncOperation asyncLoad = SceneManager.LoadSceneAsync(mapPoint.Scene);
while (!asyncLoad.isDone)
@@ -126,6 +137,9 @@ private IEnumerator GoToMapPointCoroutine(MapPoint mapPoint)
yield return null;
}
blackScreenColor.a = 0;
Instance.BlackScreen.color = blackScreenColor;
// move character a little more
while (fadeTime < moveDuration)
{
@@ -183,6 +197,7 @@ private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
ReloadReferences();
// Make sure screen is black in new scene
blackScreenColor.a = 1;
Instance.BlackScreen.color = blackScreenColor;
SceneDoor door = GameSceneManager.Instance.GetDoorWithId(doorId);
@@ -207,6 +222,9 @@ private IEnumerator EnterSceneDoorCoroutine(string scene, int doorId)
yield return null;
}
blackScreenColor.a = 0;
Instance.BlackScreen.color = blackScreenColor;
// move character a little more
while (fadeTime < moveDuration)
{
+6
View File
@@ -7,4 +7,10 @@ public class MapPoint
{
public string Scene;
public Vector3 SpawnPosition;
public MapPoint(string scene, Vector3 spawnPosition)
{
this.Scene = scene;
this.SpawnPosition = spawnPosition;
}
}
+6 -14
View File
@@ -47,17 +47,18 @@ void Update()
{
if (!paused)
{
Cursor.lockState = CursorLockMode.None;
Time.timeScale = 0;
canUseTools = false;
hasControl = false;
GameManager.Instance.PauseMenu.gameObject.SetActive(true);
GameManager.Instance.MenuController.ShowScreen("Pause");
}
else
{
Time.timeScale = 1;
canUseTools = true;
hasControl = true;
GameManager.Instance.PauseMenu.gameObject.SetActive(false);
GameManager.Instance.MenuController.HideAllScreens();
}
paused = !paused;
@@ -73,18 +74,6 @@ void Update()
CheckWeaponChange();
ApplyWalk();
// TODO: This is just for testing, remove or clean up if used
if (Input.GetKeyDown(KeyCode.Q))
{
cameraController.RotateCam();
}
// TODO: Add actual save feature later, this is just for test
if (Input.GetKeyDown(KeyCode.I))
{
SaveSystem.Save();
}
}
if (canUseTools)
@@ -116,6 +105,8 @@ private void CheckSprint()
/// Checks if weapon is being switched by scroll wheel
/// </summary>
private void CheckWeaponChange()
{
if (!Input.GetMouseButton(1))
{
if (Input.mouseScrollDelta.y > 0)
{
@@ -126,6 +117,7 @@ private void CheckWeaponChange()
SwitchTools(false);
}
}
}
/// <summary>
/// Apply walking inputs to moveDir
+6 -7
View File
@@ -10,22 +10,22 @@ public class PlayerManager : MonoBehaviour
public void SavePlayerData(ref PlayerSaveData data)
{
data.activeToolIndex = GameManager.Instance.PlayerManager.CurrentToolIndex;
data.camRotation = GameManager.Instance.PlayerController.cameraController.camTargetRotation;
data.dougPosition = GameManager.Instance.PlayerController.transform.position;
data.currentScene = SceneManager.GetActiveScene().name;
}
public void LoadPlayerData(PlayerSaveData data)
{
/*if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
if (data.currentScene != null && data.currentScene != SceneManager.GetActiveScene().name)
{
GameManager.Instance.GoToMapPoint(new MapPoint(data.currentScene, data.dougPosition), true);
}
else
{
SceneManager.LoadScene(data.currentScene);
}*/
GameManager.Instance.PlayerManager.CurrentToolIndex = data.activeToolIndex;
GameManager.Instance.PlayerController.cameraController.SnapToRotation(data.camRotation);
GameManager.Instance.PlayerController.transform.position = data.dougPosition;
}
}
#endregion
}
@@ -33,7 +33,6 @@ public void LoadPlayerData(PlayerSaveData data)
public struct PlayerSaveData
{
public int activeToolIndex;
public float camRotation;
public Vector3 dougPosition;
public string currentScene;
}
@@ -4,7 +4,7 @@ MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: -2
executionOrder: -501
icon: {instanceID: 0}
userData:
assetBundleName:
+3
View File
@@ -14,6 +14,7 @@ public struct SaveData
public InventorySaveData InventorySaveData;
public TimeSaveData TimeSaveData;
public PlayerSaveData PlayerSaveData;
public SoundSettingSaveData SoundSettingSaveData;
}
public static string SaveFileName()
@@ -61,6 +62,7 @@ private static void HandleSaveData()
GameManager.Instance.TimeManager.SaveTime(ref _saveData.TimeSaveData);
GameManager.Instance.PlayerManager.SavePlayerData(ref _saveData.PlayerSaveData);
QuestRegistry.Instance.SaveQuestData(ref _saveData.QuestData);
GameManager.Instance.SoundSettingManager.SaveSoundSettingsData(ref _saveData.SoundSettingSaveData);
}
public static void Load()
@@ -101,5 +103,6 @@ public static void HandleLoadData()
GameManager.Instance.TimeManager.LoadTime(_saveData.TimeSaveData);
GameManager.Instance.PlayerManager.LoadPlayerData(_saveData.PlayerSaveData);
QuestRegistry.Instance.LoadQuestData(_saveData.QuestData);
GameManager.Instance.SoundSettingManager.LoadSoundSettingsData(_saveData.SoundSettingSaveData);
}
}
@@ -0,0 +1,101 @@
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class SoundSettingManager : MonoBehaviour
{
public AudioMixer audioMixer;
float masterVolume;
float musicVolume;
float sfxVolume;
Slider MasterSlider;
Slider SfxSlider;
Slider MusicSlider;
private void Start()
{
MasterSlider.value = masterVolume;
SfxSlider.value = sfxVolume;
MusicSlider.value = musicVolume;
}
public void ReloadReferences()
{
MasterSlider = GameObject.FindWithTag("MasterSlider").GetComponent<Slider>();
SfxSlider = GameObject.FindWithTag("SfxSlider").GetComponent<Slider>();
MusicSlider = GameObject.FindWithTag("MusicSlider").GetComponent<Slider>();
MasterSlider.onValueChanged.AddListener(OnMasterValueChanged);
SfxSlider.onValueChanged.AddListener(OnSfxValueChanged);
MusicSlider.onValueChanged.AddListener(OnMusicValueChanged);
MasterSlider.value = masterVolume;
SfxSlider.value = sfxVolume;
MusicSlider.value = musicVolume;
}
public void OnMasterValueChanged(float newValue)
{
masterVolume = newValue;
SetVolumeFloat(newValue, "MasterVolume");
}
public void OnSfxValueChanged(float newValue)
{
sfxVolume = newValue;
SetVolumeFloat(newValue, "SFXVolume");
}
public void OnMusicValueChanged(float newValue)
{
musicVolume = newValue;
SetVolumeFloat(newValue, "MusicVolume");
}
private void SetVolumeFloat(float sliderVal, string mixerGroup)
{
// Convert linear 0-1 to dB (-80 to 0 range)
float dbValue = Mathf.Log10(sliderVal) * 20;
if (sliderVal == 0)
{
dbValue = -80;
}
audioMixer.SetFloat(mixerGroup, dbValue);
}
#region Sound Settings Data Save/Load
public void SaveSoundSettingsData(ref SoundSettingSaveData data)
{
data.musicVolume = musicVolume;
data.sfxVolume = sfxVolume;
data.masterVolume = masterVolume;
}
public void LoadSoundSettingsData(SoundSettingSaveData data)
{
musicVolume = data.musicVolume;
sfxVolume = data.sfxVolume;
masterVolume = data.masterVolume;
MasterSlider.value = masterVolume;
SfxSlider.value = sfxVolume;
MusicSlider.value = musicVolume;
SetVolumeFloat(masterVolume, "MasterVolume");
SetVolumeFloat(musicVolume, "MusicVolume");
SetVolumeFloat(sfxVolume, "SFXVolume");
}
#endregion
}
[System.Serializable]
public struct SoundSettingSaveData
{
public float musicVolume;
public float sfxVolume;
public float masterVolume;
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ab14394efecbd6540af369ced75e81d0
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 83ac1cbbc254d804499b8f2508119340
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+30
View File
@@ -0,0 +1,30 @@
using System.Collections.Generic;
using UnityEngine;
public class MenuController : MonoBehaviour
{
public List<MenuScreen> screens;
public void ShowScreen(string screenName)
{
HideAllScreens();
MenuScreen selScreen = screens.Find(x => x.screenName == screenName);
if (selScreen != null)
{
selScreen.Show();
}
else
{
throw new System.Exception("Screen name was not found in list of screens!");
}
}
public void HideAllScreens()
{
foreach (var screen in screens)
{
screen.Hide();
}
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 2289f767f0db35c459c4aae4d94b05c5
+16
View File
@@ -0,0 +1,16 @@
using UnityEngine;
public class MenuScreen : MonoBehaviour
{
public string screenName;
public void Show()
{
gameObject.SetActive(true);
}
public void Hide()
{
gameObject.SetActive(false);
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3ba23d5f6c337c34caaac9a4d8aab191
+25
View File
@@ -0,0 +1,25 @@
using UnityEngine;
public class MiniMapCam : MonoBehaviour
{
Transform playerTransform;
Transform camHomeTransform;
void LateUpdate()
{
if (playerTransform == null)
{
playerTransform = GameManager.Instance.PlayerController.transform;
}
if (camHomeTransform == null)
{
camHomeTransform = GameManager.Instance.PlayerController.cameraController.playerCamHome;
}
Vector3 newPosition = playerTransform.position;
newPosition.y = transform.position.y;
transform.position = newPosition;
transform.rotation = Quaternion.Euler(90, camHomeTransform.eulerAngles.y, 0);
}
}
+2
View File
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 64af30c5f595a904b9beb633d468cbff
@@ -7,19 +7,9 @@ public class PauseMenu : MonoBehaviour
public Button DeleteSaveButton;
public Button QuitButton;
public void ReloadReferences()
{
// pull all game objs here
}
void Start()
{
SaveButton.onClick.AddListener(SaveSystem.Save);
DeleteSaveButton.onClick.AddListener(SaveSystem.ClearSave);
}
void Update()
{
}
}
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6a123f00b4942dc4091340ce72744309
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+6 -2
View File
@@ -342,6 +342,9 @@ MonoBehaviour:
skyOcclusionIntensityMultiplier:
m_OverrideState: 1
m_Value: 1
worldOffset:
m_OverrideState: 1
m_Value: {x: 0, y: 0, z: 0}
--- !u!114 &-1216621516061285780
MonoBehaviour:
m_ObjectHideFlags: 3
@@ -376,6 +379,9 @@ MonoBehaviour:
highQualityFiltering:
m_OverrideState: 1
m_Value: 0
filter:
m_OverrideState: 1
m_Value: 0
downscale:
m_OverrideState: 1
m_Value: 0
@@ -462,8 +468,6 @@ MonoBehaviour:
- {fileID: -6288072647309666549}
- {fileID: 7518938298396184218}
- {fileID: -1410297666881709256}
- {fileID: -7750755424749557576}
- {fileID: -5139089513906902183}
--- !u!114 &853819529557874667
MonoBehaviour:
m_ObjectHideFlags: 3
BIN
View File
Binary file not shown.
+110
View File
@@ -0,0 +1,110 @@
fileFormatVersion: 2
guid: dd94efce2613467429ba62d5e1847e88
ModelImporter:
serializedVersion: 24200
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
generateMeshLods: 0
meshLodGenerationFlags: 0
maximumMeshLod: -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:
+4823 -6
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -1,6 +1,7 @@
{
"dependencies": {
"com.unity.ai.navigation": "2.0.9",
"com.unity.cinemachine": "3.1.6",
"com.unity.collab-proxy": "2.10.2",
"com.unity.ide.visualstudio": "2.0.25",
"com.unity.render-pipelines.universal": "17.3.0",
+28
View File
@@ -19,6 +19,16 @@
},
"url": "https://packages.unity.com"
},
"com.unity.cinemachine": {
"version": "3.1.6",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.splines": "2.0.0",
"com.unity.modules.imgui": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.collab-proxy": {
"version": "2.10.2",
"depth": 0,
@@ -107,6 +117,13 @@
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.settings-manager": {
"version": "2.1.1",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "17.3.0",
"depth": 1,
@@ -116,6 +133,17 @@
"com.unity.searcher": "4.9.3"
}
},
"com.unity.splines": {
"version": "2.8.2",
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.mathematics": "1.2.1",
"com.unity.modules.imgui": "1.0.0",
"com.unity.settings-manager": "1.0.3"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.6.0",
"depth": 1,
+5 -2
View File
@@ -13,12 +13,15 @@ TagManager:
- DialogItemText
- ItemPickupText
- DialogContainer
- PauseMenu
- MasterSlider
- SfxSlider
- MusicSlider
- MenuController
layers:
- Default
- TransparentFX
- Ignore Raycast
-
- CameraObstructions
- Water
- UI
-