1
This commit is contained in:
20
Src/Unity/Scripts/Assets/YooAssetVersionEvent.cs
Normal file
20
Src/Unity/Scripts/Assets/YooAssetVersionEvent.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user