Эх сурвалжийг харах

[unity] Added experimental package com.esotericsoftware.spine.ui-toolkit to support UI Toolkit. See #1943.

Harald Csaszar 1 жил өмнө
parent
commit
af57e96f91
31 өөрчлөгдсөн 2194 нэмэгдсэн , 0 устгасан
  1. 26 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/LICENSE.md
  2. 7 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/LICENSE.md.meta
  3. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime.meta
  4. 88 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/MeshGeneratorUIElements.cs
  5. 11 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/MeshGeneratorUIElements.cs.meta
  6. 355 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/SpineVisualElement.cs
  7. 11 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/SpineVisualElement.cs.meta
  8. 17 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/spine-ui-toolkit.asmdef
  9. 7 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/spine-ui-toolkit.asmdef.meta
  10. 43 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/PaneSettings.asset
  11. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/PaneSettings.asset.meta
  12. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons.meta
  13. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor.meta
  14. 716 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro.json
  15. 7 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro.json.meta
  16. 31 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro_SkeletonData.asset
  17. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro_SkeletonData.asset.meta
  18. 93 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.atlas.txt
  19. 7 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.atlas.txt.meta
  20. BIN
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.png
  21. 228 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.png.meta
  22. 19 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Atlas.asset
  23. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Atlas.asset.meta
  24. 48 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Material.mat
  25. 8 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Material.mat.meta
  26. 11 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/SpineUIToolkit.uxml
  27. 10 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/SpineUIToolkit.uxml.meta
  28. 361 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/UI Toolkit Example.unity
  29. 7 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/UI Toolkit Example.unity.meta
  30. 28 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/package.json
  31. 7 0
      spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/package.json.meta

+ 26 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/LICENSE.md

@@ -0,0 +1,26 @@
+# Spine Runtimes License Agreement
+Last updated July 28, 2023. Replaces all prior versions.
+
+Copyright (c) 2013-2024, Esoteric Software LLC
+
+Integration of the Spine Runtimes into software or otherwise creating
+derivative works of the Spine Runtimes is permitted under the terms and
+conditions of Section 2 of the Spine Editor License Agreement:
+http://esotericsoftware.com/spine-editor-license
+
+Otherwise, it is permitted to integrate the Spine Runtimes into software or
+otherwise create derivative works of the Spine Runtimes (collectively,
+"Products"), provided that each user of the Products must obtain their own
+Spine Editor license and redistribution of the Products in any form must
+include this license and copyright notice.
+
+THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
+BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
+SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 7 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/LICENSE.md.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 6e04c0aa848c6c948b5754273be3109a
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e61fb760177df754d83776c975e4ed64
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 88 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/MeshGeneratorUIElements.cs

@@ -0,0 +1,88 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated July 28, 2023. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2024, Esoteric Software LLC
+ *
+ * Integration of the Spine Runtimes into software or otherwise creating
+ * derivative works of the Spine Runtimes is permitted under the terms and
+ * conditions of Section 2 of the Spine Editor License Agreement:
+ * http://esotericsoftware.com/spine-editor-license
+ *
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
+ * otherwise create derivative works of the Spine Runtimes (collectively,
+ * "Products"), provided that each user of the Products must obtain their own
+ * Spine Editor license and redistribution of the Products in any form must
+ * include this license and copyright notice.
+ *
+ * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
+ * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *****************************************************************************/
+
+#if UNITY_2018_1_OR_NEWER
+#define HAS_NATIVE_COLLECTIONS
+#endif
+
+using UnityEngine;
+using System;
+using System.Collections.Generic;
+using Unity.Collections;
+
+namespace Spine.Unity {
+
+	/// <summary>Holds several methods to prepare and generate a UnityEngine mesh based on a skeleton. Contains buffers needed to perform the operation, and serializes settings for mesh generation.</summary>
+	[System.Serializable]
+	public class MeshGeneratorUIElements : MeshGenerator {
+
+#if HAS_NATIVE_COLLECTIONS
+		public void FillVertexData (ref NativeSlice<UnityEngine.UIElements.Vertex> uiVertices) {
+
+			var vertexBufferItems = vertexBuffer.Items;
+			var uvBufferItems = uvBuffer.Items;
+			var colorBufferItems = colorBuffer.Items;
+			int vertexBufferLength = vertexBufferItems.Length;
+
+			int vertexCount = vertexBuffer.Count;
+			// Zero the extra.
+			{
+				var vector3zero = Vector3.zero;
+				for (int i = vertexCount; i < vertexBufferLength; i++)
+					vertexBufferItems[i] = vector3zero;
+			}
+
+			// Set the vertex buffer.
+			{
+				for (int i = 0; i < vertexCount; i++) {
+					UnityEngine.UIElements.Vertex uiVertex = uiVertices[i];
+					uiVertex.position = vertexBufferItems[i];
+					uiVertex.tint = colorBufferItems[i];
+					uiVertex.uv = uvBufferItems[i];
+					uiVertices[i] = uiVertex;
+				}
+			}
+		}
+
+		public void FillTrianglesSingleSubmesh (ref NativeSlice<ushort> uiIndices, int submeshIndex = 0) {
+			if (submeshes.Count == 0)
+				return;
+
+			var srcIndices32List = submeshes.Items[submeshIndex];
+			int[] srcIndices32 = srcIndices32List.Items;
+			int srcIndicesCount = srcIndices32List.Count;
+			int dstIndicesCount = uiIndices.Length;
+			for (int i = 0; i < srcIndicesCount; ++i)
+				uiIndices[i] = (ushort)srcIndices32[i];
+			for (int i = srcIndicesCount; i < dstIndicesCount; ++i)
+				uiIndices[i] = 0;
+		}
+#endif // HAS_NATIVE_COLLECTIONS
+	}
+}

+ 11 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/MeshGeneratorUIElements.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5c2de6f891f2d46bf8fdb9cd00bd2862
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 355 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/SpineVisualElement.cs

