mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-28 04:31:27 +08:00
[unity] Updated docs.
This commit is contained in:
parent
ad8964380e
commit
d7eff92375
@ -73,7 +73,7 @@ namespace Spine.Unity {
|
||||
bool skeletonTransformIsParent;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the target bone by its bone name. Returns false if no bone was found.</summary>
|
||||
/// Sets the target bone by its bone name. Returns false if no bone was found. To set the bone by reference, use BoneFollower.bone directly.</summary>
|
||||
public bool SetBone (string name) {
|
||||
bone = skeletonRenderer.skeleton.FindBone(name);
|
||||
if (bone == null) {
|
||||
|
||||
@ -126,11 +126,16 @@ namespace Spine.Unity {
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Clears the previously generated mesh, resets the skeleton's pose, and clears all previously active animations.</summary>
|
||||
public override void ClearState () {
|
||||
base.ClearState();
|
||||
if (state != null) state.ClearTracks();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize this component. Attempts to load the SkeletonData and creates the internal Spine objects and buffers.</summary>
|
||||
/// <param name="overwrite">If set to <c>true</c>, force overwrite an already initialized object.</param>
|
||||
public override void Initialize (bool overwrite) {
|
||||
if (valid && !overwrite)
|
||||
return;
|
||||
|
||||
@ -163,12 +163,17 @@ namespace Spine.Unity {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears the previously generated mesh and resets the skeleton's pose.</summary>
|
||||
public virtual void ClearState () {
|
||||
meshFilter.sharedMesh = null;
|
||||
currentInstructions.Clear();
|
||||
if (skeleton != null) skeleton.SetToSetupPose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize this component. Attempts to load the SkeletonData and creates the internal Skeleton object and buffers.</summary>
|
||||
/// <param name="overwrite">If set to <c>true</c>, it will overwrite internal objects if they were already generated. Otherwise, the initialized component will ignore subsequent calls to initialize.</param>
|
||||
public virtual void Initialize (bool overwrite) {
|
||||
if (valid && !overwrite)
|
||||
return;
|
||||
@ -219,6 +224,8 @@ namespace Spine.Unity {
|
||||
OnRebuild(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Generates a new UnityEngine.Mesh from the internal Skeleton.</summary>
|
||||
public virtual void LateUpdate () {
|
||||
if (!valid) return;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user