Browse Source

[unity] Updated docs.

pharan 7 years ago
parent
commit
d7eff92375

+ 1 - 1
spine-unity/Assets/spine-unity/BoneFollower.cs

@@ -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) {

+ 5 - 0
spine-unity/Assets/spine-unity/SkeletonAnimation.cs

@@ -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;

+ 7 - 0
spine-unity/Assets/spine-unity/SkeletonRenderer.cs

@@ -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;