mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
ENABLE_URP asmdef
ENABLE_URP asmdef
This commit is contained in:
8
Assets/GameScripts/HotFix/GameLogic/Camera.meta
Normal file
8
Assets/GameScripts/HotFix/GameLogic/Camera.meta
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1d862c80fdc1e684e8ff3b6ae7707b79
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
24
Assets/GameScripts/HotFix/GameLogic/Camera/CameraUtils.cs
Normal file
24
Assets/GameScripts/HotFix/GameLogic/Camera/CameraUtils.cs
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
using TEngine;
|
||||||
|
using UnityEngine;
|
||||||
|
#if ENABLE_URP
|
||||||
|
using UnityEngine.Rendering.Universal;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace GameLogic
|
||||||
|
{
|
||||||
|
public class CameraUtils
|
||||||
|
{
|
||||||
|
public static void AddCameraStack(Camera camera,Camera mainCamera)
|
||||||
|
{
|
||||||
|
#if ENABLE_URP
|
||||||
|
if (mainCamera != null)
|
||||||
|
{
|
||||||
|
// 通过脚本的方式,只要能找到 camera 不轮是否跨 base 相机的场景,都可以 Add 进 Stack
|
||||||
|
mainCamera.GetComponent<UniversalAdditionalCameraData>().cameraStack.Add(GameModule.UI.UICamera);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
Log.Fatal("Could not add camera stack because had no URP-Render-Pip");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6375b5490bbdcc145a24706a6c4e9cb7
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@@ -5,7 +5,8 @@
|
|||||||
"GUID:08c3762f54316454ca6b6fbcb22b40e5",
|
"GUID:08c3762f54316454ca6b6fbcb22b40e5",
|
||||||
"GUID:a90b2d3377c5e4a4db95cc44fb82045e",
|
"GUID:a90b2d3377c5e4a4db95cc44fb82045e",
|
||||||
"GUID:aa06d4cc755c979489c256c1bcca1dfb",
|
"GUID:aa06d4cc755c979489c256c1bcca1dfb",
|
||||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||||
|
"GUID:15fc0a57446b3144c949da3e2b9737a9"
|
||||||
],
|
],
|
||||||
"includePlatforms": [],
|
"includePlatforms": [],
|
||||||
"excludePlatforms": [],
|
"excludePlatforms": [],
|
||||||
@@ -14,6 +15,12 @@
|
|||||||
"precompiledReferences": [],
|
"precompiledReferences": [],
|
||||||
"autoReferenced": true,
|
"autoReferenced": true,
|
||||||
"defineConstraints": [],
|
"defineConstraints": [],
|
||||||
"versionDefines": [],
|
"versionDefines": [
|
||||||
|
{
|
||||||
|
"name": "com.unity.render-pipelines.universal",
|
||||||
|
"expression": "",
|
||||||
|
"define": "ENABLE_URP"
|
||||||
|
}
|
||||||
|
],
|
||||||
"noEngineReferences": false
|
"noEngineReferences": false
|
||||||
}
|
}
|
Reference in New Issue
Block a user