Add render scaling option

This commit is contained in:
Jens Pitkänen 2020-04-22 18:44:05 +03:00
parent bd3b2ef322
commit 236490d543
10 changed files with 775 additions and 30 deletions

View File

@ -758,7 +758,7 @@ Camera:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: 1
m_TargetTexture: {fileID: 0}
m_TargetTexture: {fileID: 8400000, guid: 1081a4c76e2f37243a86c7ebff1b384c, type: 2}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
@ -874,6 +874,7 @@ Transform:
- {fileID: 6125707628839966534}
- {fileID: 6257962716474165078}
- {fileID: 3141763353809520921}
- {fileID: 6530920292409720816}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: -16.035, z: 0}
@ -1244,6 +1245,96 @@ SphereCollider:
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &7346651551553365433
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6530920292409720816}
- component: {fileID: 1488686182993218547}
- component: {fileID: 1934908101051269637}
m_Layer: 11
m_Name: Scaled Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6530920292409720816
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7346651551553365433}
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_Children: []
m_Father: {fileID: 6125707630481988396}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &1488686182993218547
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7346651551553365433}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 4
m_BackGroundColor: {r: 0.4285335, g: 0.23215556, b: 0.4433962, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: -1
far clip plane: 1
field of view: 60
orthographic: 1
orthographic size: 1
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 0
m_RenderingPath: 0
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 0
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 0
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!114 &1934908101051269637
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7346651551553365433}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c918cf81ef4650d4b918444e5423b82b, type: 3}
m_Name:
m_EditorClassIdentifier:
Options: {fileID: 0}
RenderingCamera: {fileID: 6125707628839966529}
CurrentRenderScale: 1
--- !u!1 &7997720268311607166
GameObject:
m_ObjectHideFlags: 0

View File

