浏览代码

Removed Universal RP and reverted materials to the Standard Shader

/hw-training
Arturo Nereu 3 年前
当前提交
6d5aba52
共有 11 个文件被更改,包括 16 次插入397 次删除
  1. 113
      Assets/Prefabs/Player.prefab
  2. 15
      Assets/Scripts/PlayerConfigurator.cs
  3. 14
      Assets/Scripts/Store.cs
  4. 3
      Packages/manifest.json
  5. 63
      Packages/packages-lock.json
  6. 78
      Assets/CustomPostProcessData.asset
  7. 8
      Assets/CustomPostProcessData.asset.meta
  8. 61
      Assets/UniversalRenderPipelineAsset.asset
  9. 8
      Assets/UniversalRenderPipelineAsset.asset.meta
  10. 42
      Assets/UniversalRenderPipelineAsset_Renderer.asset
  11. 8
      Assets/UniversalRenderPipelineAsset_Renderer.asset.meta

113
Assets/Prefabs/Player.prefab


m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &1529884499
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2054700875163822802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3da73fbe6d1911748aa71248eb0f8b82, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ParticleSystem: {fileID: 851981570792355814}
--- !u!1 &4494805130079759894
GameObject:
m_ObjectHideFlags: 0

m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1713640702973489256}
- {fileID: 851981570792355609}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

m_Name:
m_EditorClassIdentifier:
m_HatAnchor: {fileID: 1946178409}
m_GameManager: {fileID: 11400000, guid: a9f6da264584558478e57f0d26b9befb, type: 2}
--- !u!114 &8083381679980500539
MonoBehaviour:
m_ObjectHideFlags: 0

m_InputCollisionLayer:
serializedVersion: 2
m_Bits: 256
m_GameManager: {fileID: 11400000, guid: a9f6da264584558478e57f0d26b9befb, type: 2}
--- !u!1001 &1171686176522753923
PrefabInstance:
m_ObjectHideFlags: 0

