移除水
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[ExecuteAlways]
|
||||
[RequireComponent(typeof(Camera))]
|
||||
sealed class AlignSceneViewToCamera : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
#if UNITY_EDITOR
|
||||
static int s_Scene;
|
||||
static bool s_SceneChanged;
|
||||
|
||||
[InitializeOnLoadMethod]
|
||||
static void OnLoad()
|
||||
{
|
||||
EditorSceneManager.sceneClosed -= OnSceneClosed;
|
||||
EditorSceneManager.sceneClosed += OnSceneClosed;
|
||||
s_Scene = SceneManager.GetActiveScene().handle;
|
||||
}
|
||||
|
||||
static void OnSceneClosed(Scene a)
|
||||
{
|
||||
// TODO: Report to Unity
|
||||
// Does not work if only game view is open. Handles will never update.
|
||||
if (s_Scene == a.handle) return;
|
||||
s_SceneChanged = true;
|
||||
s_Scene = a.handle;
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
EditorApplication.update -= EditorUpdate;
|
||||
EditorApplication.update += EditorUpdate;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
EditorApplication.update -= EditorUpdate;
|
||||
}
|
||||
|
||||
void EditorUpdate()
|
||||
{
|
||||
if (s_SceneChanged && SceneView.lastActiveSceneView != null && WaterRenderer.Instance != null && WaterRenderer.Instance.IsSceneViewActive)
|
||||
{
|
||||
TeleportSceneCamera(transform);
|
||||
s_SceneChanged = false;
|
||||
}
|
||||
}
|
||||
|
||||
public static void TeleportSceneCamera(Transform transform)
|
||||
{
|
||||
var view = SceneView.lastActiveSceneView;
|
||||
if (view == null) return;
|
||||
view.pivot = transform.position + transform.forward * view.cameraDistance;
|
||||
view.rotation = Quaternion.LookRotation(transform.forward);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37330e43f019941fcb1368f1db1be0ac
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,11 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("WaveHarmonic.Crest.Samples.Editor")]
|
||||
|
||||
namespace UnityEditor.SceneManagement { }
|
||||
namespace UnityEngine.InputSystem { }
|
||||
namespace UnityEngine.Rendering.HighDefinition { }
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d4528094ca3f47b29eaf5cc6056652c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,249 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
#if d_UnityInputSystem && ENABLE_INPUT_SYSTEM
|
||||
#define INPUT_SYSTEM_ENABLED
|
||||
#endif
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.XR;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// A simple and dumb camera script that can be controlled using WASD and the mouse.
|
||||
/// </summary>
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class CameraController : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[SerializeField]
|
||||
float _LinearSpeed = 10f;
|
||||
|
||||
[SerializeField]
|
||||
float _AngularSpeed = 70f;
|
||||
|
||||
[SerializeField]
|
||||
bool _SimulateForwardInput = false;
|
||||
|
||||
[SerializeField]
|
||||
bool _RequireLeftMouseButtonToMove = false;
|
||||
|
||||
[SerializeField]
|
||||
float _FixedDeltaTime = 1 / 60f;
|
||||
|
||||
[UnityEngine.Space(10)]
|
||||
|
||||
[SerializeField]
|
||||
DebugFields _Debug = new();
|
||||
|
||||
[System.Serializable]
|
||||
sealed class DebugFields
|
||||
{
|
||||
[Tooltip("Allows the camera to roll (rotating on the z axis).")]
|
||||
public bool _EnableCameraRoll = false;
|
||||
|
||||
[Tooltip("Disables the XR occlusion mesh for debugging purposes. Only works with legacy XR.")]
|
||||
public bool _DisableOcclusionMesh = false;
|
||||
|
||||
[Tooltip("Sets the XR occlusion mesh scale. Useful for debugging refractions. Only works with legacy XR."), UnityEngine.Range(1f, 2f)]
|
||||
public float _OcclusionMeshScale = 1f;
|
||||
}
|
||||
|
||||
|
||||
Vector2 _LastMousePosition = -Vector2.one;
|
||||
bool _Dragging = false;
|
||||
Transform _TargetTransform;
|
||||
Camera _Camera;
|
||||
|
||||
|
||||
void Awake()
|
||||
{
|
||||
_TargetTransform = transform;
|
||||
|
||||
if (!TryGetComponent(out _Camera))
|
||||
{
|
||||
enabled = false;
|
||||
return;
|
||||
}
|
||||
|
||||
#if ENABLE_VR && d_UnityModuleVR
|
||||
if (XRSettings.enabled)
|
||||
{
|
||||
// Seems like the best place to put this for now. Most XR debugging happens using this component.
|
||||
// @FixMe: useOcclusionMesh doesn't work anymore. Might be a Unity bug.
|
||||
XRSettings.useOcclusionMesh = !_Debug._DisableOcclusionMesh;
|
||||
XRSettings.occlusionMaskScale = _Debug._OcclusionMeshScale;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var dt = Time.deltaTime;
|
||||
if (_FixedDeltaTime > 0f)
|
||||
dt = _FixedDeltaTime;
|
||||
|
||||
UpdateMovement(dt);
|
||||
|
||||
#if ENABLE_VR && d_UnityModuleVR
|
||||
// These aren't useful and can break for XR hardware.
|
||||
if (!XRSettings.enabled || XRSettings.loadedDeviceName.Contains("MockHMD"))
|
||||
#endif
|
||||
{
|
||||
UpdateDragging(dt);
|
||||
UpdateKillRoll();
|
||||
}
|
||||
|
||||
#if ENABLE_VR && d_UnityModuleVR
|
||||
if (XRSettings.enabled)
|
||||
{
|
||||
// Check if property has changed.
|
||||
if (XRSettings.useOcclusionMesh == _Debug._DisableOcclusionMesh)
|
||||
{
|
||||
// @FixMe: useOcclusionMesh doesn't work anymore. Might be a Unity bug.
|
||||
XRSettings.useOcclusionMesh = !_Debug._DisableOcclusionMesh;
|
||||
}
|
||||
|
||||
XRSettings.occlusionMaskScale = _Debug._OcclusionMeshScale;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void UpdateMovement(float dt)
|
||||
{
|
||||
// New input system works even when game view is not focused.
|
||||
if (!Application.isFocused)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
if (!Mouse.current.leftButton.isPressed && _RequireLeftMouseButtonToMove) return;
|
||||
float forward = (Keyboard.current.wKey.isPressed ? 1 : 0) - (Keyboard.current.sKey.isPressed ? 1 : 0);
|
||||
#else
|
||||
if (!Input.GetMouseButton(0) && _RequireLeftMouseButtonToMove) return;
|
||||
float forward = (Input.GetKey(KeyCode.W) ? 1 : 0) - (Input.GetKey(KeyCode.S) ? 1 : 0);
|
||||
#endif
|
||||
if (_SimulateForwardInput)
|
||||
{
|
||||
forward = 1f;
|
||||
}
|
||||
|
||||
_TargetTransform.position += dt * forward * _LinearSpeed * _TargetTransform.forward;
|
||||
var speed = _LinearSpeed;
|
||||
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
if (Keyboard.current.leftShiftKey.isPressed)
|
||||
#else
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
#endif
|
||||
{
|
||||
speed *= 3f;
|
||||
}
|
||||
|
||||
_TargetTransform.position += dt * forward * speed * _TargetTransform.forward;
|
||||
// _TargetTransform.position += _LinearSpeed * _TargetTransform.right * Input.GetAxis( "Horizontal" ) * dt;
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
_TargetTransform.position += (Keyboard.current.eKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Keyboard.current.qKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Keyboard.current.aKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right;
|
||||
_TargetTransform.position += (Keyboard.current.dKey.isPressed ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right;
|
||||
_TargetTransform.position += (Keyboard.current.eKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Keyboard.current.qKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Keyboard.current.aKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.right;
|
||||
_TargetTransform.position += (Keyboard.current.dKey.isPressed ? 1 : 0) * dt * speed * _TargetTransform.right;
|
||||
#else
|
||||
_TargetTransform.position += (Input.GetKey(KeyCode.E) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Input.GetKey(KeyCode.Q) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Input.GetKey(KeyCode.A) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right;
|
||||
_TargetTransform.position += (Input.GetKey(KeyCode.D) ? 1 : 0) * dt * _LinearSpeed * _TargetTransform.right;
|
||||
_TargetTransform.position += (Input.GetKey(KeyCode.E) ? 1 : 0) * dt * speed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Input.GetKey(KeyCode.Q) ? 1 : 0) * dt * speed * _TargetTransform.up;
|
||||
_TargetTransform.position -= (Input.GetKey(KeyCode.A) ? 1 : 0) * dt * speed * _TargetTransform.right;
|
||||
_TargetTransform.position += (Input.GetKey(KeyCode.D) ? 1 : 0) * dt * speed * _TargetTransform.right;
|
||||
#endif
|
||||
{
|
||||
var rotate = 0f;
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
rotate += Keyboard.current.rightArrowKey.isPressed ? 1 : 0;
|
||||
rotate -= Keyboard.current.leftArrowKey.isPressed ? 1 : 0;
|
||||
#else
|
||||
rotate += Input.GetKey(KeyCode.RightArrow) ? 1 : 0;
|
||||
rotate -= Input.GetKey(KeyCode.LeftArrow) ? 1 : 0;
|
||||
#endif
|
||||
|
||||
rotate *= 5f;
|
||||
var ea = _TargetTransform.eulerAngles;
|
||||
ea.y += 0.1f * _AngularSpeed * rotate * dt;
|
||||
_TargetTransform.eulerAngles = ea;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateDragging(float dt)
|
||||
{
|
||||
// New input system works even when game view is not focused.
|
||||
if (!Application.isFocused)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var mousePos =
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
Mouse.current.position.ReadValue();
|
||||
#else
|
||||
new Vector2(Input.mousePosition.x, Input.mousePosition.y);
|
||||
#endif
|
||||
|
||||
var wasLeftMouseButtonPressed =
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
Mouse.current.leftButton.wasPressedThisFrame;
|
||||
#else
|
||||
Input.GetMouseButtonDown(0);
|
||||
#endif
|
||||
|
||||
if (!_Dragging && wasLeftMouseButtonPressed && _Camera.rect.Contains(_Camera.ScreenToViewportPoint(mousePos)) &&
|
||||
!DebugGUI.OverGUI(mousePos))
|
||||
{
|
||||
_Dragging = true;
|
||||
_LastMousePosition = mousePos;
|
||||
}
|
||||
#if INPUT_SYSTEM_ENABLED
|
||||
if (_Dragging && Mouse.current.leftButton.wasReleasedThisFrame)
|
||||
#else
|
||||
if (_Dragging && Input.GetMouseButtonUp(0))
|
||||
#endif
|
||||
{
|
||||
_Dragging = false;
|
||||
_LastMousePosition = -Vector2.one;
|
||||
}
|
||||
|
||||
if (_Dragging)
|
||||
{
|
||||
var delta = mousePos - _LastMousePosition;
|
||||
|
||||
var ea = _TargetTransform.eulerAngles;
|
||||
ea.x += -0.1f * _AngularSpeed * delta.y * dt;
|
||||
ea.y += 0.1f * _AngularSpeed * delta.x * dt;
|
||||
_TargetTransform.eulerAngles = ea;
|
||||
|
||||
_LastMousePosition = mousePos;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateKillRoll()
|
||||
{
|
||||
if (_Debug._EnableCameraRoll) return;
|
||||
var ea = _TargetTransform.eulerAngles;
|
||||
ea.z = 0f;
|
||||
transform.eulerAngles = ea;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ffaccddaf6fd4ef0bacf218202412e8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,60 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class LerpCamera : ManagedBehaviour<WaterRenderer>
|
||||
{
|
||||
#pragma warning disable IDE0032 // Use auto property
|
||||
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[SerializeField]
|
||||
float _LerpAlpha = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
Transform _Target = null;
|
||||
|
||||
[SerializeField]
|
||||
Transform _LookAt = null;
|
||||
|
||||
[SerializeField]
|
||||
float _LookAtOffset = 5f;
|
||||
|
||||
[SerializeField]
|
||||
float _MinimumHeightAboveWater = 0.5f;
|
||||
|
||||
#pragma warning restore IDE0032 // Use auto property
|
||||
|
||||
public Transform Target { get => _Target; set => _Target = value; }
|
||||
public Transform LookAt { get => _LookAt; set => _LookAt = value; }
|
||||
|
||||
readonly SampleCollisionHelper _SampleHeightHelper = new();
|
||||
|
||||
private protected override System.Action<WaterRenderer> OnUpdateMethod => OnUpdate;
|
||||
void OnUpdate(WaterRenderer water)
|
||||
{
|
||||
if (_Target == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_SampleHeightHelper.SampleHeight(transform.position, out var h);
|
||||
|
||||
var targetPos = _Target.position;
|
||||
targetPos.y = Mathf.Max(targetPos.y, h + _MinimumHeightAboveWater);
|
||||
|
||||
transform.position = Vector3.Lerp(transform.position, targetPos, _LerpAlpha * water.DeltaTime * 60f);
|
||||
transform.LookAt(_LookAt.position + _LookAtOffset * Vector3.up);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7c0bccaa30631446891d9da26fb6bfec
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,73 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class PrefabSpawner : MonoBehaviour
|
||||
{
|
||||
enum Mode
|
||||
{
|
||||
OnStart,
|
||||
OnDemand,
|
||||
}
|
||||
|
||||
|
||||
[SerializeField]
|
||||
GameObject _Prefab;
|
||||
|
||||
[SerializeField]
|
||||
Mode _Mode;
|
||||
|
||||
[SerializeField]
|
||||
bool _DestroyInstances = true;
|
||||
|
||||
[SerializeField]
|
||||
bool _SpawnAsChild = true;
|
||||
|
||||
[SerializeField]
|
||||
bool _RandomizePosition;
|
||||
|
||||
[SerializeField]
|
||||
float _RandomizePositionSphericalSize = 1f;
|
||||
|
||||
|
||||
readonly List<GameObject> _Instances = new();
|
||||
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
if (_Mode is Mode.OnDemand) return;
|
||||
Execute();
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
if (!_DestroyInstances)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var instance in _Instances)
|
||||
{
|
||||
Destroy(instance);
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute()
|
||||
{
|
||||
var prefab = Instantiate(_Prefab);
|
||||
prefab.transform.SetPositionAndRotation(transform.position +
|
||||
(_RandomizePosition ? Random.insideUnitSphere * _RandomizePositionSphericalSize : Vector3.zero), transform.rotation);
|
||||
prefab.transform.localScale = transform.localScale;
|
||||
if (_SpawnAsChild) prefab.transform.SetParent(transform, worldPositionStays: true);
|
||||
_Instances.Add(prefab);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd850100d148b4b8b8ce7855c080de37
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f031f6d9a813d46f78118d5291310b2c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,92 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// Attach this script to any GameObject and it will create three collision probes in front of the camera
|
||||
/// </summary>
|
||||
[AddComponentMenu(Constants.k_MenuPrefixSample + "Sample Displacement Demo")]
|
||||
sealed class SampleDisplacementDemo : ManagedBehaviour<WaterRenderer>
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[Tooltip(ICollisionProvider.k_LayerTooltip)]
|
||||
[SerializeField]
|
||||
CollisionLayer _Layer;
|
||||
|
||||
[SerializeField]
|
||||
bool _TrackCamera = true;
|
||||
|
||||
[UnityEngine.Range(0f, 32f)]
|
||||
[SerializeField]
|
||||
float _MinimumGridSize = 0f;
|
||||
|
||||
|
||||
readonly GameObject[] _MarkerObjects = new GameObject[3];
|
||||
readonly Vector3[] _MarkerPosition = new Vector3[3];
|
||||
readonly Vector3[] _ResultDisplacement = new Vector3[3];
|
||||
readonly Vector3[] _ResultNormal = new Vector3[3];
|
||||
readonly Vector3[] _ResultVelocity = new Vector3[3];
|
||||
readonly float _SamplesRadius = 5f;
|
||||
|
||||
private protected override Action<WaterRenderer> OnUpdateMethod => OnUpdate;
|
||||
void OnUpdate(WaterRenderer water)
|
||||
{
|
||||
if (_TrackCamera)
|
||||
{
|
||||
var height = Mathf.Abs(Camera.main.transform.position.y - water.SeaLevel);
|
||||
var lookAngle = Mathf.Max(Mathf.Abs(Camera.main.transform.forward.y), 0.001f);
|
||||
var offset = height / lookAngle;
|
||||
_MarkerPosition[0] = Camera.main.transform.position + Camera.main.transform.forward * offset;
|
||||
_MarkerPosition[1] = Camera.main.transform.position + Camera.main.transform.forward * offset + _SamplesRadius * Vector3.right;
|
||||
_MarkerPosition[2] = Camera.main.transform.position + Camera.main.transform.forward * offset + _SamplesRadius * Vector3.forward;
|
||||
}
|
||||
|
||||
var collProvider = water.AnimatedWavesLod.Provider;
|
||||
|
||||
var status = collProvider.Query(GetHashCode(), _MinimumGridSize, _MarkerPosition, _ResultDisplacement, _ResultNormal, _ResultVelocity, _Layer);
|
||||
|
||||
if (collProvider.RetrieveSucceeded(status))
|
||||
{
|
||||
for (var i = 0; i < _ResultDisplacement.Length; i++)
|
||||
{
|
||||
if (_MarkerObjects[i] == null)
|
||||
{
|
||||
_MarkerObjects[i] = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
||||
Helpers.Destroy(_MarkerObjects[i].GetComponent<Collider>());
|
||||
_MarkerObjects[i].transform.localScale = Vector3.one * 0.5f;
|
||||
}
|
||||
|
||||
var query = _MarkerPosition[i];
|
||||
query.y = water.SeaLevel;
|
||||
|
||||
var disp = _ResultDisplacement[i];
|
||||
|
||||
var pos = query;
|
||||
pos.y = disp.y;
|
||||
Debug.DrawLine(pos, pos - disp);
|
||||
|
||||
_MarkerObjects[i].transform.SetPositionAndRotation(pos, Quaternion.FromToRotation(Vector3.up, _ResultNormal[i]));
|
||||
}
|
||||
|
||||
for (var i = 0; i < _ResultNormal.Length; i++)
|
||||
{
|
||||
Debug.DrawLine(_MarkerObjects[i].transform.position, _MarkerObjects[i].transform.position + _ResultNormal[i], Color.blue);
|
||||
}
|
||||
|
||||
for (var i = 0; i < _ResultVelocity.Length; i++)
|
||||
{
|
||||
Debug.DrawLine(_MarkerObjects[i].transform.position, _MarkerObjects[i].transform.position + _ResultVelocity[i], Color.green);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fb222be11f47b450c873a21b733311c1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,40 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using WaveHarmonic.Crest.Internal;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// Places the game object on the water surface by moving it vertically.
|
||||
/// </summary>
|
||||
[AddComponentMenu(Constants.k_MenuPrefixSample + "Sample Height Demo")]
|
||||
sealed class SampleHeightDemo : ManagedBehaviour<WaterRenderer>
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[Tooltip(ICollisionProvider.k_LayerTooltip)]
|
||||
[SerializeField]
|
||||
CollisionLayer _Layer;
|
||||
|
||||
readonly SampleCollisionHelper _SampleHeightHelper = new();
|
||||
|
||||
private protected override System.Action<WaterRenderer> OnUpdateMethod => OnUpdate;
|
||||
void OnUpdate(WaterRenderer water)
|
||||
{
|
||||
// Assume a primitive like a sphere or box.
|
||||
var r = transform.lossyScale.magnitude;
|
||||
|
||||
if (_SampleHeightHelper.SampleHeight(transform.position, out var height, minimumLength: 2f * r, _Layer))
|
||||
{
|
||||
var pos = transform.position;
|
||||
pos.y = height;
|
||||
transform.position = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e958915a82f294814bc369b4962ed05c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,85 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// Shoves the gameobject around random amounts, occasionally useful for debugging where some motion is required to reproduce an issue.
|
||||
/// </summary>
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class RandomMotion : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[Header("Translation")]
|
||||
|
||||
[SerializeField]
|
||||
Vector3 _Axis = Vector3.up;
|
||||
|
||||
[@Range(0, 15)]
|
||||
[SerializeField]
|
||||
float _Amplitude = 1f;
|
||||
|
||||
[@Range(0, 5)]
|
||||
[SerializeField]
|
||||
float _Frequency = 1f;
|
||||
|
||||
[@Range(0, 1)]
|
||||
[SerializeField]
|
||||
float _OrthogonalMotion = 0f;
|
||||
|
||||
|
||||
[Header("Rotation")]
|
||||
|
||||
[@Range(0, 5)]
|
||||
[SerializeField]
|
||||
float _RotationFrequency = 1f;
|
||||
|
||||
[SerializeField]
|
||||
float _RotationVelocity = 0f;
|
||||
|
||||
|
||||
Vector3 _Origin;
|
||||
Vector3 _OrthogonalAxis;
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
_Origin = transform.position;
|
||||
|
||||
_OrthogonalAxis = Quaternion.AngleAxis(90f, Vector3.up) * _Axis;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Translation
|
||||
{
|
||||
// Do circles in perlin noise
|
||||
var rnd = 2f * (Mathf.PerlinNoise(0.5f + 0.5f * Mathf.Cos(_Frequency * Time.time), 0.5f + 0.5f * Mathf.Sin(_Frequency * Time.time)) - 0.5f);
|
||||
|
||||
var orthoPhaseOff = Mathf.PI / 2f;
|
||||
var rndOrtho = 2f * (Mathf.PerlinNoise(0.5f + 0.5f * Mathf.Cos(_Frequency * Time.time + orthoPhaseOff), 0.5f + 0.5f * Mathf.Sin(_Frequency * Time.time + orthoPhaseOff)) - 0.5f);
|
||||
|
||||
transform.position = _Origin + (_Axis * rnd + _OrthogonalMotion * rndOrtho * _OrthogonalAxis) * _Amplitude;
|
||||
}
|
||||
|
||||
// Rotation
|
||||
{
|
||||
var f1 = Mathf.Sin(Time.time * _RotationFrequency * 1.0f);
|
||||
var f2 = Mathf.Sin(Time.time * _RotationFrequency * 0.83f);
|
||||
var f3 = Mathf.Sin(Time.time * _RotationFrequency * 1.14f);
|
||||
transform.rotation *= Quaternion.Euler(
|
||||
f1 * _RotationVelocity * Time.deltaTime,
|
||||
f2 * _RotationVelocity * Time.deltaTime,
|
||||
f3 * _RotationVelocity * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e67c8b7e3e4e04c46b61963b7c204049
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 90acd0fc619264df3bbb62a37697e17e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,94 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[ExecuteAlways]
|
||||
sealed class AmbientLightPatcher : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
#if UNITY_EDITOR
|
||||
void OnEnable() => InitializeAmbientLighting();
|
||||
void Update() => InitializeAmbientLighting();
|
||||
|
||||
bool _Baked;
|
||||
|
||||
void InitializeAmbientLighting()
|
||||
{
|
||||
if (_Baked)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (UnityEditor.Lightmapping.isRunning)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Application.isPlaying)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Throws a warning.
|
||||
if (UnityEditor.ShaderUtil.anythingCompiling)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Only do skyboxes for now.
|
||||
if (RenderSettings.ambientMode != AmbientMode.Skybox)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// NOTE: Cannot use as API introduced in 6000.0.22f1 which cannot be targeted by defines.
|
||||
// if (UnityEditor.Lightmapping.bakeOnSceneLoad == UnityEditor.Lightmapping.BakeOnSceneLoadMode.IfMissingLightingData)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
var bake = true;
|
||||
var probe = RenderSettings.ambientProbe;
|
||||
|
||||
// Check if the ambient probe is effectively empty.
|
||||
for (var i = 0; i < 9; i++)
|
||||
{
|
||||
if (probe[0, i] != 0 || probe[1, i] != 0 || probe[2, i] != 0)
|
||||
{
|
||||
bake = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (bake)
|
||||
{
|
||||
#if !UNITY_6000_0_OR_NEWER
|
||||
var oldWorkflow = UnityEditor.Lightmapping.giWorkflowMode;
|
||||
UnityEditor.Lightmapping.giWorkflowMode = UnityEditor.Lightmapping.GIWorkflowMode.OnDemand;
|
||||
#endif
|
||||
// Only attempt to bake once per scene load.
|
||||
_Baked = UnityEditor.Lightmapping.BakeAsync();
|
||||
#if !UNITY_6000_0_OR_NEWER
|
||||
UnityEditor.Lightmapping.giWorkflowMode = oldWorkflow;
|
||||
#endif
|
||||
|
||||
if (!_Baked)
|
||||
{
|
||||
Debug.LogWarning($"Crest: Could not generate scene lighting. Lighting will look incorrect.");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdfa905826925432690154f06e557c79
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,120 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
#if d_UnityPostProcessing
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.PostProcessing;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
// ExecuteDuringEditMode does not work with scene camera.
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[ExecuteAlways, RequireComponent(typeof(PostProcessVolume))]
|
||||
sealed class LegacyPostProcessingVolume : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[@Layer]
|
||||
[SerializeField]
|
||||
int _Layer;
|
||||
|
||||
readonly List<PostProcessVolume> _QuickVolumes = new();
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (!RenderPipelineHelper.IsLegacy)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_QuickVolumes.Clear();
|
||||
|
||||
foreach (var volume in GetComponents<PostProcessVolume>())
|
||||
{
|
||||
if (volume.sharedProfile == null) continue;
|
||||
_QuickVolumes.Add(PostProcessManager.instance.QuickVolume(_Layer, volume.priority, volume.sharedProfile.settings.ToArray()));
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
foreach (var volume in _QuickVolumes)
|
||||
{
|
||||
if (volume == null) continue;
|
||||
Helpers.Destroy(volume.profile);
|
||||
var gameObject = volume.gameObject;
|
||||
Helpers.Destroy(volume);
|
||||
Helpers.Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using WaveHarmonic.Crest.Editor;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[ExecuteAlways]
|
||||
sealed class LegacyPostProcessingVolume : MonoBehaviour
|
||||
{
|
||||
[@Layer]
|
||||
[SerializeField]
|
||||
int _Layer;
|
||||
|
||||
static string s_SceneName;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
// Ask only once per scene load.
|
||||
var scene = SceneManager.GetActiveScene();
|
||||
if (!RenderPipelineHelper.IsLegacy || s_SceneName == scene.name)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
s_SceneName = scene.name;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
var install = EditorUtility.DisplayDialog
|
||||
(
|
||||
"Missing Package",
|
||||
"This sample scene requires the post-processing package when using the built-in renderer. Without it the scene will be overexposed. Would you like to install it?",
|
||||
"Install",
|
||||
"Ignore"
|
||||
);
|
||||
|
||||
if (install)
|
||||
{
|
||||
PackageManagerHelpers.AddMissingPackage("com.unity.postprocessing");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
if (!RenderPipelineHelper.IsLegacy)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.LogWarning("Crest: This scene requires the post-processing package. Without it the scene will be overexposed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c1d3923e4ad524d8997140b39308dc69
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,114 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using MonoBehaviour = WaveHarmonic.Crest.Internal.EditorBehaviour;
|
||||
#endif
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[DefaultExecutionOrder(-1000)]
|
||||
[ExecuteAlways]
|
||||
sealed class LightingPatcher : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
#if !CREST_DEBUG
|
||||
[HideInInspector]
|
||||
#endif
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _LightsUseLinearIntensity;
|
||||
|
||||
#if !CREST_DEBUG
|
||||
[HideInInspector]
|
||||
#endif
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _LightsUseColorTemperature;
|
||||
|
||||
bool _CurrentLightsUseLinearIntensity;
|
||||
bool _CurrentLightsUseColorTemperature;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
// SRP is always linear with temperature.
|
||||
if (RenderPipelineHelper.IsLegacy)
|
||||
{
|
||||
Camera.onPreCull -= OnBeginRendering;
|
||||
Camera.onPreCull += OnBeginRendering;
|
||||
Camera.onPostRender -= OnEndRendering;
|
||||
Camera.onPostRender += OnEndRendering;
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderPipelineManager.beginContextRendering -= OnBeginContextRendering;
|
||||
RenderPipelineManager.beginContextRendering += OnBeginContextRendering;
|
||||
RenderPipelineManager.endContextRendering -= OnEndContextRendering;
|
||||
RenderPipelineManager.endContextRendering += OnEndContextRendering;
|
||||
}
|
||||
|
||||
_CurrentLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity;
|
||||
_CurrentLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (RenderPipelineHelper.IsLegacy)
|
||||
{
|
||||
Camera.onPreCull -= OnBeginRendering;
|
||||
Camera.onPostRender -= OnEndRendering;
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderPipelineManager.beginContextRendering -= OnBeginContextRendering;
|
||||
RenderPipelineManager.endContextRendering -= OnEndContextRendering;
|
||||
}
|
||||
}
|
||||
|
||||
void OnBeginContextRendering(ScriptableRenderContext context, List<Camera> cameras) => ChangeLighting();
|
||||
void OnEndContextRendering(ScriptableRenderContext context, List<Camera> cameras) => RestoreLighting();
|
||||
|
||||
void OnBeginRendering(Camera camera) => ChangeLighting();
|
||||
void OnEndRendering(Camera camera) => RestoreLighting();
|
||||
|
||||
void ChangeLighting()
|
||||
{
|
||||
_CurrentLightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity;
|
||||
_CurrentLightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature;
|
||||
GraphicsSettings.lightsUseLinearIntensity = true;
|
||||
GraphicsSettings.lightsUseColorTemperature = true;
|
||||
}
|
||||
|
||||
void RestoreLighting()
|
||||
{
|
||||
GraphicsSettings.lightsUseLinearIntensity = _CurrentLightsUseLinearIntensity;
|
||||
GraphicsSettings.lightsUseColorTemperature = _CurrentLightsUseColorTemperature;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private protected override void Reset()
|
||||
{
|
||||
_LightsUseLinearIntensity = GraphicsSettings.lightsUseLinearIntensity;
|
||||
_LightsUseColorTemperature = GraphicsSettings.lightsUseColorTemperature;
|
||||
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
[@OnChange]
|
||||
void OnChange(string propertyPath, object previousValue)
|
||||
{
|
||||
GraphicsSettings.lightsUseLinearIntensity = _LightsUseLinearIntensity;
|
||||
GraphicsSettings.lightsUseColorTemperature = _LightsUseColorTemperature;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41f656df4b8434812870960da35d35b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 30
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,47 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.HighDefinition;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[RequireComponent(typeof(Camera))]
|
||||
sealed class RenderPipelineCameraPatcher : RenderPipelinePatcher
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnActiveRenderPipelineTypeChanged()
|
||||
{
|
||||
if (PrefabStageUtility.GetCurrentPrefabStage() != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if d_UnityHDRP
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
if (TryGetComponent<HDAdditionalCameraData>(out var data))
|
||||
{
|
||||
// This component will try to modify serialized HDR & MSAA properties every frame. Disgusting.
|
||||
data.enabled = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b740d83895ff4657b903a39cce9286c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,79 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using System.Reflection;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering.HighDefinition;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[RequireComponent(typeof(Light))]
|
||||
[DefaultExecutionOrder(10)]
|
||||
sealed class RenderPipelineLightPatcher : RenderPipelinePatcher
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
#if d_UnityHDRP
|
||||
// For 2023.3 onwards, HDAdditionalLightData.intensity is obsolete and returns Light.intensity.
|
||||
// It still serializes the old value so grab it via reflection.
|
||||
static readonly FieldInfo s_Intensity = typeof(HDAdditionalLightData)
|
||||
.GetField("m_Intensity", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
#endif
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
if (!Application.isPlaying) OnActiveRenderPipelineTypeChanged();
|
||||
}
|
||||
|
||||
protected override void OnActiveRenderPipelineTypeChanged()
|
||||
{
|
||||
EditorApplication.update -= OnActiveRenderPipelineTypeChanged;
|
||||
|
||||
if (PrefabStageUtility.GetCurrentPrefabStage() != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Can happen.
|
||||
if (this == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if d_UnityHDRP
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
if (TryGetComponent<Light>(out var light) && TryGetComponent<HDAdditionalLightData>(out var data))
|
||||
{
|
||||
var intensity = (float)s_Intensity.GetValue(data);
|
||||
|
||||
if (light.intensity == intensity) return;
|
||||
|
||||
// HDRP will not restore the correct intensity.
|
||||
light.intensity = intensity;
|
||||
|
||||
// Execute next frame as revert prefab interferes despite executing afterwards.
|
||||
EditorApplication.update -= OnActiveRenderPipelineTypeChanged;
|
||||
EditorApplication.update += OnActiveRenderPipelineTypeChanged;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a245210cb0ef4c94aac318662d37252
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,31 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using MonoBehaviour = WaveHarmonic.Crest.Internal.EditorBehaviour;
|
||||
#endif
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
[ExecuteAlways]
|
||||
abstract class RenderPipelinePatcher : MonoBehaviour
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
protected virtual void OnEnable()
|
||||
{
|
||||
RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged;
|
||||
RenderPipelineManager.activeRenderPipelineTypeChanged += OnActiveRenderPipelineTypeChanged;
|
||||
}
|
||||
|
||||
protected virtual void OnDisable()
|
||||
{
|
||||
RenderPipelineManager.activeRenderPipelineTypeChanged -= OnActiveRenderPipelineTypeChanged;
|
||||
}
|
||||
|
||||
protected abstract void OnActiveRenderPipelineTypeChanged();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c5e6eb7e2ef841d38e15a82c8b83964
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,53 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
// Restores "Lighting > Environment" settings after switching from HDRP. "Lighting > Other Settings" do not need
|
||||
// restoring. We only need to restore the skybox as we use the default values for everything else.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class RenderPipelineSettingsPatcher : RenderPipelinePatcher
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[@AttachMaterialEditor]
|
||||
[@DecoratedField, SerializeField]
|
||||
Material _SkyBox;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private protected override void Reset()
|
||||
{
|
||||
_SkyBox = RenderSettings.skybox;
|
||||
|
||||
base.Reset();
|
||||
}
|
||||
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
OnActiveRenderPipelineTypeChanged();
|
||||
}
|
||||
|
||||
protected override void OnActiveRenderPipelineTypeChanged()
|
||||
{
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (RenderPipelineHelper.IsLegacy || RenderPipelineHelper.IsUniversal)
|
||||
{
|
||||
RenderSettings.skybox = _SkyBox;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8911488f4e1ce40e1b2766334def268b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,60 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class RenderPipelineTerrainPatcher : RenderPipelinePatcher
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[SerializeField]
|
||||
Material _Material;
|
||||
|
||||
[SerializeField]
|
||||
Material _MaterialHDRP;
|
||||
|
||||
[SerializeField]
|
||||
Material _MaterialURP;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
OnActiveRenderPipelineTypeChanged();
|
||||
}
|
||||
|
||||
protected override void OnActiveRenderPipelineTypeChanged()
|
||||
{
|
||||
if (PrefabStageUtility.GetCurrentPrefabStage() != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var terrain in GetComponentsInChildren<Terrain>())
|
||||
{
|
||||
terrain.materialTemplate = RenderPipelineHelper.RenderPipeline switch
|
||||
{
|
||||
RenderPipeline.Legacy => _Material,
|
||||
RenderPipeline.Universal => _MaterialURP,
|
||||
RenderPipeline.HighDefinition => _MaterialHDRP,
|
||||
_ => throw new System.NotImplementedException(),
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e49c7e9e3297f44b3a07573b45ec815d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- _Material: {fileID: 10650, guid: 0000000000000000f000000000000000, type: 0}
|
||||
- _MaterialHDRP: {fileID: 2100000, guid: 22ff8771d87ef27429e670136399094b, type: 2}
|
||||
- _MaterialURP: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,49 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Editor
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class RevertPrefabOnRenderPipelineChange : RenderPipelinePatcher
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
#if UNITY_EDITOR
|
||||
private protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
if (!Application.isPlaying) OnActiveRenderPipelineTypeChanged();
|
||||
}
|
||||
|
||||
protected override void OnActiveRenderPipelineTypeChanged()
|
||||
{
|
||||
if (PrefabStageUtility.GetCurrentPrefabStage() != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isActiveAndEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var item in gameObject.GetComponents<Component>())
|
||||
{
|
||||
if (item is Transform) continue;
|
||||
if (item == null) continue; // Can happen if missing packages/scripts.
|
||||
if (!PrefabUtility.IsPartOfPrefabInstance(item)) continue;
|
||||
PrefabUtility.RevertObjectOverride(item, InteractionMode.AutomatedAction);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ee84b2ccf836471c94ceaafe58b392e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,91 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
[ExecuteAlways]
|
||||
sealed class SendUnityEvent : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[SerializeField]
|
||||
float _ExecuteUpdateEvery;
|
||||
|
||||
[SerializeField]
|
||||
float _StopExecutingUpdateAfter = Mathf.Infinity;
|
||||
|
||||
[SerializeField]
|
||||
UnityEvent _OnEnable = new();
|
||||
|
||||
[SerializeField]
|
||||
UnityEvent _OnDisable = new();
|
||||
|
||||
[SerializeField]
|
||||
UnityEvent<float> _OnUpdate = new();
|
||||
|
||||
[SerializeField]
|
||||
UnityEvent _OnLegacyRenderPipeline = new();
|
||||
|
||||
[SerializeField]
|
||||
UnityEvent _OnHighDefinitionPipeline = new();
|
||||
|
||||
[SerializeField]
|
||||
UnityEvent _OnUniversalRenderPipeline = new();
|
||||
|
||||
float _TimeSinceEnabled;
|
||||
float _LastUpdateTime;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_TimeSinceEnabled = 0f;
|
||||
_OnEnable.Invoke();
|
||||
|
||||
if (RenderPipelineHelper.IsHighDefinition)
|
||||
{
|
||||
_OnHighDefinitionPipeline?.Invoke();
|
||||
}
|
||||
else if (RenderPipelineHelper.IsUniversal)
|
||||
{
|
||||
_OnUniversalRenderPipeline?.Invoke();
|
||||
}
|
||||
else
|
||||
{
|
||||
_OnLegacyRenderPipeline?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
_OnDisable.Invoke();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
_TimeSinceEnabled += Time.deltaTime;
|
||||
_LastUpdateTime += Time.deltaTime;
|
||||
|
||||
if (_LastUpdateTime < _ExecuteUpdateEvery)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_LastUpdateTime = 0;
|
||||
|
||||
if (_TimeSinceEnabled > _StopExecutingUpdateAfter)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_OnUpdate.Invoke(_TimeSinceEnabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8eca7a783ef84759a4e965c9d6d8827
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,65 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// Moves this transform.
|
||||
/// </summary>
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class SimpleMotion : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[SerializeField]
|
||||
bool _ResetOnDisable;
|
||||
|
||||
[SerializeField]
|
||||
bool _IsLocal;
|
||||
|
||||
[Header("Translation")]
|
||||
[SerializeField]
|
||||
Vector3 _Velocity;
|
||||
|
||||
[Header("Rotation")]
|
||||
[SerializeField]
|
||||
Vector3 _AngularVelocity;
|
||||
|
||||
Vector3 _OldPosition;
|
||||
Quaternion _OldRotation;
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
_OldPosition = transform.position;
|
||||
_OldRotation = transform.rotation;
|
||||
}
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (_ResetOnDisable)
|
||||
{
|
||||
transform.SetPositionAndRotation(_OldPosition, _OldRotation);
|
||||
}
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
// Translation
|
||||
{
|
||||
transform.position += (_IsLocal ? transform.TransformDirection(_Velocity) : _Velocity) * Time.deltaTime;
|
||||
}
|
||||
|
||||
// Rotation
|
||||
{
|
||||
transform.rotation *= Quaternion.Euler(_AngularVelocity * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f069d1ec9fe154d3ba75ff75ed08e5b9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,62 +0,0 @@
|
||||
// Crest Water System
|
||||
// Copyright © 2024 Wave Harmonic. All rights reserved.
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace WaveHarmonic.Crest.Examples
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple utility script to destroy the gameobject after a set time.
|
||||
/// </summary>
|
||||
#if !CREST_DEBUG
|
||||
[AddComponentMenu("")]
|
||||
#endif
|
||||
sealed class TimedDestroy : MonoBehaviour
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 0;
|
||||
#pragma warning restore 414
|
||||
|
||||
[SerializeField]
|
||||
float _LifeTime = 2.0f;
|
||||
|
||||
// this seems to make motion stutter?
|
||||
// [SerializeField]
|
||||
// float _ScaleToOneDuration = 0.1f;
|
||||
|
||||
[SerializeField]
|
||||
float _ScaleToZeroDuration = 0.0f;
|
||||
|
||||
Vector3 _Scale;
|
||||
float _BirthTime;
|
||||
|
||||
void Start()
|
||||
{
|
||||
_BirthTime = Time.time;
|
||||
_Scale = transform.localScale;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
var age = Time.time - _BirthTime;
|
||||
|
||||
if (age >= _LifeTime)
|
||||
{
|
||||
Helpers.Destroy(gameObject);
|
||||
}
|
||||
else if (age > _LifeTime - _ScaleToZeroDuration)
|
||||
{
|
||||
transform.localScale = _Scale * (1.0f - (age - (_LifeTime - _ScaleToZeroDuration)) / _ScaleToZeroDuration);
|
||||
}
|
||||
/*else if (age < _ScaleToOneDuration && _ScaleToOneDuration > 0.0f)
|
||||
{
|
||||
transform.localScale = _Scale * age / _ScaleToOneDuration;
|
||||
}*/
|
||||
else
|
||||
{
|
||||
transform.localScale = _Scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3080de53ec3d224eba7fe59e0309668
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"name": "WaveHarmonic.Crest.Samples",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:d60799ab2a985554ea1a39cd38695018",
|
||||
"GUID:df380645f10b7bc4b97d4f5eb6303d95",
|
||||
"GUID:457756d89b35d2941b3e7b37b4ece6f1",
|
||||
"GUID:7c347618730f5467f86a58f333ce21df",
|
||||
"GUID:056ff2a5b2f124d468c6655552acdca5",
|
||||
"GUID:1ab2a6c2a51cd4b43867788dbaee1a55"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [
|
||||
"UNITY_2022_3_OR_NEWER"
|
||||
],
|
||||
"versionDefines": [
|
||||
{
|
||||
"name": "com.unity.modules.vr",
|
||||
"expression": "",
|
||||
"define": "d_UnityModuleVR"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.inputsystem",
|
||||
"expression": "",
|
||||
"define": "d_UnityInputSystem"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.postprocessing",
|
||||
"expression": "",
|
||||
"define": "d_UnityPostProcessing"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.render-pipelines.high-definition",
|
||||
"expression": "",
|
||||
"define": "d_UnityHDRP"
|
||||
},
|
||||
{
|
||||
"name": "com.unity.render-pipelines.universal",
|
||||
"expression": "",
|
||||
"define": "d_UnityURP"
|
||||
}
|
||||
],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a6ae266c63a146c6876ee98745a14fa
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user