主题
GameCore.ResourceType
Animation 双端
命名空间 GameCore.ResourceType
csharp
public struct Animation : IFile构造函数
Animation 双端
csharp
public Animation(UTF8String path)属性
Path 双端
csharp
public UTF8String Path { get; set; }方法
implicit operator 双端
csharp
public static Animation implicit operator(UTF8String path)implicit operator 双端
csharp
public static Animation implicit operator(ReadOnlySpan<byte> path)implicit operator 双端
csharp
public static Animation implicit operator(string path)implicit operator 双端
csharp
public static UTF8String implicit operator(Animation Animation)ToString 双端
csharp
public override readonly string ToString()Font 双端
命名空间 GameCore.ResourceType
csharp
public struct Font : IFile构造函数
Font 双端
csharp
public Font(UTF8String path)属性
Path 双端
csharp
public UTF8String Path { get; set; }方法
implicit operator 双端
csharp
public static Font implicit operator(UTF8String path)implicit operator 双端
csharp
public static Font implicit operator(ReadOnlySpan<byte> path)implicit operator 双端
csharp
public static Font implicit operator(string path)implicit operator 双端
csharp
public static UTF8String implicit operator(Font Font)ToString 双端
csharp
public override readonly string ToString()Icon 双端
命名空间 GameCore.ResourceType
csharp
public struct Icon : IFile表示游戏中的图标资源,包装图标文件路径并提供类型转换功能
path— 图标文件的路径
备注
此结构体用于表示和管理游戏中的图标资源,通常用于 UI 元素、物品图标、技能图标等。 支持与字符串类型的隐式转换,便于在不同的上下文中使用图标路径。 图标通常是小尺寸的图像文件,用于在用户界面中提供视觉标识。
构造函数
Icon 双端
csharp
public Icon(UTF8String path)表示游戏中的图标资源,包装图标文件路径并提供类型转换功能
path— 图标文件的路径
备注
此结构体用于表示和管理游戏中的图标资源,通常用于 UI 元素、物品图标、技能图标等。 支持与字符串类型的隐式转换,便于在不同的上下文中使用图标路径。 图标通常是小尺寸的图像文件,用于在用户界面中提供视觉标识。
属性
Path 双端
csharp
public UTF8String Path { get; set; }获取或设置图标文件的路径
备注
使用 UTF8String 类型存储路径,提供更好的性能和内存效率。
方法
implicit operator 双端
csharp
public static Icon implicit operator(UTF8String path)提供从 UTF8String 到 Icon 的隐式转换
path— UTF8 格式的图标路径
返回: 新的 Icon 实例
implicit operator 双端
csharp
public static Icon implicit operator(string path)提供从字符串到 Icon 的隐式转换
path— 图标文件路径
返回: 新的 Icon 实例
implicit operator 双端
csharp
public static Icon implicit operator(ReadOnlySpan<byte> path)提供从字符串到 Icon 的隐式转换
path— 图标文件路径
返回: 新的 Icon 实例
implicit operator 双端
csharp
public static UTF8String implicit operator(Icon icon)提供从 Icon 到 UTF8String 的隐式转换
icon— Icon 实例
返回: 图标的路径
ToString 双端
csharp
public override readonly string ToString()IFile 双端
命名空间 GameCore.ResourceType
csharp
public interface IFile属性
Path 双端
csharp
public UTF8String Path { get; set; }Image 双端
命名空间 GameCore.ResourceType
csharp
public struct Image : IFile构造函数
Image 双端
csharp
public Image(UTF8String path)属性
Path 双端
csharp
public UTF8String Path { get; set; }方法
implicit operator 双端
csharp
public static Image implicit operator(UTF8String path)implicit operator 双端
csharp
public static Image implicit operator(ReadOnlySpan<byte> path)implicit operator 双端
csharp
public static Image implicit operator(string path)ToString 双端
csharp
public override readonly string ToString()Material 双端
命名空间 GameCore.ResourceType
csharp
public struct Material : IFile表示游戏中的材质资源,包装材质文件路径并提供类型转换功能
path— 材质文件的路径
备注
此结构体用于表示和管理游戏中的材质资源,支持与字符串类型的隐式转换, 便于在不同的上下文中使用材质路径。材质通常用于定义 3D 模型的外观和渲染属性。
构造函数
Material 双端
csharp
public Material(UTF8String path)表示游戏中的材质资源,包装材质文件路径并提供类型转换功能
path— 材质文件的路径
备注
此结构体用于表示和管理游戏中的材质资源,支持与字符串类型的隐式转换, 便于在不同的上下文中使用材质路径。材质通常用于定义 3D 模型的外观和渲染属性。
属性
Path 双端
csharp
public UTF8String Path { get; set; }获取或设置材质文件的路径
备注
使用 UTF8String 类型存储路径,提供更好的性能和内存效率。
方法
implicit operator 双端
csharp
public static Material implicit operator(UTF8String path)提供从 UTF8String 到 Material 的隐式转换
path— UTF8 格式的材质路径
返回: 新的 Material 实例
implicit operator 双端
csharp
public static Material implicit operator(ReadOnlySpan<byte> path)提供从字节跨度到 Material 的隐式转换
path— 表示路径的只读字节跨度
返回: 新的 Material 实例
implicit operator 双端
csharp
public static Material implicit operator(string path)提供从字符串到 Material 的隐式转换
path— 材质文件路径
返回: 新的 Material 实例
implicit operator 双端
csharp
public static UTF8String implicit operator(Material Material)提供从 Material 到 UTF8String 的隐式转换
Material— Material 实例
返回: 材质的路径
ToString 双端
csharp
public override readonly string ToString()Model 双端
命名空间 GameCore.ResourceType
csharp
public struct Model : IFile表示游戏中的 3D 模型资源,包装模型文件路径并提供类型转换功能
path— 模型文件的路径
备注
此结构体用于表示和管理游戏中的 3D 模型资源,支持从多种字符串类型的隐式转换。 模型资源通常包含几何体、材质引用和动画数据,用于在游戏世界中渲染 3D 对象。
构造函数
Model 双端
csharp
public Model(UTF8String path)表示游戏中的 3D 模型资源,包装模型文件路径并提供类型转换功能
path— 模型文件的路径
备注
此结构体用于表示和管理游戏中的 3D 模型资源,支持从多种字符串类型的隐式转换。 模型资源通常包含几何体、材质引用和动画数据,用于在游戏世界中渲染 3D 对象。
属性
Path 双端
csharp
public UTF8String Path { get; set; }获取或设置模型文件的路径
备注
使用 UTF8String 类型存储路径,提供更好的性能和内存效率。
方法
implicit operator 双端
csharp
public static Model implicit operator(UTF8String path)提供从 UTF8String 到 Model 的隐式转换
path— UTF8 格式的模型路径
返回: 新的 Model 实例
implicit operator 双端
csharp
public static Model implicit operator(ReadOnlySpan<byte> path)提供从字节跨度到 Model 的隐式转换
path— 表示路径的只读字节跨度
返回: 新的 Model 实例
implicit operator 双端
csharp
public static Model implicit operator(string path)提供从字符串到 Model 的隐式转换
path— 模型文件路径
返回: 新的 Model 实例
implicit operator 双端
csharp
public static UTF8String implicit operator(Model Model)提供从 Model 到 UTF8String 的隐式转换
Model— Model 实例
返回: 模型的路径
ToString 双端
csharp
public override readonly string ToString()Particle 双端
命名空间 GameCore.ResourceType
csharp
public struct Particle : IFile构造函数
Particle 双端
csharp
public Particle(UTF8String path)属性
Path 双端
csharp
public UTF8String Path { get; set; }方法
implicit operator 双端
csharp
public static Particle implicit operator(UTF8String path)implicit operator 双端
csharp
public static Particle implicit operator(ReadOnlySpan<byte> path)implicit operator 双端
csharp
public static Particle implicit operator(string path)implicit operator 双端
csharp
public static UTF8String implicit operator(Particle Particle)ToString 双端
csharp
public override readonly string ToString()Prefab 双端
命名空间 GameCore.ResourceType
csharp
public struct Prefab : IFile表示游戏中的 3D 预制体资源,包装预制体文件路径并提供类型转换功能
path— 预制体文件的路径
备注
此结构体用于表示和管理游戏中的 3D 预制体资源,支持从多种字符串类型的隐式转换。 预制体资源通常包含节点、组件和资源引用,用于在游戏世界中创建和实例化 3D 对象。
构造函数
Prefab 双端
csharp
public Prefab(UTF8String path)表示游戏中的 3D 预制体资源,包装预制体文件路径并提供类型转换功能
path— 预制体文件的路径
备注
此结构体用于表示和管理游戏中的 3D 预制体资源,支持从多种字符串类型的隐式转换。 预制体资源通常包含节点、组件和资源引用,用于在游戏世界中创建和实例化 3D 对象。
属性
Path 双端
csharp
public UTF8String Path { get; set; }方法
implicit operator 双端
csharp
public static Prefab implicit operator(UTF8String path)implicit operator 双端
csharp
public static Prefab implicit operator(ReadOnlySpan<byte> path)implicit operator 双端
csharp
public static Prefab implicit operator(string path)implicit operator 双端
csharp
public static UTF8String implicit operator(Prefab Prefab)ToString 双端
csharp
public override readonly string ToString()Sound 双端
命名空间 GameCore.ResourceType
csharp
public struct Sound : IFile表示游戏中的音频资源,包装音频文件路径并提供类型转换功能
path— 音频文件的路径
备注
此结构体用于表示和管理游戏中的音频资源,包括音效、背景音乐和语音等。 支持与字符串类型的隐式转换,便于在不同的上下文中使用音频路径。 音频资源通常用于游戏的声音效果系统。
构造函数
Sound 双端
csharp
public Sound(UTF8String path)表示游戏中的音频资源,包装音频文件路径并提供类型转换功能
path— 音频文件的路径
备注
此结构体用于表示和管理游戏中的音频资源,包括音效、背景音乐和语音等。 支持与字符串类型的隐式转换,便于在不同的上下文中使用音频路径。 音频资源通常用于游戏的声音效果系统。
属性
Path 双端
csharp
public UTF8String Path { get; set; }获取或设置音频文件的路径
备注
使用 UTF8String 类型存储路径,提供更好的性能和内存效率。
方法
implicit operator 双端
csharp
public static Sound implicit operator(UTF8String path)提供从 UTF8String 到 Sound 的隐式转换
path— UTF8 格式的音频路径
返回: 新的 Sound 实例
implicit operator 双端
csharp
public static Sound implicit operator(string path)implicit operator 双端
csharp
public static UTF8String implicit operator(Sound sound)提供从 Sound 到 UTF8String 的隐式转换
sound— Sound 实例
返回: 音频的路径
ToString 双端
csharp
public override readonly string ToString()Texture 双端
命名空间 GameCore.ResourceType
csharp
public struct Texture : IFile表示游戏中的纹理资源,包装纹理文件路径并提供类型转换功能
path— 纹理文件的路径
备注
此结构体用于表示和管理游戏中的纹理资源,包括贴图、精灵图、UI 图片等。 支持与字符串类型的隐式转换,便于在不同的上下文中使用纹理路径。 纹理资源是游戏渲染系统的重要组成部分,用于为 3D 模型和 2D 精灵提供视觉外观。
构造函数
Texture 双端
csharp
public Texture(UTF8String path)表示游戏中的纹理资源,包装纹理文件路径并提供类型转换功能
path— 纹理文件的路径
备注
此结构体用于表示和管理游戏中的纹理资源,包括贴图、精灵图、UI 图片等。 支持与字符串类型的隐式转换,便于在不同的上下文中使用纹理路径。 纹理资源是游戏渲染系统的重要组成部分,用于为 3D 模型和 2D 精灵提供视觉外观。
属性
Path 双端
csharp
public UTF8String Path { get; set; }获取或设置纹理文件的路径
备注
使用 UTF8String 类型存储路径,提供更好的性能和内存效率。
方法
implicit operator 双端
csharp
public static Texture implicit operator(UTF8String path)提供从 UTF8String 到 Texture 的隐式转换
path— UTF8 格式的纹理路径
返回: 新的 Texture 实例
implicit operator 双端
csharp
public static Texture implicit operator(string path)提供从字符串到 Texture 的隐式转换
path— 纹理文件路径
返回: 新的 Texture 实例
implicit operator 双端
csharp
public static UTF8String implicit operator(Texture texture)提供从 Texture 到 UTF8String 的隐式转换
texture— Texture 实例
返回: 纹理的路径
ToString 双端
csharp
public override readonly string ToString()GameDataAnimation 双端
命名空间 GameCore.ResourceType.Data
csharp
public abstract class GameDataAnimation : GameDataCategory<GameDataAnimation>, IGameDataCategory<GameDataAnimation>, IGameData<GameDataAnimation>, IGameData构造函数
GameDataAnimation 双端
csharp
public GameDataAnimation(GameLink<GameDataAnimation, GameDataAnimation> link)GameDataAnimation 双端
csharp
public GameDataAnimation(IGameLink<GameDataAnimation> link)方法
CreateSwingController 仅客户端
csharp
public abstract IAnimationSwingController? CreateSwingController(IActorAnimationPlayable animationPlayable, TimeSpan? totalTime = null)仅创建本轮技能动画控制器,不应立即启动播放。控制器可在随后收到的 Preswing 通知中启动前摇, 并分别处理 Cast、Channel、Backswing 以及 Stop 通知。
备注
如果控制器在后续阶段才被创建,只会收到当前阶段通知,不会补发已过去的阶段。 重新起手会创建新的控制器实例,运行状态不应存放在共享的数据对象中。
GameDataModel 双端
命名空间 GameCore.ResourceType.Data
csharp
public class GameDataModel : GameDataCategory<GameDataModel>, IGameDataNativeCacheRefreshable, IGameDataCategory<GameDataModel>, IGameData<GameDataModel>, IGameData3D 模型资源数据。定义角色、建筑等模型的显示、动画与物理属性。
构造函数
GameDataModel 双端
csharp
public GameDataModel(GameLink<GameDataModel, GameDataModel> link)GameDataModel 双端
csharp
public GameDataModel(IGameLink<GameDataModel> link)属性
Asset 双端
csharp
public Model Asset { get; set; }CollisionBake 双端
csharp
public ModelCollisionBake? CollisionBake { get; set; }模型预烘焙碰撞配置。不设置时不参与复杂模型碰撞烘焙。
AssetLayerScale 双端
csharp
public float AssetLayerScale { get; set; }资产层缩放。独立于脚本缩放,用于统一不同工具导入模型的尺寸,避免手动调脚本缩放。
ApplyAssetLayerScaleToChildren 双端
csharp
public bool ApplyAssetLayerScaleToChildren { get; set; }是否将资产层缩放应用到子节点。默认 false,仅作用于资产本身。
BirthStandDeathAnimation 双端
csharp
public BirthStandDeathAnimation? BirthStandDeathAnimation { get; set; }出生、待机、死亡等基础动画配置。
Events 双端
csharp
public List<TimedAssetEventAnimation>? Events { get; set; }基于时间轴的事件动画(如技能释放时的动作)。
AnimationMappings 双端
csharp
public List<AnimationMapping>? AnimationMappings { get; set; }运行时动画别名映射列表。将逻辑动画名称(如"walk"、"attack")映射到实际的动画文件路径。 这是运行时系统,用于代码中通过别名引用动画,而不是直接使用文件路径。 与 HumanoidSourceAnimations 不同,这不是用于动画烘焙,而是用于动画播放的别名系统。
HumanoidSourceAnimations 双端
csharp
public List<Animation>? HumanoidSourceAnimations { get; set; }需要重定向到此模型的人形源动画列表。 工具会将这些基于标准人形骨架的动画重定向并烘焙为适配当前模型骨骼结构的特定动画。
ForceOffScreenUpdate 双端
csharp
public bool ForceOffScreenUpdate { get; set; }离屏时是否强制更新。用于需要持续动画或从屏外移入视野的对象。
CustomStatusBarPosition 双端
csharp
public StatusBarPosition? CustomStatusBarPosition { get; set; }血条/状态条显示位置。不设置时依次使用模型的 socket_status_bar、 兼容旧模型的 socket_blood_bar;API 版本不低于 2000 且均不存在时使用单位根节点。
Radius 双端
csharp
public float Radius { get; set; }逻辑半径(游戏单位)。用于视觉缩放、技能指示器、分段特效等的尺寸基准。启用 AutoScale 时按 targetRadius/model.Radius 计算缩放比。
Volume 双端
csharp
public Vector3 Volume { get; set; }包围体积(宽高深),用于布局与碰撞估算。
UpperBodyRootBone 双端
csharp
public UTF8String UpperBodyRootBone { get; set; }上半身根骨骼名。用于区分上下半身动画(如边移动边攻击)。
DynamicPointLightShadingEnabled 双端
csharp
public bool DynamicPointLightShadingEnabled { get; set; }控制模型是否受场景中动态点光源影响(如火把、魔法光效等)。启用后模型会对动态光源产生实时明暗响应,但会增加渲染开销。
RoleSphericalHarmonicsEnabled 双端
csharp
public bool RoleSphericalHarmonicsEnabled { get; set; }启用球谐光照(Spherical Harmonics)以获得更真实的环境光照效果。模型会受到场景全局光照影响,更好地融入环境。推荐用于主要角色和重要NPC,不推荐用于大量次要物体。
OcclusionCullingEnabled 双端
csharp
public bool OcclusionCullingEnabled { get; set; }启用遮挡剔除优化。当模型被其他物体完全遮挡时自动跳过渲染,可显著提升性能。推荐大多数模型启用。
RayCastingEnabled 双端
csharp
public bool RayCastingEnabled { get; set; }是否参与射线检测(如点击选中、技能目标)。
SimpleBoundingCylinder 双端
csharp
public SimpleBoundingCylinder? SimpleBoundingCylinder { get; set; }简化的圆柱包围体,用于射线检测等轻量碰撞。
ShadowSetting 双端
csharp
public ShadowSetting? ShadowSetting { get; set; }阴影配置。
Outline 双端
csharp
public Outline? Outline { get; set; }描边配置。
MovementAnimationSpeedRatio 双端
csharp
public float MovementAnimationSpeedRatio { get; set; }移动动画播放速度与移动速度的比值。用于同步步伐与位移。
UnitLocomotionAnimationProfile 双端
csharp
public IGameLink<GameDataUnitLocomotionAnimationProfile>? UnitLocomotionAnimationProfile { get; set; }单位移动动画状态机 profile。未设置时保留旧 idle/move 表现。
方法
SetNativeCacheRefresh 双端
csharp
public void SetNativeCacheRefresh(bool refresh = true)请求刷新此模型定义在 native 侧的缓存。
refresh— 为true时,请求 native 侧在下次读取此GameDataModel定义时重建缓存; 为false时,清除此刷新请求。
备注
某些 GameDataModel 定义在运行时会被 native 层缓存。 如果你在游戏运行过程中修改了这类定义,后续新创建的模型表现不一定会自动使用最新值。 调用此方法后,后续再次读取此定义的 native 逻辑会使用最新数据。 但已经创建并持有旧缓存结果的运行时对象,不保证立即更新。 未接通对应缓存链路的平台会安全忽略此请求。
GameDataParticle 双端
命名空间 GameCore.ResourceType.Data
csharp
public class GameDataParticle : GameDataCategory<GameDataParticle>, IGameDataNativeCacheRefreshable, IGameDataCategory<GameDataParticle>, IGameData<GameDataParticle>, IGameData粒子特效资源数据。定义技能特效、环境粒子等的显示与尺寸。
构造函数
GameDataParticle 双端
csharp
public GameDataParticle(GameLink<GameDataParticle, GameDataParticle> link)GameDataParticle 双端
csharp
public GameDataParticle(IGameLink<GameDataParticle> link)属性
Asset 双端
csharp
public Particle Asset { get; set; }AssetLayerScale 双端
csharp
public float AssetLayerScale { get; set; }资产层缩放。独立于脚本缩放,用于统一不同工具导入粒子的尺寸。
ApplyAssetLayerScaleToChildren 双端
csharp
public bool ApplyAssetLayerScaleToChildren { get; set; }是否将资产层缩放应用到子节点。默认 false,仅作用于资产本身。
Radius 双端
csharp
public float Radius { get; set; }逻辑半径(游戏单位)。用于技能指示器、缩放计算等。
Volume 双端
csharp
public Vector3 Volume { get; set; }包围体积(宽高深),用于布局与碰撞估算。
方法
SetNativeCacheRefresh 双端
csharp
public void SetNativeCacheRefresh(bool refresh = true)请求刷新此粒子定义在 native 侧的缓存。
refresh— 为true时,请求 native 侧在下次读取此GameDataParticle定义时重建缓存; 为false时,清除此刷新请求。
备注
某些 GameDataParticle 定义在运行时会被 native 层缓存。 如果你在游戏运行过程中修改了这类定义,后续新创建的粒子表现不一定会自动使用最新值。 调用此方法后,后续再次读取此定义的 native 逻辑会使用最新数据。 但已经创建并持有旧缓存结果的运行时对象,不保证立即更新。 未接通对应缓存链路的平台会安全忽略此请求。
GameDataSound 双端
命名空间 GameCore.ResourceType.Data
csharp
public class GameDataSound : GameDataCategory<GameDataSound>, IGameDataNativeCacheRefreshable, IGameDataCategory<GameDataSound>, IGameData<GameDataSound>, IGameData音效资源数据。定义技能音效、环境音、背景音乐等的播放参数。
构造函数
GameDataSound 双端
csharp
public GameDataSound(GameLink<GameDataSound, GameDataSound> link)GameDataSound 双端
csharp
public GameDataSound(IGameLink<GameDataSound> link)属性
Asset 双端
csharp
public Sound Asset { get; set; }Events 双端
csharp
public List<TimedAssetEvent>? Events { get; set; }基于时间轴的事件列表,用于在动画播放时触发音效。
VolumeFactor 双端
csharp
public float VolumeFactor { get; set; }音量乘数。用于调整该音效相对于分类的音量。
FadeTime 双端
csharp
public TimeSpan FadeTime { get; set; }淡入淡出时长。普通音效通常 0.5 秒,音乐通常 2 秒。
Category 双端
csharp
public SoundCategory Category { get; set; }音效分类。用于按分类静音或调节音量(如战斗、环境、音乐)。
方法
SetNativeCacheRefresh 双端
csharp
public void SetNativeCacheRefresh(bool refresh = true)请求刷新此音效定义在 native 侧的缓存。
refresh— 为true时,请求 native 侧在下次读取此GameDataSound定义时重建缓存; 为false时,清除此刷新请求。
备注
某些 GameDataSound 定义在运行时会被 native 层缓存。 如果你在游戏运行过程中修改了这类定义,后续新创建的音效表现不一定会自动使用最新值。 调用此方法后,后续再次读取此定义的 native 逻辑会使用最新数据。 但已经创建并持有旧缓存结果的运行时对象,不保证立即更新。 未接通对应缓存链路的平台会安全忽略此请求。
ShadowType 双端
命名空间 GameCore.ResourceType.Data.Enum
csharp
public enum ShadowType定义阴影渲染的类型,控制游戏对象的阴影生成方式
备注
阴影类型决定了游戏对象如何产生和显示阴影效果。不同的阴影类型在性能和视觉质量之间提供了不同的平衡, 允许开发者根据游戏需求和设备性能选择合适的阴影实现方式。
枚举值
FakeShadow— 假阴影 - 使用预制的平面阴影贴图,性能开销最小DeviceDependentShadow— 设备依赖阴影 - 根据设备性能自动选择阴影实现方式
SliceMode 双端
命名空间 GameCore.ResourceType.Data.Enum
csharp
public enum SliceModeDefines the mode for specifying animation slice duration.
备注
SliceMode determines how the animation slice end point is calculated:
- Duration: Uses start offset and duration length for precise time-based slicing
- EndOffset: Uses start offset and absolute end offset for position-based slicing
- EndOffsetFromEnd: Uses start offset and offset from animation end for relative slicing This provides flexibility in animation content selection and timing control.
枚举值
Duration— Specify start offset and duration length.EndOffset— Specify start offset and end offset.EndOffsetFromEnd— Specify start offset and end offset from the end of the original animation.
SoundCategory 双端
命名空间 GameCore.ResourceType.Data.Enum
csharp
public enum SoundCategoryDefines categories for organizing and managing different types of sounds in the game.
备注
This enum is used to classify sounds for purposes such as volume control, mixing, and resource management. Each category represents a different type of audio content.
枚举值
UI— User interface sounds such as button clicks, menu navigation, and notifications.Ambient— Background environmental sounds that create atmosphere.Music— Background music and musical compositions.Cutscene— Audio for cinematic sequences and story scenes.Dialogue— Character speech and conversation audio.Alert— Warning sounds and alert notifications.Movement— Sounds related to character and object movement.Foley— Sound effects for everyday actions and interactions.Doodad— Environmental object and decoration sounds.Combat— Battle, fighting, and combat-related audio effects.Message— System messages and communication sounds.Voice— Character voice acting and vocal expressions.
AnimationMapping 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class AnimationMappingRepresents a mapping relationship between a logical animation alias and an actual animation resource, enabling the use of meaningful names instead of direct file paths in animation systems.
备注
AnimationMapping provides an abstraction layer for animation resources by allowing developers to:
- Use logical names (aliases) like "walk", "attack", "idle" instead of file paths
- Easily swap animation files without changing code that references the animations
- Organize animations with consistent naming across different models and contexts
- Support multiple aliases pointing to the same animation resource for reusability This mapping system is particularly useful in game development where animation files may be reorganized, renamed, or replaced during development, and where different models may use different animation files for the same logical action.
构造函数
AnimationMapping 双端
csharp
public AnimationMapping()属性
AnimationAlias 双端
csharp
public Animation AnimationAlias { get; set; }Gets or sets the logical alias name used to reference this animation in code.
备注
This alias serves as the public interface for the animation, allowing developers to use descriptive names instead of file paths. The alias should be consistent across different models that perform the same logical action, enabling code reuse and maintainability. Common naming conventions include:
- Action-based: "walk", "run", "attack", "defend"
- State-based: "idle", "casting", "stunned", "dead"
- Context-specific: "intro", "victory", "defeat"
AnimationRaw 双端
csharp
public Animation AnimationRaw { get; set; }Gets or sets the actual animation resource that will be played when the alias is referenced.
备注
This property points to the concrete animation resource (typically a file) that will be loaded and played when the corresponding alias is requested. The raw animation can be:
- A file path to an animation file (e.g., "animations/character_walk.fbx")
- A reference to an animation resource in the game's asset system
- Any valid Animation resource identifier Multiple mappings can reference the same AnimationRaw, allowing for animation reuse across different aliases or contexts.
AnimationPlayback 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class AnimationPlaybackRepresents a comprehensive animation playback configuration that controls how an animation is played back, including timing, scaling, looping, and blending behavior.
备注
AnimationPlayback provides fine-grained control over animation playback by allowing you to:
- Reference a source animation and apply time scaling
- Define slice configuration using different modes (duration, end offset, or end offset from end)
- Control looping behavior when playback duration exceeds content duration
- Configure smooth blending transitions for seamless animation transitions This class is particularly useful for creating complex animation sequences, dynamic timing adjustments, and smooth animation blending in game scenarios.
构造函数
AnimationPlayback 双端
csharp
public AnimationPlayback()属性
AnimationRaw 双端
csharp
public Animation AnimationRaw { get; set; }Gets or sets the source animation to be played back.
备注
This property references the raw animation data that will be modified according to the other playback configuration properties in this class.
Scale 双端
csharp
public float Scale { get; set; }Gets or sets the time scale multiplier applied to the original animation speed.
备注
This scale factor affects the overall playback speed of the animation. For example:
- 0.5 will play the animation at half speed
- 2.0 will play the animation at double speed The scale is applied to the original animation timing before other duration calculations.
Mode 双端
csharp
public SliceMode Mode { get; set; }Gets or sets the mode for specifying the animation slice.
备注
This mode determines which properties are used to define the animation slice:
- Duration: Uses StartOffset and SliceDuration
- EndOffset: Uses StartOffset and EndOffset
- EndOffsetFromEnd: Uses StartOffset and EndOffsetFromEnd
StartOffset 双端
csharp
public TimeSpan StartOffset { get; set; }Gets or sets the start offset for the animation playback, based on the original animation speed.
备注
This offset allows you to start playback from any point within the source animation, effectively skipping the initial portion. The offset is calculated based on the original animation timing before any scaling is applied.
SliceDuration 双端
csharp
public TimeSpan SliceDuration { get; set; }Gets or sets the duration of the animation content to be played, based on the original animation speed. Used when Mode is set to Duration.
备注
This duration defines how much of the source animation (starting from the StartOffset) will be considered for playback. It represents the "slice" of animation content before any scaling or playback duration modifications are applied. Only used when Mode is SliceMode.Duration.
EndOffset 双端
csharp
public TimeSpan EndOffset { get; set; }Gets or sets the end offset for the animation slice, based on the original animation speed. Used when Mode is set to EndOffset.
备注
This end offset defines the absolute end point of the animation slice within the source animation. The effective slice duration will be (EndOffset - StartOffset). Only used when Mode is SliceMode.EndOffset.
EndOffsetFromEnd 双端
csharp
public TimeSpan EndOffsetFromEnd { get; set; }Gets or sets the end offset from the end of the original animation, based on the original animation speed. Used when Mode is set to EndOffsetFromEnd.
备注
This end offset defines how much time before the end of the original animation the slice should stop. For example, if the original animation is 10 seconds and EndOffsetFromEnd is 2 seconds, the slice will end at 8 seconds from the start. Only used when Mode is SliceMode.EndOffsetFromEnd.
IsLooping 双端
csharp
public bool IsLooping { get; set; }Gets or sets a value indicating whether the animation should loop when the playback duration exceeds the slice duration.
备注
When the PlaybackDuration is longer than the effective slice duration, this property controls the behavior:
- If
true, the animation will loop continuously until the PlaybackDuration is reached - If
false, the animation will pause at the last frame until the PlaybackDuration is reached
PlaybackDuration 双端
csharp
public TimeSpan PlaybackDuration { get; set; }Gets or sets the actual playback duration of the animation at the scaled animation speed.
备注
This duration controls the total time the animation will play, independent of the source content duration. The behavior depends on the relationship between PlaybackDuration and the effective slice duration:
- If PlaybackDuration is less than slice duration: animation stops early
- If PlaybackDuration is greater than slice duration: animation loops (if IsLooping is true) or pauses at the last frame
- If PlaybackDuration equals slice duration: animation plays exactly once through the slice content
BlendIn 双端
csharp
public TimeSpan BlendIn { get; set; }Gets or sets the blend-in duration for smooth transitions when starting this animation.
备注
This property controls how smoothly the animation transitions in when it starts playing. A longer blend-in duration creates a more gradual transition, while a shorter duration creates a more abrupt change. This is particularly useful for character animations where sudden transitions can look unnatural.
BlendOut 双端
csharp
public TimeSpan BlendOut { get; set; }Gets or sets the blend-out duration for smooth transitions when ending this animation.
备注
This property controls how smoothly the animation transitions out when it finishes playing. A longer blend-out duration creates a more gradual transition to the next animation, while a shorter duration creates a more abrupt change. This helps create seamless animation sequences and prevents jarring transitions between different animations.
BirthStandDeathAnimation 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class BirthStandDeathAnimation构造函数
BirthStandDeathAnimation 双端
csharp
public BirthStandDeathAnimation()属性
BirthAnimation 双端
csharp
public Animation? BirthAnimation { get; set; }StandAnimation 双端
csharp
public Animation? StandAnimation { get; set; }DeathAnimation 双端
csharp
public Animation? DeathAnimation { get; set; }ModelCollisionBake 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public sealed class ModelCollisionBake模型预烘焙碰撞的生成配置。
构造函数
ModelCollisionBake 双端
csharp
public ModelCollisionBake()属性
Enabled 双端
csharp
public bool Enabled { get; set; }是否为该模型生成预烘焙碰撞数据。
Mode 双端
csharp
public ModelCollisionBakeMode Mode { get; set; }碰撞烘焙模式。
MaxHullVertices 双端
csharp
public int MaxHullVertices { get; set; }凸包模式下允许的最大顶点数,取值范围为 4 至 4096。
字段
MinHullVertices 双端
csharp
public const int MinHullVerticesMaxHullVerticesLimit 双端
csharp
public const int MaxHullVerticesLimitModelCollisionBakeMode 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public enum ModelCollisionBakeMode模型预烘焙碰撞模式。
枚举值
StaticTriangleMesh— 静态三角网格碰撞。推荐用于 mass=0 的建筑、装饰和静态交互物。ConvexHull— 单凸包碰撞。适用于简单动态刚体。CompoundConvex— 复合凸包碰撞。Prefab 中每个独立静态模型部件生成一个凸包,并保留部件本地变换。BoundsBox— 按模型包围盒生成碰撞。BoundsCapsule— 按模型包围胶囊生成碰撞。
Outline 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class Outline构造函数
Outline 双端
csharp
public Outline()属性
InnerOutlineThickness 双端
csharp
public float? InnerOutlineThickness { get; set; }OuterOutlineThickness 双端
csharp
public float? OuterOutlineThickness { get; set; }RenderThroughOcclusion 双端
csharp
public bool RenderThroughOcclusion { get; set; }ShadowSetting 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class ShadowSetting构造函数
ShadowSetting 双端
csharp
public ShadowSetting()属性
ShadowScaleFactor 双端
csharp
public float ShadowScaleFactor { get; set; }ShadowType 双端
csharp
public ShadowType ShadowType { get; set; }SimpleBoundingCylinder 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class SimpleBoundingCylinder构造函数
SimpleBoundingCylinder 双端
csharp
public SimpleBoundingCylinder()属性
Radius 双端
csharp
public float Radius { get; set; }Height 双端
csharp
public float Height { get; set; }StatusBarPosition 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class StatusBarPosition构造函数
StatusBarPosition 双端
csharp
public StatusBarPosition()属性
RootZOffset 双端
csharp
public float RootZOffset { get; set; }The StatusBar's position relative to the root bone.
ScreenOffset 双端
csharp
public Vector2 ScreenOffset { get; set; }This is device-dependent, a offset in screen space.
TimedAssetEvent 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class TimedAssetEvent构造函数
TimedAssetEvent 双端
csharp
public TimedAssetEvent()属性
EventName 双端
csharp
public UTF8String EventName { get; set; }StartingTime 双端
csharp
public TimeSpan StartingTime { get; set; }Duration 双端
csharp
public TimeSpan Duration { get; set; }SpawnActors 双端
csharp
public List<IGameLink<GameDataActor>>? SpawnActors { get; set; }TimedAssetEventAnimation 双端
命名空间 GameCore.ResourceType.Data.Struct
csharp
public class TimedAssetEventAnimation : TimedAssetEvent构造函数
TimedAssetEventAnimation 双端
csharp
public TimedAssetEventAnimation()属性
Animation 双端
csharp
public Animation? Animation { get; set; }