Files
BITKit/Src/Unity/Scripts/Assets/YooAssetVersionEvent.cs
CortexCore 299082fe27 1
2024-05-31 01:23:15 +08:00

21 lines
536 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using YooAsset;
namespace BITKit
{
public class YooAssetVersionEvent : MonoBehaviour
{
[SerializeReference, SubclassSelector] private IReference packageName;
[SerializeField] private UnityEvent<string> output;
private void Start()
{
var package = YooAssets.GetPackage(packageName.Value);
output?.Invoke(package.GetPackageVersion());
}
}
}