@@ -0,0 +1,355 @@
+/******************************************************************************
+ * Spine Runtimes License Agreement
+ * Last updated July 28, 2023. Replaces all prior versions.
+ *
+ * Copyright (c) 2013-2024, Esoteric Software LLC
+ *
+ * Integration of the Spine Runtimes into software or otherwise creating
+ * derivative works of the Spine Runtimes is permitted under the terms and
+ * conditions of Section 2 of the Spine Editor License Agreement:
+ * http://esotericsoftware.com/spine-editor-license
+ *
+ * Otherwise, it is permitted to integrate the Spine Runtimes into software or
+ * otherwise create derivative works of the Spine Runtimes (collectively,
+ * "Products"), provided that each user of the Products must obtain their own
+ * Spine Editor license and redistribution of the Products in any form must
+ * include this license and copyright notice.
+ *
+ * THE SPINE RUNTIMES ARE PROVIDED BY ESOTERIC SOFTWARE LLC "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL ESOTERIC SOFTWARE LLC BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES,
+ * BUSINESS INTERRUPTION, OR LOSS OF USE, DATA, OR PROFITS) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
+ * SPINE RUNTIMES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *****************************************************************************/
+
+using System;
+using Unity.Collections;
+using Unity.Jobs;
+using UnityEngine;
+using UnityEngine.Profiling;
+using UnityEngine.UIElements;
+using UIVertex = UnityEngine.UIElements.Vertex;
+
+namespace Spine.Unity {
+
+	[UxmlElement]
+	public partial class SpineVisualElement : VisualElement {
+		public new class UxmlFactory : UxmlFactory<SpineVisualElement, UxmlTraits> { }
+
+		[SpineAnimation(dataField: "SkeletonDataAsset", avoidGenericMenu: true)]
+		[UxmlAttribute]
+		public string StartingAnimation {
+			get { return startingAnimation; }
+			set {
+				if (startingAnimation == value) return;
+				startingAnimation = value;
+#if UNITY_EDITOR
+				if (!Application.isPlaying)
+					Initialize(true);
+#endif
+			}
+		}
+		public string startingAnimation = "";
+
+		[SpineSkin(dataField: "SkeletonDataAsset", avoidGenericMenu: true)]
+		[UxmlAttribute]
+		public string InitialSkinName {
+			get { return initialSkinName; }
+			set {
+				if (initialSkinName == value) return;
+				initialSkinName = value;
+#if UNITY_EDITOR
+				if (!Application.isPlaying)
+					Initialize(true);
+#endif
+			}
+		}
+		public string initialSkinName;
+
+		[UxmlAttribute] public bool startingLoop { get; set; } = true;
+		[UxmlAttribute] public float timeScale { get; set; } = 1.0f;
+
+		[UxmlAttribute]
+		public SkeletonDataAsset SkeletonDataAsset {
+			get { return skeletonDataAsset; }
+			set {
+				if (skeletonDataAsset == value) return;
+				skeletonDataAsset = value;
+#if UNITY_EDITOR
+				if (!Application.isPlaying)
+					Initialize(true);
+#endif
+			}
+		}
+		public SkeletonDataAsset skeletonDataAsset;
+
+		public AnimationState AnimationState {
+			get {
+				Initialize(false);
+				return state;
+			}
+		}
+		public bool freeze { get; set; }
+		public bool unscaledTime { get; set; }
+
+		/// <summary>Update mode to optionally limit updates to e.g. only apply animations but not update the mesh.</summary>
+		public UpdateMode UpdateMode { get { return updateMode; } set { updateMode = value; } }
+		protected UpdateMode updateMode = UpdateMode.FullUpdate;
+
+		protected AnimationState state;
+		protected Skeleton skeleton;
+		protected SkeletonRendererInstruction currentInstructions = new();// to match existing code better
+		protected Spine.Unity.MeshGeneratorUIElements meshGenerator = new MeshGeneratorUIElements();
+
+		protected VisualElement rendererElement;
+		IVisualElementScheduledItem scheduledItem;
+		protected Bounds referenceMeshBounds;
+		protected float scale = 100;
+		protected float offsetX, offsetY;
+
+		bool IsValid { get { return skeleton != null; } }
+
+		public SpineVisualElement () {
+			RegisterCallback<AttachToPanelEvent>(OnAttachedCallback);
+			RegisterCallback<DetachFromPanelEvent>(OnDetatchedCallback);
+
+			rendererElement = new VisualElement();
+			rendererElement.generateVisualContent += GenerateVisualContents;
+			rendererElement.pickingMode = PickingMode.Ignore;
+			rendererElement.style.position = Position.Absolute;
+			rendererElement.style.top = 0;
+			rendererElement.style.left = 0;
+			rendererElement.style.bottom = 0;
+			rendererElement.style.right = 0;
+			Add(rendererElement);
+
+			rendererElement.RegisterCallback<GeometryChangedEvent>(OnGeometryChanged);
+		}
+
+		void OnGeometryChanged (GeometryChangedEvent evt) {
+			AdjustOffsetScaleToMeshBounds(rendererElement);
+		}
+
+		void OnAttachedCallback (AttachToPanelEvent evt) {
+			Initialize(false);
+		}
+
+		void OnDetatchedCallback (DetachFromPanelEvent evt) {
+			ClearElement();
+		}
+
+		public void ClearElement () {
+			skeleton = null;
+			DisposeUISubmeshes();
+		}
+
+		public virtual void Update () {
+#if UNITY_EDITOR
+			if (!Application.isPlaying) {
+				Update(0f);
+				return;
+			}
+#endif
+
+			if (freeze) return;
+			Update(unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime);
+			rendererElement.MarkDirtyRepaint();
+		}
+
+		public virtual void Update (float deltaTime) {
+			if (!this.IsValid) return;
+
+			if (updateMode < UpdateMode.OnlyAnimationStatus)
+				return;
+			UpdateAnimationStatus(deltaTime);
+
+			if (updateMode == UpdateMode.OnlyAnimationStatus)
+				return;
+			ApplyAnimation();
+		}
+
+		protected void UpdateAnimationStatus (float deltaTime) {
+			deltaTime *= timeScale;
+			state.Update(deltaTime);
+			skeleton.Update(deltaTime);
+		}
+
+		protected void ApplyAnimation () {
+
+			if (updateMode != UpdateMode.OnlyEventTimelines)
+				state.Apply(skeleton);
+			else
+				state.ApplyEventTimelinesOnly(skeleton);
+
+			skeleton.UpdateWorldTransform(Skeleton.Physics.Update);
+		}
+
+		void Initialize (bool overwrite) {
+			if (this.IsValid && !overwrite) return;
+
+			if (this.SkeletonDataAsset == null) return;
+			var skeletonData = this.SkeletonDataAsset.GetSkeletonData(false);
+			if (skeletonData == null) return;
+
+			if (SkeletonDataAsset.atlasAssets.Length <= 0 || SkeletonDataAsset.atlasAssets[0].MaterialCount <= 0) return;
+
+			this.state = new Spine.AnimationState(SkeletonDataAsset.GetAnimationStateData());
+			if (state == null) {
+				Clear();
+				return;
+			}
+
+			this.skeleton = new Skeleton(skeletonData) {
+				ScaleX = 1,
+				ScaleY = -1
+			};
+
+			// Set the initial Skin and Animation
+			if (!string.IsNullOrEmpty(initialSkinName))
+				skeleton.SetSkin(initialSkinName);
+
+			if (!string.IsNullOrEmpty(startingAnimation)) {
+				var animationObject = SkeletonDataAsset.GetSkeletonData(false).FindAnimation(startingAnimation);
+				if (animationObject != null) {
+					state.SetAnimation(0, animationObject, startingLoop);
+				}
+			}
+
+			AdjustReferenceMeshBounds();
+			if (scheduledItem == null)
+				scheduledItem = schedule.Execute(Update).Every(1);
+
+			rendererElement.MarkDirtyRepaint();
+		}
+
+		protected class UISubmesh {
+			public NativeArray<UIVertex>? vertices = null;
+			public NativeArray<ushort>? indices = null;
+
+			public NativeSlice<UIVertex> verticesSlice;
+			public NativeSlice<ushort> indicesSlice;
+		}
+		protected readonly ExposedList<UISubmesh> uiSubmeshes = new ExposedList<UISubmesh>();
+
+		protected void GenerateVisualContents (MeshGenerationContext context) {
+			if (!this.IsValid) return;
+
+			MeshGeneratorUIElements.GenerateSkeletonRendererInstruction(currentInstructions, skeleton, null,
+				null,
+				 false,
+				false);
+
+			int submeshCount = currentInstructions.submeshInstructions.Count;
+			PrepareUISubmeshCount(submeshCount);
+
+			// Generate meshes.
+			for (int i = 0; i < submeshCount; i++) {
+				var submeshInstructionItem = currentInstructions.submeshInstructions.Items[i];
+				UISubmesh uiSubmesh = uiSubmeshes.Items[i];
+
+				meshGenerator.Begin();
+				meshGenerator.AddSubmesh(submeshInstructionItem);
+				// clipping is done, vertex counts are final.
+
+				PrepareUISubmesh(uiSubmesh, meshGenerator.VertexCount, meshGenerator.SubmeshIndexCount(0));
+				meshGenerator.FillVertexData(ref uiSubmesh.verticesSlice);
+				meshGenerator.FillTrianglesSingleSubmesh(ref uiSubmesh.indicesSlice);
+
+				var submeshMaterial = submeshInstructionItem.material;
+
+				Texture usedTexture = submeshMaterial.mainTexture;
+
+				FillContext(context, uiSubmesh, usedTexture);
+			}
+		}
+
+		protected void PrepareUISubmeshCount (int targetCount) {
+			int oldCount = uiSubmeshes.Count;
+			uiSubmeshes.EnsureCapacity(targetCount);
+			for (int i = oldCount; i < targetCount; ++i) {
+				uiSubmeshes.Add(new UISubmesh());
+			}
+		}
+
+		protected void PrepareUISubmesh (UISubmesh uiSubmesh, int vertexCount, int indexCount) {
+			bool shallReallocateVertices = uiSubmesh.vertices == null || uiSubmesh.vertices.Value.Length < vertexCount;
+			if (shallReallocateVertices) {
+				int allocationCount = vertexCount;
+				if (uiSubmesh.vertices != null) {
+					allocationCount = Math.Max(vertexCount, 2 * uiSubmesh.vertices.Value.Length);
+					uiSubmesh.vertices.Value.Dispose();
+				}
+				uiSubmesh.vertices = new NativeArray<UIVertex>(allocationCount, Allocator.Persistent, NativeArrayOptions.ClearMemory);
+			}
+			if (shallReallocateVertices || uiSubmesh.verticesSlice.Length != vertexCount) {
+				uiSubmesh.verticesSlice = new NativeSlice<UIVertex>(uiSubmesh.vertices.Value, 0, vertexCount);
+			}
+
+			bool shallReallocateIndices = uiSubmesh.indices == null || uiSubmesh.indices.Value.Length < indexCount;
+			if (shallReallocateIndices) {
+				int allocationCount = indexCount;
+				if (uiSubmesh.indices != null) {
+					allocationCount = Math.Max(indexCount, uiSubmesh.indices.Value.Length * 2);
+					uiSubmesh.indices.Value.Dispose();
+				}
+				uiSubmesh.indices = new NativeArray<ushort>(allocationCount, Allocator.Persistent, NativeArrayOptions.ClearMemory);
+			}
+			if (shallReallocateIndices || uiSubmesh.indicesSlice.Length != indexCount) {
+				uiSubmesh.indicesSlice = new NativeSlice<ushort>(uiSubmesh.indices.Value, 0, indexCount);
+			}
+		}
+
+		protected void DisposeUISubmeshes () {
+			for (int i = 0, count = uiSubmeshes.Count; i < count; ++i) {
+				UISubmesh uiSubmesh = uiSubmeshes.Items[i];
+				if (uiSubmesh.vertices != null) uiSubmesh.vertices.Value.Dispose();
+				if (uiSubmesh.indices != null) uiSubmesh.indices.Value.Dispose();
+			}
+			uiSubmeshes.Clear();
+		}
+
+		void FillContext (MeshGenerationContext context, UISubmesh submesh, Texture texture) {
+			MeshWriteData meshWriteData = context.Allocate(submesh.verticesSlice.Length, submesh.indicesSlice.Length, texture);
+
+			meshWriteData.SetAllVertices(submesh.verticesSlice);
+			meshWriteData.SetAllIndices(submesh.indicesSlice);
+		}
+
+		public void AdjustReferenceMeshBounds () {
+
+			// Need one update to obtain valid mesh bounds
+			Update(0.0f);
+			MeshGeneratorUIElements.GenerateSkeletonRendererInstruction(currentInstructions, skeleton,
+				null, null, false, false);
+			int submeshCount = currentInstructions.submeshInstructions.Count;
+			meshGenerator.Begin();
+
+			for (int i = 0; i < submeshCount; i++) {
+				var submeshInstructionItem = currentInstructions.submeshInstructions.Items[i];
+				meshGenerator.AddSubmesh(submeshInstructionItem);
+			}
+
+			referenceMeshBounds = meshGenerator.GetMeshBounds();
+		}
+
+		void AdjustOffsetScaleToMeshBounds (VisualElement visualElement) {
+			Rect targetRect = visualElement.layout;
+			float xScale = targetRect.width / referenceMeshBounds.size.x;
+			float yScale = targetRect.height / referenceMeshBounds.size.y;
+			this.scale = Math.Min(xScale, yScale);
+			float targetOffsetX = targetRect.width / 2;
+			float targetOffsetY = targetRect.height / 2;
+			this.offsetX = targetOffsetX - referenceMeshBounds.center.x * this.scale;
+			this.offsetY = targetOffsetY - referenceMeshBounds.center.y * this.scale;
+
+			visualElement.style.translate = new StyleTranslate(new Translate(offsetX, offsetY, 0));
+			visualElement.style.transformOrigin = new TransformOrigin(0, 0, 0);
+			visualElement.style.scale = new Scale(new Vector3(scale, scale, 1));
+		}
+	}
+}

