From 8b873aa20d785a46164bed9a2288e3719fb05268 Mon Sep 17 00:00:00 2001 From: UVCLimHun Date: Mon, 4 Aug 2025 17:26:24 +0900 Subject: [PATCH] move --- Assets/Resources/UI.meta | 8 + Assets/Resources/UI/InventoryItem.prefab | 95 ++++ Assets/Resources/UI/InventoryItem.prefab.meta | 7 + Assets/Scripts/ClickHandler.cs | 1 - Assets/Scripts/Logic/Panel_LogicData.cs | 1 - .../SimulationModels/SimulationModel.cs | 9 - .../SimulationModelConveyor.cs | 486 +++++++----------- .../SimulationModels/SimulationModelMove.cs | 265 ++++++---- .../SimulationModelProcess.cs | 6 +- .../SimulationModelProduct.cs | 6 + .../SimulationModels/SimulationModelSource.cs | 17 +- .../SimulationModels/SimulationModelStore.cs | 183 +++---- Assets/Scripts/Web/WebReceiver.cs | 4 +- ...niversalRenderPipelineGlobalSettings.asset | 240 ++++----- 14 files changed, 680 insertions(+), 648 deletions(-) create mode 100644 Assets/Resources/UI.meta create mode 100644 Assets/Resources/UI/InventoryItem.prefab create mode 100644 Assets/Resources/UI/InventoryItem.prefab.meta diff --git a/Assets/Resources/UI.meta b/Assets/Resources/UI.meta new file mode 100644 index 00000000..1f579028 --- /dev/null +++ b/Assets/Resources/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6b31709f297aa9e4da7b16836c661a91 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Resources/UI/InventoryItem.prefab b/Assets/Resources/UI/InventoryItem.prefab new file mode 100644 index 00000000..299cad1d --- /dev/null +++ b/Assets/Resources/UI/InventoryItem.prefab @@ -0,0 +1,95 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &8083802405129708202 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5549719013547300854} + - component: {fileID: 1038155520378291879} + - component: {fileID: 7795452597470257345} + - component: {fileID: 6274831035850983080} + m_Layer: 5 + m_Name: InventoryItem + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5549719013547300854 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8083802405129708202} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 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: 90, y: 50} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &1038155520378291879 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8083802405129708202} + m_CullTransparentMesh: 1 +--- !u!114 &7795452597470257345 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8083802405129708202} + 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_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 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!114 &6274831035850983080 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8083802405129708202} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c83beb55043dab346a0cf9439add61ec, type: 3} + m_Name: + m_EditorClassIdentifier: + rectTransform: {fileID: 0} + mask: + serializedVersion: 2 + m_Bits: 64 + targetModel: {fileID: 0} diff --git a/Assets/Resources/UI/InventoryItem.prefab.meta b/Assets/Resources/UI/InventoryItem.prefab.meta new file mode 100644 index 00000000..f454d040 --- /dev/null +++ b/Assets/Resources/UI/InventoryItem.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e8cb2a757f946e4419b9e0d9369977cf +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/ClickHandler.cs b/Assets/Scripts/ClickHandler.cs index 0bf3608e..9306ebb3 100644 --- a/Assets/Scripts/ClickHandler.cs +++ b/Assets/Scripts/ClickHandler.cs @@ -49,7 +49,6 @@ public class ClickHandler : MonoBehaviour Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out RaycastHit hit)) { - Debug.Log(hit.transform.name); if (hit.collider.TryGetComponent(out var clickable)) { highLight.ShowHighlight((BoxCollider)hit.collider); diff --git a/Assets/Scripts/Logic/Panel_LogicData.cs b/Assets/Scripts/Logic/Panel_LogicData.cs index cc5e3335..a1208cfd 100644 --- a/Assets/Scripts/Logic/Panel_LogicData.cs +++ b/Assets/Scripts/Logic/Panel_LogicData.cs @@ -48,7 +48,6 @@ namespace Octopus.Simulator { if (item == null) { - Debug.Log(null); gameObject.SetActive(false); return; } diff --git a/Assets/Scripts/SimulationModels/SimulationModel.cs b/Assets/Scripts/SimulationModels/SimulationModel.cs index 9eac406a..0543e7dc 100644 --- a/Assets/Scripts/SimulationModels/SimulationModel.cs +++ b/Assets/Scripts/SimulationModels/SimulationModel.cs @@ -28,7 +28,6 @@ public abstract class SimulationModel : MonoBehaviour, IClickable public Transform DataBubbleSocket; protected BubbleUI bubbleUIPrefab; protected BubbleUI currentBubble; - public string eventKey; private bool isQuitting = false; public Action onModelClicked; protected Panel_SimulationUI simulationUI; @@ -57,10 +56,6 @@ public abstract class SimulationModel : MonoBehaviour, IClickable } } - private void OnEnable() - { - StartCoroutine(RunSimulationCoroutine()); - } private void OnDestroy() { if (isQuitting) return; @@ -94,10 +89,6 @@ public abstract class SimulationModel : MonoBehaviour, IClickable collider.size = transform.InverseTransformVector(bounds.size); collider.size = new Vector3(Mathf.Abs(collider.size.x), Mathf.Abs(collider.size.y),Mathf.Abs(collider.size.z)); } - protected virtual IEnumerator RunSimulationCoroutine() - { - yield return null; - } public abstract void GetData(string data); diff --git a/Assets/Scripts/SimulationModels/SimulationModelConveyor.cs b/Assets/Scripts/SimulationModels/SimulationModelConveyor.cs index f69f5a42..fef99e3f 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelConveyor.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelConveyor.cs @@ -2,322 +2,18 @@ using Newtonsoft.Json; using System.Collections.Generic; using UnityEngine; -using System.Collections; -using Newtonsoft.Json.Linq; -using System.Collections.Concurrent; -using Octopus.Simulator.Networks; using Octopus.Simulator; -using static UnityEngine.InputSystem.HID.HID; #pragma warning disable CS8632 -public class SimulationModelConveyor : SimulationModel -{ - Vector3 startPosition; - Vector3 endPosition; - ConcurrentQueue dataQueue; - public GameObject moveTargetCargo; - public GameObject storedCargo; - int transportTime; - float elapseTime; - string inputQueueID; - string inputStoreID; - // Start is called once before the first execution of Update after the MonoBehaviour is created - - protected override void init() - { - base.init(); - startPosition = this.transform.Find(nameof(startPosition)).transform.position; - endPosition = this.transform.Find(nameof(endPosition)).transform.position; - } - - // Update is called once per frame - void Update() - { - if (simulationUI.isplaying) - { - if (moveTargetCargo != null) - { - startPosition = this.transform.Find(nameof(startPosition)).transform.position; - endPosition = this.transform.Find(nameof(endPosition)).transform.position; - - elapseTime += Time.deltaTime; - - if (elapseTime < transportTime) - { - moveTargetCargo.transform.position = Vector3.Lerp(startPosition, endPosition, elapseTime / transportTime); - } - else if (elapseTime > transportTime) - { - //moveTargetCargo = null; - elapseTime = 0; - } - - } - } - } - - /* - protected override IEnumerator RunSimulationCoroutine() - { - yield return new WaitUntil(() => !string.IsNullOrEmpty(nodeID)); - while (dataQueue == null) - { - dataQueue = MQTTDataBase.Instance.GetDataQueue(nodeID); - if (dataQueue == null) - yield return null; - else - break; - } - - while(true) - { - if (dataQueue.TryDequeue(out JObject currentData)) - { - string rawData = currentData.ToString(); - - - Debug.Log(rawData); - if ( rawData.Contains("conveyor_loading")) - { - //targetCargo = Instantiate(this.gameObject); - //var resourcePath = "Models"; - //var tmpModel = Resources.Load(string.Format("{0}/{1}", resourcePath, "Box_Pallet")); - //targetCargo = Instantiate(tmpModel); - - - - SimulationModel model = new SimulationModel(); - - if (!string.IsNullOrEmpty(inputQueueID)) - { - model = DataManager.I.GetModel(inputQueueID); - } - else if (!string.IsNullOrEmpty(inputStoreID)) - { - model = DataManager.I.GetModel(inputStoreID); - } - - SimulationModelStore storeModel = (SimulationModelStore)model; - - if ( moveTargetCargo == null) - { - yield return new WaitUntil(() => - { - moveTargetCargo = storeModel.GetProduct(); - storedCargo = moveTargetCargo; - return moveTargetCargo != null; - }); - - moveTargetCargo.transform.position = startPosition; - moveTargetCargo.transform.rotation = Quaternion.identity; - - } - - ConveyorLoadingEventMessage message - = JsonConvert.DeserializeObject(rawData); - Debug.Log(message); - - } - - if ( rawData.Contains("conveyor_started")) - { - ConveyorStartedEventMessage startDataMessage - = JsonConvert.DeserializeObject(rawData); - - Debug.Log(startDataMessage.Data.InputQueues.ToString() + this.name); - - transportTime = (int)startDataMessage.Data.MoveTime; - - if ( startDataMessage.Data.InputQueues.Count != 0) - { - inputQueueID = startDataMessage.Data.InputQueues[0].Queue; - } - - if ( startDataMessage.Data.InputStores.Count != 0) - { - inputStoreID = startDataMessage.Data.InputStores[0].Queue; - } - - - - } - - if ( rawData.Contains("conveyor_unloading")) - { - if ( rawData.Contains("_to_queue")) - { - ConveyorUnloadingToQueueEventMessage message - = JsonConvert.DeserializeObject(rawData); - - string destinationID = message.Data.QueueName; - - SimulationModel model = DataManager.I.GetModel(destinationID); - SimulationModelStore storemodel = (SimulationModelStore)model; - - storemodel.StoreProduct(storedCargo); - storedCargo = null; - } - - else if ( rawData.Contains("_to_store")) - { - ConveyorUnloadingToStoreEventMessage message - = JsonConvert.DeserializeObject(rawData); - - - string destinationID = message.Data.StoreName; - - SimulationModel model = DataManager.I.GetModel(destinationID); - SimulationModelStore storemodel = (SimulationModelStore)model; - - storemodel.StoreProduct(storedCargo); - storedCargo = null; - } - - - } - - } - - yield return null; - } - - } - */ - public override void GetData(string data) - { - var wrapclass = JsonConvert.DeserializeObject(data); - - if (wrapclass._event.Contains("conveyor_started")) - { - ConveyorStartedEventMessage startDataMessage - = JsonConvert.DeserializeObject(data); - - //Debug.Log("conveyor"+startDataMessage.Data.InputQueues.ToString() + this.name); - - transportTime = (int)startDataMessage.Data.MoveTime; - - if (startDataMessage.Data.InputQueues.Count != 0) - { - inputQueueID = startDataMessage.Data.InputQueues[0].Queue; - } - - if (startDataMessage.Data.InputStores.Count != 0) - { - inputStoreID = startDataMessage.Data.InputStores[0].Queue; - } - } - - if (wrapclass._event.Contains("conveyor_loading_from_store")) - { - Conveyor_Loading_From_Store loadingData = JsonConvert.DeserializeObject(wrapclass.data.ToString()); - SimulationModel model; - model = DataManager.I.GetModel(loadingData.store_name); - - SimulationModelStore storeModel = model.GetComponent(); - - if (moveTargetCargo == null) - { - moveTargetCargo = ProductManager.Instance.SpawnProduct(); - storedCargo = moveTargetCargo; - - moveTargetCargo.transform.position = startPosition; - moveTargetCargo.transform.rotation = Quaternion.identity; - } - - } - else if (wrapclass._event.Contains("conveyor_loading_from_queue")) - { - Conveyor_Loading_From_Queue loadingData = JsonConvert.DeserializeObject(wrapclass.data.ToString()); - SimulationModel model; - model = DataManager.I.GetModel(loadingData.queue_name); - - SimulationModelStore storeModel = model.GetComponent(); - - if (moveTargetCargo == null) - { - moveTargetCargo = ProductManager.Instance.SpawnProduct(); - storedCargo = moveTargetCargo; - - moveTargetCargo.transform.position = startPosition; - moveTargetCargo.transform.rotation = Quaternion.identity; - } - - } - - if (wrapclass._event.Contains("conveyor_unloading")) - { - if (wrapclass._event.Contains("_to_queue")) - { - ConveyorUnloadingToQueueEventMessage message - = JsonConvert.DeserializeObject(data); - - string destinationID = message.Data.QueueName; - - SimulationModel model = DataManager.I.GetModel(destinationID); - SimulationModelStore storemodel = model.GetComponent(); - - moveTargetCargo = null; - //storemodel.StoreProduct(storedCargo); - Destroy(storedCargo); - storedCargo = null; - } - - else if (wrapclass._event.Contains("_to_store")) - { - ConveyorUnloadingToStoreEventMessage message - = JsonConvert.DeserializeObject(data); - - - string destinationID = message.Data.StoreName; - - SimulationModel model = DataManager.I.GetModel(destinationID); - SimulationModelStore storemodel = model.GetComponent(); - - moveTargetCargo = null; - //storemodel.StoreProduct(storedCargo); - Destroy(storedCargo); - storedCargo = null; - } - } - - if (wrapclass._event.Contains("conveyor_statistics_update")) - { - SetBubble(JsonConvert.DeserializeObject(wrapclass.data.ToString()).statistics.transported_count); - } - } - - public override void SetBubble(object data) - { - string msg = data.ToString(); - - if (currentBubble == null) - { - // 생성 - currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType().transform); - currentBubble.target = DataBubbleSocket; - currentBubble.worldOffset = new Vector3(0, 1.0f, 0); // 필요에 따라 조절 - currentBubble.GetComponent().SetAsFirstSibling(); - } - // 텍스트 갱신 - currentBubble.SetMessage(msg); - currentBubble.SetDetail(msg, logicType.conveyor, LogicUIManager.instance.GetItemLabelByID(nodeID)); - } -} - +#region class [Serializable] public class ConveyorUnloadingToStoreEventMessage { - [JsonProperty("type")] - public string? Type { get; set; } + [JsonProperty("type")] public string? Type { get; set; } + [JsonProperty("_event")] public string? Event { get; set; } + [JsonProperty("component_type")] public string? ComponentType { get; set; } - [JsonProperty("_event")] - public string? Event { get; set; } - - [JsonProperty("component_type")] - public string? ComponentType { get; set; } - - [JsonProperty("component_id")] - public string? ComponentId { get; set; } + [JsonProperty("component_id")] public string? ComponentId { get; set; } [JsonProperty("simulation_time")] public double? SimulationTime { get; set; } @@ -767,3 +463,175 @@ public class StatisticsConveyor { public int transported_count; } +#endregion +public class SimulationModelConveyor : SimulationModel +{ + Vector3 startPosition; + Vector3 endPosition; + public GameObject moveTargetCargo; + public GameObject storedCargo; + int transportTime; + float elapseTime; + string inputQueueID; + string inputStoreID; + // Start is called once before the first execution of Update after the MonoBehaviour is created + + protected override void init() + { + base.init(); + startPosition = transform.Find(nameof(startPosition)).transform.position; + endPosition = transform.Find(nameof(endPosition)).transform.position; + } + + + // Update is called once per frame + void Update() + { + if (!simulationUI.isplaying) + return; + + if (moveTargetCargo == null) + return; + + startPosition = transform.Find(nameof(startPosition)).transform.position; + endPosition = transform.Find(nameof(endPosition)).transform.position; + elapseTime += Time.deltaTime; + + if (transportTime <= 0) + return; + + if (elapseTime < transportTime) + { + moveTargetCargo.transform.position = Vector3.Lerp(startPosition, endPosition, elapseTime / transportTime); + } + else + { + elapseTime = 0f; + // 완료 후 행동이 필요하면 여기에 추가 (예: 다음 상태로 이동) + } + } + + public override void GetData(string data) + { + var wrapclass = JsonConvert.DeserializeObject(data); + + switch (wrapclass._event) + { + case "conveyor_started": + SetStartPosition(wrapclass.data.ToString()); + break; + case "conveyor_loading_from_store": + LoadingCargo(wrapclass.data.ToString()); + break; + case "conveyor_loading_from_queue": + LoadingCargo(wrapclass.data.ToString()); + break; + case "conveyor_unloading_to_queue": + UnloadingCargo(data, true); + break; + case "conveyor_unloading_to_store": + UnloadingCargo(data, false); + break; + case "conveyor_statistics_update": + SetBubble(JsonConvert.DeserializeObject(wrapclass.data.ToString()).statistics.transported_count); + break; + } + } + + private void SetStartPosition(string data) + { + var startData = JsonConvert.DeserializeObject(data); + if (startData == null) + return; + + transportTime = (int)(startData.MoveTime ?? transportTime); + + if (startData.InputQueues != null && startData.InputQueues.Count > 0) + { + inputQueueID = startData.InputQueues[0].Queue ?? string.Empty; + } + + if (startData.InputStores != null && startData.InputStores.Count > 0) + { + inputStoreID = startData.InputStores[0].Queue ?? string.Empty; + } + } + + private void LoadingCargo(string data) + { + if (moveTargetCargo != null) + return; + + InitCargo(); + + moveTargetCargo.transform.position = startPosition; + moveTargetCargo.transform.rotation = Quaternion.identity; + } + + private void InitCargo() + { + if (moveTargetCargo != null) + return; + + moveTargetCargo = ProductManager.Instance.SpawnProduct(); + moveTargetCargo.GetComponent().SetParent(this.nodeID); + storedCargo = moveTargetCargo; + } + + private void UnloadingCargo(string data, bool isQueue) + { + if (isQueue) + { + var msg = JsonConvert.DeserializeObject(data); + if (msg == null) + return; + + string destinationID = msg.QueueName; + ProcessUnload(destinationID); + } + else + { + var msg = JsonConvert.DeserializeObject(data); + if (msg == null) + return; + + string destinationID = msg.StoreName; + ProcessUnload(destinationID); + } + } + + private void ProcessUnload(string destinationID) + { + if (string.IsNullOrEmpty(destinationID)) + return; + + var model = DataManager.I.GetModel(destinationID); + if (model == null) + return; + + moveTargetCargo = null; + + if (storedCargo != null) + { + Destroy(storedCargo); + storedCargo = null; + } + } + + public override void SetBubble(object data) + { + string msg = data.ToString(); + + if (currentBubble == null) + { + // 생성 + currentBubble = Instantiate(bubbleUIPrefab, FindAnyObjectByType().transform); + currentBubble.target = DataBubbleSocket; + currentBubble.worldOffset = new Vector3(0, 1.0f, 0); // 필요에 따라 조절 + currentBubble.GetComponent().SetAsFirstSibling(); + } + // 텍스트 갱신 + currentBubble.SetMessage(msg); + currentBubble.SetDetail(msg, logicType.conveyor, LogicUIManager.instance.GetItemLabelByID(nodeID)); + } +} \ No newline at end of file diff --git a/Assets/Scripts/SimulationModels/SimulationModelMove.cs b/Assets/Scripts/SimulationModels/SimulationModelMove.cs index 6d7f94fa..54a7cbee 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelMove.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelMove.cs @@ -1,13 +1,12 @@ -using Newtonsoft.Json.Linq; -using UnityEngine; +using UnityEngine; using System; -using System.Collections.Concurrent; using System.Collections.Generic; using UnityEngine.Events; using Octopus.Simulator.Networks; using Newtonsoft.Json; using Octopus.Simulator; +#region class [Serializable] public class MoveDataClass_start { @@ -142,6 +141,7 @@ public class statisticsMove { public int total_moved; } +#endregion public class SimulationModelMove : SimulationModel { @@ -150,131 +150,111 @@ public class SimulationModelMove : SimulationModel string eventUnloading = "move_unloading"; string eventSpeed = "move_speed_factor_applied"; string eventReturning = "move_returning"; + + [Header("Transport")] public List listProducts = new List(); public Transform productPos; public Vector3 productDistance = new Vector3(0, 0.321f, 0); - public UnityEvent onMove; - public UnityEvent onWait; + int productCount = 0; int currentCount = 0; int totalMoved = 0; + bool isFirstTransport = true; + Transform origin = null; public Transform destination = null; + public float arrivalTime = 0; public float elapsedTime = 0; + Vector3 originalPos; Vector3 prevPos; void Update() { - if (simulationUI.isplaying) + if (!simulationUI.isplaying) + return; + + UpdateProductStacking(); + UpdateMovement(); + } + + private void UpdateProductStacking() + { + if (productCount != listProducts.Count) { - int interval = 0; - if (productCount != listProducts.Count) + productCount = listProducts.Count; + // 단순하게 모두 같은 offset으로 배치 (필요 시 i 기반 offset으로 확장) + foreach (var gb in listProducts) { - productCount = listProducts.Count; - for (int i = 0; i < productCount; i++) + if (gb != null) { - GameObject gb = listProducts[i]; gb.transform.localPosition = productDistance; - interval++; } } - if (destination != null) - { - elapsedTime += Time.deltaTime * WebParameters.speed; - - if (elapsedTime / arrivalTime > 1.0f) - { - transform.position = destination.position; - transform.forward = destination.forward; - destination = null; - } - else - { - transform.position = Vector3.Lerp(originalPos, destination.position, elapsedTime / arrivalTime); - Vector3 dir = transform.position - prevPos; - dir.y = 0; - dir.Normalize(); - transform.forward = dir; - prevPos = transform.position; - } - - } } } - bool isFirstTransport = true; + private void UpdateMovement() + { + if (destination == null) + return; + + elapsedTime += Time.deltaTime * WebParameters.speed; + + if (arrivalTime <= 0f) + return; + + float t = elapsedTime / arrivalTime; + if (t > 1f) + { + transform.position = destination.position; + transform.forward = destination.forward; + destination = null; + } + else + { + Vector3 newPos = Vector3.Lerp(originalPos, destination.position, t); + transform.position = newPos; + + Vector3 dir = newPos - prevPos; + dir.y = 0; + if (dir.sqrMagnitude > 0.0001f) + { + dir.Normalize(); + transform.forward = dir; + } + + prevPos = newPos; + } + } public override void GetData(string data) { var wrapclass = JsonConvert.DeserializeObject(data); - - if (wrapclass._event.Contains(eventLoading)) + if (wrapclass == null || string.IsNullOrEmpty(wrapclass._event)) + return; + /* + string eventLoading = "move_loading"; + string eventMove = "move_moving"; + string eventUnloading = "move_unloading"; + string eventSpeed = "move_speed_factor_applied"; + string eventReturning = "move_returning"; + */ + switch (wrapclass._event) { - var moveData_loading = JsonConvert.DeserializeObject(wrapclass.data.ToString()); - if (moveData_loading.source_queues != null && (moveData_loading.source_queues.Count >= 1)) - { - string queueID = moveData_loading.source_queues[0].ToString(); - SimulationModel model = DataManager.I.GetModel(queueID); - SimulationModelStore storeModel = (SimulationModelStore)model; - currentCount = moveData_loading.loaded_count; - SetBubble(currentCount); - - - if ( isFirstTransport) - { - SimulationModelStore source = DataManager.I.GetModel(moveData_loading.source_queues[0]) as SimulationModelStore; - this.transform.position = source.GetTransporterPosition().position; - - isFirstTransport = false; - } - - - for (int i = 0; i < moveData_loading.loaded_count; i++) - { - GameObject product = null; - product = ProductManager.Instance.SpawnProduct(); - if (product != null) - { - product.transform.parent = productPos; - product.transform.localPosition = Vector3.zero; - product.transform.localRotation = Quaternion.identity; - listProducts.Add(product); - } - } - } - if (moveData_loading.source_stores != null && (moveData_loading.source_stores.Count >= 1)) - { - string storeID = moveData_loading.source_stores[0].ToString(); - SimulationModel model = DataManager.I.GetModel(storeID); - SimulationModelStore storeModel = (SimulationModelStore)model; - currentCount = moveData_loading.loaded_count; - SetBubble(currentCount); - - if ( isFirstTransport) - { - SimulationModelStore source = DataManager.I.GetModel(moveData_loading.source_stores[0]) as SimulationModelStore; - this.transform.position = source.GetTransporterPosition().position; - - isFirstTransport = false; - } - - - - for (int i = 0; i < moveData_loading.loaded_count; i++) - { - GameObject product = null; - product = ProductManager.Instance.SpawnProduct(); - if (product != null) - { - product.transform.parent = productPos; - product.transform.localPosition = Vector3.zero; - product.transform.localRotation = Quaternion.identity; - listProducts.Add(product); - } - } - } + case "move_loading": + LoadingCargo(wrapclass.data.ToString()); + break; + case "move_moving": + Moving(wrapclass.data.ToString()); + break; + case "move_unloading": + break; + case "move_speed_factor_applied": + break; + case "move_returning": + break; } if (wrapclass._event.Contains(eventMove)) { @@ -393,6 +373,93 @@ public class SimulationModelMove : SimulationModel } } + private void LoadingCargo(string data) + { + var loading = JsonConvert.DeserializeObject(data); + if (loading == null) + return; + + currentCount = loading.loaded_count; + SetBubble(currentCount); + + // 처음 운송이면 출발 위치 세팅 + if (isFirstTransport) + { + string sourceId = GetFirstNonEmpty(loading.source_queues, loading.source_stores); + if (!string.IsNullOrEmpty(sourceId)) + { + var sourceModel = DataManager.I.GetModel(sourceId) as SimulationModelStore; + if (sourceModel != null) + { + transform.position = sourceModel.GetTransporterPosition()?.position ?? transform.position; + } + } + isFirstTransport = false; + } + + AddProducts(loading.loaded_count); + } + + private void Moving(string data) + { + var moveData = JsonConvert.DeserializeObject(data); + if (moveData == null) + return; + + elapsedTime = 0f; + arrivalTime = moveData.time; + originalPos = transform.position; + prevPos = transform.position; + + // origin 설정 (입력 큐 / 스토어) + string inputId = GetFirstNonEmpty(moveData.input?.queues, moveData.input?.stores); + if (!string.IsNullOrEmpty(inputId)) + { + var model = DataManager.I.GetModel(inputId) as SimulationModelStore; + if (model != null) + origin = model.GetTransporterPosition(); + } + + // destination 설정 (출력 큐 / 스토어) + if (!string.IsNullOrEmpty(moveData.output?.queue)) + { + var model = DataManager.I.GetModel(moveData.output.queue) as SimulationModelStore; + if (model != null) + destination = model.GetTransporterPosition(); + } + else if (!string.IsNullOrEmpty(moveData.output?.store)) + { + var model = DataManager.I.GetModel(moveData.output.store) as SimulationModelStore; + if (model != null) + destination = model.GetTransporterPosition(); + } + } + + private string GetFirstNonEmpty(List listA, List listB) + { + if (listA != null && listA.Count > 0) + return listA[0]; + if (listB != null && listB.Count > 0) + return listB[0]; + return string.Empty; + } + + private void AddProducts(int count) + { + for (int i = 0; i < count; i++) + { + var product = ProductManager.Instance.SpawnProduct(); + if (product == null) + continue; + + product.GetComponent().SetParent(this.nodeID); + product.transform.parent = productPos; + product.transform.localPosition = Vector3.zero; + product.transform.localRotation = Quaternion.identity; + listProducts.Add(product); + } + } + public override void SetBubble(object data) { string msg = $"{currentCount}/{totalMoved}"; diff --git a/Assets/Scripts/SimulationModels/SimulationModelProcess.cs b/Assets/Scripts/SimulationModels/SimulationModelProcess.cs index dd5ab89b..16c05039 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelProcess.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelProcess.cs @@ -201,7 +201,8 @@ public class SimulationModelProcess : SimulationModel { GameObject product = null; product = ProductManager.Instance.SpawnProduct(); - + product.GetComponent().SetParent(this.nodeID); + product.transform.parent = productPos; product.transform.localPosition = Vector3.zero; product.transform.localRotation = Quaternion.identity; @@ -221,7 +222,8 @@ public class SimulationModelProcess : SimulationModel { GameObject product = null; product = ProductManager.Instance.SpawnProduct(); - + product.GetComponent().SetParent(this.nodeID); + product.transform.parent = productPos; product.transform.localPosition = Vector3.zero; product.transform.localRotation = Quaternion.identity; diff --git a/Assets/Scripts/SimulationModels/SimulationModelProduct.cs b/Assets/Scripts/SimulationModels/SimulationModelProduct.cs index 15c94d26..48b6fabd 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelProduct.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelProduct.cs @@ -2,11 +2,17 @@ using UnityEngine; public class SimulationModelProduct : SimulationModel { + public string id; public override void GetData(string data) { throw new System.NotImplementedException(); } + public void SetParent(string id) + { + this.id = id; + } + public override void SetBubble(object data) { Debug.Log(data.ToString()); diff --git a/Assets/Scripts/SimulationModels/SimulationModelSource.cs b/Assets/Scripts/SimulationModels/SimulationModelSource.cs index afeff62e..88bdad41 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelSource.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelSource.cs @@ -73,24 +73,20 @@ public class SimulationModelSource : SimulationModel int productCount = 0; int defectCount = 0; - protected override void init() - { - base.init(); - eventKey = "generator_event"; - } - public override void GetData(string data) { var wrapclass = JsonConvert.DeserializeObject(data); if (wrapclass._event.Contains(eventGenerateProduct)) { GameObject gb = Instantiate(productPrefab, productPos); + gb.GetComponent().SetParent(this.nodeID); listProducts.Add(gb); ProductSorting(); } else if (wrapclass._event.Contains(eventGenerateDefect)) { GameObject gb = Instantiate(defectPrefab, productPos); + gb.GetComponent().SetParent(this.nodeID); listProducts.Add(gb); ProductSorting(); } @@ -116,7 +112,14 @@ public class SimulationModelSource : SimulationModel { SimulationModelStore storeModel = model.GetComponent(); storeModel.maxCapacity = queueCapacity; - storeModel.storeType = storeType; + if (storeType == "fifo") + { + storeModel.storeType = StoreBehavior.FIFO; + } + else + { + storeModel.storeType = StoreBehavior.LIFO; + } //storeModel.StoreProduct(product); Destroy(product); } diff --git a/Assets/Scripts/SimulationModels/SimulationModelStore.cs b/Assets/Scripts/SimulationModels/SimulationModelStore.cs index dd90573e..e8ac5f28 100644 --- a/Assets/Scripts/SimulationModels/SimulationModelStore.cs +++ b/Assets/Scripts/SimulationModels/SimulationModelStore.cs @@ -1,22 +1,29 @@ using UnityEngine; using System.Collections.Generic; using System.Linq; -using RTG; -using Octopus.Simulator.Networks; using Newtonsoft.Json; -using System.Collections; using System; using Octopus.Simulator; +#region class +public interface IStatusUpdateStatistics +{ + long current_length { get; } + long capacity { get; } +} + public class StoreStatusUpdateData { public StoreStatusUpdateDatastatistics statistics; } -public class StoreStatusUpdateDatastatistics +public class StoreStatusUpdateDatastatistics : IStatusUpdateStatistics { - public Int64 current_length; - public Int64 capacity; + public long current_length; + public long capacity; + + long IStatusUpdateStatistics.current_length => current_length; + long IStatusUpdateStatistics.capacity => capacity; } public class QueueStatusUpdateData @@ -24,20 +31,34 @@ public class QueueStatusUpdateData public QueueStatusUpdateDatastatistics statistics; } -public class QueueStatusUpdateDatastatistics +public class QueueStatusUpdateDatastatistics : IStatusUpdateStatistics { - public Int64 current_length; - public Int64 capacity; + public long current_length; + public long capacity; + + long IStatusUpdateStatistics.current_length => current_length; + long IStatusUpdateStatistics.capacity => capacity; } +public enum StoreBehavior +{ + FIFO, + LIFO +} +#endregion + public class SimulationModelStore : SimulationModel { + [Header("Configuration")] public List storePositions = new List(); - public int maxCapacity; - public List storedProducts = new List(); - public string storeType = "fifo"; public List transporterPositions = new List(); + public List storedProducts = new List(); + public int maxCapacity; + public StoreBehavior storeType = StoreBehavior.FIFO; + + + protected override void init() { base.init(); @@ -46,124 +67,90 @@ public class SimulationModelStore : SimulationModel public void StoreProduct(GameObject product) { + if (product == null) return; + product.transform.parent = transform; - for (int i = 0; i < storePositions.Count; i++) + + Transform emptySlot = storePositions.FirstOrDefault(slot => slot.childCount == 0); + if (emptySlot != null) { - Transform storePos = storePositions[i]; - if (storePos.childCount == 0) - { - product.transform.parent = storePos; - break; - } + product.transform.SetParent(emptySlot, false); } + product.transform.localPosition = Vector3.zero; product.transform.localRotation = Quaternion.identity; storedProducts.Add(product); - if (storedProducts.Count > maxCapacity) { } - //Debug.LogWarning("Max Capacity " + maxCapacity + " Reached on : " + nodeID); } + public GameObject GetProduct() { if (storedProducts.Count == 0) return null; - if (storeType.Contains("fifo")) - { - GameObject product = storedProducts[0]; - storedProducts.Remove(product); - return product; - } - else if (storeType.Contains("lifo")) - { - GameObject product = storedProducts[storedProducts.Count - 1]; - storedProducts.Remove(product); - return product; - } - return null; + + GameObject product = storeType == StoreBehavior.FIFO + ? storedProducts[0] + : storedProducts[storedProducts.Count - 1]; + + if (storeType == StoreBehavior.FIFO) + storedProducts.RemoveAt(0); + else + storedProducts.RemoveAt(storedProducts.Count - 1); + + return product; } + public Transform GetTransporterPosition() { - if (transporterPositions.Count == 0) + if (transporterPositions == null || transporterPositions.Count == 0) return null; - return transporterPositions[UnityEngine.Random.Range(0, transporterPositions.Count)]; + + int idx = UnityEngine.Random.Range(0, transporterPositions.Count); + return transporterPositions[idx]; } - void AdjustStore(StoreStatusUpdateData Store) + private void AdjustToTarget(IStatusUpdateStatistics status) { + if (status == null) return; + int current = storedProducts.Count; - Int64 target = Store.statistics.current_length; + long target = status.current_length; + int capacity = storePositions.Count; + + if (capacity <= 0) + return; + if (current < target) { - if (current > storePositions.Count) - { - return; - } - int spawnCount = (int)Mathf.Min(target - current, storePositions.Count - current); - for (int k = 0; k < spawnCount; k++) + int availableSlots = capacity - current; + int spawnCount = (int)Mathf.Min(target - current, availableSlots); + for (int i = 0; i < spawnCount; i++) { + Transform emptySlot = storePositions.FirstOrDefault(slot => slot.childCount == 0); + if (emptySlot == null) + break; + GameObject prod = ProductManager.Instance.SpawnProduct(); - - Transform emptySlot = storePositions - .FirstOrDefault(slot => slot.childCount == 0); prod.transform.SetParent(emptySlot, false); - storedProducts.Add(prod); } } else if (current > target) { - if (current > storePositions.Count) - { - return; - } int removeCount = (int)(current - target); - for (int k = 0; k < removeCount; k++) + for (int i = 0; i < removeCount; i++) { - GameObject prod = (storeType == "fifo") - ? storedProducts[0] - : storedProducts[storedProducts.Count - 1]; + GameObject prod = storeType == StoreBehavior.FIFO + ? storedProducts.FirstOrDefault() + : storedProducts.LastOrDefault(); - storedProducts.Remove(prod); - Destroy(prod); - } - } - } + if (prod == null) + continue; - void AdjustQueue(QueueStatusUpdateData Queue) - { - int current = storedProducts.Count; - Int64 target = Queue.statistics.current_length; - if (current < target) - { - if (current > storePositions.Count) - { - return; - } - int spawnCount = (int)Mathf.Min(target - current, storePositions.Count - current); - for (int k = 0; k < spawnCount; k++) - { - GameObject prod = ProductManager.Instance.SpawnProduct(); + if (storeType == StoreBehavior.FIFO) + storedProducts.RemoveAt(0); + else + storedProducts.RemoveAt(storedProducts.Count - 1); - Transform emptySlot = storePositions - .FirstOrDefault(slot => slot.childCount == 0); - prod.transform.SetParent(emptySlot, false); - - storedProducts.Add(prod); - } - } - else if (current > target) - { - if (current > storePositions.Count) - { - return; - } - int removeCount = (int)(current - target); - for (int k = 0; k < removeCount; k++) - { - GameObject prod = (storeType == "fifo") - ? storedProducts[0] - : storedProducts[storedProducts.Count - 1]; - - storedProducts.Remove(prod); Destroy(prod); } } @@ -176,13 +163,13 @@ public class SimulationModelStore : SimulationModel { case "store_status_update": var storeStatus = JsonConvert.DeserializeObject(wrapclass.data.ToString()); - AdjustStore(storeStatus); + AdjustToTarget(storeStatus?.statistics); SetBubble(storeStatus.statistics.current_length); SetBubbleDetail_Store(storeStatus.statistics); break; case "queue_status_update": var queueStatus = JsonConvert.DeserializeObject(wrapclass.data.ToString()); - AdjustQueue(queueStatus); + AdjustToTarget(queueStatus?.statistics); SetBubble(queueStatus.statistics.current_length); SetBubbleDetail_Queue(queueStatus.statistics); break; diff --git a/Assets/Scripts/Web/WebReceiver.cs b/Assets/Scripts/Web/WebReceiver.cs index a666e131..deb38e4a 100644 --- a/Assets/Scripts/Web/WebReceiver.cs +++ b/Assets/Scripts/Web/WebReceiver.cs @@ -21,9 +21,9 @@ namespace Octopus.Simulator.Networks onParameterRecived += FindAnyObjectByType().RequestInfo; onParameterRecived += FindAnyObjectByType().RequestInfo; #if UNITY_EDITOR - config.projectId = "56"; + config.projectId = "37"; //config.simulationId = "15"; - config.logicId = "61"; + config.logicId = "42"; WebParameters.config = config; onParameterRecived?.Invoke(); #else diff --git a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset index d87feb6d..0260a4e9 100644 --- a/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset +++ b/Assets/Settings/UniversalRenderPipelineGlobalSettings.asset @@ -33,28 +33,28 @@ MonoBehaviour: m_Settings: m_SettingsList: m_List: - - rid: 7810220825279463551 - - rid: 7810220825279463552 + - rid: 2193962912130007106 + - rid: 2193962912130007107 - rid: 6852985685364965378 - rid: 6852985685364965379 - rid: 6852985685364965380 - rid: 6852985685364965381 - - rid: 7810220825279463553 - - rid: 7810220825279463554 + - rid: 2193962912130007108 + - rid: 2193962912130007109 - rid: 6852985685364965384 - rid: 6852985685364965385 - - rid: 7810220825279463555 - - rid: 7810220825279463556 - - rid: 7810220825279463557 - - rid: 7810220825279463558 - - rid: 7810220825279463559 - - rid: 7810220825279463560 + - rid: 2193962912130007110 + - rid: 2193962912130007111 + - rid: 2193962912130007112 + - rid: 2193962912130007113 + - rid: 2193962912130007114 + - rid: 2193962912130007115 - rid: 6852985685364965392 - - rid: 7810220825279463561 + - rid: 2193962912130007116 - rid: 6852985685364965394 - rid: 8712630790384254976 - rid: 5092397466944798720 - - rid: 7810220825279463562 + - rid: 2193962912130007117 m_RuntimeSettings: m_List: - rid: 6852985685364965378 @@ -97,6 +97,114 @@ MonoBehaviour: references: version: 2 RefIds: + - rid: 2193962912130007106 + type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} + data: + m_Version: 0 + m_StripUnusedPostProcessingVariants: 1 + m_StripUnusedVariants: 1 + m_StripScreenCoordOverrideVariants: 1 + - rid: 2193962912130007107 + type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} + data: + m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3} + m_AutodeskInteractiveTransparent: {fileID: 4800000, guid: 5c81372d981403744adbdda4433c9c11, type: 3} + m_AutodeskInteractiveMasked: {fileID: 4800000, guid: 80aa867ac363ac043847b06ad71604cd, type: 3} + m_TerrainDetailLit: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3} + m_TerrainDetailGrassBillboard: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3} + m_TerrainDetailGrass: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3} + m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3} + m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3} + m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3} + - rid: 2193962912130007108 + type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} + data: + m_Version: 0 + m_LightShader: {fileID: 4800000, guid: 3f6c848ca3d7bca4bbe846546ac701a1, type: 3} + m_ProjectedShadowShader: {fileID: 4800000, guid: ce09d4a80b88c5a4eb9768fab4f1ee00, type: 3} + m_SpriteShadowShader: {fileID: 4800000, guid: 44fc62292b65ab04eabcf310e799ccf6, type: 3} + m_SpriteUnshadowShader: {fileID: 4800000, guid: de02b375720b5c445afe83cd483bedf3, type: 3} + m_GeometryShadowShader: {fileID: 4800000, guid: 19349a0f9a7ed4c48a27445bcf92e5e1, type: 3} + m_GeometryUnshadowShader: {fileID: 4800000, guid: 77774d9009bb81447b048c907d4c6273, type: 3} + m_FallOffLookup: {fileID: 2800000, guid: 5688ab254e4c0634f8d6c8e0792331ca, type: 3} + m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} + m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} + m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} + m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} + - rid: 2193962912130007109 + type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} + data: + m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} + m_DefaultParticleMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2} + m_DefaultLineMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2} + m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2} + m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2} + m_DefaultSpriteMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} + - rid: 2193962912130007110 + type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime} + data: + m_Version: 0 + m_InstanceDataBufferCopyKernels: {fileID: 7200000, guid: f984aeb540ded8b4fbb8a2047ab5b2e2, type: 3} + m_InstanceDataBufferUploadKernels: {fileID: 7200000, guid: 53864816eb00f2343b60e1a2c5a262ef, type: 3} + m_TransformUpdaterKernels: {fileID: 7200000, guid: 2a567b9b2733f8d47a700c3c85bed75b, type: 3} + m_WindDataUpdaterKernels: {fileID: 7200000, guid: fde76746e4fd0ed418c224f6b4084114, type: 3} + m_OccluderDepthPyramidKernels: {fileID: 7200000, guid: 08b2b5fb307b0d249860612774a987da, type: 3} + m_InstanceOcclusionCullingKernels: {fileID: 7200000, guid: f6d223acabc2f974795a5a7864b50e6c, type: 3} + m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3} + m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3} + m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3} + - rid: 2193962912130007111 + type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3} + m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3} + m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3} + - rid: 2193962912130007112 + type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + dilationShader: {fileID: 7200000, guid: 6bb382f7de370af41b775f54182e491d, type: 3} + subdivideSceneCS: {fileID: 7200000, guid: bb86f1f0af829fd45b2ebddda1245c22, type: 3} + voxelizeSceneShader: {fileID: 4800000, guid: c8b6a681c7b4e2e4785ffab093907f9e, type: 3} + traceVirtualOffsetCS: {fileID: -6772857160820960102, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} + traceVirtualOffsetRT: {fileID: -5126288278712620388, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} + skyOcclusionCS: {fileID: -6772857160820960102, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} + skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} + renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} + renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} + - rid: 2193962912130007113 + type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + m_ProbeVolumeDisableStreamingAssets: 0 + - rid: 2193962912130007114 + type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + probeVolumeDebugShader: {fileID: 4800000, guid: 3b21275fd12d65f49babb5286f040f2d, type: 3} + probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 3a80877c579b9144ebdcc6d923bca303, type: 3} + probeVolumeSamplingDebugShader: {fileID: 4800000, guid: bf54e6528c79a224e96346799064c393, type: 3} + probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3} + probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3} + numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3} + - rid: 2193962912130007115 + type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_version: 0 + m_IncludeReferencedInScenes: 0 + m_IncludeAssetsByLabel: 0 + m_LabelToInclude: + - rid: 2193962912130007116 + type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} + data: + m_Version: 1 + probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3} + probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3} + probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3} + - rid: 2193962912130007117 + type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} + data: + m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2} - rid: 5092397466944798720 type: {class: UniversalRenderPipelineRuntimeXRResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} data: @@ -156,114 +264,6 @@ MonoBehaviour: m_version: 0 m_EnableCompilationCaching: 1 m_EnableValidityChecks: 1 - - rid: 7810220825279463551 - type: {class: URPShaderStrippingSetting, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} - data: - m_Version: 0 - m_StripUnusedPostProcessingVariants: 1 - m_StripUnusedVariants: 1 - m_StripScreenCoordOverrideVariants: 1 - - rid: 7810220825279463552 - type: {class: UniversalRenderPipelineEditorShaders, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} - data: - m_AutodeskInteractive: {fileID: 4800000, guid: 0e9d5a909a1f7e84882a534d0d11e49f, type: 3} - m_AutodeskInteractiveTransparent: {fileID: 4800000, guid: 5c81372d981403744adbdda4433c9c11, type: 3} - m_AutodeskInteractiveMasked: {fileID: 4800000, guid: 80aa867ac363ac043847b06ad71604cd, type: 3} - m_TerrainDetailLit: {fileID: 4800000, guid: f6783ab646d374f94b199774402a5144, type: 3} - m_TerrainDetailGrassBillboard: {fileID: 4800000, guid: 29868e73b638e48ca99a19ea58c48d90, type: 3} - m_TerrainDetailGrass: {fileID: 4800000, guid: e507fdfead5ca47e8b9a768b51c291a1, type: 3} - m_DefaultSpeedTree7Shader: {fileID: 4800000, guid: 0f4122b9a743b744abe2fb6a0a88868b, type: 3} - m_DefaultSpeedTree8Shader: {fileID: -6465566751694194690, guid: 9920c1f1781549a46ba081a2a15a16ec, type: 3} - m_DefaultSpeedTree9Shader: {fileID: -6465566751694194690, guid: cbd3e1cc4ae141c42a30e33b4d666a61, type: 3} - - rid: 7810220825279463553 - type: {class: Renderer2DResources, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} - data: - m_Version: 0 - m_LightShader: {fileID: 4800000, guid: 3f6c848ca3d7bca4bbe846546ac701a1, type: 3} - m_ProjectedShadowShader: {fileID: 4800000, guid: ce09d4a80b88c5a4eb9768fab4f1ee00, type: 3} - m_SpriteShadowShader: {fileID: 4800000, guid: 44fc62292b65ab04eabcf310e799ccf6, type: 3} - m_SpriteUnshadowShader: {fileID: 4800000, guid: de02b375720b5c445afe83cd483bedf3, type: 3} - m_GeometryShadowShader: {fileID: 4800000, guid: 19349a0f9a7ed4c48a27445bcf92e5e1, type: 3} - m_GeometryUnshadowShader: {fileID: 4800000, guid: 77774d9009bb81447b048c907d4c6273, type: 3} - m_FallOffLookup: {fileID: 2800000, guid: 5688ab254e4c0634f8d6c8e0792331ca, type: 3} - m_CopyDepthPS: {fileID: 4800000, guid: d6dae50ee9e1bfa4db75f19f99355220, type: 3} - m_DefaultLitMaterial: {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} - m_DefaultUnlitMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - m_DefaultMaskMaterial: {fileID: 2100000, guid: 15d0c3709176029428a0da2f8cecf0b5, type: 2} - - rid: 7810220825279463554 - type: {class: UniversalRenderPipelineEditorMaterials, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} - data: - m_DefaultMaterial: {fileID: 2100000, guid: 31321ba15b8f8eb4c954353edc038b1d, type: 2} - m_DefaultParticleMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2} - m_DefaultLineMaterial: {fileID: 2100000, guid: e823cd5b5d27c0f4b8256e7c12ee3e6d, type: 2} - m_DefaultTerrainMaterial: {fileID: 2100000, guid: 594ea882c5a793440b60ff72d896021e, type: 2} - m_DefaultDecalMaterial: {fileID: 2100000, guid: 31d0dcc6f2dd4e4408d18036a2c93862, type: 2} - m_DefaultSpriteMaterial: {fileID: 2100000, guid: 9dfc825aed78fcd4ba02077103263b40, type: 2} - - rid: 7810220825279463555 - type: {class: GPUResidentDrawerResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.GPUDriven.Runtime} - data: - m_Version: 0 - m_InstanceDataBufferCopyKernels: {fileID: 7200000, guid: f984aeb540ded8b4fbb8a2047ab5b2e2, type: 3} - m_InstanceDataBufferUploadKernels: {fileID: 7200000, guid: 53864816eb00f2343b60e1a2c5a262ef, type: 3} - m_TransformUpdaterKernels: {fileID: 7200000, guid: 2a567b9b2733f8d47a700c3c85bed75b, type: 3} - m_WindDataUpdaterKernels: {fileID: 7200000, guid: fde76746e4fd0ed418c224f6b4084114, type: 3} - m_OccluderDepthPyramidKernels: {fileID: 7200000, guid: 08b2b5fb307b0d249860612774a987da, type: 3} - m_InstanceOcclusionCullingKernels: {fileID: 7200000, guid: f6d223acabc2f974795a5a7864b50e6c, type: 3} - m_OcclusionCullingDebugKernels: {fileID: 7200000, guid: b23e766bcf50ca4438ef186b174557df, type: 3} - m_DebugOcclusionTestPS: {fileID: 4800000, guid: d3f0849180c2d0944bc71060693df100, type: 3} - m_DebugOccluderPS: {fileID: 4800000, guid: b3c92426a88625841ab15ca6a7917248, type: 3} - - rid: 7810220825279463556 - type: {class: STP/RuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} - data: - m_setupCS: {fileID: 7200000, guid: 33be2e9a5506b2843bdb2bdff9cad5e1, type: 3} - m_preTaaCS: {fileID: 7200000, guid: a679dba8ec4d9ce45884a270b0e22dda, type: 3} - m_taaCS: {fileID: 7200000, guid: 3923900e2b41b5e47bc25bfdcbcdc9e6, type: 3} - - rid: 7810220825279463557 - type: {class: ProbeVolumeBakingResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} - data: - m_Version: 1 - dilationShader: {fileID: 7200000, guid: 6bb382f7de370af41b775f54182e491d, type: 3} - subdivideSceneCS: {fileID: 7200000, guid: bb86f1f0af829fd45b2ebddda1245c22, type: 3} - voxelizeSceneShader: {fileID: 4800000, guid: c8b6a681c7b4e2e4785ffab093907f9e, type: 3} - traceVirtualOffsetCS: {fileID: -6772857160820960102, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} - traceVirtualOffsetRT: {fileID: -5126288278712620388, guid: ff2cbab5da58bf04d82c5f34037ed123, type: 3} - skyOcclusionCS: {fileID: -6772857160820960102, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} - skyOcclusionRT: {fileID: -5126288278712620388, guid: 5a2a534753fbdb44e96c3c78b5a6999d, type: 3} - renderingLayerCS: {fileID: -6772857160820960102, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} - renderingLayerRT: {fileID: -5126288278712620388, guid: 94a070d33e408384bafc1dea4a565df9, type: 3} - - rid: 7810220825279463558 - type: {class: ProbeVolumeGlobalSettings, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} - data: - m_Version: 1 - m_ProbeVolumeDisableStreamingAssets: 0 - - rid: 7810220825279463559 - type: {class: ProbeVolumeDebugResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} - data: - m_Version: 1 - probeVolumeDebugShader: {fileID: 4800000, guid: 3b21275fd12d65f49babb5286f040f2d, type: 3} - probeVolumeFragmentationDebugShader: {fileID: 4800000, guid: 3a80877c579b9144ebdcc6d923bca303, type: 3} - probeVolumeSamplingDebugShader: {fileID: 4800000, guid: bf54e6528c79a224e96346799064c393, type: 3} - probeVolumeOffsetDebugShader: {fileID: 4800000, guid: db8bd7436dc2c5f4c92655307d198381, type: 3} - probeSamplingDebugMesh: {fileID: -3555484719484374845, guid: 20be25aac4e22ee49a7db76fb3df6de2, type: 3} - numbersDisplayTex: {fileID: 2800000, guid: 73fe53b428c5b3440b7e87ee830b608a, type: 3} - - rid: 7810220825279463560 - type: {class: IncludeAdditionalRPAssets, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} - data: - m_version: 0 - m_IncludeReferencedInScenes: 0 - m_IncludeAssetsByLabel: 0 - m_LabelToInclude: - - rid: 7810220825279463561 - type: {class: ProbeVolumeRuntimeResources, ns: UnityEngine.Rendering, asm: Unity.RenderPipelines.Core.Runtime} - data: - m_Version: 1 - probeVolumeBlendStatesCS: {fileID: 7200000, guid: a3f7b8c99de28a94684cb1daebeccf5d, type: 3} - probeVolumeUploadDataCS: {fileID: 7200000, guid: 0951de5992461754fa73650732c4954c, type: 3} - probeVolumeUploadDataL2CS: {fileID: 7200000, guid: 6196f34ed825db14b81fb3eb0ea8d931, type: 3} - - rid: 7810220825279463562 - type: {class: UniversalRenderPipelineEditorAssets, ns: UnityEngine.Rendering.Universal, asm: Unity.RenderPipelines.Universal.Runtime} - data: - m_DefaultSettingsVolumeProfile: {fileID: 11400000, guid: eda47df5b85f4f249abf7abd73db2cb2, type: 2} - rid: 8712630790384254976 type: {class: RenderGraphUtilsResources, ns: UnityEngine.Rendering.RenderGraphModule.Util, asm: Unity.RenderPipelines.Core.Runtime} data: