1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
-
- namespace NRKernal.Experimental.Persistence
- {
- using NRKernal.Experimental.Persistence;
- using System;
- using UnityEngine;
- using UnityEngine.EventSystems;
-
- public class AnchorItem : MonoBehaviour, IPointerClickHandler
- {
-
- public string key;
-
- public Action<string, GameObject> OnAnchorItemClick;
- private NRWorldAnchorStore m_NRWorldAnchorStore;
- void Start()
- {
- NRWorldAnchorStore.GetAsync((anchorstore) =>
- {
- m_NRWorldAnchorStore = anchorstore;
- });
- }
- public void DeleteKey()
- {
- m_NRWorldAnchorStore?.Delete(key);
- }
-
-
- public void OnPointerClick(PointerEventData eventData)
- {
- OnAnchorItemClick?.Invoke(key, gameObject);
- }
- }
- }
|