+ 11 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/SpineVisualElement.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6ccc3c8f87d70471caf1e836e55f5edd
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 17 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/spine-ui-toolkit.asmdef

@@ -0,0 +1,17 @@
+{
+    "name": "spine-ui-toolkit",
+    "rootNamespace": "",
+    "references": [
+        "spine-unity",
+        "spine-csharp"
+    ],
+    "includePlatforms": [],
+    "excludePlatforms": [],
+    "allowUnsafeCode": false,
+    "overrideReferences": false,
+    "precompiledReferences": [],
+    "autoReferenced": true,
+    "defineConstraints": [],
+    "versionDefines": [],
+    "noEngineReferences": false
+}

+ 7 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Runtime/spine-ui-toolkit.asmdef.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 277c50a20a75a8b4d83df2bdf9413ac0
+AssemblyDefinitionImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 43 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/PaneSettings.asset

@@ -0,0 +1,43 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 19101, guid: 0000000000000000e000000000000000, type: 0}
+  m_Name: PaneSettings
+  m_EditorClassIdentifier: 
+  themeUss: {fileID: -4733365628477956816, guid: 6fd02a62ce112e547aa19d3af6f42b02, type: 3}
+  m_TargetTexture: {fileID: 0}
+  m_RenderMode: 0
+  m_WorldSpaceLayer: 0
+  m_ScaleMode: 1
+  m_ReferenceSpritePixelsPerUnit: 100
+  m_PixelsPerUnit: 100
+  m_Scale: 1
+  m_ReferenceDpi: 264
+  m_FallbackDpi: 96
+  m_ReferenceResolution: {x: 1200, y: 800}
+  m_ScreenMatchMode: 0
+  m_Match: 0
+  m_SortingOrder: 0
+  m_TargetDisplay: 0
+  m_BindingLogLevel: 0
+  m_ClearDepthStencil: 1
+  m_ClearColor: 0
+  m_ColorClearValue: {r: 0, g: 0, b: 0, a: 0}
+  m_VertexBudget: 0
+  m_DynamicAtlasSettings:
+    m_MinAtlasSize: 64
+    m_MaxAtlasSize: 4096
+    m_MaxSubTextureSize: 64
+    m_ActiveFilters: -1
+  m_AtlasBlitShader: {fileID: 9101, guid: 0000000000000000f000000000000000, type: 0}
+  m_RuntimeShader: {fileID: 9100, guid: 0000000000000000f000000000000000, type: 0}
+  m_RuntimeWorldShader: {fileID: 9102, guid: 0000000000000000f000000000000000, type: 0}
+  textSettings: {fileID: 0}

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/PaneSettings.asset.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d90f599573ee84c23b0ab11351611102
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 11400000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a79d765fc75ae734fbddf882c3f566e8
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 44b53f48e03bf42428f79553e48047d1
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 716 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro.json


