11111
This commit is contained in:
53
Assets/00.StaryEvoTools/Runtime/HybridLoad/Base/AppConfig.cs
Normal file
53
Assets/00.StaryEvoTools/Runtime/HybridLoad/Base/AppConfig.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
public class AppConfig
|
||||
{
|
||||
public static OpenDomainType OpenDomainType { get; set; }
|
||||
/// <summary>
|
||||
/// package name
|
||||
/// </summary>
|
||||
public static string PackageDomainName { get; set; }
|
||||
|
||||
|
||||
public static string IpConfig { get; set; }
|
||||
public static string UserName { get; set; }
|
||||
public static string PassWord { get; set; }
|
||||
public static string ProductName { get; set; }
|
||||
public static string Platform { get; set; }
|
||||
|
||||
public static string MainDomainVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主场景main实例物体
|
||||
/// </summary>
|
||||
private static GameObject _MainBaseModel;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 赋值默认的实例
|
||||
/// </summary>
|
||||
public static void SetDefaultMainInstance(GameObject mainbase)
|
||||
{
|
||||
_MainBaseModel = mainbase;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 赋值默认的实例
|
||||
/// </summary>
|
||||
public static GameObject GetDefaultMainInstance()
|
||||
{
|
||||
return _MainBaseModel;
|
||||
}
|
||||
}
|
||||
|
||||
public class GlobalConfig
|
||||
{
|
||||
public const string RikidHandLeft = "LeftHandRender/RKHandVisual/Hand_L/left_wrist/left_palm";
|
||||
public const string RikidHandRight = "RightHandRender/RKHandVisual/Hand_R/right_wrist/right_palm";
|
||||
public const string RikidHandRightIndexTip = "RightHandRender/RKHandVisual/Hand_R/right_wrist/right_index_metacarpal/right_index_proximal/right_index_intermediate/right_index_distal/right_index_tip";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43c9d32ba5934c65bf80d76e35074a1a
|
||||
timeCreated: 1741162242
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Stary.Evo.AudioCore;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace Stary.Evo
|
||||
{
|
||||
/// <summary>
|
||||
/// 热更基类,应该继承的基类
|
||||
/// </summary>
|
||||
public class DomainBase : MonoBehaviour
|
||||
{
|
||||
public string DomainName { get; set; }
|
||||
|
||||
public Transform TransformInfo;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 触发Domain时,调用该方法
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
public virtual void OnEnter(string param)
|
||||
{
|
||||
TransformInfo = transform.Find("TransformInfo");
|
||||
if ( HybridClREntrance.Global.domain =="Main" && !HybridClREntrance.Global.loadDomain.Equals("null"))
|
||||
{
|
||||
HybridClREntrance.Global.OpenDomain(HybridClREntrance.Global.loadDomain,OpenDomainType.VIOICE);
|
||||
//return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Domain被关闭时,会调该方法
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
public virtual void OnExit()
|
||||
{
|
||||
AudioCoreManager.StopMusic();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public virtual Task OnEnterAsync(string param)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public virtual Task OnExitAsync()
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8923efe3eb184e7f9283f71e2dc4ea10
|
||||
timeCreated: 1742540500
|
||||
Reference in New Issue
Block a user