type: 3}
m_PrefabInstance: {fileID: 1171686176522753923}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1330099940373112775
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 4494805130079759893}
m_Modifications:
- target: {fileID: 1848637902619463712, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_Materials.Array.size
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463713, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: looping
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463713, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: playOnAwake
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463715, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_Name
value: JumpParticles
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalPosition.y
value: -0.975
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: -90
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents:
- {fileID: 8583602134986185745, guid: 80c850b5834d25244b868178c027cd24, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 80c850b5834d25244b868178c027cd24, type: 3}
--- !u!4 &851981570792355609 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 1848637902619463902, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
m_PrefabInstance: {fileID: 1330099940373112775}
m_PrefabAsset: {fileID: 0}
--- !u!198 &851981570792355814 stripped
ParticleSystem:
m_CorrespondingSourceObject: {fileID: 1848637902619463713, guid: 80c850b5834d25244b868178c027cd24,
type: 3}
m_PrefabInstance: {fileID: 1330099940373112775}
m_PrefabAsset: {fileID: 0}

15
Assets/Scripts/PlayerConfigurator.cs


using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
//using UnityEngine.AddressableAssets;
//using UnityEngine.ResourceManagement.AsyncOperations;
public class PlayerConfigurator : MonoBehaviour
{

[SerializeField]
//[SerializeField]
private AsyncOperationHandle m_HatLoadingHandle;
//private AsyncOperationHandle m_HatLoadingHandle;
void Start()
{

// We are using the InstantiateAsync function on the Addressables API, the non-Addressables way
// looks something like the following line, however, this version is not Asynchronous
// GameObject.Instantiate(prefabToInstantiate);
m_HatLoadingHandle = Addressables.InstantiateAsync(hatKey, m_HatAnchor, false);
//m_HatLoadingHandle = Addressables.InstantiateAsync(hatKey, m_HatAnchor, false);
m_HatLoadingHandle.Completed += OnHatInstantiated;
//m_HatLoadingHandle.Completed += OnHatInstantiated;
/*
private void OnHatInstantiated(AsyncOperationHandle obj)
{
// We can check for the status of the InstantiationAsync operation: Failed, Succeeded or None

m_HatLoadingHandle.Completed -= OnHatInstantiated;
}
*/
}

14
Assets/Scripts/Store.cs


using UnityEngine;
using UnityEngine.UI;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
//using UnityEngine.AddressableAssets;
//using UnityEngine.ResourceManagement.AsyncOperations;
public class Store : MonoBehaviour
{

[SerializeField]
private Transform m_HatAttachPoint;
private AsyncOperationHandle m_DownloadHatsHandle;
//private AsyncOperationHandle m_DownloadHatsHandle;
private AsyncOperationHandle m_HatHandle;
//private AsyncOperationHandle m_HatHandle;
// Start is called before the first frame update
void Start()

public void PurchaseHats()
{
// TODO: Download the assets and then assign the first hat to the character
m_DownloadHatsHandle = Addressables.DownloadDependenciesAsync("Hat00");
//m_DownloadHatsHandle = Addressables.DownloadDependenciesAsync("Hat00");
m_DownloadHatsHandle.Completed += OnHatsDownloaded;
//m_DownloadHatsHandle.Completed += OnHatsDownloaded;
/*
private void OnHatsDownloaded(AsyncOperationHandle obj)
{
if(m_DownloadHatsHandle.Status == AsyncOperationStatus.Succeeded)

m_LeftArrowButton.gameObject.SetActive(false);
m_RightArrowButton.gameObject.SetActive(false);
}
*/
}

3
Packages/manifest.json


{
"dependencies": {
"com.unity.2d.sprite": "1.0.0",
"com.unity.addressables": "1.16.19",
"com.unity.postprocessing": "3.1.1",
"com.unity.render-pipelines.universal": "11.0.0",
"com.unity.scriptablebuildpipeline": "1.16.1",
"com.unity.textmeshpro": "3.0.6",
"com.unity.ugui": "1.0.0",

63
Packages/packages-lock.json


"source": "builtin",
"dependencies": {}
},
"com.unity.addressables": {
"version": "1.16.19",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.scriptablebuildpipeline": "1.15.2",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.ext.nunit": {
"version": "1.0.6",
"depth": 2,

},
"url": "https://packages.unity.com"
},
"com.unity.mathematics": {
"version": "1.2.1",
"depth": 1,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.postprocessing": {
"version": "3.1.1",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.physics": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.render-pipelines.core": {
"version": "11.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity.modules.physics": "1.0.0"
}
},
"com.unity.render-pipelines.universal": {
"version": "11.0.0",
"depth": 0,
"source": "builtin",
"dependencies": {
"com.unity.mathematics": "1.1.0",
"com.unity.render-pipelines.core": "11.0.0",
"com.unity.shadergraph": "11.0.0"
}
},
"com.unity.scriptablebuildpipeline": {
"version": "1.16.1",
"depth": 0,

},
"com.unity.searcher": {
"version": "4.3.2",
"depth": 2,
"source": "registry",
"dependencies": {},
"url": "https://packages.unity.com"
},
"com.unity.shadergraph": {
"version": "11.0.0",
"depth": 1,
"source": "builtin",
"dependencies": {
"com.unity.render-pipelines.core": "11.0.0",
"com.unity.searcher": "4.3.1"
}
},
"com.unity.test-framework": {
"version": "1.1.24",

78
Assets/CustomPostProcessData.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 572910c10080c0945a0ef731ccedc739, type: 3}
m_Name: CustomPostProcessData
m_EditorClassIdentifier:
shaders:
stopNanPS: {fileID: 4800000, guid: 1121bb4e615ca3c48b214e79e841e823, type: 3}
subpixelMorphologicalAntialiasingPS: {fileID: 4800000, guid: 63eaba0ebfb82cc43bde059b4a8c65f6,
type: 3}
gaussianDepthOfFieldPS: {fileID: 4800000, guid: 5e7134d6e63e0bc47a1dd2669cedb379,
type: 3}
bokehDepthOfFieldPS: {fileID: 4800000, guid: 2aed67ad60045d54ba3a00c91e2d2631,
type: 3}
cameraMotionBlurPS: {fileID: 4800000, guid: 1edcd131364091c46a17cbff0b1de97a,
type: 3}
paniniProjectionPS: {fileID: 4800000, guid: a15b78cf8ca26ca4fb2090293153c62c,
type: 3}
lutBuilderLdrPS: {fileID: 4800000, guid: 65df88701913c224d95fc554db28381a, type: 3}
lutBuilderHdrPS: {fileID: 4800000, guid: ec9fec698a3456d4fb18cf8bacb7a2bc, type: 3}
bloomPS: {fileID: 4800000, guid: 5f1864addb451f54bae8c86d230f736e, type: 3}
uberPostPS: {fileID: 4800000, guid: e7857e9d0c934dc4f83f270f8447b006, type: 3}
finalPostPassPS: {fileID: 4800000, guid: c49e63ed1bbcb334780a3bd19dfed403, type: 3}
textures:
blueNoise16LTex:
- {fileID: 2800000, guid: 81200413a40918d4d8702e94db29911c, type: 3}
- {fileID: 2800000, guid: d50c5e07c9911a74982bddf7f3075e7b, type: 3}
- {fileID: 2800000, guid: 1134690bf9216164dbc75050e35b7900, type: 3}
- {fileID: 2800000, guid: 7ce2118f74614a94aa8a0cdf2e6062c3, type: 3}
- {fileID: 2800000, guid: 2ca97df9d1801e84a8a8f2c53cb744f0, type: 3}
- {fileID: 2800000, guid: e63eef8f54aa9dc4da9a5ac094b503b5, type: 3}
- {fileID: 2800000, guid: 39451254daebd6d40b52899c1f1c0c1b, type: 3}
- {fileID: 2800000, guid: c94ad916058dff743b0f1c969ddbe660, type: 3}
- {fileID: 2800000, guid: ed5ea7ce59ca8ec4f9f14bf470a30f35, type: 3}
- {fileID: 2800000, guid: 071e954febf155243a6c81e48f452644, type: 3}
- {fileID: 2800000, guid: 96aaab9cc247d0b4c98132159688c1af, type: 3}
- {fileID: 2800000, guid: fc3fa8f108657e14486697c9a84ccfc5, type: 3}
- {fileID: 2800000, guid: bfed3e498947fcb4890b7f40f54d85b9, type: 3}
- {fileID: 2800000, guid: d512512f4af60a442ab3458489412954, type: 3}
- {fileID: 2800000, guid: 47a45908f6db0cb44a0d5e961143afec, type: 3}
- {fileID: 2800000, guid: 4dcc0502f8586f941b5c4a66717205e8, type: 3}
- {fileID: 2800000, guid: 9d92991794bb5864c8085468b97aa067, type: 3}
- {fileID: 2800000, guid: 14381521ff11cb74abe3fe65401c23be, type: 3}
- {fileID: 2800000, guid: d36f0fe53425e08499a2333cf423634c, type: 3}
- {fileID: 2800000, guid: d4044ea2490d63b43aa1765f8efbf8a9, type: 3}
- {fileID: 2800000, guid: c9bd74624d8070f429e3f46d161f9204, type: 3}
- {fileID: 2800000, guid: d5c9b274310e5524ebe32a4e4da3df1f, type: 3}
- {fileID: 2800000, guid: f69770e54f2823f43badf77916acad83, type: 3}
- {fileID: 2800000, guid: 10b6c6d22e73dea46a8ab36b6eebd629, type: 3}
- {fileID: 2800000, guid: a2ec5cbf5a9b64345ad3fab0912ddf7b, type: 3}
- {fileID: 2800000, guid: 1c3c6d69a645b804fa232004b96b7ad3, type: 3}
- {fileID: 2800000, guid: d18a24d7b4ed50f4387993566d9d3ae2, type: 3}
- {fileID: 2800000, guid: c989e1ed85cf7154caa922fec53e6af6, type: 3}
- {fileID: 2800000, guid: ff47e5a0f105eb34883b973e51f4db62, type: 3}
- {fileID: 2800000, guid: fa042edbfc40fbd4bad0ab9d505b1223, type: 3}
- {fileID: 2800000, guid: 896d9004736809c4fb5973b7c12eb8b9, type: 3}
- {fileID: 2800000, guid: 179f794063d2a66478e6e726f84a65bc, type: 3}
filmGrainTex:
- {fileID: 2800000, guid: 654c582f7f8a5a14dbd7d119cbde215d, type: 3}
- {fileID: 2800000, guid: dd77ffd079630404e879388999033049, type: 3}
- {fileID: 2800000, guid: 1097e90e1306e26439701489f391a6c0, type: 3}
- {fileID: 2800000, guid: f0b67500f7fad3b4c9f2b13e8f41ba6e, type: 3}
- {fileID: 2800000, guid: 9930fb4528622b34687b00bbe6883de7, type: 3}
- {fileID: 2800000, guid: bd9e8c758250ef449a4b4bfaad7a2133, type: 3}
- {fileID: 2800000, guid: 510a2f57334933e4a8dbabe4c30204e4, type: 3}
- {fileID: 2800000, guid: b4db8180660810945bf8d55ab44352ad, type: 3}
- {fileID: 2800000, guid: fd2fd78b392986e42a12df2177d3b89c, type: 3}
- {fileID: 2800000, guid: 5cdee82a77d13994f83b8fdabed7c301, type: 3}
smaaAreaTex: {fileID: 2800000, guid: d1f1048909d55cd4fa1126ab998f617e, type: 3}
smaaSearchTex: {fileID: 2800000, guid: 51eee22c2a633ef4aada830eed57c3fd, type: 3}

8
Assets/CustomPostProcessData.asset.meta


fileFormatVersion: 2
guid: e9d2049c0a598e142bde475df0642f1b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

61
Assets/UniversalRenderPipelineAsset.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: UniversalRenderPipelineAsset
m_EditorClassIdentifier:
k_AssetVersion: 9
k_AssetPreviousVersion: 9
m_RendererType: 1
m_RendererData: {fileID: 0}
m_RendererDataList:
- {fileID: 11400000, guid: 2f8843aadd5d0a343802e2c6c909708e, type: 2}
m_DefaultRendererIndex: 0
m_RequireDepthTexture: 1
m_RequireOpaqueTexture: 1
m_OpaqueDownsampling: 1
m_SupportsTerrainHoles: 1
m_SupportsHDR: 1
m_MSAA: 2
m_RenderScale: 1
m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 1
m_MainLightShadowmapResolution: 2048
m_AdditionalLightsRenderingMode: 1
m_AdditionalLightsPerObjectLimit: 4
m_AdditionalLightShadowsSupported: 1
m_AdditionalLightsShadowmapResolution: 2048
m_AdditionalLightsShadowResolutionTierLow: 256
m_AdditionalLightsShadowResolutionTierMedium: 512
m_AdditionalLightsShadowResolutionTierHigh: 1024
m_ShadowDistance: 50
m_ShadowCascadeCount: 1
m_Cascade2Split: 0.25
m_Cascade3Split: {x: 0.1, y: 0.3}
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 1
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 0
m_MixedLightingSupported: 1
m_DebugLevel: 0
m_UseAdaptivePerformance: 1
m_ColorGradingMode: 1
m_ColorGradingLutSize: 32
m_UseFastSRGBLinearConversion: 0
m_ShadowType: 1
m_LocalShadowsSupported: 0
m_LocalShadowsAtlasResolution: 256
m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256
m_ShaderVariantLogLevel: 0
m_ShadowCascades: 0

8
Assets/UniversalRenderPipelineAsset.asset.meta


fileFormatVersion: 2
guid: 7bec702e7cb9e50478526075b9d527de
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

42
Assets/UniversalRenderPipelineAsset_Renderer.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: de640fe3d0db1804a85f9fc8f5cadab6, type: 3}
m_Name: UniversalRenderPipelineAsset_Renderer
m_EditorClassIdentifier:
m_RendererFeatures: []
m_RendererFeatureMap:
postProcessData: {fileID: 11400000, guid: e9d2049c0a598e142bde475df0642f1b, type: 2}
xrSystemData: {fileID: 11400000, guid: 60e1133243b97e347b653163a8c01b64, type: 2}
shaders:
blitPS: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}
copyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3}
screenSpaceShadowPS: {fileID: 0}
samplingPS: {fileID: 4800000, guid: 04c410c9937594faa893a11dceb85f7e, type: 3}
stencilDeferredPS: {fileID: 4800000, guid: e9155b26e1bc55942a41e518703fe304, type: 3}
fallbackErrorPS: {fileID: 4800000, guid: e6e9a19c3678ded42a3bc431ebef7dbd, type: 3}
materialErrorPS: {fileID: 4800000, guid: 5fd9a8feb75a4b5894c241777f519d4e, type: 3}
m_OpaqueLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_TransparentLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_DefaultStencilState:
overrideStencilState: 0
stencilReference: 0
stencilCompareFunction: 8
passOperation: 2
failOperation: 0
zFailOperation: 0
m_ShadowTransparentReceive: 1
m_RenderingMode: 0
m_AccurateGbufferNormals: 0

8
Assets/UniversalRenderPipelineAsset_Renderer.asset.meta


fileFormatVersion: 2
guid: 2f8843aadd5d0a343802e2c6c909708e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存