+ 7 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro.json.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 83ec6110c38be7248a0de6b948cc3510
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 31 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro_SkeletonData.asset

@@ -0,0 +1,31 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
+  m_Name: raptor-pro_SkeletonData
+  m_EditorClassIdentifier: 
+  atlasAssets:
+  - {fileID: 11400000, guid: 8a3a401562f0944468f7361d60286f0c, type: 2}
+  scale: 0.01
+  skeletonJSON: {fileID: 4900000, guid: 83ec6110c38be7248a0de6b948cc3510, type: 3}
+  isUpgradingBlendModeMaterials: 0
+  blendModeMaterials:
+    requiresBlendModeMaterials: 0
+    applyAdditiveMaterial: 0
+    additiveMaterials: []
+    multiplyMaterials: []
+    screenMaterials: []
+  skeletonDataModifiers: []
+  fromAnimation: []
+  toAnimation: []
+  duration: []
+  defaultMix: 0.2
+  controller: {fileID: 0}

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor-pro_SkeletonData.asset.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d46d232b9d6644c499754d07fb6e9f08
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 11400000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 93 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.atlas.txt

@@ -0,0 +1,93 @@
+raptor.png
+	size: 1024, 512
+	filter: Linear, Linear
+	scale: 0.5
+back-arm
+	bounds: 895, 295, 46, 25
+back-bracer
+	bounds: 992, 216, 39, 28
+	rotate: 90
+back-hand
+	bounds: 594, 58, 36, 34
+back-knee
+	bounds: 729, 86, 49, 67
+	rotate: 90
+back-thigh
+	bounds: 379, 2, 39, 24
+eyes-open
+	bounds: 902, 194, 47, 45
+	rotate: 90
+front-arm
+	bounds: 945, 306, 48, 26
+front-bracer
+	bounds: 949, 197, 41, 29
+front-hand
+	bounds: 949, 266, 41, 38
+front-open-hand
+	bounds: 875, 148, 43, 44
+front-thigh
+	bounds: 793, 171, 57, 29
+	rotate: 90
+gun
+	bounds: 379, 28, 107, 103
+	rotate: 90
+gun-nohand
+	bounds: 487, 87, 105, 102
+head
+	bounds: 807, 361, 136, 149
+lower-leg
+	bounds: 827, 195, 73, 98
+mouth-grind
+	bounds: 920, 145, 47, 30
+	rotate: 90
+mouth-smile
+	bounds: 992, 257, 47, 30
+	rotate: 90
+neck
+	bounds: 359, 114, 18, 21
+raptor-back-arm
+	bounds: 653, 142, 82, 86
+raptor-body
+	bounds: 2, 277, 632, 233
+raptor-front-arm
+	bounds: 484, 4, 81, 102
+	rotate: 90
+raptor-front-leg
+	bounds: 2, 18, 191, 257
+raptor-hindleg-back
+	bounds: 636, 295, 169, 215
+raptor-horn
+	bounds: 195, 22, 182, 80
+raptor-horn-back
+	bounds: 945, 334, 176, 77
+	rotate: 90
+raptor-jaw
+	bounds: 359, 137, 126, 138
+raptor-jaw-tooth
+	bounds: 895, 322, 37, 48
+	rotate: 90
+raptor-mouth-inside
+	bounds: 949, 228, 36, 41
+	rotate: 90
+raptor-saddle-strap-back
+	bounds: 653, 86, 54, 74
+	rotate: 90
+raptor-saddle-strap-front
+	bounds: 594, 94, 57, 95
+raptor-saddle-w-shadow
+	bounds: 195, 104, 162, 171
+raptor-tail-shadow
+	bounds: 636, 230, 189, 63
+raptor-tongue
+	bounds: 807, 295, 86, 64
+stirrup-back
+	bounds: 952, 151, 44, 35
+	rotate: 90
+stirrup-front
+	bounds: 902, 243, 45, 50
+stirrup-strap
+	bounds: 824, 147, 49, 46
+torso
+	bounds: 737, 137, 54, 91
+visor
+	bounds: 487, 191, 131, 84

