mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 02:36:56 +08:00
Merge branch '3.8' into 4.0-beta
This commit is contained in:
commit
bb239c326e
@ -236,7 +236,9 @@ namespace Spine.Unity.Editor {
|
|||||||
if (string.IsNullOrEmpty(textureSettingsRef.stringValue)) {
|
if (string.IsNullOrEmpty(textureSettingsRef.stringValue)) {
|
||||||
var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
|
var pmaTextureSettingsReferenceGUIDS = AssetDatabase.FindAssets("PMATexturePreset");
|
||||||
if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
|
if (pmaTextureSettingsReferenceGUIDS.Length > 0) {
|
||||||
textureSettingsRef.stringValue = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
|
var assetPath = AssetDatabase.GUIDToAssetPath(pmaTextureSettingsReferenceGUIDS[0]);
|
||||||
|
if (!string.IsNullOrEmpty(assetPath))
|
||||||
|
textureSettingsRef.stringValue = assetPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,10 @@
|
|||||||
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* THE SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#if UNITY_2019_3_OR_NEWER
|
||||||
|
#define MESH_SET_TRIANGLES_PROVIDES_LENGTH_PARAM
|
||||||
|
#endif
|
||||||
|
|
||||||
// Not for optimization. Do not disable.
|
// Not for optimization. Do not disable.
|
||||||
#define SPINE_TRIANGLECHECK // Avoid calling SetTriangles at the cost of checking for mesh differences (vertex counts, memberwise attachment list compare) every frame.
|
#define SPINE_TRIANGLECHECK // Avoid calling SetTriangles at the cost of checking for mesh differences (vertex counts, memberwise attachment list compare) every frame.
|
||||||
//#define SPINE_DEBUG
|
//#define SPINE_DEBUG
|
||||||
@ -1117,7 +1121,11 @@ namespace Spine.Unity {
|
|||||||
mesh.subMeshCount = submeshCount;
|
mesh.subMeshCount = submeshCount;
|
||||||
|
|
||||||
for (int i = 0; i < submeshCount; i++)
|
for (int i = 0; i < submeshCount; i++)
|
||||||
|
#if MESH_SET_TRIANGLES_PROVIDES_LENGTH_PARAM
|
||||||
|
mesh.SetTriangles(submeshesItems[i].Items, 0, submeshesItems[i].Count, i, false);
|
||||||
|
#else
|
||||||
mesh.SetTriangles(submeshesItems[i].Items, i, false);
|
mesh.SetTriangles(submeshesItems[i].Items, i, false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user