【m】框架大更新
This commit is contained in:
54
Assets/00.BuildOriginality/Editor/BuildAssetEntity.cs
Normal file
54
Assets/00.BuildOriginality/Editor/BuildAssetEntity.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo.Editor
|
||||
{
|
||||
[Serializable]
|
||||
public class BuildAssetEntity
|
||||
{
|
||||
public BuildAssetEntity(string HorizontalGroupName,string ButtonName ,Action OnClickAction )
|
||||
{
|
||||
this.HorizontalGroupName = HorizontalGroupName;
|
||||
this.ButtonName = ButtonName;
|
||||
this.OnClickAction = OnClickAction;
|
||||
}
|
||||
|
||||
|
||||
private Color messageColor = Color.white;
|
||||
private string messageText = "点击开始进程!!!!!";
|
||||
private bool showInfoBox = true;
|
||||
private string HorizontalGroupName;
|
||||
private string ButtonName;
|
||||
private Action OnClickAction;
|
||||
[HorizontalGroup("@ HorizontalGroupName")]
|
||||
[Button("@ ButtonName", ButtonSizes.Large)]
|
||||
[InfoBox("@ messageText", InfoMessageType.Error, "@ showInfoBox==false")]
|
||||
[InfoBox("@ messageText", InfoMessageType.Info, "@ showInfoBox==true")]
|
||||
private void CopyDll()
|
||||
{
|
||||
try
|
||||
{
|
||||
OnClickAction?.Invoke();
|
||||
showInfoBox = true;
|
||||
messageColor = Color.green;
|
||||
messageText = "进程结束!!!!!";
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e);
|
||||
showInfoBox = false;
|
||||
messageText =$"进程存在异常,异常信息为:【{e.Message}】" ;
|
||||
messageColor = Color.red;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void SetButtonName(string ButtonName)
|
||||
{
|
||||
this.ButtonName = ButtonName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user