+ 7 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.atlas.txt.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 93456ae5f468800499b80d92a05282f3
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.png


+ 228 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor.png.meta

@@ -0,0 +1,228 @@
+fileFormatVersion: 2
+guid: 21efe90961832774382e29b0d3bb5ea8
+TextureImporter:
+  internalIDToNameTable:
+  - first:
+      213: -7354147798389650842
+    second: raptor_0
+  - first:
+      213: -1298313523742627566
+    second: raptor_1
+  - first:
+      213: -3984343856350860912
+    second: raptor_2
+  - first:
+      213: -5960175505165232002
+    second: raptor_3
+  - first:
+      213: 6333033293371259919
+    second: raptor_4
+  - first:
+      213: 4489145543039759560
+    second: raptor_5
+  - first:
+      213: 9160161647816102319
+    second: raptor_6
+  - first:
+      213: -2680824643813874362
+    second: raptor_7
+  - first:
+      213: 3074881226115346556
+    second: raptor_8
+  - first:
+      213: 1076853692452709030
+    second: raptor_9
+  - first:
+      213: 2154098530053057128
+    second: raptor_10
+  - first:
+      213: 759012714101432034
+    second: raptor_11
+  - first:
+      213: 4135046594981868538
+    second: raptor_12
+  - first:
+      213: -9119015110704730337
+    second: raptor_13
+  - first:
+      213: -7926931232330581205
+    second: raptor_14
+  - first:
+      213: 7786374172662284791
+    second: raptor_15
+  - first:
+      213: -6552680127814452331
+    second: raptor_16
+  - first:
+      213: -3280142813647027266
+    second: raptor_17
+  - first:
+      213: 5245843113711608464
+    second: raptor_18
+  - first:
+      213: -1564803074740011960
+    second: raptor_19
+  - first:
+      213: -6251335937492990686
+    second: raptor_20
+  - first:
+      213: 5168550553188587764
+    second: raptor_21
+  - first:
+      213: -3235569547720698065
+    second: raptor_22
+  - first:
+      213: 2637519729019159070
+    second: raptor_23
+  - first:
+      213: 749422979662797245
+    second: raptor_24
+  - first:
+      213: -4320376347171973161
+    second: raptor_25
+  - first:
+      213: -6895877406667551030
+    second: raptor_26
+  - first:
+      213: 3394579972421694033
+    second: raptor_27
+  - first:
+      213: -6504870716705668756
+    second: raptor_28
+  - first:
+      213: -4212008797316919269
+    second: raptor_29
+  - first:
+      213: 5488931473750602163
+    second: raptor_30
+  - first:
+      213: -2928241519144913418
+    second: raptor_31
+  - first:
+      213: 9074545460576386088
+    second: raptor_32
+  - first:
+      213: -1360907593187138022
+    second: raptor_33
+  - first:
+      213: -3802396160791436098
+    second: raptor_34
+  - first:
+      213: 5738290514620653696
+    second: raptor_35
+  - first:
+      213: 2483372005746370757
+    second: raptor_36
+  - first:
+      213: -1673080942115091751
+    second: raptor_37
+  externalObjects: {}
+  serializedVersion: 13
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 0
+    sRGBTexture: 0
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+    flipGreenChannel: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  vTOnly: 0
+  ignoreMipmapLimit: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: 1
+    aniso: 1
+    mipBias: 0
+    wrapU: 0
+    wrapV: 0
+    wrapW: 0
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  flipbookRows: 1
+  flipbookColumns: 1
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  ignorePngGamma: 0
+  applyGammaDecoding: 0
+  swizzle: 50462976
+  cookieLightType: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 1
+  - serializedVersion: 3
+    buildTarget: Standalone
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 0
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    ignorePlatformSupport: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 1
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+    nameFileIdTable: {}
+  mipmapLimitGroupName: 
+  pSDRemoveMatte: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 19 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Atlas.asset

