[unity] SkeletonRenderer.SetMeshSettings

This commit is contained in:
pharan 2017-08-23 18:36:05 +08:00
parent 3a1b77871f
commit 4d89539b1b

View File

@ -61,13 +61,14 @@ namespace Spine.Unity {
public bool useClipping = true;
public bool immutableTriangles = false;
public bool pmaVertexColors = true;
/// <summary>Clears the state when this component or its GameObject is disabled. This prevents previous state from being retained when it is enabled again. When pooling your skeleton, setting this to true can be helpful.</summary>
public bool clearStateOnDisable = false;
public bool tintBlack = false;
public bool singleSubmesh = false;
[UnityEngine.Serialization.FormerlySerializedAs("calculateNormals")]
public bool addNormals;
public bool calculateTangents;
public bool addNormals = false;
public bool calculateTangents = false;
public bool logErrors = false;
@ -134,6 +135,18 @@ namespace Spine.Unity {
}
return c;
}
/// <summary>Applies MeshGenerator settings to the SkeletonRenderer and its internal MeshGenerator.</summary>
public void SetMeshSettings (MeshGenerator.Settings settings) {
this.calculateTangents = settings.calculateTangents;
this.immutableTriangles = settings.immutableTriangles;
this.pmaVertexColors = settings.pmaVertexColors;
this.tintBlack = settings.tintBlack;
this.useClipping = settings.useClipping;
this.zSpacing = settings.zSpacing;
this.meshGenerator.settings = settings;
}
#endregion
public virtual void Awake () {