@ -1190,6 +1190,79 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2126550784541495751
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4577859626376109895}
- component: {fileID: 6409743815927180410}
- component: {fileID: 5766562530094871921}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4577859626376109895
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2126550784541495751}
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_Children: []
m_Father: {fileID: 1557934989922870215}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6409743815927180410
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2126550784541495751}
m_CullTransparentMesh: 0
--- !u!114 &5766562530094871921
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2126550784541495751}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &2173387209304216904
GameObject:
m_ObjectHideFlags: 0
@ -1762,12 +1835,12 @@ RectTransform:
- {fileID: 7746964408723638739}
- {fileID: 4996311027558172407}
m_Father: {fileID: 2316617036968199621}
m_RootOrder: 7
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 25, y: -150}
m_SizeDelta: {x: -25, y: 50}
m_AnchoredPosition: {x: 25, y: -125}
m_SizeDelta: {x: -25, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &3149377277045041841
GameObject:
@ -1804,8 +1877,81 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 240}
m_SizeDelta: {x: 0, y: 50}
m_SizeDelta: {x: 0, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &3196401242126356212
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3667396000955299568}
- component: {fileID: 2028760510324006705}
- component: {fileID: 7738434171451415563}
m_Layer: 5
m_Name: Handle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3667396000955299568
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3196401242126356212}
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_Children: []
m_Father: {fileID: 3396063470761971018}
m_RootOrder: 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: 20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2028760510324006705
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3196401242126356212}
m_CullTransparentMesh: 0
--- !u!114 &7738434171451415563
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3196401242126356212}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &3312838670862903035
GameObject:
m_ObjectHideFlags: 0
@ -2330,8 +2476,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 180}
m_SizeDelta: {x: 0, y: 50}
m_AnchoredPosition: {x: 0, y: 190}
m_SizeDelta: {x: 0, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &3999067420799839757
GameObject:
@ -2436,12 +2582,12 @@ RectTransform:
- {fileID: 6758695985631416854}
- {fileID: 2298855283123590711}
m_Father: {fileID: 2316617036968199621}
m_RootOrder: 5
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 25, y: -50}
m_SizeDelta: {x: -25, y: 50}
m_AnchoredPosition: {x: 25, y: -35}
m_SizeDelta: {x: -25, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &4542464072751889926
GameObject:
@ -2876,6 +3022,78 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &5324808538541562371
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3396063470761971018}
m_Layer: 5
m_Name: Handle Slide Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3396063470761971018
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5324808538541562371}
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_Children:
- {fileID: 3667396000955299568}
m_Father: {fileID: 1557934989922870215}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5347280717994444091
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4119424334272103090}
m_Layer: 5
m_Name: Fill Area
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4119424334272103090
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5347280717994444091}
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_Children:
- {fileID: 3731604467718041767}
m_Father: {fileID: 1557934989922870215}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.25}
m_AnchorMax: {x: 1, y: 0.75}
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5391661524913202320
GameObject:
m_ObjectHideFlags: 0
@ -3095,6 +3313,7 @@ MonoBehaviour:
InvertMouseY: {fileID: 3688206207163001157}
CameraBobbing: {fileID: 2164472545587475712}
MouseSensitivity: {fileID: 4413106551099451582}
RenderScale: {fileID: 4201047697799753434}
MasterVolume: {fileID: 8445847009848297359}
CampfireVolume: {fileID: 5289447238612992950}
AmbientVolume: {fileID: 1021974734450698777}
@ -3112,6 +3331,106 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4082236b98d7bfb42b8cd2b342f7f31c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &5413632233908497504
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1557934989922870215}
- component: {fileID: 4201047697799753434}
m_Layer: 5
m_Name: Render Scale Slider
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1557934989922870215
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5413632233908497504}
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_Children:
- {fileID: 4577859626376109895}
- {fileID: 4119424334272103090}
- {fileID: 3396063470761971018}
m_Father: {fileID: 624405336269752368}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: -20, y: 0}
m_SizeDelta: {x: 120, y: 20}
m_Pivot: {x: 1, y: 0.5}
--- !u!114 &4201047697799753434
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5413632233908497504}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 67db9e8f0e2ae9c40bc1e2b64352a6b4, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 7738434171451415563}
m_FillRect: {fileID: 3731604467718041767}
m_HandleRect: {fileID: 3667396000955299568}
m_Direction: 0
m_MinValue: 0.3
m_MaxValue: 1
m_WholeNumbers: 0
m_Value: 1
m_OnValueChanged:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 2837007226937140173}
m_MethodName: set_RenderScale
m_Mode: 0
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5483146371104631563
GameObject:
m_ObjectHideFlags: 0
@ -3179,6 +3498,7 @@ RectTransform:
- {fileID: 7379875903275102228}
- {fileID: 3479557468769067426}
- {fileID: 226479021477264902}
- {fileID: 624405336269752368}
- {fileID: 3325963044810254397}
- {fileID: 6081099778283769688}
- {fileID: 519962654072447509}
@ -3209,10 +3529,11 @@ MonoBehaviour:
- 10
- 10
- 10
- 5
- 0
- 0
- 0
- 10
- 0
- 0
- 0
--- !u!1 &5606957236065671271
GameObject:
m_ObjectHideFlags: 0
@ -3313,6 +3634,43 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &5728003999962279261
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 624405336269752368}
m_Layer: 5
m_Name: Render scale
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &624405336269752368
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5728003999962279261}
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_Children:
- {fileID: 3366597506189944183}
- {fileID: 1557934989922870215}
m_Father: {fileID: 2316617036968199621}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 90}
m_SizeDelta: {x: 0, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &6025229801341262997
GameObject:
m_ObjectHideFlags: 0
@ -3444,6 +3802,79 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &6624205880379739517
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3731604467718041767}
- component: {fileID: 2305920843803941586}
- component: {fileID: 4483802842866497669}
m_Layer: 5
m_Name: Fill
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3731604467718041767
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6624205880379739517}
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_Children: []
m_Father: {fileID: 4119424334272103090}
m_RootOrder: 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: 10, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2305920843803941586
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6624205880379739517}
m_CullTransparentMesh: 0
--- !u!114 &4483802842866497669
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6624205880379739517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &6728495783965750235
GameObject:
m_ObjectHideFlags: 0
@ -3474,12 +3905,12 @@ RectTransform:
- {fileID: 8486973499386019265}
- {fileID: 6148881968160265910}
m_Father: {fileID: 2316617036968199621}
m_RootOrder: 4
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 25, y: 0}
m_SizeDelta: {x: -25, y: 50}
m_AnchoredPosition: {x: 25, y: 5}
m_SizeDelta: {x: -25, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &6785779351101422955
GameObject:
@ -3817,12 +4248,12 @@ RectTransform:
- {fileID: 4793522943544567765}
- {fileID: 600084219704661126}
m_Father: {fileID: 2316617036968199621}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 60}
m_SizeDelta: {x: 0, y: 50}
m_AnchoredPosition: {x: 0, y: 45}
m_SizeDelta: {x: 0, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &7526026049420645828
GameObject:
@ -4112,12 +4543,12 @@ RectTransform:
- {fileID: 8485555142905947008}
- {fileID: 7929567292926754667}
m_Father: {fileID: 2316617036968199621}
m_RootOrder: 6
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 25, y: -100}
m_SizeDelta: {x: -25, y: 50}
m_AnchoredPosition: {x: 25, y: -75}
m_SizeDelta: {x: -25, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &8185170095768739190
GameObject:
@ -4153,8 +4584,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 120}
m_SizeDelta: {x: 0, y: 50}
m_AnchoredPosition: {x: 0, y: 140}
m_SizeDelta: {x: 0, y: 40}
m_Pivot: {x: 0, y: 1}
--- !u!1 &8211735902257612313
GameObject:
@ -4192,6 +4623,83 @@ RectTransform:
m_AnchoredPosition: {x: -5, y: 0}
m_SizeDelta: {x: -20, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &8665191601479484873
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3366597506189944183}
- component: {fileID: 3826682898500783349}
- component: {fileID: 4293342239935520605}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3366597506189944183
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8665191601479484873}
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_Children: []
m_Father: {fileID: 624405336269752368}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: 20, y: 0}
m_SizeDelta: {x: 285, y: 36}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &3826682898500783349
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8665191601479484873}
m_CullTransparentMesh: 0
--- !u!114 &4293342239935520605
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8665191601479484873}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.93333334, g: 0.93333334, b: 0.93333334, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 12800000, guid: a0bb3d007c7133149bd1682bd93b776f, type: 3}
m_FontSize: 26
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Render scale
--- !u!1 &8698089712246988807
GameObject:
m_ObjectHideFlags: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eee6fb104b0a3f1429ab24ac8a50a4a3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,37 @@
%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: Main Camera Target
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 3
m_Width: 1280
m_Height: 720
m_AntiAliasing: 1
m_MipCount: -1
m_DepthFormat: 2
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1081a4c76e2f37243a86c7ebff1b384c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -24474,7 +24474,7 @@ PrefabInstance:
- target: {fileID: 226479021477264902, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 120
value: 140
objectReference: {fileID: 0}
- target: {fileID: 317676106527232818, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
@ -24489,7 +24489,7 @@ PrefabInstance:
- target: {fileID: 519962654072447509, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -50
value: -35
objectReference: {fileID: 0}
- target: {fileID: 1470294652521727049, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
@ -24499,18 +24499,43 @@ PrefabInstance:
- target: {fileID: 3325963044810254397, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 60
value: 45
objectReference: {fileID: 0}
- target: {fileID: 3479557468769067426, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 180
value: 190
objectReference: {fileID: 0}
- target: {fileID: 3667396000955299568, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3667396000955299568, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3667396000955299568, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3682198691915602031, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3731604467718041767, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3731604467718041767, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3965423868489175230, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchorMax.y
@ -24519,7 +24544,7 @@ PrefabInstance:
- target: {fileID: 4127888187077662439, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -100
value: -75
objectReference: {fileID: 0}
- target: {fileID: 4249983716973098219, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
@ -24579,7 +24604,7 @@ PrefabInstance:
- target: {fileID: 6081099778283769688, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6576731660997411131, guid: 2cd64e49ad7ad1c4bb4a4264703d7915,
type: 3}
@ -24714,6 +24739,11 @@ PrefabInstance:
propertyPath: Options
value:
objectReference: {fileID: 5400695019531174118}
- target: {fileID: 1934908101051269637, guid: 558201eae20fa5540a826edb23937665,
type: 3}
propertyPath: Options
value:
objectReference: {fileID: 5400695019531174118}
- target: {fileID: 5513444400062872372, guid: 558201eae20fa5540a826edb23937665,
type: 3}
propertyPath: Display

View File

@ -5,6 +5,7 @@ public class Options : MonoBehaviour {
public bool InvertMouseY { get; set; }
public bool CameraBobbing { get; set; }
public float MouseSensitivity { get; set; }
public float RenderScale { get; set; }
public float MasterVolume { get; set; }
public float CampfireVolume { get; set; }
public float AmbientVolume { get; set; }
@ -16,6 +17,7 @@ public class Options : MonoBehaviour {
InvertMouseY = false;
CameraBobbing = true;
MouseSensitivity = 2f;
RenderScale = 1f;
MasterVolume = 0.3f;
CampfireVolume = 1f;
AmbientVolume = 1f;

View File

@ -10,6 +10,7 @@ public class PauseMenu : MonoBehaviour {
public Toggle InvertMouseY;
public Toggle CameraBobbing;
public Slider MouseSensitivity;
public Slider RenderScale;
public Slider MasterVolume;
public Slider CampfireVolume;
public Slider AmbientVolume;
@ -32,6 +33,7 @@ public class PauseMenu : MonoBehaviour {
InvertMouseY.isOn = Options.InvertMouseY;
CameraBobbing.isOn = Options.CameraBobbing;
MouseSensitivity.value = Options.MouseSensitivity;
RenderScale.value = Options.RenderScale;
MasterVolume.value = Options.MasterVolume;
CampfireVolume.value = Options.CampfireVolume;
AmbientVolume.value = Options.AmbientVolume;

View File

@ -0,0 +1,48 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/**
* <summary>
* Blits a RenderTexture on the Camera in this GameObject.
* The RenderingCamera field controls which Camera's render target is blitted.
* The render target of RenderingCamera is scaled according to Options.RenderScale.
* </summary>
*/
[RequireComponent(typeof(Camera))]
public class RenderScaler : MonoBehaviour {
public Options Options;
public Camera RenderingCamera;
public float CurrentRenderScale = -1f;
// 100ms between texture recreation should lessen the gpu load a bit
// when moving the slider around, but still give realtime (enough) feedback.
public float RenderScaleChangeCooldown = 0.1f;
private RenderTexture CameraTarget;
private float LastChange = 0;
private void Start() {
UpdateRenderTexture();
}
private void Update() {
if (Time.unscaledTime - LastChange > RenderScaleChangeCooldown && CurrentRenderScale != Options.RenderScale) {
LastChange = Time.unscaledTime;
UpdateRenderTexture();
}
}
private void UpdateRenderTexture() {
CurrentRenderScale = Options.RenderScale;
RenderingCamera.targetTexture.Release();
RenderingCamera.targetTexture.width = (int)(Screen.width * CurrentRenderScale);
RenderingCamera.targetTexture.height = (int)(Screen.height * CurrentRenderScale);
RenderingCamera.targetTexture.Create();
}
private void OnRenderImage(RenderTexture src, RenderTexture dst) {
Graphics.Blit(RenderingCamera.targetTexture, dst);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c918cf81ef4650d4b918444e5423b82b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: