stackable inv objects, inv container

This commit is contained in:
HelarJ 2022-03-28 10:08:54 +03:00
parent 84e21c94f3
commit 8246a9ef8a
20 changed files with 3595 additions and 637 deletions

View File

@ -13,6 +13,7 @@ GameObject:
- component: {fileID: 5155207960822887486}
- component: {fileID: 1015801306266775026}
- component: {fileID: 1015801306266775027}
- component: {fileID: 7148710207580294270}
m_Layer: 21
m_Name: Holster
m_TagString: Untagged
@ -151,3 +152,15 @@ MonoBehaviour:
m_SocketActive: 1
m_InteractableHoverScale: 1
m_RecycleDelayTime: 1
--- !u!114 &7148710207580294270
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1015801306266775025}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: aca2b5bf18c279c4cb265c82010714b1, type: 3}
m_Name:
m_EditorClassIdentifier:

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 4729065021270817612}
- component: {fileID: 5579585539182961868}
- component: {fileID: 8105550803505491054}
- component: {fileID: 4591371125200328589}
m_Layer: 0
m_Name: Mushroom_01
m_TagString: Untagged
@ -31,7 +32,7 @@ Transform:
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_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
@ -231,3 +232,19 @@ MonoBehaviour:
m_ForceGravityOnDetach: 0
m_RetainTransformParent: 1
m_AttachPointCompatibilityMode: 0
--- !u!114 &4591371125200328589
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4385080170328260021}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fc417ab3a5b06f04db2149be4cfdf6e4, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 1
canStack: 1
itemName: Red Mushroom
itemDescription:

View File

@ -14,6 +14,7 @@ GameObject:
- component: {fileID: 5371485246626056766}
- component: {fileID: 5868452619794669030}
- component: {fileID: 2669145217468523370}
- component: {fileID: 8028753017960928093}
m_Layer: 0
m_Name: Mushroom_02
m_TagString: Untagged
@ -231,3 +232,19 @@ MonoBehaviour:
m_ForceGravityOnDetach: 0
m_RetainTransformParent: 1
m_AttachPointCompatibilityMode: 0
--- !u!114 &8028753017960928093
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5440707293445505367}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fc417ab3a5b06f04db2149be4cfdf6e4, type: 3}
m_Name:
m_EditorClassIdentifier:
itemId: 2
canStack: 1
itemName: Brown Mushroom
itemDescription:

View File

@ -0,0 +1,30 @@
using System;
using TMPro;
using UnityEngine;
public class ConsolePrinter : MonoBehaviour
{
static string historyOutput = "";
public TMP_Text textBox;
void OnEnable()
{
Application.logMessageReceived += Log;
}
void OnDisable()
{
Application.logMessageReceived -= Log;
}
private void Log(string logString, string stackTrace, LogType type)
{
historyOutput = Time.fixedTime + ": " + logString + "\n" + historyOutput;
if (historyOutput.Length > 5000)
{
historyOutput = historyOutput[..4000];
}
textBox.text = historyOutput;
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: af6659aa65864ce9987c4e88ca2fa878
timeCreated: 1648411791

View File

@ -1,39 +1,77 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
[Serializable]
[RequireComponent(typeof(XRSocketInteractor))]
public class Inventory : MonoBehaviour
{
public int slots = 1;
private List<int> _inv;
private XRSocketInteractor xrSocketInteractor;
public List<InventorySlot> additionalSlots;
public GameObject itemContainerPrefab;
private List<InventorySlot> _inventorySlots;
private void Awake()
{
xrSocketInteractor = GetComponent<XRSocketInteractor>();
_inv = new List<int>(slots);
var oldestInteractableSelected = xrSocketInteractor.GetOldestInteractableSelected();
xrSocketInteractor.selectEntered.AddListener(Call);
xrSocketInteractor.hoverEntered.AddListener(Call);
_inventorySlots = new List<InventorySlot>();
foreach (var inventorySlot in additionalSlots)
{
inventorySlot.SetParentInventory(this);
_inventorySlots.Add(inventorySlot);
}
}
private void Call(HoverEnterEventArgs arg0)
private void OnEnable()
{
Debug.Log("hoverenter "+arg0.interactableObject + " " + xrSocketInteractor.hasHover + " " + xrSocketInteractor.hasSelection);
var inventorySlotsInChildren = GetComponentsInChildren<InventorySlot>();
foreach (var inventorySlot in inventorySlotsInChildren)
{
inventorySlot.SetParentInventory(this);
_inventorySlots.Add(inventorySlot);
}
}
public bool AddItem(ItemData item)
{
if (item.canStack)
{
return AddItem(ConvertToInventoryItem(item));
}
return AddToFirstOpenSlot(item.gameObject);
}
public bool AddItem(InventoryItem item)
{
//Stacks the item if it already exists in the inventory.
foreach (var inventorySlot in _inventorySlots.Where(inventorySlot =>
inventorySlot.ContainsItem(item.GetItemid())))
{
inventorySlot.GetItem().ChangeCount(item.Count);
return true;
}
return AddToFirstOpenSlot(item.gameObject);
}
private void Call(SelectEnterEventArgs arg0)
private bool AddToFirstOpenSlot(GameObject item)
{
Debug.Log("selectenter "+arg0.interactableObject);
foreach (var inventorySlot in _inventorySlots.Where(inventorySlot => !inventorySlot.ContainsItem()))
{
inventorySlot.AssignItem(item);
return true;
}
return false;
}
}
private InventoryItem ConvertToInventoryItem(ItemData item)
{
var inventoryItem = Instantiate(itemContainerPrefab, transform);
itemContainerPrefab.GetComponent<InventoryItem>().itemPrefab = item.gameObject;
return inventoryItem.gameObject.GetComponent<InventoryItem>();
}
}

View File

@ -1,11 +1,3 @@
fileFormatVersion: 2
guid: aca2b5bf18c279c4cb265c82010714b1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
guid: 29f5f8aed8d641c3abc54850a6a876cc
timeCreated: 1648431912

View File

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InventoryItem : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,172 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
[Serializable]
[RequireComponent(typeof(XRSocketInteractor))]
public class InventorySlot : MonoBehaviour
{
private XRSocketInteractor xrSocketInteractor;
private GameObject _itemInSlot;
private Inventory _parentInventory;
private void Awake()
{
xrSocketInteractor = GetComponent<XRSocketInteractor>();
var oldestInteractableSelected = xrSocketInteractor.GetOldestInteractableSelected();
xrSocketInteractor.selectEntered.AddListener(SelectEnter);
xrSocketInteractor.selectExited.AddListener(SelectExit);
xrSocketInteractor.hoverEntered.AddListener(HoverEnter);
xrSocketInteractor.hoverExited.AddListener(HoverExit);
}
private void HoverEnter(HoverEnterEventArgs args)
{
if (_itemInSlot == null) return;
if (_itemInSlot.GetComponent<InventoryItem>() == null) return;
if (_itemInSlot == args.interactableObject.transform.gameObject) return;
//Debug.Log("hoverenter "+args.interactableObject + " " + xrSocketInteractor.hasHover + " " + xrSocketInteractor.hasSelection);
var newItem = args.interactableObject.transform.gameObject;
var itemData = newItem.GetComponentInChildren<ItemData>();
Debug.Log("HOVER ENTER: "+itemData);
if (itemData.canStack && itemData.itemId == _itemInSlot.GetComponentInChildren<ItemData>().itemId)
{
var inventoryItem = newItem.GetComponent<InventoryItem>();
if (inventoryItem != null)
{
_itemInSlot.GetComponent<InventoryItem>().ChangeCount(inventoryItem.Count);
}
else
{
_itemInSlot.GetComponent<InventoryItem>().ChangeCount(1);
}
args.manager.interactableUnregistered += ManagerOninteractableUnregistered;
args.manager.UnregisterInteractable(args.interactableObject);
args.manager.interactableUnregistered -= ManagerOninteractableUnregistered;
}
}
private void HoverExit(HoverExitEventArgs args)
{
Debug.Log("hoverexit "+args.interactableObject + " " + xrSocketInteractor.hasHover + " " + xrSocketInteractor.hasSelection);
}
private void SelectEnter(SelectEnterEventArgs args)
{
Debug.Log("Added to slot item " + _itemInSlot);
var newItem = args.interactableObject.transform.gameObject;
//Converts the item into a inventory item
if (newItem.GetComponent<InventoryItem>() == null && newItem.GetComponent<ItemData>().canStack)
{
var load = Resources.Load("Helar/Item", typeof(GameObject)) as GameObject;
var instance = Instantiate(load, args.interactorObject.transform);
instance.GetComponent<InventoryItem>().itemPrefab = newItem.gameObject;
instance.transform.localScale = Vector3.one;
instance.transform.localPosition = Vector3.zero;
instance.GetComponent<InventoryItem>().enabled = true;
args.manager.interactableUnregistered += ManagerOninteractableUnregistered;
args.manager.UnregisterInteractable(args.interactableObject);
args.manager.interactableUnregistered -= ManagerOninteractableUnregistered;
args.interactableObject = instance.GetComponent<XRGrabInteractable>();
args.interactorObject.interactablesSelected.Add(instance.GetComponent<XRGrabInteractable>());
Debug.Log("Upgraded item to InventoryItem "+instance);
_itemInSlot = instance;
return;
}
_itemInSlot = newItem;
//xrSocketInteractor.attachTransform = _itemInSlot.transform;
Debug.Log("Holstered item" + _itemInSlot.GetComponentInChildren<ItemData>());
}
private void ManagerOninteractableUnregistered(InteractableUnregisteredEventArgs obj)
{
Debug.Log("Removing object "+ obj);
Destroy(obj.interactableObject.transform.gameObject);
}
private void SelectExit(SelectExitEventArgs args)
{
if (_itemInSlot == null) return;
if (_itemInSlot.GetComponent<InventoryItem>() == null) return;
var component = _itemInSlot.GetComponent<Rigidbody>();
component.useGravity = true;
component.angularDrag = 2f;
component.drag = 0.5f;
if (!_itemInSlot.GetComponentInChildren<ItemData>().canStack ||
_itemInSlot.GetComponent<InventoryItem>().Count == 1)
{
//var transformGameObject = _itemInSlot.GetComponentInChildren<ItemData>().transform.gameObject;
//Debug.Log(transformGameObject);
//args.interactableObject = transformGameObject.GetComponent<XRGrabInteractable>();
//todo change back to regular item
}
Debug.Log("Removed from slot item " + _itemInSlot);
_itemInSlot = null;
}
public void SetParentInventory(Inventory inventory)
{
_parentInventory = inventory;
}
public bool ContainsItem()
{
return _itemInSlot != null;
}
public bool ContainsItem(int id)
{
if (!ContainsItem()) return false;
var inventoryItem = _itemInSlot.GetComponent<InventoryItem>();
if (inventoryItem != null) return inventoryItem.GetItemid() == id;
return false;
}
public void AssignItem(GameObject newObject)
{
_itemInSlot = newObject;
}
public InventoryItem GetItem()
{
var inventoryItem = _itemInSlot.GetComponent<InventoryItem>();
if (inventoryItem == null) Debug.LogError("Item in slot doesn't have InventoryItem component");
return inventoryItem;
}
}

View File

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

View File

@ -9,6 +9,7 @@ public class ItemSpawner : MonoBehaviour
public GameObject placeToSpawn;
public void SpawnItem()
{
//Debug.Log("Spawned " + objectToSpawn);
Instantiate(objectToSpawn, placeToSpawn.transform);
}
}

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: d504c149f8ea1714d83d6d405de4e157
guid: c509c0c7d8d7f2942a05792798d31fc0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,115 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TMPro;
using Unity.Mathematics;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
[ExecuteAlways]
public class InventoryItem : MonoBehaviour
{
public GameObject itemPrefab;
private int _itemId;
private GameObject _childPrefab;
public int Count { get; private set; }
public TMP_Text itemCounterText;
private ItemData _itemData;
private void OnEnable()
{
if (itemPrefab == null)
{
enabled = false;
//Debug.LogError("Item has no attached prefab");
return;
}
enabled = true;
if (itemCounterText == null) itemCounterText = GetComponentInChildren<TMP_Text>();
_childPrefab = GetComponentInChildren<ItemData>()?.gameObject;
//Only attaches the prefab if it doesn't already have one ([ExecuteAlways] causes one to be spawned in editor).
if (_childPrefab != null) return;
_childPrefab = Instantiate(itemPrefab, transform);
_childPrefab.transform.localPosition = new Vector3(0, -0.45f, 0);
_childPrefab.transform.localScale = new Vector3(2, 2, 2);
_childPrefab.transform.rotation = quaternion.identity;
//Disable prefab components that arent relevant.
var colliderComponent = _childPrefab.GetComponent<Collider>();
if (colliderComponent != null) colliderComponent.enabled = false;
var rigidbodyComponent = _childPrefab.GetComponent<Rigidbody>();
if (rigidbodyComponent != null)
{
rigidbodyComponent.isKinematic = true;
rigidbodyComponent.useGravity = false;
}
var xrGrabInteractableComponent = _childPrefab.GetComponent<XRGrabInteractable>();
if (xrGrabInteractableComponent != null) xrGrabInteractableComponent.enabled = false;
}
private void Start()
{
_itemData = _childPrefab.GetComponent<ItemData>();
if (_itemData == null) Debug.LogError("Item prefab has no attached ItemData", _childPrefab);
_itemId = _itemData.itemId;
if (Count == 0) Count = 1;
UpdateText();
}
private void UpdateText()
{
itemCounterText.text = _itemData.canStack ? Count.ToString() : "";
}
/**
* Changes how many items are in this itemcontainer.
* Returns false if attempted to remove more items than exists in the container.
*/
public bool ChangeCount(int amount)
{
if (Count + amount < 0) return false;
Count += amount;
if (Count == 0)
{
//Destroys this gameobject if the count is 0 or lower
Destroy(this);
return true;
}
UpdateText();
return true;
}
public int GetItemid()
{
return _itemId;
}
public override string ToString()
{
return $"{base.ToString()}, Count: {Count}, ItemData: {_itemData}";
}
}

View File

@ -0,0 +1,18 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class ItemData : MonoBehaviour
{
public int itemId;
public bool canStack;
public string itemName;
public string itemDescription;
public override string ToString()
{
return $"{base.ToString()}, itemId: {itemId}, canStack: {canStack}, itemName: {itemName}";
}
}

View File

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

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 5b9bfd9e428a3e443a66c361f3675f26
guid: af818d2fbe0b12e4794f02d093a8d1c5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,485 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4641253255217536251
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4641253255217536250}
- component: {fileID: 8651546429774249556}
- component: {fileID: 719213140875167028}
- component: {fileID: 4641253255217536248}
- component: {fileID: 719213140875167033}
- component: {fileID: 719213140875167030}
- component: {fileID: 719213140875167031}
m_Layer: 10
m_Name: Item
m_TagString: Throwable
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4641253255217536250
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.568, y: 1.63, z: 2.097}
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 6541328993966107080}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &8651546429774249556
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &719213140875167028
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 29a26db91bfbab5408277406ba20dff7, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!135 &4641253255217536248
SphereCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!114 &719213140875167033
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e6bef3249ab68fd4184bea62f15c461f, type: 3}
m_Name:
m_EditorClassIdentifier:
itemPrefab: {fileID: 0}
itemCounterText: {fileID: 6541328994119722906}
--- !u!54 &719213140875167030
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
serializedVersion: 2
m_Mass: 1
m_Drag: 0.5
m_AngularDrag: 2
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 80
m_CollisionDetection: 0
--- !u!114 &719213140875167031
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4641253255217536251}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ad34abafad169848a38072baa96cdb2, type: 3}
m_Name:
m_EditorClassIdentifier:
m_InteractionManager: {fileID: 0}
m_Colliders: []
m_InteractionLayerMask:
serializedVersion: 2
m_Bits: 4294967295
m_InteractionLayers:
m_Bits: 1
m_SelectMode: 0
m_CustomReticle: {fileID: 0}
m_FirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_LastHoverExited:
m_PersistentCalls:
m_Calls: []
m_HoverEntered:
m_PersistentCalls:
m_Calls: []
m_HoverExited:
m_PersistentCalls:
m_Calls: []
m_FirstSelectEntered:
m_PersistentCalls:
m_Calls: []
m_LastSelectExited:
m_PersistentCalls:
m_Calls: []
m_SelectEntered:
m_PersistentCalls:
m_Calls: []
m_SelectExited:
m_PersistentCalls:
m_Calls: []
m_Activated:
m_PersistentCalls:
m_Calls: []
m_Deactivated:
m_PersistentCalls:
m_Calls: []
m_OnFirstHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnLastHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnHoverEntered:
m_PersistentCalls:
m_Calls: []
m_OnHoverExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectEntered:
m_PersistentCalls:
m_Calls: []
m_OnSelectExited:
m_PersistentCalls:
m_Calls: []
m_OnSelectCanceled:
m_PersistentCalls:
m_Calls: []
m_OnActivate:
m_PersistentCalls:
m_Calls: []
m_OnDeactivate:
m_PersistentCalls:
m_Calls: []
m_AttachTransform: {fileID: 0}
m_AttachEaseInTime: 0.15
m_MovementType: 2
m_VelocityDamping: 1
m_VelocityScale: 1
m_AngularVelocityDamping: 1
m_AngularVelocityScale: 1
m_TrackPosition: 1
m_SmoothPosition: 0
m_SmoothPositionAmount: 5
m_TightenPosition: 0.5
m_TrackRotation: 1
m_SmoothRotation: 0
m_SmoothRotationAmount: 5
m_TightenRotation: 0.5
m_ThrowOnDetach: 1
m_ThrowSmoothingDuration: 0.25
m_ThrowSmoothingCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0
outWeight: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
m_ThrowVelocityScale: 1.5
m_ThrowAngularVelocityScale: 1
m_ForceGravityOnDetach: 0
m_RetainTransformParent: 1
m_AttachPointCompatibilityMode: 0
--- !u!1 &6541328993966107081
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6541328993966107080}
- component: {fileID: 6541328993966107085}
- component: {fileID: 6541328993966107082}
- component: {fileID: 6541328993966107083}
m_Layer: 10
m_Name: ItemTextCanvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6541328993966107080
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328993966107081}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0.496}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6541328994119722907}
m_Father: {fileID: 4641253255217536250}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 2, y: 2}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!223 &6541328993966107085
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328993966107081}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!114 &6541328993966107082
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328993966107081}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!114 &6541328993966107083
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328993966107081}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!1 &6541328994119722904
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6541328994119722907}
- component: {fileID: 6541328994119722909}
- component: {fileID: 6541328994119722906}
m_Layer: 10
m_Name: Count
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6541328994119722907
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328994119722904}
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: 6541328993966107080}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6541328994119722909
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328994119722904}
m_CullTransparentMesh: 1
--- !u!114 &6541328994119722906
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6541328994119722904}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, 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_text: 1
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials:
- {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 0.25
m_fontSizeBase: 0.25
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 0.1
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}

View File

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: b8065bad1ff274b42ba313442b4cd7fa
DefaultImporter:
guid: b609e3c6adb2d2b4196415d93e789ddd
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:

File diff suppressed because it is too large Load Diff