主题
GameGraph.ResourceSystem
AnimationChannel 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum AnimationChannelAnimation track data channels.
枚举值
None = 0Position = 1Rotation = 2Scale = 4Compress = 8
AnimationKeyFrame 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct AnimationKeyFrame : IEquatable<AnimationKeyFrame>A skeletal-animation key frame copied by value from native storage.
构造函数
AnimationKeyFrame 仅客户端
csharp
public AnimationKeyFrame(float Time, Vector3 Position, Quaternion Rotation, Vector3 Scale)A skeletal-animation key frame copied by value from native storage.
属性
Time 仅客户端
csharp
public float Time { get; init; }Position 仅客户端
csharp
public Vector3 Position { get; init; }Rotation 仅客户端
csharp
public Quaternion Rotation { get; init; }Scale 仅客户端
csharp
public Vector3 Scale { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(AnimationKeyFrame left, AnimationKeyFrame right)operator == 仅客户端
csharp
public static bool operator ==(AnimationKeyFrame left, AnimationKeyFrame right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(AnimationKeyFrame other)Deconstruct 仅客户端
csharp
public void Deconstruct(out float Time, out Vector3 Position, out Quaternion Rotation, out Vector3 Scale)AnimationResource 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public class AnimationResource : Resource骨骼动画资源(.ani)。通过 Animation) 加载后可查询动画长度,或将路径直接交给 AnimationController 播放。
属性
Length 仅客户端
csharp
public float Length { get; set; }动画长度(秒)。
AnimationName 仅客户端
csharp
public string AnimationName { get; set; }动画内部名(从资源元数据读取,与文件路径未必一致)。
AnimationNameHash 仅客户端
csharp
public uint AnimationNameHash { get; }StepLength 仅客户端
csharp
public float StepLength { get; set; }SecondCutAsChannel 仅客户端
csharp
public bool SecondCutAsChannel { get; set; }HitPoint 仅客户端
csharp
public float HitPoint { get; set; }CancelPoint 仅客户端
csharp
public float CancelPoint { get; set; }BlendInTime 仅客户端
csharp
public float BlendInTime { get; }BlendOutTime 仅客户端
csharp
public float BlendOutTime { get; }LoopType 仅客户端
csharp
public AnimLoopType LoopType { get; set; }HasOptimizableTrack 仅客户端
csharp
public bool HasOptimizableTrack { get; }NumTracks 仅客户端
csharp
public uint NumTracks { get; }NumTriggers 仅客户端
csharp
public uint NumTriggers { get; }方法
Load 仅客户端
csharp
public static AnimationResource? Load(Animation animationPath)从路径加载动画资源(.ani 文件)。
SetBlendTime 仅客户端
csharp
public void SetBlendTime(float blendInTime, float blendOutTime)Clone 仅客户端
csharp
public AnimationResource? Clone(string cloneName = "")CreateTrack 仅客户端
csharp
public AnimationTrack? CreateTrack(string name)RemoveTrack 仅客户端
csharp
public bool RemoveTrack(string name)RemoveAllTracks 仅客户端
csharp
public void RemoveAllTracks()GetTrack 仅客户端
csharp
public AnimationTrack? GetTrack(string name)GetTrack 仅客户端
csharp
public AnimationTrack? GetTrack(uint nameHash)GetTrackByIndex 仅客户端
csharp
public AnimationTrack? GetTrackByIndex(uint index)GetTracks 仅客户端
csharp
public AnimationTrack[] GetTracks()ResizeTriggers 仅客户端
csharp
public void ResizeTriggers(uint count)SetTrigger 仅客户端
csharp
public bool SetTrigger(uint index, AnimationTrigger trigger)AddTrigger 仅客户端
csharp
public bool AddTrigger(AnimationTrigger trigger, bool timeIsNormalized = false)RemoveTrigger 仅客户端
csharp
public bool RemoveTrigger(uint index)RemoveAllTriggers 仅客户端
csharp
public void RemoveAllTriggers()GetTrigger 仅客户端
csharp
public AnimationTrigger? GetTrigger(uint index)AnimationSample 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct AnimationSample : IEquatable<AnimationSample>A sampled track value and the channels that contributed to it.
构造函数
AnimationSample 仅客户端
csharp
public AnimationSample(float Time, Vector3 Position, Quaternion Rotation, Vector3 Scale, AnimationChannel Channels)A sampled track value and the channels that contributed to it.
属性
Time 仅客户端
csharp
public float Time { get; init; }Position 仅客户端
csharp
public Vector3 Position { get; init; }Rotation 仅客户端
csharp
public Quaternion Rotation { get; init; }Scale 仅客户端
csharp
public Vector3 Scale { get; init; }Channels 仅客户端
csharp
public AnimationChannel Channels { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(AnimationSample left, AnimationSample right)operator == 仅客户端
csharp
public static bool operator ==(AnimationSample left, AnimationSample right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(AnimationSample other)Deconstruct 仅客户端
csharp
public void Deconstruct(out float Time, out Vector3 Position, out Quaternion Rotation, out Vector3 Scale, out AnimationChannel Channels)AnimationSet2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class AnimationSet2D : ResourceUrho2D animation set resource for AnimatedSprite2D.
备注
AnimationSet2D supports Spriter .scml resources and Spine skeleton resources (.skel or .json) with their matching .atlas and texture files. New project-local 2D presentation resources should follow UI resource layout: Spriter .scml files and image frames under ui/image/..., and Spine files under ui/spine/.... The path passed to String) omits the ui/ prefix and should include the animation data extension. Legacy current-project res/... paths remain supported as a fallback.
属性
NumAnimations 仅客户端
csharp
public uint NumAnimations { get; }Gets the number of animations exposed by this animation set.
Sprite 仅客户端
csharp
public Sprite2D? Sprite { get; }Gets the backing sprite used by simple Spriter animation sets when available.
备注
Spine animation sets and multi-texture animation sets may return null. Use this only for diagnostics or low-level integrations; normal playback uses AnimationSet.
方法
Load 仅客户端
csharp
public static AnimationSet2D? Load(string path)Loads a Spriter or Spine 2D animation set from the engine resource cache.
path— Resource path including extension. For example, a Spriter file atui/image/Animated/coin.scmlis loaded with"image/Animated/coin.scml", and a Spine file atui/spine/hero/hero.skelis loaded with"spine/hero/hero.skel". Existing files underres/..., such asres/Animated/hero.skel, can still be loaded with"Animated/hero.skel".
返回: The loaded animation set, or null if the resource cannot be found or decoded.
GetAnimation 仅客户端
csharp
public string GetAnimation(uint index)Gets the animation name at the specified index.
index— Zero-based animation index. Must be less thanNumAnimations.
返回: The animation name, or an empty string if the index is invalid.
HasAnimation 仅客户端
csharp
public bool HasAnimation(string animationName)Returns whether this animation set contains the specified animation.
animationName— Animation name to test. Names are case-sensitive.
AnimationTrack 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class AnimationTrackStable owner + name view of an animation track. Native AnimationTrack pointers are intentionally not retained across WASM calls because editing the owning animation can invalidate them.
属性
Name 仅客户端
csharp
public string Name { get; }NameHash 仅客户端
csharp
public uint NameHash { get; }Channels 仅客户端
csharp
public AnimationChannel Channels { get; set; }NumKeyFrames 仅客户端
csharp
public uint NumKeyFrames { get; }方法
GetKeyFrame 仅客户端
csharp
public AnimationKeyFrame? GetKeyFrame(uint index)SetKeyFrame 仅客户端
csharp
public bool SetKeyFrame(uint index, AnimationKeyFrame keyFrame)AddKeyFrame 仅客户端
csharp
public bool AddKeyFrame(AnimationKeyFrame keyFrame)InsertKeyFrame 仅客户端
csharp
public bool InsertKeyFrame(uint index, AnimationKeyFrame keyFrame)RemoveKeyFrame 仅客户端
csharp
public bool RemoveKeyFrame(uint index)ClearKeyFrames 仅客户端
csharp
public bool ClearKeyFrames()GetKeyFrameIndex 仅客户端
csharp
public uint? GetKeyFrameIndex(float time, uint previousIndex = 0u)Resolves the key-frame index for a time. Pass the previous result to keep native's fast forward/backward search behavior; returns null when the track has no key frames.
Sample 仅客户端
csharp
public AnimationSample? Sample(float time, bool looped = false)AnimationTrigger 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct AnimationTrigger : IEquatable<AnimationTrigger>An animation trigger point with Variant data represented by GameCore's portable text bridge.
构造函数
AnimationTrigger 仅客户端
csharp
public AnimationTrigger(float Time, Variant Data)An animation trigger point with Variant data represented by GameCore's portable text bridge.
属性
Time 仅客户端
csharp
public float Time { get; init; }Data 仅客户端
csharp
public Variant Data { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(AnimationTrigger left, AnimationTrigger right)operator == 仅客户端
csharp
public static bool operator ==(AnimationTrigger left, AnimationTrigger right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(AnimationTrigger other)Deconstruct 仅客户端
csharp
public void Deconstruct(out float Time, out Variant Data)AnimLoopType 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum AnimLoopTypeHow a logical animation segment advances after reaching its end.
枚举值
OnceLoopEndFrame
CompressedFormat 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum CompressedFormat枚举值
NoneRGBADXT1DXT3DXT5ETC1ETC2_RGBETC2_RGBARGBA_ASTC_4x4_KHRRGBA_ASTC_5x5_KHRRGBA_ASTC_6x6_KHRSRGB8_ALPHA8_ASTC_4x4_KHRSRGB8_ALPHA8_ASTC_5x5_KHRSRGB8_ALPHA8_ASTC_6x6_KHRPVRTC_RGB_2BPPPVRTC_RGBA_2BPPPVRTC_RGB_4BPPPVRTC_RGBA_4BPP
CubeMapFace 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum CubeMapFace枚举值
PositiveXNegativeXPositiveYNegativeYPositiveZNegativeZ
Image 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Image : ResourceClient image resource and CPU pixel operations.
构造函数
Image 仅客户端
csharp
public Image()属性
Width 仅客户端
csharp
public int Width { get; }Height 仅客户端
csharp
public int Height { get; }Depth 仅客户端
csharp
public int Depth { get; }Components 仅客户端
csharp
public uint Components { get; }IsCompressed 仅客户端
csharp
public bool IsCompressed { get; }CompressedFormat 仅客户端
csharp
public CompressedFormat CompressedFormat { get; }NumCompressedLevels 仅客户端
csharp
public uint NumCompressedLevels { get; }IsCubemap 仅客户端
csharp
public bool IsCubemap { get; }IsArray 仅客户端
csharp
public bool IsArray { get; }IsSRGB 仅客户端
csharp
public bool IsSRGB { get; }HasAlphaChannel 仅客户端
csharp
public bool HasAlphaChannel { get; }方法
Load 仅客户端
csharp
public static Image? Load(GameCore.ResourceType.Image imagePath)SetSize 仅客户端
csharp
public bool SetSize(int width, int height, uint components)SetSize 仅客户端
csharp
public bool SetSize(int width, int height, int depth, uint components)SetPixel 仅客户端
csharp
public void SetPixel(int x, int y, Color color)SetPixel 仅客户端
csharp
public void SetPixel(int x, int y, int z, Color color)SetPixelInt 仅客户端
csharp
public void SetPixelInt(int x, int y, uint color)SetPixelInt 仅客户端
csharp
public void SetPixelInt(int x, int y, int z, uint color)FlipHorizontal 仅客户端
csharp
public bool FlipHorizontal()FlipVertical 仅客户端
csharp
public bool FlipVertical()Resize 仅客户端
csharp
public bool Resize(int width, int height)Clear 仅客户端
csharp
public void Clear(Color color)ClearInt 仅客户端
csharp
public void ClearInt(uint color)GetPixel 仅客户端
csharp
public Color GetPixel(int x, int y)GetPixel 仅客户端
csharp
public Color GetPixel(int x, int y, int z)GetPixelInt 仅客户端
csharp
public uint GetPixelInt(int x, int y)GetPixelInt 仅客户端
csharp
public uint GetPixelInt(int x, int y, int z)GetPixelBilinear 仅客户端
csharp
public Color GetPixelBilinear(float x, float y)GetPixelTrilinear 仅客户端
csharp
public Color GetPixelTrilinear(float x, float y, float z)GetSubimage 仅客户端
csharp
public Image? GetSubimage(Rectangle rectangle)SetSubimage 仅客户端
csharp
public bool SetSubimage(Image source, Rectangle rectangle)MaterialQuality 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum MaterialQuality枚举值
Low = 0uMedium = 1uHigh = 2uMax = 15u
Mesh 双端
命名空间 GameGraph.ResourceSystem
csharp
public class Mesh : Resource构造函数
Mesh 双端
csharp
public Mesh()属性
BoundingBox 仅客户端
csharp
public BoundingBox BoundingBox { get; set; }NumGeometries 仅客户端
csharp
public uint NumGeometries { get; set; }NumMorphs 仅客户端
csharp
public uint NumMorphs { get; }IsSingleBone 仅客户端
csharp
public bool IsSingleBone { get; }SingleBoneIndex 仅客户端
csharp
public uint SingleBoneIndex { get; }NumBones 仅客户端
csharp
public uint NumBones { get; }RootBoneIndex 仅客户端
csharp
public uint RootBoneIndex { get; }方法
Load 双端
csharp
public static Mesh? Load(Model meshPath)SetNumGeometryLodLevels 仅客户端
csharp
public bool SetNumGeometryLodLevels(uint geometryIndex, uint numLevels)GetNumGeometryLodLevels 仅客户端
csharp
public uint GetNumGeometryLodLevels(uint geometryIndex)SetGeometry 仅客户端
csharp
public bool SetGeometry(uint geometryIndex, uint lodLevel, Geometry? geometry)GetGeometry 仅客户端
csharp
public Geometry? GetGeometry(uint geometryIndex, uint lodLevel = 0u)SetGeometryCenter 仅客户端
csharp
public bool SetGeometryCenter(uint geometryIndex, Vector3 center)GetGeometryCenter 仅客户端
csharp
public Vector3 GetGeometryCenter(uint geometryIndex)SetVertexBuffers 仅客户端
csharp
public bool SetVertexBuffers(params VertexBuffer[] buffers)GetVertexBuffers 仅客户端
csharp
public VertexBuffer[] GetVertexBuffers()SetIndexBuffers 仅客户端
csharp
public bool SetIndexBuffers(params IndexBuffer[] buffers)GetIndexBuffers 仅客户端
csharp
public IndexBuffer[] GetIndexBuffers()GetMorph 仅客户端
csharp
public ModelMorphInfo? GetMorph(uint index)GetMorphRangeStart 仅客户端
csharp
public uint GetMorphRangeStart(uint bufferIndex)GetMorphRangeCount 仅客户端
csharp
public uint GetMorphRangeCount(uint bufferIndex)Clone 仅客户端
csharp
public Mesh Clone(UTF8String cloneName = default(UTF8String))CopySkeletonFrom 仅客户端
csharp
public void CopySkeletonFrom(Mesh source)GetBoneIndex 仅客户端
csharp
public uint? GetBoneIndex(string name)GetBoneIndex 仅客户端
csharp
public uint? GetBoneIndex(uint nameHash)GetBone 仅客户端
csharp
public Bone? GetBone(uint index)GetBone 仅客户端
csharp
public Bone? GetBone(string name)SetBoneAnimated 仅客户端
csharp
public bool SetBoneAnimated(uint index, bool animated)SetBoneCollisionMask 仅客户端
csharp
public bool SetBoneCollisionMask(uint index, BoneCollisionShape collisionMask)SetBoneRadius 仅客户端
csharp
public bool SetBoneRadius(uint index, float radius)SetBoneBoundingBox 仅客户端
csharp
public bool SetBoneBoundingBox(uint index, BoundingBox boundingBox)MeshBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public class MeshBuilder流式构建自定义 Mesh,支持 Position / Normal / Color / UV0 / UV1 / Tangent 顶点属性。 默认在未提供法线时自动生成面积加权法线。
构造函数
MeshBuilder 仅客户端
csharp
public MeshBuilder()方法
SetPositions 仅客户端
csharp
public MeshBuilder SetPositions(Vector3[] positions)设置顶点位置(必须)。
SetIndices 仅客户端
csharp
public MeshBuilder SetIndices(uint[] indices)设置索引数组(必须)。
SetNormals 仅客户端
csharp
public MeshBuilder SetNormals(Vector3[] normals)设置法线数组。调用后自动禁用法线自动生成。
SetTexCoords 仅客户端
csharp
public MeshBuilder SetTexCoords(Vector2[] uvs)设置 UV0 纹理坐标。
SetTexCoords2 仅客户端
csharp
public MeshBuilder SetTexCoords2(Vector2[] uvs)设置 UV1 纹理坐标(第二通道,用于光照贴图等)。
SetTangents 仅客户端
csharp
public MeshBuilder SetTangents(Vector4[] tangents)设置切线数组(xyzw,w 分量为 handedness ±1)。
SetPrimitiveType 仅客户端
csharp
public MeshBuilder SetPrimitiveType(PrimitiveType type)设置渲染图元类型,默认 TriangleList。
AutoGenerateNormals 仅客户端
csharp
public MeshBuilder AutoGenerateNormals(bool enable)设置是否在未提供法线时自动生成法线(默认 true)。 调用 SetNormals 后此项自动置为 false。
SetColors 仅客户端
csharp
public MeshBuilder SetColors(uint[] argbColors)设置顶点颜色(ARGB uint 格式)。
SetColors 仅客户端
csharp
public MeshBuilder SetColors(Color[] colors)设置顶点颜色(System.Drawing.Color 格式,内部转换为 ARGB uint)。
Build 仅客户端
csharp
public Mesh? Build()构建 Mesh。校验输入后执行一次 WASM 调用创建引擎 Model。
ModelMorphInfo 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct ModelMorphInfo : IEquatable<ModelMorphInfo>构造函数
ModelMorphInfo 仅客户端
csharp
public ModelMorphInfo(string Name, uint NameHash, float Weight)属性
Name 仅客户端
csharp
public string Name { get; init; }NameHash 仅客户端
csharp
public uint NameHash { get; init; }Weight 仅客户端
csharp
public float Weight { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(ModelMorphInfo left, ModelMorphInfo right)operator == 仅客户端
csharp
public static bool operator ==(ModelMorphInfo left, ModelMorphInfo right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(ModelMorphInfo other)Deconstruct 仅客户端
csharp
public void Deconstruct(out string Name, out uint NameHash, out float Weight)NodePositionMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum NodePositionMode枚举值
NoneNodeBoundingBoxGround
ObjectAnimation 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ObjectAnimation : ResourceClient-only Urho ObjectAnimation resource. It owns the mapping from attribute paths to ValueAnimation resources and their playback settings.
构造函数
ObjectAnimation 仅客户端
csharp
public ObjectAnimation()属性
NumAttributeAnimations 仅客户端
csharp
public uint NumAttributeAnimations { get; }方法
Load 仅客户端
csharp
public static ObjectAnimation? Load(string path)AddAttributeAnimation 仅客户端
csharp
public void AddAttributeAnimation(string name, ValueAnimation animation, ObjectAnimationWrapMode wrapMode = ObjectAnimationWrapMode.Loop, float speed = 1f)RemoveAttributeAnimation 仅客户端
csharp
public void RemoveAttributeAnimation(string name)RemoveAttributeAnimation 仅客户端
csharp
public void RemoveAttributeAnimation(ValueAnimation animation)GetAttributeAnimation 仅客户端
csharp
public ValueAnimation? GetAttributeAnimation(string name)GetAttributeAnimationWrapMode 仅客户端
csharp
public ObjectAnimationWrapMode GetAttributeAnimationWrapMode(string name)GetAttributeAnimationSpeed 仅客户端
csharp
public float GetAttributeAnimationSpeed(string name)GetAttributeAnimationName 仅客户端
csharp
public string GetAttributeAnimationName(uint index)GetAttributeAnimationNames 仅客户端
csharp
public string[] GetAttributeAnimationNames()GetAttributeAnimationInfo 仅客户端
csharp
public ObjectAnimationInfo? GetAttributeAnimationInfo(string name)ObjectAnimationInfo 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct ObjectAnimationInfo : IEquatable<ObjectAnimationInfo>Safe snapshot of one ObjectAnimation attribute entry.
构造函数
ObjectAnimationInfo 仅客户端
csharp
public ObjectAnimationInfo(ValueAnimation? Animation, ObjectAnimationWrapMode WrapMode, float Speed, float Time)Safe snapshot of one ObjectAnimation attribute entry.
属性
Animation 仅客户端
csharp
public ValueAnimation? Animation { get; init; }WrapMode 仅客户端
csharp
public ObjectAnimationWrapMode WrapMode { get; init; }Speed 仅客户端
csharp
public float Speed { get; init; }Time 仅客户端
csharp
public float Time { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(ObjectAnimationInfo left, ObjectAnimationInfo right)operator == 仅客户端
csharp
public static bool operator ==(ObjectAnimationInfo left, ObjectAnimationInfo right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(ObjectAnimationInfo other)Deconstruct 仅客户端
csharp
public void Deconstruct(out ValueAnimation? Animation, out ObjectAnimationWrapMode WrapMode, out float Speed, out float Time)ObjectAnimationWrapMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ObjectAnimationWrapModeHow an ObjectAnimation entry advances after reaching its end.
枚举值
LoopOnceClamp
ParticleAxisLock 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleAxisLock粒子朝向锁定轴。
枚举值
NoneXYZNegativeXNegativeYNegativeZRotateXRotateYRotateZ
ParticleBeamTaperMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleBeamTaperModeBeam 粒子宽度收束模式。
枚举值
NoneFullPartial
ParticleBlendMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleBlendMode粒子材质混合模式。
枚举值
ReplaceAddMultiplyAlphaAddAlphaPremulAlphaInverseDestinationAlphaSubtractSubtractAlpha
ParticleConeDirection 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleConeDirection圆锥/圆台发射区域的速度方向模式。
枚举值
NormalEdgeVolume
ParticleCylinderHeightAxis 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleCylinderHeightAxis圆柱形发射区域的高度轴。
枚举值
XYZ
ParticleEffectExportResult 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleEffectExportResultDebug 导出 .effect 的结果码。
枚举值
Success = 0NotDebugMode = 1InvalidParticleSystem = 2FileSystemUnavailable = 3InvalidDirectory = 4AlreadyExists = 5SaveFailed = 6InvalidNativeResponse = 100
ParticleEmitterAccelerationBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterAccelerationBuilder配置粒子加速度。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterAccelerationBuilder Constant(Vector3 acceleration, bool alwaysInWorldSpace = true, bool applyOwnerScale = false)设置固定加速度。
Range 仅客户端
csharp
public ParticleEmitterAccelerationBuilder Range(Vector3 min, Vector3 max, bool alwaysInWorldSpace = true, bool applyOwnerScale = false)设置随机加速度范围。
ParticleEmitterBeamBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterBeamBuilder配置 Beam 发射器。
备注
配置 ParticleSystem 资源,与 ActorBeam 使用相同的底层光束粒子能力。 ActorBeam 由框架管理单位/挂点跟随及生命周期;本 Builder 只配置参数,不提供 Node 绑定。 资源挂载后,通过 ParticleSystem.GetEmitter 获取运行时 ParticleEmitter,逐帧更新端点以跟随节点, 并在目标或光束移除时停止更新。不要通过每帧 Apply 跟随节点,因为 Apply 会重置关联发射器。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Points 仅客户端
csharp
public ParticleEmitterBeamBuilder Points(Vector3 source, Vector3 target)设置 Beam 的起点和终点。
备注
保存资源中的坐标值,不绑定 Node,也不会持续跟踪节点移动。 动态跟随请在挂载后调用运行时 ParticleEmitter.SetSourcePoint/SetEndPoint。
Options 仅客户端
csharp
public ParticleEmitterBeamBuilder Options(int maxBeamCount = 1, float speed = 10f, int interpolationPoints = 0, bool alwaysOn = false)设置 Beam 数量、速度、插值点和常亮选项。
Tiling 仅客户端
csharp
public ParticleEmitterBeamBuilder Tiling(int textureTile = 1, float textureTileDistance = 0f)设置 Beam 贴图平铺。
Taper 仅客户端
csharp
public ParticleEmitterBeamBuilder Taper(ParticleBeamTaperMode mode, float factor = 1f, float scale = 1f)设置 Beam 宽度收束。
Noise 仅客户端
csharp
public ParticleEmitterBeamBuilder Noise(int frequency, Vector3 range, Vector3 speed = default(Vector3), bool smooth = true, int tessellation = 1)设置 Beam 的低频噪声扰动。
ParticleEmitterBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterBuilder单个运行时粒子发射器的链式配置入口。
属性
Index 仅客户端
csharp
public int Index { get; }发射器在当前粒子系统中的索引。
Type 仅客户端
csharp
public ParticleEmitterType Type { get; }发射器类型。
Spawn 仅客户端
csharp
public ParticleEmitterSpawnBuilder Spawn { get; }生成频率和 burst 配置。
Lifetime 仅客户端
csharp
public ParticleEmitterLifetimeBuilder Lifetime { get; }单个粒子的生命周期配置。
Size 仅客户端
csharp
public ParticleEmitterSizeBuilder Size { get; }粒子大小配置。
Velocity 仅客户端
csharp
public ParticleEmitterVelocityBuilder Velocity { get; }粒子速度配置。
Acceleration 仅客户端
csharp
public ParticleEmitterAccelerationBuilder Acceleration { get; }粒子加速度配置。
Location 仅客户端
csharp
public ParticleEmitterLocationBuilder Location { get; }粒子初始生成位置配置。
Color 仅客户端
csharp
public ParticleEmitterColorBuilder Color { get; }粒子颜色随生命周期变化配置。
SubUV 仅客户端
csharp
public ParticleEmitterSubUVBuilder SubUV { get; }序列帧贴图配置。
Rotation 仅客户端
csharp
public ParticleEmitterRotationBuilder Rotation { get; }Sprite 粒子旋转配置。
Material 仅客户端
csharp
public ParticleEmitterMaterialBuilder Material { get; }粒子材质、贴图和混合配置。
Mesh 仅客户端
csharp
public ParticleEmitterMeshBuilder Mesh { get; }Mesh 发射器专用配置。
Beam 仅客户端
csharp
public ParticleEmitterBeamBuilder Beam { get; }Beam 发射器专用配置。
Ribbon 仅客户端
csharp
public ParticleEmitterRibbonBuilder Ribbon { get; }Ribbon 发射器专用配置。
方法
Duration 仅客户端
csharp
public ParticleEmitterBuilder Duration(float seconds)设置发射器持续时间,单位秒。
Loops 仅客户端
csharp
public ParticleEmitterBuilder Loops(int loops)设置循环次数;0 表示无限循环。
Delay 仅客户端
csharp
public ParticleEmitterBuilder Delay(float seconds)设置发射器启动延迟,单位秒。
LocalSpace 仅客户端
csharp
public ParticleEmitterBuilder LocalSpace(bool enabled = true)设置粒子是否使用发射器本地空间。
Prewarm 仅客户端
csharp
public ParticleEmitterBuilder Prewarm(bool enabled = true)设置是否预热无限循环粒子。
Timing 仅客户端
csharp
public ParticleEmitterBuilder Timing(float duration, int loops = 0, float delay = 0f, bool localSpace = true, bool prewarm = false)一次性设置发射器时间、循环、本地空间和预热参数。
Facing 仅客户端
csharp
public ParticleEmitterBuilder Facing(ParticleScreenAlignment screenAlignment = ParticleScreenAlignment.Square, ParticleAxisLock axisLock = ParticleAxisLock.None, bool stretched = false)设置 Sprite 粒子的朝向方式、轴锁和速度拉伸。
ScreenAlignment 仅客户端
csharp
public ParticleEmitterBuilder ScreenAlignment(ParticleScreenAlignment screenAlignment)设置 Sprite 粒子的屏幕对齐方式。
AxisLock 仅客户端
csharp
public ParticleEmitterBuilder AxisLock(ParticleAxisLock axisLock)设置 Sprite 粒子的朝向锁轴。
Stretched 仅客户端
csharp
public ParticleEmitterBuilder Stretched(bool enabled = true)设置粒子是否沿速度方向拉伸。
Apply 仅客户端
csharp
public ParticleEmitterBuilder Apply()将当前运行时粒子系统配置重新应用到已挂载节点。
ParticleEmitterColorBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterColorBuilder配置粒子颜色随生命周期变化。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterColorBuilder Constant(Color color)设置固定颜色。
OverLife 仅客户端
csharp
public ParticleEmitterColorBuilder OverLife(Color start, Color end)设置生命周期开始和结束颜色。
ParticleEmitterLifetimeBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterLifetimeBuilder配置粒子生命周期。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterLifetimeBuilder Constant(float seconds)设置固定生命周期,单位秒。
Range 仅客户端
csharp
public ParticleEmitterLifetimeBuilder Range(float minSeconds, float maxSeconds)设置随机生命周期范围,单位秒。
ParticleEmitterLocationBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterLocationBuilder配置粒子初始生成位置。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterLocationBuilder Constant(Vector3 location)在固定位置生成粒子。
Range 仅客户端
csharp
public ParticleEmitterLocationBuilder Range(Vector3 min, Vector3 max)在盒形范围内随机生成粒子。
Box 仅客户端
csharp
public ParticleEmitterLocationBuilder Box(Vector3 min, Vector3 max)在盒形范围内随机生成粒子。
Sphere 仅客户端
csharp
public ParticleEmitterLocationBuilder Sphere(float radius, Vector3 center = default(Vector3), bool surfaceOnly = false, bool emitVelocity = false, float velocityScale = 1f)在球体或球面上生成粒子。
Cylinder 仅客户端
csharp
public ParticleEmitterLocationBuilder Cylinder(float radius, float height, Vector3 center = default(Vector3), ParticleCylinderHeightAxis heightAxis = ParticleCylinderHeightAxis.Z, bool surfaceOnly = false, bool radialVelocity = true, bool emitVelocity = false, float velocityScale = 1f)在圆柱体或圆柱面上生成粒子。
Cone 仅客户端
csharp
public ParticleEmitterLocationBuilder Cone(float bottomRadius, float height, Vector3 center = default(Vector3), float topRadius = 0f, float thickness = 1f, bool emitFromBottom = false, ParticleConeDirection direction = ParticleConeDirection.Normal, float startAngleDegrees = 0f, float endAngleDegrees = 360f)在圆锥或圆台区域中生成粒子。
MeshSurface 仅客户端
csharp
public ParticleEmitterLocationBuilder MeshSurface(Model modelPath, bool emitFromTriangles = true, float normalOffset = 0f, Vector3 position = default(Vector3), Vector3? scale = null, Vector3 rotationDegrees = default(Vector3), bool emitVelocity = false, float velocityScale = 1f)从模型顶点或三角面上生成粒子。
ParticleEmitterMaterialBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterMaterialBuilder配置粒子材质、贴图、混合和材质开关。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Texture 仅客户端
csharp
public ParticleEmitterMaterialBuilder Texture(ParticleTextureSlot slot, GameCore.ResourceType.Texture texturePath)设置指定贴图槽位的材质贴图。
Texture 仅客户端
csharp
public ParticleEmitterMaterialBuilder Texture(uint unit, GameCore.ResourceType.Texture texturePath)设置指定材质贴图单元的贴图。
Blend 仅客户端
csharp
public ParticleEmitterMaterialBuilder Blend(ParticleBlendMode blendMode)设置材质混合模式。
UseMask 仅客户端
csharp
public ParticleEmitterMaterialBuilder UseMask(bool enabled = true)启用或关闭 mask 贴图逻辑。
UseNoise 仅客户端
csharp
public ParticleEmitterMaterialBuilder UseNoise(bool enabled = true, float intensity = 1f)启用或关闭噪声扰动。
UseDissolve 仅客户端
csharp
public ParticleEmitterMaterialBuilder UseDissolve(bool enabled = true)启用或关闭 dissolve 贴图逻辑。
UseVertexColor 仅客户端
csharp
public ParticleEmitterMaterialBuilder UseVertexColor(bool enabled = true)启用或关闭顶点色参与材质颜色。
Flags 仅客户端
csharp
public ParticleEmitterMaterialBuilder Flags(bool useMask = false, bool useNoise = false, bool useDissolve = false, bool vertexColor = false, float noiseIntensity = 1f)一次性设置常用材质开关。
SoftParticle 仅客户端
csharp
public ParticleEmitterMaterialBuilder SoftParticle(bool enabled = true, float fadeHeight = 10f)启用或关闭软粒子,用于减轻和场景几何相交时的硬边。
TransparentDepthWrite 仅客户端
csharp
public ParticleEmitterMaterialBuilder TransparentDepthWrite(bool enabled = true)设置透明粒子是否写深度。
Fresnel 仅客户端
csharp
public ParticleEmitterMaterialBuilder Fresnel(bool enabled = true)启用或关闭 Fresnel 效果。
EnvironmentLight 仅客户端
csharp
public ParticleEmitterMaterialBuilder EnvironmentLight(bool enabled = true)设置是否使用环境光。
TextureRotation 仅客户端
csharp
public ParticleEmitterMaterialBuilder TextureRotation(Vector3 radians)设置贴图旋转参数,单位弧度。
ParticleEmitterMeshBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterMeshBuilder配置 Mesh 发射器。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Model 仅客户端
csharp
public ParticleEmitterMeshBuilder Model(Model modelPath)设置 Mesh 粒子的模型。
Material 仅客户端
csharp
public ParticleEmitterMeshBuilder Material(GameCore.ResourceType.Material materialPath)使用指定材质资源渲染 Mesh 粒子。
Material 仅客户端
csharp
public ParticleEmitterMeshBuilder Material(GameGraph.MaterialSystem.Material material)使用已加载材质渲染 Mesh 粒子。
Technique 仅客户端
csharp
public ParticleEmitterMeshBuilder Technique(string techniquePath)使用指定 Technique 路径覆盖 Mesh 粒子的材质 technique。
Technique 仅客户端
csharp
public ParticleEmitterMeshBuilder Technique(Technique technique)使用已加载 Technique 覆盖 Mesh 粒子的材质 technique。
Technique 仅客户端
csharp
public ParticleEmitterMeshBuilder Technique(Shader shader)Options 仅客户端
csharp
public ParticleEmitterMeshBuilder Options(bool cameraFacing = false, bool castShadow = false, bool forceInstance = false, bool lodDisabled = false)设置 Mesh 发射器的渲染选项。
RotationRange 仅客户端
csharp
public ParticleEmitterMeshBuilder RotationRange(Vector3 minDegrees, Vector3 maxDegrees)设置 Mesh 粒子的随机初始旋转,单位度。
RotationRateRange 仅客户端
csharp
public ParticleEmitterMeshBuilder RotationRateRange(Vector3 minDegreesPerSecond, Vector3 maxDegreesPerSecond)设置 Mesh 粒子的随机旋转速度,单位度/秒。
ParticleEmitterRibbonBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterRibbonBuilder配置 Ribbon 发射器。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Options 仅客户端
csharp
public ParticleEmitterRibbonBuilder Options(int maxTrailCount = 1, int maxParticleInTrailCount = 128, float tilingDistance = 0f, bool tangentRecalculationEveryFrame = false, bool spawnInitialParticle = false)设置 Ribbon 最大拖尾数、粒子数和平铺参数。
Behavior 仅客户端
csharp
public ParticleEmitterRibbonBuilder Behavior(bool deadTrailsOnDeactivate = true, bool deadTrailsOnSourceLoss = true, bool clipSourceSegment = true)设置 Ribbon 拖尾在发射器停用或源粒子丢失时的保留方式。
Render 仅客户端
csharp
public ParticleEmitterRibbonBuilder Render(ParticleRibbonRenderAxis renderAxis = ParticleRibbonRenderAxis.CameraUp, int sheetsPerTrail = 1, float tangentSpawningScalar = 0f)设置 Ribbon 横截面朝向、sheet 数和出生切线强度。
Tessellation 仅客户端
csharp
public ParticleEmitterRibbonBuilder Tessellation(int maxTessellationBetweenParticles = 25, float distanceStepSize = 15f, float tangentScalar = 5f, bool previousTangentRecalculation = true, bool tangentRecalculationEveryFrame = false, bool scaleTangentDiffInterpolation = false)设置 Ribbon 细分和平滑切线重算参数。
ParticleEmitterRotationBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterRotationBuilder配置 Sprite 粒子旋转。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterRotationBuilder Constant(float degrees)设置固定初始旋转角度,单位度。
Range 仅客户端
csharp
public ParticleEmitterRotationBuilder Range(float minDegrees, float maxDegrees)设置随机初始旋转角度范围,单位度。
Rate 仅客户端
csharp
public ParticleEmitterRotationBuilder Rate(float degreesPerSecond)设置固定旋转速度,单位度/秒。
RateRange 仅客户端
csharp
public ParticleEmitterRotationBuilder RateRange(float minDegreesPerSecond, float maxDegreesPerSecond)设置随机旋转速度范围,单位度/秒。
RateOverLife 仅客户端
csharp
public ParticleEmitterRotationBuilder RateOverLife(float startDegreesPerSecond, float endDegreesPerSecond)设置旋转速度随生命周期变化,单位度/秒。
ParticleEmitterSizeBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterSizeBuilder配置粒子初始大小和生命周期缩放。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterSizeBuilder Constant(float uniformSize)设置三轴相同的固定大小。
Constant 仅客户端
csharp
public ParticleEmitterSizeBuilder Constant(Vector3 size)设置固定三轴大小。
Range 仅客户端
csharp
public ParticleEmitterSizeBuilder Range(Vector3 min, Vector3 max, bool singleRandom = false)设置随机初始大小范围。
OverLife 仅客户端
csharp
public ParticleEmitterSizeBuilder OverLife(float startScale, float endScale)设置生命周期开始到结束的统一尺寸倍率。
OverLife 仅客户端
csharp
public ParticleEmitterSizeBuilder OverLife(Vector3 startScale, Vector3 endScale)设置生命周期开始到结束的三轴尺寸倍率。
ParticleEmitterSpawnBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterSpawnBuilder配置发射器的持续生成和 burst 生成。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Rate 仅客户端
csharp
public ParticleEmitterSpawnBuilder Rate(float particlesPerSecond)设置每秒生成粒子数。
ClearBursts 仅客户端
csharp
public ParticleEmitterSpawnBuilder ClearBursts()清除所有 burst 生成点。
Burst 仅客户端
csharp
public ParticleEmitterSpawnBuilder Burst(int count, float time = 0f, bool clearExisting = true)添加一次 burst 生成。
ParticleEmitterSubUVBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterSubUVBuilder配置序列帧贴图。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Grid 仅客户端
csharp
public ParticleEmitterSubUVBuilder Grid(int columns, int rows, ParticleSubUVInterpolation interpolation = ParticleSubUVInterpolation.Linear, int startFrame = 0, int? endFrame = null, int randomImageChanges = 0)设置序列帧网格和播放帧范围。
Frame 仅客户端
csharp
public ParticleEmitterSubUVBuilder Frame(int columns, int rows, int frame)固定显示序列帧中的一帧。
Random 仅客户端
csharp
public ParticleEmitterSubUVBuilder Random(int columns, int rows, int changesPerLifetime = 0, bool blend = false)在序列帧中随机切换帧。
ParticleEmitterType 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleEmitterType运行时粒子发射器类型。通常通过 AddSpriteEmitter 等便捷方法创建。
枚举值
SpriteRibbonMeshBeamAnimTrail
ParticleEmitterVelocityBuilder 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ParticleEmitterVelocityBuilder配置粒子初始速度和生命周期速度变化。
属性
Emitter 仅客户端
csharp
public ParticleEmitterBuilder Emitter { get; }方法
Constant 仅客户端
csharp
public ParticleEmitterVelocityBuilder Constant(Vector3 velocity, bool inWorldSpace = false, bool applyOwnerScale = false)设置固定初始速度。
Range 仅客户端
csharp
public ParticleEmitterVelocityBuilder Range(Vector3 min, Vector3 max, bool inWorldSpace = false, bool applyOwnerScale = false)设置随机初始速度范围。
ScaleOverLife 仅客户端
csharp
public ParticleEmitterVelocityBuilder ScaleOverLife(Vector3 startMultiplier, Vector3 endMultiplier)设置速度随生命周期变化的倍率。
AbsoluteOverLife 仅客户端
csharp
public ParticleEmitterVelocityBuilder AbsoluteOverLife(Vector3 startVelocity, Vector3 endVelocity, bool inWorldSpace = false, bool applyOwnerScale = false)设置生命周期内覆盖到的绝对速度。
Orbit 仅客户端
csharp
public ParticleEmitterVelocityBuilder Orbit(Vector3 radiansPerSecond, Vector3 center = default(Vector3), float radialSpeed = 0f)添加绕指定中心旋转和径向运动的速度。
ParticleRibbonRenderAxis 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleRibbonRenderAxisRibbon 粒子横截面朝向的参考轴。
枚举值
CameraUpSourceUpWorldUp
ParticleScreenAlignment 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleScreenAlignmentSprite 粒子面向相机或速度方向的方式。
枚举值
SquareRectangleVelocityTypeSpecific
ParticleSubUVInterpolation 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleSubUVInterpolation序列帧贴图的帧插值方式。
枚举值
NoneLinearLinearBlendRandomRandomBlend
ParticleSystem 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public class ParticleSystem : Resource粒子系统资源。从 .effect 文件加载后,通过 Boolean) 在节点上创建发射器组件。 支持 Sprite、Mesh、Ribbon、Beam、AnimTrail 多种粒子渲染类型和丰富的模块化配置。
备注
可沿用“粒子资源 → 挂载 Node → 控制发射器”的 Urho 心智模型,但资源格式、 Builder 和发射器模块采用星火粒子系统的公共能力,不是 Urho 原生粒子 API 的逐项复制。 该类型仅客户端可用。 与 ActorParticle、ActorBeam 共享底层粒子系统。Actor 层由框架管理挂载和生命周期; 本类型提供直接控制 Node 和发射器的入口。ActorBeam 的单位/挂点跟随由 Actor 框架逐帧更新, 不通过 C# Builder 实现。直接使用本类型时,由调用方管理端点跟随和清理。 ParticleEmitterBeamBuilder 配置资源中的光束参数;挂载后通过 Int32) 获取运行时发射器,使用其 SetSourcePoint/SetEndPoint 更新端点。
属性
EffectCount 仅客户端
csharp
public uint EffectCount { get; }效果数量(一个 ParticleSystem 可包含多个效果/发射器定义)。
SpawnRateFactor 仅客户端
csharp
public float SpawnRateFactor { get; set; }生成速率因子 (0~1),用于整体控制粒子生成速率。
IsInfinite 仅客户端
csharp
public bool IsInfinite { get; }粒子效果是否包含无限持续的发射器。
方法
AddEmitter 仅客户端
csharp
public ParticleEmitterBuilder AddEmitter(ParticleEmitterType type)向运行时粒子系统追加指定类型的发射器。
AddSpriteEmitter 仅客户端
csharp
public ParticleEmitterBuilder AddSpriteEmitter()追加 Sprite 发射器,适合火花、烟雾、光点等 billboard 粒子。
AddMeshEmitter 仅客户端
csharp
public ParticleEmitterBuilder AddMeshEmitter(Model modelPath)追加 Mesh 发射器,并设置粒子模型。
AddBeamEmitter 仅客户端
csharp
public ParticleEmitterBuilder AddBeamEmitter(Vector3 source, Vector3 target)追加 Beam 发射器,并设置起点和终点。
AddRibbonEmitter 仅客户端
csharp
public ParticleEmitterBuilder AddRibbonEmitter()追加 Ribbon 发射器,用于拖尾类粒子。
ExportEffect 仅客户端
csharp
public ParticleEffectExportResult<string> ExportEffect(string directory = "RuntimeParticles", bool overwrite = false)Debug-only: 将运行时构造的粒子保存为 .effect。 默认写入当前地图工程的 res/RuntimeParticles 目录,返回生成文件的绝对路径。
CreateRuntime 仅客户端
csharp
public static ParticleSystem CreateRuntime()创建一个仅存在于运行时内存中的粒子系统,可通过 builder API 追加和配置发射器。
Load 仅客户端
csharp
public static ParticleSystem? Load(Particle path)从路径加载粒子系统资源(.effect 文件)。 路径相对于资源根目录,例如 "effect/eff_tongyong/huoqiu2/particle.effect"。
AddToNode 仅客户端
csharp
public void AddToNode(Node node, bool shaderPrewarm = false)将粒子效果挂载到指定节点。在节点上创建多个 粒子发射器组件(按 .effect 中定义的效果数量)。 调用后粒子自动开始播放。
node— 目标节点shaderPrewarm— 是否预热着色器(可避免首次渲染时的卡顿)
AddToNode 仅客户端
csharp
public void AddToNode(Node node, uint randomSeed, bool shaderPrewarm = false)使用确定性实例种子挂载粒子效果。各发射器的随机种子由 、 节点上已有发射器数量和本系统 effect 序号派生;调用后需通过 Single) 或 Single) 进入确定性回放。
备注
排序/动态合批身份保持引擎原有规则,不使用用户随机种子;同一节点挂载多个系统时, 种子按节点上的发射器顺序分配,与 UInt32) 和 Single) 一致。 需要客户端能力版本 10。旧客户端调用该重载会失败,请在项目初始化时检查 GameCore.ClientEnvironment.ClientEnvironment.Runtime.Supports(ClientRuntimeFeature.ParticleDeterminism)。 该重载不会改变既有 Boolean) 的行为。
Apply 仅客户端
csharp
public void Apply()应用运行时构造的粒子模块配置,并重置已关联的粒子发射器。
Play 仅客户端
csharp
public static void Play(Node node)重置并播放节点上的所有 粒子发射器。
备注
处于确定性模式时保持暂停;需要自动播放时,先调用 SetDeterministicMode(node, false)。
Stop 仅客户端
csharp
public static void Stop(Node node, bool killOnDeactivate = false)停止节点上的所有 粒子发射器。
node— 目标节点killOnDeactivate— true 则立即销毁所有粒子,false 则让现有粒子自然消亡
IsFinished 仅客户端
csharp
public static bool IsFinished(Node node)检查节点上的所有 粒子发射器是否已播放完毕。
SetTickSpeed 仅客户端
csharp
public static void SetTickSpeed(Node node, float speed)设置节点上所有 粒子发射器的播放速率倍数。 1.0 为正常速度,<1.0 减速,>1.0 加速。
SetUnitScale 仅客户端
csharp
public static void SetUnitScale(Node node, float scale)设置节点上所有 粒子发射器的单位缩放。
SetEmitterLoops 仅客户端
csharp
public static void SetEmitterLoops(Node node, int loops)设置节点上所有 粒子发射器的循环次数。0 表示无限循环。
SetAutoRemoveMode 仅客户端
csharp
public static void SetAutoRemoveMode(Node node, AutoRemoveMode mode)设置节点上所有 粒子发射器的自动移除模式。
GetEmitterCount 仅客户端
csharp
public static int GetEmitterCount(Node node)获取节点上 粒子发射器的数量。
GetEmitter 仅客户端
csharp
public static ParticleEmitter? GetEmitter(Node node, int index)获取节点上第 index 个 粒子发射器。
GetEmitters 仅客户端
csharp
public static ParticleEmitter[] GetEmitters(Node node)获取节点上所有 粒子发射器。
SetRandomSeed 仅客户端
csharp
public static void SetRandomSeed(Node node, uint randomSeed)为节点上的所有发射器设置确定性随机种子,种子按节点上的发射器组件顺序派生。
备注
设置后再次调用 Node) 或 Boolean) 会回到同一随机序列。 排序/动态合批身份不由该种子决定。该调用不改挂载时已经生成的排序分组;需要完整实例种子时, 请在挂载阶段使用 Boolean)。 节点上的发射器数量或顺序发生变化后,种子会按新的组件顺序重新分配,需要重新设置。 需要客户端能力版本 10。
SetDeterministicMode 仅客户端
csharp
public static bool SetDeterministicMode(Node node, bool enabled)让节点上的所有发射器进入或离开确定性模式。返回 false 表示节点没有发射器或存在不支持的发射器; 返回 false 时不会改变任何发射器的状态。
备注
进入后发射器暂停每帧自动推进,只响应 Single) / Single)。 对所有发射器先做能力预检,再统一切换。需要客户端能力版本 10。 包含 EmitterHierarchy 模块的发射器不支持确定性模式。
Advance 仅客户端
csharp
public static bool Advance(Node node, float seconds, float fixedStepSeconds = 0.05f)以相同固定步长同时推进节点上的所有发射器(每个步长内依次推进每个发射器)。 返回 false 表示没有可用发射器、存在未进入确定性模式的发射器或参数无效;预检失败不会推进任何发射器。
备注
时间为播放秒,实际粒子时间 = seconds × 当前 TickSpeed;本接口不会修改 TickSpeed。 参数必须是有限值,时间不得为负,步长必须为正,步数超过上限时直接返回 false。 需要客户端能力版本 10,并且所有发射器已进入确定性模式。
Replay 仅客户端
csharp
public static bool Replay(Node node, uint randomSeed, float absoluteTimeSeconds, float fixedStepSeconds = 0.05f)用同一实例种子重新开始并推进到指定绝对时刻(播放秒)。 节点上的所有发射器先统一重置,再按相同固定步长交错推进,便于逐帧对照与截图。
备注
参数和所有发射器的能力会在改变任何状态前校验;校验失败时发射器保持原状。 种子按节点上的发射器组件顺序分配,与带种子的 Boolean) 一致。 时间为播放秒,实际粒子时间 = absoluteTimeSeconds × 当前 TickSpeed;本接口不会修改 TickSpeed。 参数必须是有限值,时间不得为负,步长必须为正,步数超过上限时返回 false。 回放只覆盖发射器内部状态。宿主节点在回放期间应保持静止;如果粒子依赖外部逐帧输入 (例如光束端点跟随、AnimTrail 的骨骼轨迹),调用方需要在推进前自行同步这些输入。 交错推进按节点组件顺序执行;包含 EmitterHierarchy 模块的系统暂不支持回放,返回 false。 相同种子、相同固定步长序列和相同 TickSpeed 会得到相同仿真状态,但不承诺跨 GPU/平台逐像素一致。 排序/动态合批身份保持引擎原有规则,不随种子改变。 需要客户端能力版本 10。
PredictDuration 仅客户端
csharp
public float PredictDuration(bool forced = false)预测粒子效果的持续时间(秒)。返回 0 表示效果包含无限持续的发射器。
forced— 是否强制重新计算(默认使用缓存值)
ParticleTextureSlot 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ParticleTextureSlot粒子材质贴图槽位。
枚举值
DiffuseNormalMaskDissolveEnvironment
Pass 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Pass : EngineObject属性
Name 仅客户端
csharp
public UTF8String Name { get; }Index 仅客户端
csharp
public uint Index { get; }BlendMode 仅客户端
csharp
public BlendMode BlendMode { get; set; }CullMode 仅客户端
csharp
public CullMode CullMode { get; set; }DepthTestMode 仅客户端
csharp
public CompareMode DepthTestMode { get; set; }LightingMode 仅客户端
csharp
public PassLightingMode LightingMode { get; set; }SupportedLightingMode 仅客户端
csharp
public PassLightingMode SupportedLightingMode { get; }ColorWrite 仅客户端
csharp
public bool ColorWrite { get; set; }DepthWrite 仅客户端
csharp
public bool DepthWrite { get; set; }AlphaToCoverage 仅客户端
csharp
public bool AlphaToCoverage { get; set; }IsDesktop 仅客户端
csharp
public bool IsDesktop { get; set; }VertexShader 仅客户端
csharp
public UTF8String VertexShader { get; set; }PixelShader 仅客户端
csharp
public UTF8String PixelShader { get; set; }ComputeShader 仅客户端
csharp
public UTF8String ComputeShader { get; }VertexShaderDefines 仅客户端
csharp
public UTF8String VertexShaderDefines { get; set; }PixelShaderDefines 仅客户端
csharp
public UTF8String PixelShaderDefines { get; set; }ComputeShaderDefines 仅客户端
csharp
public UTF8String ComputeShaderDefines { get; }VertexShaderDefineExcludes 仅客户端
csharp
public UTF8String VertexShaderDefineExcludes { get; set; }PixelShaderDefineExcludes 仅客户端
csharp
public UTF8String PixelShaderDefineExcludes { get; set; }ComputeShaderDefineExcludes 仅客户端
csharp
public UTF8String ComputeShaderDefineExcludes { get; }EffectiveVertexShaderDefines 仅客户端
csharp
public UTF8String EffectiveVertexShaderDefines { get; }EffectivePixelShaderDefines 仅客户端
csharp
public UTF8String EffectivePixelShaderDefines { get; }EffectiveComputeShaderDefines 仅客户端
csharp
public UTF8String EffectiveComputeShaderDefines { get; }NodePositionMode 仅客户端
csharp
public NodePositionMode NodePositionMode { get; set; }AlphaTest 仅客户端
csharp
public bool AlphaTest { get; set; }Covered 仅客户端
csharp
public bool Covered { get; set; }SrgbSoftResolve 仅客户端
csharp
public bool SrgbSoftResolve { get; set; }DisableFastMath 仅客户端
csharp
public bool DisableFastMath { get; set; }ShadersLoadedFrameNumber 仅客户端
csharp
public uint ShadersLoadedFrameNumber { get; }IsBacksideLightPass 仅客户端
csharp
public bool IsBacksideLightPass { get; }方法
Clone 仅客户端
csharp
public Pass Clone()CopyAttributesFrom 仅客户端
csharp
public void CopyAttributesFrom(Pass source)MarkShadersLoaded 仅客户端
csharp
public void MarkShadersLoaded(uint frameNumber)ReleaseShaders 仅客户端
csharp
public void ReleaseShaders()PassLightingMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum PassLightingMode枚举值
UnlitPerVertexPerPixel
Prefab 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Prefab : Resource方法
CreateInstance 仅客户端
csharp
public Node CreateInstance(Node parent)创建预制体实例,并立即挂到 下。
parent— 实例的父节点,instance 立即作为 parent 的子节点
返回: 新建的 PrefabInstance 根节点
备注
生命周期契约:必须传 parent —— native 端在返回之前会调 parent.AddChild(instance), 让 parent 的 children_ 容器持一份 SharedPtr 把 Node 撑住。 没有 parent 时本地 SharedPtr 析构后 Node 立即被释放,C# 拿到的 handle 指向已释放对象,下次 AddChild 会触发 AccessViolation。 这条契约对齐 Urho 的 Scene::Instantiate / Node::CreateChild。 ⚠️ 返回的是 PrefabInstance 根节点,组件通常不在它身上: native 的 prefab 实例化 (Prefab::CreateInstance) 会产出一棵多层节点树—— 一个 PrefabInstance 根节点下挂若干 ArchetypeInstance 子节点 (SkeletalMeshArchetype 等),AnimatedModelComponent / 材质 / sockets 都挂在 子节点上,根节点本身只承载组织结构和 prefab 元数据。 想从外面拿组件,不要直接 instance.GetComponent<T>()(会返回 null), 用 Boolean) 递归找: var instance = prefab.CreateInstance(parent); var animatedModel = instance.GetComponentInChildren<AnimatedModelComponent>(); var modelNode = animatedModel?.Node; // 真正承载组件的子节点
CreatePhysicsInstance 仅客户端
csharp
public Node CreatePhysicsInstance(Node parent)创建物理预制体实例,并立即挂到 下。 生命周期契约与 Node) 相同。
Load 仅客户端
csharp
public static Prefab? Load(GameCore.ResourceType.Prefab prefabPath)PropertySet2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class PropertySet2D : EngineObjectRead-only property bag attached to a TMX tile or object.
方法
HasProperty 仅客户端
csharp
public bool HasProperty(UTF8String name)GetProperty 仅客户端
csharp
public UTF8String GetProperty(UTF8String name)RenderCommandSortMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum RenderCommandSortMode枚举值
FrontToBackBackToFront
RenderCommandType 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum RenderCommandType枚举值
NoneClearScenePassQuadForwardLightsLightVolumesRenderUIRenderUIBackRenderUIFrontSendEventOutlineRenderTargetSwapPostProcessPlanarShadowComputePassVolumetricLightLoopStaticMeshPreDrawSightMask
RenderPath 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class RenderPath : DisposableObjectClient-side Urho3D render path. A render path is an ordered list of render targets and commands; it is deliberately not a server resource.
属性
NumRenderTargets 仅客户端
csharp
public uint NumRenderTargets { get; }NumCommands 仅客户端
csharp
public uint NumCommands { get; }方法
Create 仅客户端
csharp
public static RenderPath Create()Create an empty render path owned by this wrapper.
Clone 仅客户端
csharp
public RenderPath Clone()Clone an existing render path.
FromViewport 仅客户端
csharp
public static RenderPath? FromViewport(Viewport viewport)Take a retained reference to a viewport's current render path.
Load 仅客户端
csharp
public bool Load(UTF8String path)Append 仅客户端
csharp
public bool Append(UTF8String path)SetEnabled 仅客户端
csharp
public void SetEnabled(UTF8String tag, bool enabled)IsEnabled 仅客户端
csharp
public bool IsEnabled(UTF8String tag)IsAdded 仅客户端
csharp
public bool IsAdded(UTF8String tag)ToggleEnabled 仅客户端
csharp
public void ToggleEnabled(UTF8String tag)AddRenderTarget 仅客户端
csharp
public void AddRenderTarget(RenderTargetDescription target)SetRenderTarget 仅客户端
csharp
public void SetRenderTarget(uint index, RenderTargetDescription target)GetRenderTarget 仅客户端
csharp
public RenderTargetDescription? GetRenderTarget(uint index)RemoveRenderTarget 仅客户端
csharp
public void RemoveRenderTarget(UTF8String name)RemoveRenderTarget 仅客户端
csharp
public void RemoveRenderTarget(uint index)RemoveRenderTargets 仅客户端
csharp
public void RemoveRenderTargets(UTF8String tag)GetCommand 仅客户端
csharp
public RenderPathCommand? GetCommand(uint index)AddCommand 仅客户端
csharp
public RenderPathCommand? AddCommand(RenderCommandType type, UTF8String tag = default(UTF8String), UTF8String pass = default(UTF8String), RenderCommandSortMode sortMode = RenderCommandSortMode.FrontToBack, bool enabled = true)InsertCommand 仅客户端
csharp
public RenderPathCommand? InsertCommand(uint index, RenderCommandType type, UTF8String tag = default(UTF8String), UTF8String pass = default(UTF8String), RenderCommandSortMode sortMode = RenderCommandSortMode.FrontToBack, bool enabled = true)RemoveCommand 仅客户端
csharp
public void RemoveCommand(uint index)RemoveCommands 仅客户端
csharp
public void RemoveCommands(UTF8String tag)SetCommandLoopCount 仅客户端
csharp
public void SetCommandLoopCount(UTF8String tag, int count)GetCommandLoopCount 仅客户端
csharp
public int GetCommandLoopCount(UTF8String tag)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, float value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, int value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, bool value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Vector2 value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Vector3 value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Vector4 value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Color value)DisposeUnmanaged 仅客户端
csharp
protected override void DisposeUnmanaged(bool finalizing)RenderPathCommand 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class RenderPathCommandEphemeral view of a command owned by a RenderPath.
属性
Tag 仅客户端
csharp
public UTF8String Tag { get; set; }Type 仅客户端
csharp
public RenderCommandType Type { get; set; }SortMode 仅客户端
csharp
public RenderCommandSortMode SortMode { get; set; }Pass 仅客户端
csharp
public UTF8String Pass { get; set; }Metadata 仅客户端
csharp
public UTF8String Metadata { get; set; }VertexShaderName 仅客户端
csharp
public UTF8String VertexShaderName { get; set; }PixelShaderName 仅客户端
csharp
public UTF8String PixelShaderName { get; set; }VertexShaderDefines 仅客户端
csharp
public UTF8String VertexShaderDefines { get; set; }PixelShaderDefines 仅客户端
csharp
public UTF8String PixelShaderDefines { get; set; }ClearFlags 仅客户端
csharp
public uint ClearFlags { get; set; }ClearColor 仅客户端
csharp
public Color ClearColor { get; set; }ClearDepth 仅客户端
csharp
public float ClearDepth { get; set; }ClearStencil 仅客户端
csharp
public uint ClearStencil { get; set; }BlendMode 仅客户端
csharp
public uint BlendMode { get; set; }Enabled 仅客户端
csharp
public bool Enabled { get; set; }UseFogColor 仅客户端
csharp
public bool UseFogColor { get; set; }MarkToStencil 仅客户端
csharp
public bool MarkToStencil { get; set; }UseLitBase 仅客户端
csharp
public bool UseLitBase { get; set; }VertexLights 仅客户端
csharp
public bool VertexLights { get; set; }EventName 仅客户端
csharp
public UTF8String EventName { get; set; }NumOutputs 仅客户端
csharp
public uint NumOutputs { get; }DepthStencilName 仅客户端
csharp
public UTF8String DepthStencilName { get; set; }方法
GetTextureName 仅客户端
csharp
public UTF8String GetTextureName(uint unit)SetTextureName 仅客户端
csharp
public void SetTextureName(uint unit, UTF8String name)SetNumOutputs 仅客户端
csharp
public void SetNumOutputs(uint count)SetOutput 仅客户端
csharp
public void SetOutput(uint index, UTF8String name, uint face = 0u)SetOutputName 仅客户端
csharp
public void SetOutputName(uint index, UTF8String name)SetOutputFace 仅客户端
csharp
public void SetOutputFace(uint index, uint face)GetOutputName 仅客户端
csharp
public UTF8String GetOutputName(uint index)GetOutputFace 仅客户端
csharp
public uint GetOutputFace(uint index)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, float value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, int value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, bool value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Vector2 value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Vector3 value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Vector4 value)SetShaderParameter 仅客户端
csharp
public void SetShaderParameter(UTF8String name, Color value)RemoveShaderParameter 仅客户端
csharp
public void RemoveShaderParameter(UTF8String name)RenderSurface 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class RenderSurface : EngineObjectUrho3D RenderSurface 封装,用于把 Viewport 渲染到 Texture2D RenderTarget。
属性
Width 仅客户端
csharp
public int Width { get; }RenderTarget 宽度。
Height 仅客户端
csharp
public int Height { get; }RenderTarget 高度。
ParentTexture 仅客户端
csharp
public Texture? ParentTexture { get; }拥有此 surface 的纹理。
Usage 仅客户端
csharp
public TextureUsage Usage { get; }MultiSample 仅客户端
csharp
public int MultiSample { get; }AutoResolve 仅客户端
csharp
public bool AutoResolve { get; }NumViewports 仅客户端
csharp
public uint NumViewports { get; set; }获取或设置此 RenderSurface 上的 viewport 数量。
UpdateMode 仅客户端
csharp
public RenderSurfaceUpdateMode UpdateMode { get; set; }设置 RenderSurface 的更新模式。
LinkedRenderTarget 仅客户端
csharp
public RenderSurface? LinkedRenderTarget { get; set; }LinkedDepthStencil 仅客户端
csharp
public RenderSurface? LinkedDepthStencil { get; set; }IsUpdateQueued 仅客户端
csharp
public bool IsUpdateQueued { get; }IsResolveDirty 仅客户端
csharp
public bool IsResolveDirty { get; }方法
SetViewport 仅客户端
csharp
public void SetViewport(uint index, Viewport? viewport)设置指定索引处的 RenderTarget viewport。
GetViewport 仅客户端
csharp
public Viewport? GetViewport(uint index)获取指定索引处的 RenderTarget viewport。
QueueUpdate 仅客户端
csharp
public void QueueUpdate()手动请求下一帧更新。UpdateMode 为 ManualUpdate 时使用。
ReleaseGpuResources 仅客户端
csharp
public void ReleaseGpuResources()立即释放此 surface 的 GPU 资源。surface 句柄仍存在,但在父纹理重建前不可渲染。
RenderSurfaceUpdateMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum RenderSurfaceUpdateMode枚举值
ManualUpdateUpdateVisibleUpdateAlways
RenderTargetDescription 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct RenderTargetDescription : IEquatable<RenderTargetDescription>构造函数
RenderTargetDescription 仅客户端
csharp
public RenderTargetDescription(UTF8String Name, UTF8String Tag, uint Format, float Width, float Height, RenderTargetSizeMode SizeMode = RenderTargetSizeMode.Absolute, int MultiSample = 1, bool AutoResolve = true, bool Enabled = true, bool Cubemap = false, bool Filtered = false, bool SRGB = false, bool Persistent = false, bool ComputeWrite = false)属性
Name 仅客户端
csharp
public UTF8String Name { get; init; }Tag 仅客户端
csharp
public UTF8String Tag { get; init; }Format 仅客户端
csharp
public uint Format { get; init; }Width 仅客户端
csharp
public float Width { get; init; }Height 仅客户端
csharp
public float Height { get; init; }SizeMode 仅客户端
csharp
public RenderTargetSizeMode SizeMode { get; init; }MultiSample 仅客户端
csharp
public int MultiSample { get; init; }AutoResolve 仅客户端
csharp
public bool AutoResolve { get; init; }Enabled 仅客户端
csharp
public bool Enabled { get; init; }Cubemap 仅客户端
csharp
public bool Cubemap { get; init; }Filtered 仅客户端
csharp
public bool Filtered { get; init; }SRGB 仅客户端
csharp
public bool SRGB { get; init; }Persistent 仅客户端
csharp
public bool Persistent { get; init; }ComputeWrite 仅客户端
csharp
public bool ComputeWrite { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(RenderTargetDescription left, RenderTargetDescription right)operator == 仅客户端
csharp
public static bool operator ==(RenderTargetDescription left, RenderTargetDescription right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(RenderTargetDescription other)Deconstruct 仅客户端
csharp
public void Deconstruct(out UTF8String Name, out UTF8String Tag, out uint Format, out float Width, out float Height, out RenderTargetSizeMode SizeMode, out int MultiSample, out bool AutoResolve, out bool Enabled, out bool Cubemap, out bool Filtered, out bool SRGB, out bool Persistent, out bool ComputeWrite)RenderTargetFormat 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum RenderTargetFormatPixel format used by an explicitly configured RenderTarget. RGBA formats preserve an alpha channel for transparent compositing.
枚举值
Rgba8Rgba16FRgba32FRgb8Rg11B10
RenderTargetSizeMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum RenderTargetSizeMode枚举值
AbsoluteViewportDivisorViewportMultiplier
Resource 双端
命名空间 GameGraph.ResourceSystem
csharp
public abstract class Resource : EngineObject属性
Name 仅客户端
csharp
public UTF8String Name { get; }NameHash 仅客户端
csharp
public uint NameHash { get; }MemoryUse 仅客户端
csharp
public uint MemoryUse { get; }方法
LoadFile 仅客户端
csharp
public bool LoadFile(UTF8String fileName)SaveFile 仅客户端
csharp
public bool SaveFile(UTF8String fileName)ResourceCache 双端
命名空间 GameGraph.ResourceSystem
csharp
public static class ResourceCache属性
AutoReloadResources 仅客户端
csharp
public static bool AutoReloadResources { get; set; }ReturnFailedResources 仅客户端
csharp
public static bool ReturnFailedResources { get; set; }SearchPackagesFirst 仅客户端
csharp
public static bool SearchPackagesFirst { get; set; }FinishBackgroundResourcesMs 仅客户端
csharp
public static int FinishBackgroundResourcesMs { get; set; }NumBackgroundLoadResources 仅客户端
csharp
public static uint NumBackgroundLoadResources { get; }TotalMemoryUse 仅客户端
csharp
public static ulong TotalMemoryUse { get; }方法
GetResource 双端
csharp
public static T? GetResource<T>(string path) where T : Resource获取资产
path— 资产路径
返回:
AddResourceDir 仅客户端
csharp
public static bool AddResourceDir(UTF8String path, bool append = true)ReleaseAllResources 仅客户端
csharp
public static void ReleaseAllResources(bool force = false)ReloadResource 仅客户端
csharp
public static bool ReloadResource(Resource resource, bool update = true)ReloadResourceWithDependencies 仅客户端
csharp
public static void ReloadResourceWithDependencies(UTF8String fileName)SetMemoryBudget 仅客户端
csharp
public static void SetMemoryBudget(UTF8String type, ulong budget)GetExistingResource 仅客户端
csharp
public static T? GetExistingResource<T>(UTF8String type, UTF8String name) where T : ResourceBackgroundLoadResource 仅客户端
csharp
public static bool BackgroundLoadResource(UTF8String type, UTF8String name, bool sendEventOnFailure = true)Exists 仅客户端
csharp
public static bool Exists(UTF8String name)GetMemoryBudget 仅客户端
csharp
public static ulong GetMemoryBudget(UTF8String type)GetMemoryUse 仅客户端
csharp
public static ulong GetMemoryUse(UTF8String type)GetResourceFileName 仅客户端
csharp
public static UTF8String GetResourceFileName(UTF8String name)GetPreferredResourceDir 仅客户端
csharp
public static UTF8String GetPreferredResourceDir(UTF8String path)SanitateResourceName 仅客户端
csharp
public static UTF8String SanitateResourceName(UTF8String name)SanitateResourceDirName 仅客户端
csharp
public static UTF8String SanitateResourceDirName(UTF8String name)ReleaseResource 仅客户端
csharp
public static void ReleaseResource(UTF8String type, UTF8String name, bool force = false)Shader 双端
命名空间 GameGraph.ResourceSystem
csharp
public class Shader : ResourceTechnique native handle retained for source and binary compatibility.
备注
This type loads Technique XML rather than shader source. New code should use Technique.
构造函数
Shader 双端
csharp
public Shader()属性
Path 双端
csharp
public UTF8String Path { get; }DefaultShader 双端
csharp
public static Shader DefaultShader { get; }方法
PropertyToID 双端
csharp
public static uint PropertyToID(string propertyName)材质参数名字转id
propertyName— 材质参数名
返回: 材质参数id
Find 双端
csharp
public static Shader? Find(UTF8String shaderPath)从已有资产里查找 Technique XML。
shaderPath— Technique XML 路径。
返回: 兼容 Shader 句柄。
ShadingModel 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ShadingModel枚举值
CustomLambertPBSBakeWaterSingleLayerWaterFocusClip
SoundResource 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public class SoundResource : Resource音频资源(WAV/OGG)
构造函数
SoundResource 仅客户端
csharp
public SoundResource()属性
Length 仅客户端
csharp
public float Length { get; }DataSize 仅客户端
csharp
public uint DataSize { get; }SampleSize 仅客户端
csharp
public uint SampleSize { get; }Frequency 仅客户端
csharp
public float Frequency { get; }IntegerFrequency 仅客户端
csharp
public uint IntegerFrequency { get; }IsSixteenBit 仅客户端
csharp
public bool IsSixteenBit { get; }IsStereo 仅客户端
csharp
public bool IsStereo { get; }IsCompressed 仅客户端
csharp
public bool IsCompressed { get; }IsLooped 仅客户端
csharp
public bool IsLooped { get; set; }方法
Load 仅客户端
csharp
public static SoundResource? Load(Sound path)从路径加载音频文件
SetFormat 仅客户端
csharp
public void SetFormat(uint frequency, bool sixteenBit, bool stereo)SetSize 仅客户端
csharp
public void SetSize(uint dataSize)SetData 仅客户端
csharp
public void SetData(ReadOnlySpan<byte> data)GetData 仅客户端
csharp
public byte[] GetData()LoadRaw 仅客户端
csharp
public bool LoadRaw(ReadOnlySpan<byte> data)LoadWav 仅客户端
csharp
public bool LoadWav(ReadOnlySpan<byte> data)LoadOggVorbis 仅客户端
csharp
public bool LoadOggVorbis(ReadOnlySpan<byte> data)SetLoop 仅客户端
csharp
public void SetLoop(uint repeatOffset, uint endOffset)FixInterpolation 仅客户端
csharp
public void FixInterpolation()Sprite2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Sprite2D : ResourceUrho2D sprite resource used by StaticSprite2D.
备注
Sprite2D is for a single texture sprite. For Spriter or Spine animation, load AnimationSet2D and assign it to an AnimatedSprite2D.
属性
Texture 仅客户端
csharp
public Texture2D? Texture { get; set; }Texture backing this sprite.
Rectangle 仅客户端
csharp
public Rectangle Rectangle { get; set; }Pixel rectangle within the backing texture.
HotSpot 仅客户端
csharp
public Vector2 HotSpot { get; set; }Normalized sprite hot spot.
Offset 仅客户端
csharp
public Point Offset { get; set; }Pixel offset applied to trimmed sprites.
TextureEdgeOffset 仅客户端
csharp
public float TextureEdgeOffset { get; set; }Texture edge offset used to avoid filtering artifacts.
SpriteSheet 仅客户端
csharp
public SpriteSheet2D? SpriteSheet { get; set; }Sprite sheet that owns this sprite, when applicable.
方法
Load 仅客户端
csharp
public static Sprite2D? Load(string path)Loads a 2D sprite resource from the engine resource cache.
path— Resource path. For a project file placed atres/icon/coin.png, pass"icon/coin.png".
返回: The loaded sprite, or null if the resource cannot be found or decoded.
SpriteSheet2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class SpriteSheet2D : ResourceClient-side Urho2D sprite sheet resource.
属性
Texture 仅客户端
csharp
public Texture2D? Texture { get; set; }方法
Load 仅客户端
csharp
public static SpriteSheet2D? Load(string path)Loads a sprite sheet from the client resource cache.
GetSprite 仅客户端
csharp
public Sprite2D? GetSprite(string name)Gets a named sprite from this sheet.
DefineSprite 仅客户端
csharp
public void DefineSprite(string name, Rectangle rectangle, Vector2? hotSpot = null, Size? originSize = null)Defines or replaces a named sprite in this sheet.
Technique 双端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Technique材质使用的 Technique XML 渲染方案。
备注
Technique 描述 pass、混合、深度状态以及顶点/像素 shader 变体, 本身不是真正的 shader 源码或运行时编译产物。
构造函数
Technique 仅客户端
csharp
public Technique()属性
Path 双端
csharp
public UTF8String Path { get; }Technique XML 资源路径。
DefaultTechnique 双端
csharp
public static Technique DefaultTechnique { get; }引擎默认 Technique。
IsDesktop 仅客户端
csharp
public bool IsDesktop { get; set; }IsSupported 仅客户端
csharp
public bool IsSupported { get; }ShaderLabName 仅客户端
csharp
public UTF8String ShaderLabName { get; set; }ShadingModel 仅客户端
csharp
public ShadingModel ShadingModel { get; set; }CanBeTransparent 仅客户端
csharp
public bool CanBeTransparent { get; }NumPasses 仅客户端
csharp
public uint NumPasses { get; }方法
PropertyToID 双端
csharp
public static uint PropertyToID(string propertyName)将材质参数名称转换为运行时属性 ID。
Find 双端
csharp
public static Technique? Find(UTF8String techniquePath)从已有资产中查找 Technique XML。
Clone 仅客户端
csharp
public Technique Clone(UTF8String cloneName = default(UTF8String))CreatePass 仅客户端
csharp
public Pass CreatePass(UTF8String name)RemovePass 仅客户端
csharp
public void RemovePass(UTF8String name)HasPass 仅客户端
csharp
public bool HasPass(UTF8String name)HasPass 仅客户端
csharp
public bool HasPass(uint index)GetPass 仅客户端
csharp
public Pass? GetPass(UTF8String name, bool supportedOnly = false)GetPass 仅客户端
csharp
public Pass? GetPass(uint index, bool supportedOnly = false)GetPassName 仅客户端
csharp
public UTF8String GetPassName(uint index)GetPasses 仅客户端
csharp
public Pass[] GetPasses(bool supportedOnly = false)ReleaseShaders 仅客户端
csharp
public void ReleaseShaders()IsCompatibleWith 仅客户端
csharp
public bool IsCompatibleWith(Technique other)Texture 双端
命名空间 GameGraph.ResourceSystem
csharp
public abstract class Texture : Resource属性
Format 仅客户端
csharp
public uint Format { get; }IsCompressed 仅客户端
csharp
public bool IsCompressed { get; }Levels 仅客户端
csharp
public uint Levels { get; set; }Width 仅客户端
csharp
public int Width { get; }Height 仅客户端
csharp
public int Height { get; }Components 仅客户端
csharp
public uint Components { get; }FilterMode 仅客户端
csharp
public TextureFilterMode FilterMode { get; set; }Anisotropy 仅客户端
csharp
public uint Anisotropy { get; set; }BorderColor 仅客户端
csharp
public Color BorderColor { get; set; }SRGB 仅客户端
csharp
public bool SRGB { get; set; }MultiSample 仅客户端
csharp
public int MultiSample { get; }AutoResolve 仅客户端
csharp
public bool AutoResolve { get; }IsResolveDirty 仅客户端
csharp
public bool IsResolveDirty { get; }LevelsDirty 仅客户端
csharp
public bool LevelsDirty { get; }BackupTexture 仅客户端
csharp
public Texture? BackupTexture { get; set; }Usage 仅客户端
csharp
public TextureUsage Usage { get; }方法
GetAddressMode 仅客户端
csharp
public TextureAddressMode GetAddressMode(TextureCoordinate coordinate)SetAddressMode 仅客户端
csharp
public void SetAddressMode(TextureCoordinate coordinate, TextureAddressMode mode)GetMipsToSkip 仅客户端
csharp
public int GetMipsToSkip(MaterialQuality materialQuality)GetLevelWidth 仅客户端
csharp
public int GetLevelWidth(uint level)GetLevelHeight 仅客户端
csharp
public int GetLevelHeight(uint level)GetDataSize 仅客户端
csharp
public uint GetDataSize(int width, int height)GetDataSize 仅客户端
csharp
public uint GetDataSize(int width, int height, int depth)GetRowDataSize 仅客户端
csharp
public uint GetRowDataSize(int width)Texture2D 双端
命名空间 GameGraph.ResourceSystem
csharp
public class Texture2D : Texture属性
RenderSurface 仅客户端
csharp
public RenderSurface? RenderSurface { get; }获取此 RenderTarget 纹理对应的 RenderSurface。
方法
Load 双端
csharp
public static Texture2D? Load(GameCore.ResourceType.Texture texturePath)CreateRenderTarget 仅客户端
csharp
public static Texture2D? CreateRenderTarget(int width, int height, bool highDynamicRange = true, int multiSample = 1, bool autoResolve = true)创建一张可作为 RenderTarget 使用的 Texture2D。
width— 纹理宽度,单位像素。height— 纹理高度,单位像素。highDynamicRange— true 使用 RG11B10,false 使用 RGB。multiSample— MSAA 采样数,1 表示关闭。autoResolve— 多重采样时是否自动 resolve。
CreateRenderTarget 仅客户端
csharp
public static Texture2D? CreateRenderTarget(int width, int height, RenderTargetFormat format, int multiSample = 1, bool autoResolve = true)创建一张使用显式像素格式的 RenderTarget。需要透明混合时使用 RGBA 格式。
width— 纹理宽度,单位像素。height— 纹理高度,单位像素。format— RenderTarget 像素格式;透明 UI 通常使用 RGBA8。multiSample— MSAA 采样数,1 表示关闭。autoResolve— 多重采样时是否自动 resolve。
ResizeRenderTarget 仅客户端
csharp
public bool ResizeRenderTarget(int width, int height, bool highDynamicRange = true, int multiSample = 1, bool autoResolve = true)重新设置 RenderTarget 纹理尺寸。会重建 native RenderSurface。
ResizeRenderTarget 仅客户端
csharp
public bool ResizeRenderTarget(int width, int height, RenderTargetFormat format, int multiSample = 1, bool autoResolve = true)使用显式像素格式重新设置 RenderTarget 纹理尺寸。
CreateFromImage 仅客户端
csharp
public static Texture2D? CreateFromImage(Image image, bool useAlpha = false, bool sRgb = false, uint mipLevels = 0u)Creates a runtime texture and uploads the pixels from . Dispose the returned texture when it is no longer needed.
image— The CPU image whose pixels are uploaded to the texture.useAlpha— Whether a single-component image should be uploaded as an alpha texture.sRgb— Whether to create the GPU texture in the sRGB color space.mipLevels— Requested mip count. Zero generates the full mip chain; one disables mip generation.
返回: The uploaded texture, or null when the upload fails.
备注
This creates a transient runtime texture. Use Texture) for published texture resources.
SetSize 仅客户端
csharp
public bool SetSize(int width, int height, uint format, TextureUsage usage = TextureUsage.Static, int multiSample = 1, bool autoResolve = true)SetData 仅客户端
csharp
public bool SetData(Image image, bool useAlpha = false)GetImage 仅客户端
csharp
public Image? GetImage(float gamma = 1f)Texture2DArray 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Texture2DArray : Texture构造函数
Texture2DArray 仅客户端
csharp
public Texture2DArray()属性
Layers 仅客户端
csharp
public uint Layers { get; set; }RenderSurface 仅客户端
csharp
public RenderSurface? RenderSurface { get; }方法
SetSize 仅客户端
csharp
public bool SetSize(uint layers, int width, int height, uint format, TextureUsage usage = TextureUsage.Static)SetData 仅客户端
csharp
public bool SetData(uint layer, Image image, bool useAlpha = false)Texture3D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Texture3D : Texture构造函数
Texture3D 仅客户端
csharp
public Texture3D()方法
SetSize 仅客户端
csharp
public bool SetSize(int width, int height, int depth, uint format, TextureUsage usage = TextureUsage.Static)SetData 仅客户端
csharp
public bool SetData(Image image, bool useAlpha = false)TextureAddressMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum TextureAddressMode枚举值
WrapMirrorClampBorder
TextureCoordinate 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum TextureCoordinate枚举值
UVW
TextureCube 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class TextureCube : Texture构造函数
TextureCube 仅客户端
csharp
public TextureCube()方法
SetSize 仅客户端
csharp
public bool SetSize(int size, uint format, TextureUsage usage = TextureUsage.Static, int multiSample = 1)SetData 仅客户端
csharp
public bool SetData(CubeMapFace face, Image image, bool useAlpha = false)GetImage 仅客户端
csharp
public Image? GetImage(CubeMapFace face)GetRenderSurface 仅客户端
csharp
public RenderSurface? GetRenderSurface(CubeMapFace face)TextureFilterMode 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum TextureFilterMode枚举值
NearestBilinearTrilinearAnisotropicNearestAnisotropicDefault
TextureUsage 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum TextureUsage枚举值
StaticDynamicRenderTargetDepthStencil
Tile2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class Tile2D : EngineObjectRead-only tile data returned by a tile map layer.
属性
Gid 仅客户端
csharp
public uint Gid { get; }FlipX 仅客户端
csharp
public bool FlipX { get; }FlipY 仅客户端
csharp
public bool FlipY { get; }SwapXY 仅客户端
csharp
public bool SwapXY { get; }Sprite 仅客户端
csharp
public Sprite2D? Sprite { get; }方法
HasProperty 仅客户端
csharp
public bool HasProperty(UTF8String name)GetProperty 仅客户端
csharp
public UTF8String GetProperty(UTF8String name)TileMapObject2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class TileMapObject2D : EngineObjectRead-only object geometry and metadata from an object-group layer.
属性
ObjectType 仅客户端
csharp
public TileMapObjectKind ObjectType { get; }Name 仅客户端
csharp
public UTF8String Name { get; }Type 仅客户端
csharp
public UTF8String Type { get; }Position 仅客户端
csharp
public Vector2 Position { get; }Size 仅客户端
csharp
public Vector2 Size { get; }PointCount 仅客户端
csharp
public uint PointCount { get; }TileGid 仅客户端
csharp
public uint TileGid { get; }TileFlipX 仅客户端
csharp
public bool TileFlipX { get; }TileFlipY 仅客户端
csharp
public bool TileFlipY { get; }TileSwapXY 仅客户端
csharp
public bool TileSwapXY { get; }TileSprite 仅客户端
csharp
public Sprite2D? TileSprite { get; }方法
GetPoint 仅客户端
csharp
public Vector2 GetPoint(uint index)HasProperty 仅客户端
csharp
public bool HasProperty(UTF8String name)GetProperty 仅客户端
csharp
public UTF8String GetProperty(UTF8String name)TmxFile2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class TmxFile2D : ResourceClient-side TMX tile-map resource. Loading and XML/file access stay in the client resource cache; this wrapper only exposes the already-loaded data.
属性
Info 仅客户端
csharp
public TileMapInfo Info { get; }LayerCount 仅客户端
csharp
public uint LayerCount { get; }SpriteTextureEdgeOffset 仅客户端
csharp
public float SpriteTextureEdgeOffset { get; set; }方法
Load 仅客户端
csharp
public static TmxFile2D? Load(string path)Loads a TMX resource from the client resource cache.
path— Resource path below the project's res directory, including .tmx.
返回: The loaded map, or null when the file or its dependencies cannot be loaded.
备注
ClientRuntimeFeature.TmxFile2DModernLoading requires client capability 7 and enables finite TMX 1.x maps (including 1.11), Base64 zlib/gzip/zstd tile data, and TSX-relative images. Check ClientEnvironment.Runtime.Supports before relying on these formats on older clients. Infinite maps, group layers, animated tiles and object templates are unsupported. Loading does not display the map; assign it to a TileMap2DComponent attached to a node.
SetInfo 仅客户端
csharp
public bool SetInfo(TileMapOrientation orientation, int width, int height, float tileWidth, float tileHeight)GetLayer 仅客户端
csharp
public TmxLayer2D? GetLayer(uint index)GetTileSprite 仅客户端
csharp
public Sprite2D? GetTileSprite(uint gid)GetTilePropertySet 仅客户端
csharp
public PropertySet2D? GetTilePropertySet(uint gid)TmxLayer2D 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class TmxLayer2D : EngineObjectRead-only metadata for a loaded TMX layer.
属性
TmxFile 仅客户端
csharp
public TmxFile2D? TmxFile { get; }Type 仅客户端
csharp
public TileMapLayerKind Type { get; }Name 仅客户端
csharp
public UTF8String Name { get; }Width 仅客户端
csharp
public int Width { get; }Height 仅客户端
csharp
public int Height { get; }IsVisible 仅客户端
csharp
public bool IsVisible { get; }方法
HasProperty 仅客户端
csharp
public bool HasProperty(UTF8String name)GetProperty 仅客户端
csharp
public UTF8String GetProperty(UTF8String name)ValueAnimation 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class ValueAnimation : ResourceClient-only Urho ValueAnimation resource. Variant payloads use GameCore's portable (type, textual value) representation, so no native Variant or VariantMap pointer escapes the client boundary.
备注
Scalar, vector, color, quaternion, matrix, rectangle, buffer and resource reference values can be authored from text. Native VariantMap, VariantVector, StringVector, pointer and custom values are not accepted by Variant); read snapshots report HasTextValue=false when Urho cannot serialize the native value without an owned handle. Event-frame VariantMap payloads intentionally remain native-only.
构造函数
ValueAnimation 仅客户端
csharp
public ValueAnimation()属性
InterpolationMethod 仅客户端
csharp
public ValueAnimationInterpolation InterpolationMethod { get; set; }SplineTension 仅客户端
csharp
public float SplineTension { get; set; }ValueType 仅客户端
csharp
public VariantType ValueType { get; set; }IsValid 仅客户端
csharp
public new bool IsValid { get; }BeginTime 仅客户端
csharp
public float BeginTime { get; }EndTime 仅客户端
csharp
public float EndTime { get; }HasEventFrames 仅客户端
csharp
public bool HasEventFrames { get; }IsEnabled 仅客户端
csharp
public bool IsEnabled { get; }NumKeyFrames 仅客户端
csharp
public uint NumKeyFrames { get; }NumEventFrames 仅客户端
csharp
public uint NumEventFrames { get; }方法
Load 仅客户端
csharp
public static ValueAnimation? Load(string path)Loads a ValueAnimation resource from the client resource cache.
SetCubicBezierParams 仅客户端
csharp
public void SetCubicBezierParams(float x1, float y1, float x2, float y2)SetKeyFrame 仅客户端
csharp
public bool SetKeyFrame(float time, Variant value)GetKeyFrame 仅客户端
csharp
public ValueAnimationKeyFrame? GetKeyFrame(uint index)GetAnimationValue 仅客户端
csharp
public ValueAnimationSample? GetAnimationValue(float scaledTime)SetEventFrame 仅客户端
csharp
public void SetEventFrame(float time, uint eventType)Adds an event frame with an empty event-data map. Use the event type hash that the receiving client-side event dispatcher expects.
GetEventFrame 仅客户端
csharp
public ValueAnimationEventFrame? GetEventFrame(uint index)ValueAnimationEventFrame 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct ValueAnimationEventFrame : IEquatable<ValueAnimationEventFrame>Event-frame metadata copied by value from native storage.
构造函数
ValueAnimationEventFrame 仅客户端
csharp
public ValueAnimationEventFrame(float Time, uint EventType)Event-frame metadata copied by value from native storage.
属性
Time 仅客户端
csharp
public float Time { get; init; }EventType 仅客户端
csharp
public uint EventType { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(ValueAnimationEventFrame left, ValueAnimationEventFrame right)operator == 仅客户端
csharp
public static bool operator ==(ValueAnimationEventFrame left, ValueAnimationEventFrame right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(ValueAnimationEventFrame other)Deconstruct 仅客户端
csharp
public void Deconstruct(out float Time, out uint EventType)ValueAnimationInterpolation 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum ValueAnimationInterpolationInterpolation mode used by a ValueAnimation.
枚举值
NoneLinearSplineCubicBezier
ValueAnimationKeyFrame 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct ValueAnimationKeyFrame : IEquatable<ValueAnimationKeyFrame>A value-animation key frame copied by value from native storage.
构造函数
ValueAnimationKeyFrame 仅客户端
csharp
public ValueAnimationKeyFrame(float Time, Variant Value, bool HasTextValue)A value-animation key frame copied by value from native storage.
属性
Time 仅客户端
csharp
public float Time { get; init; }Value 仅客户端
csharp
public Variant Value { get; init; }HasTextValue 仅客户端
csharp
public bool HasTextValue { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(ValueAnimationKeyFrame left, ValueAnimationKeyFrame right)operator == 仅客户端
csharp
public static bool operator ==(ValueAnimationKeyFrame left, ValueAnimationKeyFrame right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(ValueAnimationKeyFrame other)Deconstruct 仅客户端
csharp
public void Deconstruct(out float Time, out Variant Value, out bool HasTextValue)ValueAnimationSample 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public readonly struct ValueAnimationSample : IEquatable<ValueAnimationSample>A sampled value plus whether its textual payload is available.
构造函数
ValueAnimationSample 仅客户端
csharp
public ValueAnimationSample(Variant Value, bool HasTextValue)A sampled value plus whether its textual payload is available.
属性
Value 仅客户端
csharp
public Variant Value { get; init; }HasTextValue 仅客户端
csharp
public bool HasTextValue { get; init; }方法
ToString 仅客户端
csharp
public override string ToString()operator != 仅客户端
csharp
public static bool operator !=(ValueAnimationSample left, ValueAnimationSample right)operator == 仅客户端
csharp
public static bool operator ==(ValueAnimationSample left, ValueAnimationSample right)GetHashCode 仅客户端
csharp
public override int GetHashCode()Equals 仅客户端
csharp
public override bool Equals(object obj)Equals 仅客户端
csharp
public bool Equals(ValueAnimationSample other)Deconstruct 仅客户端
csharp
public void Deconstruct(out Variant Value, out bool HasTextValue)VideoPlaybackState 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public enum VideoPlaybackStateNative video playback state.
枚举值
StoppedPlayingPausedEnded
VideoPlayer 仅客户端
命名空间 GameGraph.ResourceSystem
csharp
public sealed class VideoPlayer : EngineObjectPlays a video stored under the current project's res directory.
属性
Volume 仅客户端
csharp
public float Volume { get; set; }IsMuted 仅客户端
csharp
public bool IsMuted { get; set; }IsLooping 仅客户端
csharp
public bool IsLooping { get; set; }PlaybackRate 仅客户端
csharp
public float PlaybackRate { get; set; }CurrentTime 仅客户端
csharp
public float CurrentTime { get; }Duration 仅客户端
csharp
public float Duration { get; }State 仅客户端
csharp
public VideoPlaybackState State { get; }IsReady 仅客户端
csharp
public bool IsReady { get; }IsPlaying 仅客户端
csharp
public bool IsPlaying { get; }IsAsyncLoading 仅客户端
csharp
public bool IsAsyncLoading { get; }Width 仅客户端
csharp
public int Width { get; }Height 仅客户端
csharp
public int Height { get; }Texture 仅客户端
csharp
public Texture2D? Texture { get; }Dynamic texture containing the latest decoded frame.
方法
Create 仅客户端
csharp
public static VideoPlayer? Create()Creates an empty player for Int32). Dispose it when finished.
Load 仅客户端
csharp
public static VideoPlayer? Load(string resourcePath)Loads a project video. The path is relative to res/, for example video/intro.mp4.
返回: The ready player, or null when the resource cannot be opened or decoded.
Load 仅客户端
csharp
public static VideoPlayer? Load(string resourcePath, int width, int height)Loads a project video with an explicit initial texture size. Zero lets the decoder choose the texture size from video metadata.
BeginLoadAsync 仅客户端
csharp
public bool BeginLoadAsync(string resourcePath, int width = 0, int height = 0)Starts non-blocking video loading. Poll IsAsyncLoading and then inspect IsReady or State.
Play 仅客户端
csharp
public void Play()Pause 仅客户端
csharp
public void Pause()Stop 仅客户端
csharp
public void Stop()Seek 仅客户端
csharp
public void Seek(float time)Update 仅客户端
csharp
public void Update()Forces one decoder/texture synchronization tick.