@@ -0,0 +1,19 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 0}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3}
+  m_Name: raptor_Atlas
+  m_EditorClassIdentifier: 
+  textureLoadingMode: 0
+  onDemandTextureLoader: {fileID: 0}
+  atlasFile: {fileID: 4900000, guid: 93456ae5f468800499b80d92a05282f3, type: 3}
+  materials:
+  - {fileID: 2100000, guid: f88a0ab51f5e5a84bb56248a0cb5884e, type: 2}

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Atlas.asset.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 8a3a401562f0944468f7361d60286f0c
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 11400000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 48 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Material.mat

@@ -0,0 +1,48 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!21 &2100000
+Material:
+  serializedVersion: 8
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: raptor_Material
+  m_Shader: {fileID: 4800000, guid: 1e8a610c9e01c3648bac42585e5fc676, type: 3}
+  m_Parent: {fileID: 0}
+  m_ModifiedSerializedProperties: 0
+  m_ValidKeywords: []
+  m_InvalidKeywords:
+  - _USE8NEIGHBOURHOOD_ON
+  m_LightmapFlags: 4
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: -1
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_LockedProperties: 
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _MainTex:
+        m_Texture: {fileID: 2800000, guid: 21efe90961832774382e29b0d3bb5ea8, type: 3}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Ints: []
+    m_Floats:
+    - _Cutoff: 0.1
+    - _OutlineMipLevel: 0
+    - _OutlineOpaqueAlpha: 1
+    - _OutlineReferenceTexWidth: 1024
+    - _OutlineSmoothness: 1
+    - _OutlineWidth: 3
+    - _StencilComp: 8
+    - _StencilRef: 1
+    - _StraightAlphaInput: 0
+    - _ThresholdEnd: 0.25
+    - _Use8Neighbourhood: 1
+    - _UseScreenSpaceOutlineWidth: 0
+    m_Colors:
+    - _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
+  m_BuildTextureStacks: []
+  m_AllowLocking: 1

+ 8 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/Spine Skeletons/Raptor/raptor_Material.mat.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f88a0ab51f5e5a84bb56248a0cb5884e
+NativeFormatImporter:
+  externalObjects: {}
+  mainObjectFileID: 2100000
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 11 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/SpineUIToolkit.uxml

@@ -0,0 +1,11 @@
+<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:uie="UnityEditor.UIElements" editor-extension-mode="False">
+    <ui:VisualElement style="flex-direction: row; flex-wrap: wrap; height: 100%; width: 100%;">
+        <ui:Label text="Spine Visual Element&#10;for UI Toolkit" name="Label" enable-rich-text="false" style="width: 100%; height: 30%; font-size: 60%; -unity-font-style: normal; color: rgb(255, 255, 255); text-overflow: clip; flex-direction: column; -unity-text-align: middle-center;" />
+        <ui:VisualElement name="SpineSkeletons" style="flex-grow: 1; width: 100%; height: 70%; flex-direction: row; align-items: center; justify-content: center;">
+            <Spine.Unity.SpineVisualElement starting-animation="roar" initial-flip-y="true" skeleton-data-asset="project://database/Assets/SpineUITK/Sample/Spine%20Skeletons/Raptor/raptor-pro_SkeletonData.asset?fileID=11400000&amp;guid=d46d232b9d6644c499754d07fb6e9f08&amp;type=2#raptor-pro_SkeletonData" name="SpineVisualElement" adjust-to-bounds="false" initial-skin-name="default" style="height: 400px; width: 400px; --skeleton-asset: url(&quot;project://database/Packages/com.esotericsoftware.spine.spine-unity-examples/Spine%20Skeletons/spineboy-pro/spineboy-pro_SkeletonData.asset?fileID=11400000&amp;guid=af38a3de26ed9b84abc2fe7c7f3b209d&amp;type=2#spineboy-pro_SkeletonData&quot;); align-items: flex-end; align-self: stretch;" />
+            <Spine.Unity.SpineVisualElement starting-animation="walk" initial-flip-y="true" skeleton-data-asset="project://database/Assets/SpineUITK/Sample/Spine%20Skeletons/Raptor/raptor-pro_SkeletonData.asset?fileID=11400000&amp;guid=d46d232b9d6644c499754d07fb6e9f08&amp;type=2#raptor-pro_SkeletonData" name="SpineVisualElement" adjust-to-bounds="false" initial-skin-name="default" style="height: 400px; width: 400px; --skeleton-asset: url(&quot;project://database/Packages/com.esotericsoftware.spine.spine-unity-examples/Spine%20Skeletons/spineboy-pro/spineboy-pro_SkeletonData.asset?fileID=11400000&amp;guid=af38a3de26ed9b84abc2fe7c7f3b209d&amp;type=2#spineboy-pro_SkeletonData&quot;); align-self: stretch;" />
+            <Spine.Unity.SpineVisualElement starting-animation="gun-grab" initial-flip-y="true" skeleton-data-asset="project://database/Assets/SpineUITK/Sample/Spine%20Skeletons/Raptor/raptor-pro_SkeletonData.asset?fileID=11400000&amp;guid=d46d232b9d6644c499754d07fb6e9f08&amp;type=2#raptor-pro_SkeletonData" name="SpineVisualElement" adjust-to-bounds="false" initial-skin-name="default" style="height: 400px; width: 400px; --skeleton-asset: url(&quot;project://database/Packages/com.esotericsoftware.spine.spine-unity-examples/Spine%20Skeletons/spineboy-pro/spineboy-pro_SkeletonData.asset?fileID=11400000&amp;guid=af38a3de26ed9b84abc2fe7c7f3b209d&amp;type=2#spineboy-pro_SkeletonData&quot;); align-self: stretch;" />
+            <Spine.Unity.SpineVisualElement starting-animation="jump" initial-flip-y="true" skeleton-data-asset="project://database/Assets/SpineUITK/Sample/Spine%20Skeletons/Raptor/raptor-pro_SkeletonData.asset?fileID=11400000&amp;guid=d46d232b9d6644c499754d07fb6e9f08&amp;type=2#raptor-pro_SkeletonData" name="SpineVisualElement" adjust-to-bounds="false" initial-skin-name="default" style="height: 400px; width: 400px; --skeleton-asset: url(&quot;project://database/Packages/com.esotericsoftware.spine.spine-unity-examples/Spine%20Skeletons/spineboy-pro/spineboy-pro_SkeletonData.asset?fileID=11400000&amp;guid=af38a3de26ed9b84abc2fe7c7f3b209d&amp;type=2#spineboy-pro_SkeletonData&quot;); align-self: stretch;" />
+        </ui:VisualElement>
+    </ui:VisualElement>
+</ui:UXML>

