unityzgy/.svn/pristine/59/598870a45250b832fcac191818638681dcfcf4a6.svn-base
ayuan9957 bf12e02276 feat: 多语言本地化系统 - 支持中/英/法/俄实时切换
- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg)
- LoginPanel: InputField placeholder本地化、字体颜色保持
- HistoryPanel: 用时数据本地化、placeholder本地化
- RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建)
- AppraiseWindowBase: 评价等级本地化、操作消息重建
- EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized
- StudentOperateRecorder: 新增InjectOperateMsgLocalized方法
- LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选
- 字体切换时保留颜色和verticalOverflow
2026-07-16 10:05:59 +08:00

68 lines
3.0 KiB
Plaintext

// Base Boundaries|SDK_Base|007
namespace VRTK
{
using UnityEngine;
/// <summary>
/// The Base Boundaries SDK script provides a bridge to SDK methods that deal with the play area of SDKs that support room scale play spaces.
/// </summary>
/// <remarks>
/// This is an abstract class to implement the interface required by all implemented SDKs.
/// </remarks>
public abstract class SDK_BaseBoundaries : SDK_Base
{
protected Transform cachedPlayArea;
/// <summary>
/// The InitBoundaries method is run on start of scene and can be used to initialse anything on game start.
/// </summary>
public abstract void InitBoundaries();
/// <summary>
/// The GetPlayArea method returns the Transform of the object that is used to represent the play area in the scene.
/// </summary>
/// <returns>A transform of the object representing the play area in the scene.</returns>
public abstract Transform GetPlayArea();
/// <summary>
/// The GetPlayAreaVertices method returns the points of the play area boundaries.
/// </summary>
/// <returns>A Vector3 array of the points in the scene that represent the play area boundaries.</returns>
public abstract Vector3[] GetPlayAreaVertices();
/// <summary>
/// The GetPlayAreaBorderThickness returns the thickness of the drawn border for the given play area.
/// </summary>
/// <returns>The thickness of the drawn border.</returns>
public abstract float GetPlayAreaBorderThickness();
/// <summary>
/// The IsPlayAreaSizeCalibrated method returns whether the given play area size has been auto calibrated by external sensors.
/// </summary>
/// <returns>Returns true if the play area size has been auto calibrated and set by external sensors.</returns>
public abstract bool IsPlayAreaSizeCalibrated();
/// <summary>
/// The GetDrawAtRuntime method returns whether the given play area drawn border is being displayed.
/// </summary>
/// <returns>Returns true if the drawn border is being displayed.</returns>
public abstract bool GetDrawAtRuntime();
/// <summary>
/// The SetDrawAtRuntime method sets whether the given play area drawn border should be displayed at runtime.
/// </summary>
/// <param name="value">The state of whether the drawn border should be displayed or not.</param>
public abstract void SetDrawAtRuntime(bool value);
protected Transform GetSDKManagerPlayArea()
{
var sdkManager = VRTK_SDKManager.instance;
if (sdkManager != null && sdkManager.loadedSetup.actualBoundaries != null)
{
cachedPlayArea = (sdkManager.loadedSetup.actualBoundaries ? sdkManager.loadedSetup.actualBoundaries.transform : null);
return cachedPlayArea;
}
return null;
}
}
}