+ 10 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/SpineUIToolkit.uxml.meta

@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 1ee01cd9649684a5eaa82d142dd92565
+ScriptedImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 2
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
+  script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

+ 361 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/UI Toolkit Example.unity

@@ -0,0 +1,361 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!29 &1
+OcclusionCullingSettings:
+  m_ObjectHideFlags: 0
+  serializedVersion: 2
+  m_OcclusionBakeSettings:
+    smallestOccluder: 5
+    smallestHole: 0.25
+    backfaceThreshold: 100
+  m_SceneGUID: 00000000000000000000000000000000
+  m_OcclusionCullingData: {fileID: 0}
+--- !u!104 &2
+RenderSettings:
+  m_ObjectHideFlags: 0
+  serializedVersion: 10
+  m_Fog: 0
+  m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+  m_FogMode: 3
+  m_FogDensity: 0.01
+  m_LinearFogStart: 0
+  m_LinearFogEnd: 300
+  m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
+  m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
+  m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
+  m_AmbientIntensity: 1
+  m_AmbientMode: 0
+  m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
+  m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
+  m_HaloStrength: 0.5
+  m_FlareStrength: 1
+  m_FlareFadeSpeed: 3
+  m_HaloTexture: {fileID: 0}
+  m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
+  m_DefaultReflectionMode: 0
+  m_DefaultReflectionResolution: 128
+  m_ReflectionBounces: 1
+  m_ReflectionIntensity: 1
+  m_CustomReflection: {fileID: 0}
+  m_Sun: {fileID: 0}
+  m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
+  m_UseRadianceAmbientProbe: 0
+--- !u!157 &3
+LightmapSettings:
+  m_ObjectHideFlags: 0
+  serializedVersion: 12
+  m_GISettings:
+    serializedVersion: 2
+    m_BounceScale: 1
+    m_IndirectOutputScale: 1
+    m_AlbedoBoost: 1
+    m_EnvironmentLightingMode: 0
+    m_EnableBakedLightmaps: 1
+    m_EnableRealtimeLightmaps: 0
+  m_LightmapEditorSettings:
+    serializedVersion: 12
+    m_Resolution: 2
+    m_BakeResolution: 40
+    m_AtlasSize: 1024
+    m_AO: 0
+    m_AOMaxDistance: 1
+    m_CompAOExponent: 1
+    m_CompAOExponentDirect: 0
+    m_ExtractAmbientOcclusion: 0
+    m_Padding: 2
+    m_LightmapParameters: {fileID: 0}
+    m_LightmapsBakeMode: 1
+    m_TextureCompression: 1
+    m_ReflectionCompression: 2
+    m_MixedBakeMode: 2
+    m_BakeBackend: 1
+    m_PVRSampling: 1
+    m_PVRDirectSampleCount: 32
+    m_PVRSampleCount: 512
+    m_PVRBounces: 2
+    m_PVREnvironmentSampleCount: 256
+    m_PVREnvironmentReferencePointCount: 2048
+    m_PVRFilteringMode: 1
+    m_PVRDenoiserTypeDirect: 1
+    m_PVRDenoiserTypeIndirect: 1
+    m_PVRDenoiserTypeAO: 1
+    m_PVRFilterTypeDirect: 0
+    m_PVRFilterTypeIndirect: 0
+    m_PVRFilterTypeAO: 0
+    m_PVREnvironmentMIS: 1
+    m_PVRCulling: 1
+    m_PVRFilteringGaussRadiusDirect: 1
+    m_PVRFilteringGaussRadiusIndirect: 5
+    m_PVRFilteringGaussRadiusAO: 2
+    m_PVRFilteringAtrousPositionSigmaDirect: 0.5
+    m_PVRFilteringAtrousPositionSigmaIndirect: 2
+    m_PVRFilteringAtrousPositionSigmaAO: 1
+    m_ExportTrainingData: 0
+    m_TrainingDataDestination: TrainingData
+    m_LightProbeSampleCountMultiplier: 4
+  m_LightingDataAsset: {fileID: 0}
+  m_LightingSettings: {fileID: 0}
+--- !u!196 &4
+NavMeshSettings:
+  serializedVersion: 2
+  m_ObjectHideFlags: 0
+  m_BuildSettings:
+    serializedVersion: 3
+    agentTypeID: 0
+    agentRadius: 0.5
+    agentHeight: 2
+    agentSlope: 45
+    agentClimb: 0.4
+    ledgeDropHeight: 0
+    maxJumpAcrossDistance: 0
+    minRegionArea: 2
+    manualCellSize: 0
+    cellSize: 0.16666667
+    manualTileSize: 0
+    tileSize: 256
+    buildHeightMesh: 0
+    maxJobWorkers: 0
+    preserveTilesOutsideBounds: 0
+    debug:
+      m_Flags: 0
+  m_NavMeshData: {fileID: 0}
+--- !u!1 &335259381
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 335259384}
+  - component: {fileID: 335259383}
+  m_Layer: 5
+  m_Name: UIDocument
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!114 &335259383
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 335259381}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 19102, guid: 0000000000000000e000000000000000, type: 0}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_PanelSettings: {fileID: 11400000, guid: d90f599573ee84c23b0ab11351611102, type: 2}
+  m_ParentUI: {fileID: 0}
+  sourceAsset: {fileID: 9197481963319205126, guid: 1ee01cd9649684a5eaa82d142dd92565, type: 3}
+  m_SortingOrder: 0
+--- !u!4 &335259384
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 335259381}
+  serializedVersion: 2
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1110375382
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1110375385}
+  - component: {fileID: 1110375384}
+  - component: {fileID: 1110375383}
+  m_Layer: 0
+  m_Name: Main Camera
+  m_TagString: MainCamera
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!81 &1110375383
+AudioListener:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1110375382}
+  m_Enabled: 1
+--- !u!20 &1110375384
+Camera:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1110375382}
+  m_Enabled: 1
+  serializedVersion: 2
+  m_ClearFlags: 2
+  m_BackGroundColor: {r: 0.3671235, g: 0.4716981, b: 0.4664576, a: 0}
+  m_projectionMatrixMode: 1
+  m_GateFitMode: 2
+  m_FOVAxisMode: 0
+  m_Iso: 200
+  m_ShutterSpeed: 0.005
+  m_Aperture: 16
+  m_FocusDistance: 10
+  m_FocalLength: 50
+  m_BladeCount: 5
+  m_Curvature: {x: 2, y: 11}
+  m_BarrelClipping: 0.25
+  m_Anamorphism: 0
+  m_SensorSize: {x: 36, y: 24}
+  m_LensShift: {x: 0, y: 0}
+  m_NormalizedViewPortRect:
+    serializedVersion: 2
+    x: 0
+    y: 0
+    width: 1
+    height: 1
+  near clip plane: 0.3
+  far clip plane: 1000
+  field of view: 60
+  orthographic: 0
+  orthographic size: 5
+  m_Depth: -1
+  m_CullingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
+  m_RenderingPath: -1
+  m_TargetTexture: {fileID: 0}
+  m_TargetDisplay: 0
+  m_TargetEye: 3
+  m_HDR: 1
+  m_AllowMSAA: 1
+  m_AllowDynamicResolution: 0
+  m_ForceIntoRT: 0
+  m_OcclusionCulling: 1
+  m_StereoConvergence: 10
+  m_StereoSeparation: 0.022
+--- !u!4 &1110375385
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1110375382}
+  serializedVersion: 2
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 1, z: -10}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!1 &1360277534
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1360277536}
+  - component: {fileID: 1360277535}
+  m_Layer: 0
+  m_Name: Directional Light
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!108 &1360277535
+Light:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1360277534}
+  m_Enabled: 1
+  serializedVersion: 11
+  m_Type: 1
+  m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
+  m_Intensity: 1
+  m_Range: 10
+  m_SpotAngle: 30
+  m_InnerSpotAngle: 21.802082
+  m_CookieSize: 10
+  m_Shadows:
+    m_Type: 2
+    m_Resolution: -1
+    m_CustomResolution: -1
+    m_Strength: 1
+    m_Bias: 0.05
+    m_NormalBias: 0.4
+    m_NearPlane: 0.2
+    m_CullingMatrixOverride:
+      e00: 1
+      e01: 0
+      e02: 0
+      e03: 0
+      e10: 0
+      e11: 1
+      e12: 0
+      e13: 0
+      e20: 0
+      e21: 0
+      e22: 1
+      e23: 0
+      e30: 0
+      e31: 0
+      e32: 0
+      e33: 1
+    m_UseCullingMatrixOverride: 0
+  m_Cookie: {fileID: 0}
+  m_DrawHalo: 0
+  m_Flare: {fileID: 0}
+  m_RenderMode: 0
+  m_CullingMask:
+    serializedVersion: 2
+    m_Bits: 4294967295
+  m_RenderingLayerMask: 1
+  m_Lightmapping: 4
+  m_LightShadowCasterMode: 0
+  m_AreaSize: {x: 1, y: 1}
+  m_BounceIntensity: 1
+  m_ColorTemperature: 6570
+  m_UseColorTemperature: 0
+  m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
+  m_UseBoundingSphereOverride: 0
+  m_UseViewFrustumForShadowCasterCull: 1
+  m_ShadowRadius: 0
+  m_ShadowAngle: 0
+--- !u!4 &1360277536
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1360277534}
+  serializedVersion: 2
+  m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
+  m_LocalPosition: {x: 0, y: 3, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 0}
+  m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
+--- !u!1660057539 &9223372036854775807
+SceneRoots:
+  m_ObjectHideFlags: 0
+  m_Roots:
+  - {fileID: 1110375385}
+  - {fileID: 1360277536}
+  - {fileID: 335259384}

+ 7 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/Samples~/Examples/UI Toolkit Example.unity.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: b1a0b1253ab6549c68dccc370d235e1c
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 28 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/package.json

@@ -0,0 +1,28 @@
+{
+  "name": "com.esotericsoftware.spine.ui-toolkit",
+  "displayName": "Spine UI Toolkit [Experimental]",
+  "description": "This plugin provides UI Toolkit integration for the spine-unity runtime.\n\nPrerequisites:\nIt requires a working installation of the spine-unity runtime, version 4.2.\n(See http://esotericsoftware.com/git/spine-runtimes/spine-unity)",
+  "version": "4.2.0",
+  "unity": "2023.2",
+  "author": {
+    "name": "Esoteric Software",
+    "email": "[email protected]",
+    "url": "http://esotericsoftware.com/"
+  },
+  "dependencies": {
+    "com.unity.modules.uielements": "1.0.0"
+  },
+  "keywords": [
+    "spine",
+    "ui toolkit",
+    "ui"
+  ],
+  "hideInEditor": false,
+  "samples": [
+    {
+      "displayName": "Examples",
+      "description": "Contains examples for UI Toolkit",
+      "path": "Samples~/Examples"
+    }
+  ]
+}

+ 7 - 0
spine-unity/Modules/com.esotericsoftware.spine.ui-toolkit/package.json.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9451b1d3c8dd7f644925497496f9b110
+PackageManifestImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно