{"id":855,"date":"2025-04-18T06:00:05","date_gmt":"2025-04-17T22:00:05","guid":{"rendered":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/"},"modified":"2025-04-18T06:00:05","modified_gmt":"2025-04-17T22:00:05","slug":"%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3","status":"publish","type":"post","link":"http:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/","title":{"rendered":"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c"},"content":{"rendered":"<div class=\"article_content clearfix\" id=\"article_content\">\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/kdoc_html_views-1a98987dfd.css\" rel=\"stylesheet\"\/>\n <link href=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/mdeditor\/css\/editerView\/ck_htmledit_views-704d5b9767.css\" rel=\"stylesheet\"\/>\n<div class=\"htmledit_views\" id=\"content_views\">\n<h2>\n   <a id=\"_0\"><br \/>\n   <\/a><br \/>\n   \u4e8b\u60c5\u7684\u8d77\u56e0\uff1a<br \/>\n  <\/h2>\n<p>\n   \u9996\u5148\u6211\u4e4b\u524d\u5728b\u7ad9\u7684\u65f6\u5019\u7a81\u7136\u53d1\u73b0\u6709\u4e2a\u5927\u4f6c\u8bf4\u590d\u523b\u4e86\u7a7a\u6d1e\u9a91\u58eb\uff0c\u70b9\u8fdb\u53bb\u4e00\u770b\u53d1\u73b0\u5f88\u591a\u573a\u666f\u90fd\u798f\u6e90\u9053\u975e\u5e38\u8be6\u7ec6\uff0c\u5f53\u65f6\u6211\u9664\u4e86\u89c9\u5f97\u5927\u4f6c\u5f88\u5f3a\u7684\u540c\u65f6\u4e5f\u60f3\u81ea\u5df1\u8bd5\u4e00\u4e0b\uff0c\u800c\u4e14\u5f53\u65f6\u5bf9\u73a9\u5bb6\u8840\u6761\u8bbe\u8ba1\u7b49\u90fd\u5f88\u6a21\u7cca\uff0c\u5c31\u60f3\u7740\u95eeup\u4e3b\uff0c\u7ed3\u679c\u56e0\u4e3a\u5236\u4f5c\u7684\u65f6\u95f4\u8fc7\u4e86\u5f88\u4e45\u4e86\uff0c\u5927\u4f6c\u4e5f\u6709\u4e9b\u7b54\u4e0d\u4e0a\u6765\uff0c\u4e8e\u662f\u6211\u5c31\u5148\u4e0b\u6765\uff0c\u7136\u540e\u4e00\u76f4\u8ddf\u7740\u5176\u5b83\u89c6\u9891\u7ee7\u7eed\u5b66\uff0c\u8fd9\u51e0\u5929\u95f2\u7740\u5c31\u8bd5\u7740\u901a\u8fc7\u5927\u4f6c\u7684\u4ee3\u7801\u80fd\u4e0d\u80fd\u9010\u6b65\u505a\u4e00\u4e2a\u7a7a\u6d1e\u9a91\u58eb\u7684mod\u51fa\u6765\uff0c\u6240\u5e78\u524d\u9762\u7684\u6b65\u9aa4\u90fd\u6bd4\u8f83\u987a\u5229\uff0c\u901a\u8fc7\u5927\u4f6c\u7684\u4ee3\u7801\u8fd8\u662f\u80fd\u6162\u6162\u505a\u51fa\u6765\n  <\/p>\n<p>\n   \uff08Steam\u622a\u56fe\u9547\u4e2a\u697c\uff09\n  <\/p>\n<\/p>\n<h2>\n   \u5b66\u4e60\u76ee\u6807\uff1a<br \/>\n  <\/h2>\n<\/p>\n<p>\n   \u5927\u4f6c\u7684\u89c6\u9891\u4ee5\u53caGithub\u6e90\u7801\uff1a\n  <\/p>\n<p>\n   <a href=\"https:\/\/www.bilibili.com\/video\/BV1JV411k7eH?spm_id_from=333.880.my_history.page.click\" title=\"\u3010Unity3D\u3011\u7a7a\u6d1e\u9a91\u58eb\u306e\u590d\u523b_\u54d4\u54e9\u54d4\u54e9_bilibili\"><br \/>\n    \u3010Unity3D\u3011\u7a7a\u6d1e\u9a91\u58eb\u306e\u590d\u523b_\u54d4\u54e9\u54d4\u54e9_bilibili<br \/>\n   <\/a>\n  <\/p>\n<p>\n   \u9879\u76ee\u5f00\u6e90\uff1ahttps:\/\/github.com\/dreamCirno\/Hollow-Knight-Imitation\n  <\/p>\n<hr\/>\n<h2>\n   <a id=\"_10\"><br \/>\n   <\/a><br \/>\n   \u5b66\u4e60\u5185\u5bb9\uff1a<br \/>\n  <\/h2>\n<h4>\n   \u521d\u59cb\u5de5\u4f5c<br \/>\n   <strong><br \/>\n    \u5c31\u5148\u521b\u5efa\u4e00\u4e2a2D\u9879\u76ee\uff0c\u7136\u540e\u672c\u9879\u76ee\u9700\u8981\u51c6\u5907\u7684\u63d2\u4ef6\u6709\u70b9\u591a\uff0c\u628a\u6ca1\u5fc5\u8981\u7684\u63d2\u4ef6\u5220\u9664\u540e\u5c31\u8fd9\u4e9b\u4e86\uff0cProCamera2D,Input system,Post Poccessing,PlayerMaker(\u8fd9\u4e2a\u6211\u6ca1\u4e70)<br \/>\n   <\/strong><br \/>\n  <\/h4>\n<p>\n   \u6253\u5f00\u5f00\u6e90\u9879\u76ee\uff0c\u5148\u522b\u4e00\u6b21\u6027\u628aAssets\u7684\u9879\u76ee\u5168\u90e8\u5bfc\u5165\uff0c\u4e0d\u7136\u80af\u5b9a\u4e00\u5806\u62a5\u9519\u7684\uff0c\u6211\u4eec\u5148\u628a\u89d2\u8272\u7684\u7cbe\u7075\u56fe\u5bfc\u5165\uff0c\u7136\u540e\u518d\u62d6\u5165\u51e0\u4e2a\u5730\u677f\uff0c\u7136\u540e\u573a\u666f\u5c31\u6682\u65f6\u8fd9\u6837\u4e86\u3002\n  <\/p>\n<p>\n   \u63a5\u7740\u6211\u4eec\u8981\u4e3a\u73a9\u5bb6\u521b\u5efa\u52a8\u4f5c\u4e86\u3002\n  <\/p>\n<p>\n   \u521b\u5efaInput Actions\u547d\u540d\u4e3aInputControl\uff0c\u7136\u540e\u8fd9\u4e9b\u90fd\u662f\u8001\u64cd\u4f5c\u4e86\u3002\n  <\/p>\n<\/p>\n<\/p>\n<p>\n   \u7136\u540e\u5c31\u751f\u6210\u4e00\u4e2aC#\u811a\u672c\u540d\u5b57\u5c31\u53ebInputControl\uff0c\u7136\u540e\u521b\u5efa\u4e00\u4e2a\u540d\u5b57\u53ebInputManger\u7684\u7a7a\u5bf9\u8c61\u4ee5\u53ca\u4e00\u4e2a\u540c\u540d\u811a\u672c\u3001\n  <\/p>\n<p>\n   \u6211\u4eec\u6682\u65f6\u53ea\u7528\u5230GamePlayer\u7684\u52a8\u4f5c\u8868\u6240\u4ee5\u5c31\u5148\u8fd9\u6837\u5199\u4e86\u3002\n  <\/p>\n<pre><code class=\"language-cs\">using System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\npublic class InputManager : MonoBehaviour\n{\n    private static InputControl inputControl;\n    public static InputControl InputControl\n    {\n        get\n        {\n            if(inputControl == null)\n            {\n                inputControl = new InputControl();\n            }\n            return inputControl;\n        }\n    }\n\n    private void OnEnable()\n    {\n        InputControl.GamePlayer.Movement.Enable();\n        InputControl.GamePlayer.Jump.Enable();\n        InputControl.GamePlayer.Attack.Enable();\n    }\n\n    private void OnDisable()\n    {\n        InputControl.GamePlayer.Movement.Disable();\n        InputControl.GamePlayer.Jump.Disable();\n        InputControl.GamePlayer.Attack.Disable();\n    }\n\n\n\n}\n<\/code><\/pre>\n<hr\/>\n<h4>\n   <strong><br \/>\n   <\/strong><br \/>\n  <\/h4>\n<h4>\n   <strong><br \/>\n    \u73a9\u5bb6\u7c7b\u811a\u672c\uff1a<br \/>\n   <\/strong><br \/>\n  <\/h4>\n<p>\n   <strong><br \/>\n    \u6211\u4eec\u4e3a\u6211\u4eec\u7684Player\u521b\u5efa\u4e00\u4e2a\u540d\u5b57\u53ebCharacterController2D\u7684\u811a\u672c\u3002<br \/>\n   <\/strong>\n  <\/p>\n<p>\n   \u7136\u540e\u4e3a\u6211\u4eec\u7684Player\u5bf9\u8c61\u6dfb\u52a0\u4e0a\u7ec4\u4ef6\n  <\/p>\n<\/p>\n<p>\n   2D\u7269\u7406\u6750\u8d28\u5982\u4e0b\n  <\/p>\n<\/p>\n<p>\n   \u9996\u5148\u6211\u4eec\u5148\u5b9e\u73b0\u73a9\u5bb6\u7684\u79fb\u52a8\u548c\u8f6c\u5411\n  <\/p>\n<p>\n   \u5bf9\u4e8e\u79fb\u52a8\u6211\u4eec\u91c7\u7528InputSystem\u5bf9\u4e8e\u884c\u4e3a\u52a8\u4f5c\u7684\u8ba2\u9605\u4e8b\u4ef6\u548c\u9000\u8ba2\u4e8b\u4ef6\uff0c\u7528vectorInput\u8bfb\u5165\u952e\u76d8\u7684\u8f93\u5165\uff0c\n  <\/p>\n<p>\n   \u5bf9\u4e8e\u8f6c\u5411\u5219\u6839\u636e\u4efb\u52a1\u9762\u90e8\u671d\u5411\uff0c\u5f53\u5411\u53f3\u79fb\u52a8\u7684\u65f6\u5019transform.localScale\u4e3a\uff08-1,1,1\uff09\uff0c\u5411\u5de6\u5219\u4e3a\uff081,1,1\uff09\uff1b\n  <\/p>\n<pre><code class=\"language-cs\">using Com.LuisPedroFonseca.ProCamera2D;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.InputSystem;\n\npublic class CharacterController2D : MonoBehaviour\n{\n    #region Propertries\n    readonly Vector3 flippedScale = new Vector3(-1, 1, 1);\n\n    private Rigidbody2D controllerRigibody;\n\n    [Header(\"\u4f9d\u8d56\u811a\u672c\")] Animator animator;\n\n    [Header(\"\u79fb\u52a8\u53c2\u6570\")]\n    [SerializeField] float maxSpeed = 0.0f;\n    [SerializeField] float maxGravityVelocity = 10.0f;\n    [SerializeField] float jumpForce = 0.0f;\n    [SerializeField] float groundedGravityScale = 0.0f;\n\n    [SerializeField] float jumpGravityScale = 0.0f;\n    [SerializeField] float fallGravityScale = 0.0f;\n\n    private Vector2 vectorInput;\n    private int jumpCount;\n    private bool JumpInput;\n    private float counter;\n\n    private bool enableGravity;\n    private bool canMove;\n\n    private bool isOnGround;\n    private bool isFacingLeft;\n    private bool isJumping;\n    private bool isFalling;\n\n    private int animatorFirstLandingBool;\n    private int animatorGroundedBool;\n    private int animatorMovementSpeed;\n    private int animatorVelocitySpeed;\n    private int animatorJumpTrigger;\n    private int animatorDoubleJumpTrigger;\n\n    [Header(\"\u5176\u5b83\u53c2\u6570\")]\n    [SerializeField] private bool firstLanding;\n\n    #endregion\n\n    #region CallBackFunctions\n    private void Awake()\n    {\n        controllerRigibody = GetComponent&lt;Rigidbody2D&gt;();\n        animator = GetComponent&lt;Animator&gt;();\n    }\n\n    private void OnEnable()\n    {\n        InputManager.InputControl.GamePlayer.Movement.performed += ctx =&gt; vectorInput = ctx.ReadValue&lt;Vector2&gt;();\n        InputManager.InputControl.GamePlayer.Jump.started += Jump_Started;\n        InputManager.InputControl.GamePlayer.Jump.performed += Jump_Performed;\n        InputManager.InputControl.GamePlayer.Jump.canceled += Jump_Canceled;\n    }\n\n    private void OnDisable()\n    {\n        InputManager.InputControl.GamePlayer.Movement.performed -= ctx =&gt; vectorInput = ctx.ReadValue&lt;Vector2&gt;();\n        InputManager.InputControl.GamePlayer.Jump.started -= Jump_Started;\n        InputManager.InputControl.GamePlayer.Jump.performed -= Jump_Performed;\n        InputManager.InputControl.GamePlayer.Jump.canceled -= Jump_Canceled;\n    }\n\n    private void Start()\n    {\n        animatorFirstLandingBool = Animator.StringToHash(\"FirstLanding\");\n        animatorGroundedBool = Animator.StringToHash(\"Grounded\");\n        animatorVelocitySpeed = Animator.StringToHash(\"Velocity\");\n        animatorMovementSpeed = Animator.StringToHash(\"Movement\");\n        animatorJumpTrigger = Animator.StringToHash(\"Jump\");\n        animatorDoubleJumpTrigger = Animator.StringToHash(\"DoubleJump\");\n\n        animator.SetBool(animatorFirstLandingBool, firstLanding);\n\n        enableGravity = true;\n        canMove = true;\n    }\n\n    private void FixedUpdate()\n    {\n        UpdateVelocity();\n        UpdateDirection();\n\n    }\n\n    #endregion\n\n    #region Movement\n\n    private void UpdateVelocity()\n    {\n        Vector2 velocity = controllerRigibody.velocity;\n        if (vectorInput.x != 0)\n        {\n            velocity.y = Mathf.Clamp(velocity.y, -maxGravityVelocity \/ 2, maxGravityVelocity \/ 2);\n        }\n        else\n        {\n            velocity.y = Mathf.Clamp(velocity.y, -maxGravityVelocity, maxGravityVelocity);\n        }\n        animator.SetFloat(animatorVelocitySpeed, controllerRigibody.velocity.y);\n        if (canMove)\n        {\n            controllerRigibody.velocity = new Vector2(vectorInput.x * maxSpeed, velocity.y);\n            animator.SetInteger(animatorMovementSpeed, (int)vectorInput.x);\n        }\n    }\n\n    private void UpdateDirection()\n    {\n        \/\/\u63a7\u5236\u73a9\u5bb6\u7684\u65cb\u8f6c\n        if (controllerRigibody.velocity.x &gt; 1f &amp;&amp; isFacingLeft)\n        {\n            isFacingLeft = false;\n            transform.localScale = flippedScale;\n        }\n        else if (controllerRigibody.velocity.x &lt; -1f &amp;&amp; !isFacingLeft)\n        {\n            isFacingLeft = true;\n            transform.localScale = Vector3.one;\n        }\n    }\n\n   \n    \n\n    private void UpdateGrounding(Collision2D collision,bool exitState)\n    {\n        if (exitState)\n        {\n            if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\") || collision.gameObject.layer == LayerMask.NameToLayer(\"Soft Terrian\"))\n            {\n                isOnGround = false;\n\n            }\n        }\n        else\n        {   \n\/\/\u5224\u65ad\u4e3a\u843d\u5730\u72b6\u6001\n            if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\")\n                || collision.gameObject.layer == LayerMask.NameToLayer(\"Soft Terrian\")\n                &amp;&amp; collision.contacts[0].normal == Vector2.up\n                &amp;&amp; !isOnGround)\n            {\n                isOnGround = true;\n                isJumping = false;\n                isFalling = false;\n            }\n            \/\/\u5224\u65ad\u4e3a\u5934\u9876\u78b0\u5230\u7269\u4f53\u72b6\u6001\n            else if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\") || collision.gameObject.layer == LayerMask.NameToLayer(\"Soft Terrian\")\n                &amp;&amp; collision.contacts[0].normal == Vector2.down &amp;&amp; isJumping)\n            {\n\n            }\n        }\n        animator.SetBool(animatorGroundedBool, isOnGround);\n    }\n\n    public void StopHorizontalMovement()\n    {\n        Vector2 velocity = controllerRigibody.velocity;\n        velocity.x = 0;\n        controllerRigibody.velocity = velocity;\n        animator.SetInteger(animatorMovementSpeed, 0);\n    }\n\n    public void SetIsOnGrounded(bool state)\n    {\n        isOnGround = state;\n        animator.SetBool(animatorGroundedBool, isOnGround);\n    }\n    #endregion\n\n    #region Combat\n    private void Jump_Canceled(InputAction.CallbackContext context)\n    {\n        \n    }\n\n    private void Jump_Performed(InputAction.CallbackContext context)\n    {\n       \n    }\n\n    private void Jump_Started(InputAction.CallbackContext context)\n    {\n        \n    }\n\n    private void OnCollisionEnter2D(Collision2D collision)\n    {\n        UpdateGrounding(collision, false);\n    }\n\n    private void OnCollisionStay2D(Collision2D collision)\n    {\n        UpdateGrounding(collision, false);\n    }\n\n    private void OnCollisionExit2D(Collision2D collision)\n    {\n        UpdateGrounding(collision, true);\n    }\n    #endregion\n\n    #region Others\n\n    public void FirstLanding()\n    {\n\n    }\n\n    #endregion\n\n}\n<\/code><\/pre>\n<p>\n   \u63a5\u7740\u6211\u4eec\u5236\u4f5c\u52a8\u753b\uff0c\u5236\u4f5c\u597dIdle\uff0cwalk\uff0cRun\u7684\u52a8\u753b\n  <\/p>\n<\/p>\n<\/p>\n<\/p>\n<p>\n   \u7531\u4e8e\u6211\u4eec\u8fd8\u6ca1\u4e3a\u52a8\u753b\u5224\u65ad\u6761\u4ef6Grounded\u4f5c\u4ee3\u7801\u5224\u65ad\u6761\u4ef6\uff0c\u6240\u4ee5\u5c31\u5148\u521b\u5efa\u4e00\u4e2a\u7a7a\u5bf9\u8c61\u7528\u4e8e\u5730\u9762\u68c0\u6d4b\n  <\/p>\n<\/p>\n<p>\n   \u518d\u7ed9\u4ed6\u4e00\u4e2a\u811a\u672c\n  <\/p>\n<pre><code>using UnityEngine;\n\npublic class GroundDetector : MonoBehaviour\n{\n    private CharacterController2D character;\n\n    private void Awake()\n    {\n        character = FindObjectOfType&lt;CharacterController2D&gt;();\n    }\n\n    private void OnTriggerEnter2D(Collider2D collision)\n    {\n        if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\"))\n        {\n            character.SetIsOnGrounded(true);\n        }\n    }\n\n    private void OnTriggerExit2D(Collider2D collision)\n    {\n        if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\"))\n        {\n            character.SetIsOnGrounded(false);\n        }\n    }\n}\n<\/code><\/pre>\n<p>\n   \u79fb\u52a8\u7684\u811a\u672c\u505a\u5b8c\u4e86\u6211\u4eec\u8fd8\u9700\u8981\u505a\u8df3\u8dc3\uff0c\u8df3\u8dc3\u5206\u4e3a\u4e00\u6bb5\u8df3\u548c\u4e8c\u6bb5\u8df3\uff0c\u9996\u5148\u6253\u5f00CharacterController2D,\u6211\u4eec\u5c06\u901a\u8fc7\u8df3\u8dc3\u8ba1\u6570\u5668\u51b3\u5b9a\u64ad\u653e\u4e00\u6bb5\u8df3\u6216\u662f\u4e8c\u6bb5\u8df3\u7684\u52a8\u753b\uff0c\u5e76\u901a\u8fc7\u5224\u65ad\u6761\u4ef6\u51b3\u5b9a\u4ec0\u4e48\u65f6\u5019\u91cd\u7f6e\u52a8\u753b\n  <\/p>\n<pre><code class=\"language-cs\">using Com.LuisPedroFonseca.ProCamera2D;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\nusing UnityEngine.InputSystem;\n\npublic class CharacterController2D : MonoBehaviour\n{\n    #region Propertries\n    readonly Vector3 flippedScale = new Vector3(-1, 1, 1);\n\n    private Rigidbody2D controllerRigibody;\n\n    [Header(\"\u4f9d\u8d56\u811a\u672c\")] Animator animator;\n\n    [Header(\"\u79fb\u52a8\u53c2\u6570\")]\n    [SerializeField] float maxSpeed = 0.0f;\n    [SerializeField] float maxGravityVelocity = 10.0f;\n    [SerializeField] float jumpForce = 0.0f;\n    [SerializeField] float groundedGravityScale = 0.0f;\n\n    [SerializeField] float jumpGravityScale = 0.0f;\n    [SerializeField] float fallGravityScale = 0.0f;\n\n    private Vector2 vectorInput;\n    private int jumpCount;\n    private bool JumpInput;\n    private float counter;\n\n    private bool enableGravity;\n    private bool canMove;\n\n    private bool isOnGround;\n    private bool isFacingLeft;\n    private bool isJumping;\n    private bool isFalling;\n\n    private int animatorFirstLandingBool;\n    private int animatorGroundedBool;\n    private int animatorMovementSpeed;\n    private int animatorVelocitySpeed;\n    private int animatorJumpTrigger;\n    private int animatorDoubleJumpTrigger;\n\n    [Header(\"\u5176\u5b83\u53c2\u6570\")]\n    [SerializeField] private bool firstLanding;\n\n    #endregion\n\n    #region CallBackFunctions\n    private void Awake()\n    {\n        controllerRigibody = GetComponent&lt;Rigidbody2D&gt;();\n        animator = GetComponent&lt;Animator&gt;();\n    }\n\n    private void OnEnable()\n    {\n        InputManager.InputControl.GamePlayer.Movement.performed += ctx =&gt; vectorInput = ctx.ReadValue&lt;Vector2&gt;();\n        InputManager.InputControl.GamePlayer.Jump.started += Jump_Started;\n        InputManager.InputControl.GamePlayer.Jump.performed += Jump_Performed;\n        InputManager.InputControl.GamePlayer.Jump.canceled += Jump_Canceled;\n    }\n\n    private void OnDisable()\n    {\n        InputManager.InputControl.GamePlayer.Movement.performed -= ctx =&gt; vectorInput = ctx.ReadValue&lt;Vector2&gt;();\n        InputManager.InputControl.GamePlayer.Jump.started -= Jump_Started;\n        InputManager.InputControl.GamePlayer.Jump.performed -= Jump_Performed;\n        InputManager.InputControl.GamePlayer.Jump.canceled -= Jump_Canceled;\n    }\n\n    private void Start()\n    {\n        animatorFirstLandingBool = Animator.StringToHash(\"FirstLanding\");\n        animatorGroundedBool = Animator.StringToHash(\"Grounded\");\n        animatorVelocitySpeed = Animator.StringToHash(\"Velocity\");\n        animatorMovementSpeed = Animator.StringToHash(\"Movement\");\n        animatorJumpTrigger = Animator.StringToHash(\"Jump\");\n        animatorDoubleJumpTrigger = Animator.StringToHash(\"DoubleJump\");\n\n        animator.SetBool(animatorFirstLandingBool, firstLanding);\n\n        enableGravity = true;\n        canMove = true;\n    }\n\n    private void FixedUpdate()\n    {\n        UpdateVelocity();\n        UpdateJump();\n        UpdateDirection();\n        UpdateGravityScale();\n    }\n\n    #endregion\n\n    #region Movement\n\n    private void UpdateVelocity()\n    {\n        Vector2 velocity = controllerRigibody.velocity;\n        if (vectorInput.x != 0)\n        {\n            velocity.y = Mathf.Clamp(velocity.y, -maxGravityVelocity \/ 2, maxGravityVelocity \/ 2);\n        }\n        else\n        {\n            velocity.y = Mathf.Clamp(velocity.y, -maxGravityVelocity, maxGravityVelocity);\n        }\n        animator.SetFloat(animatorVelocitySpeed, controllerRigibody.velocity.y);\n        if (canMove)\n        {\n            controllerRigibody.velocity = new Vector2(vectorInput.x * maxSpeed, velocity.y);\n            animator.SetInteger(animatorMovementSpeed, (int)vectorInput.x);\n        }\n    }\n\n    private void UpdateDirection()\n    {\n        \/\/\u63a7\u5236\u73a9\u5bb6\u7684\u65cb\u8f6c\n        if (controllerRigibody.velocity.x &gt; 1f &amp;&amp; isFacingLeft)\n        {\n            isFacingLeft = false;\n            transform.localScale = flippedScale;\n        }\n        else if (controllerRigibody.velocity.x &lt; -1f &amp;&amp; !isFacingLeft)\n        {\n            isFacingLeft = true;\n            transform.localScale = Vector3.one;\n        }\n    }\n\n    private void UpdateJump()\n    {\n        if(isJumping &amp;&amp; controllerRigibody.velocity.y &lt; 0)\n        {\n            isFalling = true;\n        }\n\n        if (JumpInput)\n        {\n            controllerRigibody.AddForce(new Vector2(0,jumpForce), ForceMode2D.Impulse);\n            isJumping = true;\n        }\n        if(isOnGround &amp;&amp; !isJumping &amp;&amp; jumpCount != 0) \/\/\u5982\u679c\u5df2\u7ecf\u843d\u5730\u4e86\uff0c\u5219\u91cd\u7f6e\u8df3\u8dc3\u8ba1\u6570\u5668\n        {\n            jumpCount = 0;\n            counter = Time.time - counter;\n        }\n    }\n\n    private void UpdateGravityScale()\n    {\n        var gravityScale = groundedGravityScale;\n\n        if (!isOnGround)\n        {\n            \n            gravityScale = controllerRigibody.velocity.y &gt; 0.0f ? jumpGravityScale : fallGravityScale;\n        }\n\n        if (!enableGravity)\n        {\n            gravityScale = 0;\n        }\n\n        controllerRigibody.gravityScale = gravityScale;\n    }\n\n    private void JumpCancel()\n    {\n        JumpInput = false;\n        isJumping = false;\n        if(jumpCount == 1)\n        {\n            animator.ResetTrigger(animatorJumpTrigger);\n        }\n        else if(jumpCount == 2)\n        {\n            animator.ResetTrigger(animatorDoubleJumpTrigger);\n        }\n    }\n\n    private void UpdateGrounding(Collision2D collision,bool exitState)\n    {\n        if (exitState)\n        {\n            if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\") || collision.gameObject.layer == LayerMask.NameToLayer(\"Soft Terrian\"))\n            {\n                isOnGround = false;\n            }\n        }\n        else\n        {\n            \/\/\u5224\u65ad\u4e3a\u843d\u5730\u72b6\u6001\n            if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\")\n                || collision.gameObject.layer == LayerMask.NameToLayer(\"Soft Terrian\")\n                &amp;&amp; collision.contacts[0].normal == Vector2.up\n                &amp;&amp; !isOnGround)\n            {\n                isOnGround = true;\n                isJumping = false;\n                isFalling = false;\n                \/\/effect\n            }\n            \/\/\u5224\u65ad\u4e3a\u5934\u9876\u78b0\u5230\u7269\u4f53\u72b6\u6001\n            else if (collision.gameObject.layer == LayerMask.NameToLayer(\"Terrian\") || collision.gameObject.layer == LayerMask.NameToLayer(\"Soft Terrian\")\n                &amp;&amp; collision.contacts[0].normal == Vector2.down &amp;&amp; isJumping)\n            {\n                JumpCancel();\n            }\n        }\n        animator.SetBool(animatorGroundedBool, isOnGround);\n    }\n\n    public void StopHorizontalMovement()\n    {\n        Vector2 velocity = controllerRigibody.velocity;\n        velocity.x = 0;\n        controllerRigibody.velocity = velocity;\n        animator.SetInteger(animatorMovementSpeed, 0);\n    }\n\n    public void SetIsOnGrounded(bool state)\n    {\n        isOnGround = state;\n        animator.SetBool(animatorGroundedBool, isOnGround);\n    }\n    #endregion\n\n    #region Combat\n    private void Jump_Canceled(InputAction.CallbackContext context)\n    {\n        JumpCancel();\n    }\n\n    private void Jump_Performed(InputAction.CallbackContext context)\n    {\n        JumpCancel();\n    }\n\n    private void Jump_Started(InputAction.CallbackContext context)\n    {\n\n        counter = Time.time;\n        if(jumpCount &lt;= 1)\n        {\n            ++jumpCount;\n            if(jumpCount == 1)\n            {\n                \/\/Anim+Audio\n                animator.SetTrigger(animatorJumpTrigger);\n            }\n            else if(jumpCount == 2)\n            {\n                \/\/Anim+Audio+Effect\n                animator.SetTrigger(animatorDoubleJumpTrigger);\n            }\n        }\n        else\n        {\n            return;\n        }\n        JumpInput = true;\n    }\n\n    private void OnCollisionEnter2D(Collision2D collision)\n    {\n        UpdateGrounding(collision, false);\n    }\n\n    private void OnCollisionStay2D(Collision2D collision)\n    {\n        UpdateGrounding(collision, false);\n    }\n\n    private void OnCollisionExit2D(Collision2D collision)\n    {\n        UpdateGrounding(collision, true);\n    }\n    #endregion\n\n    #region Others\n\n    public void FirstLanding()\n    {\n\n    }\n\n    #endregion\n\n}\n<\/code><\/pre>\n<p>\n   \u5bf9\u4e8e\u52a8\u753b\u6211\u4eec\u5219\u8981\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u52a8\u753b\u72b6\u6001\u673a\u540d\u5b57\u5c31\u53ebJump StateMachine\n  <\/p>\n<\/p>\n<p>\n   \u4e3a\u6211\u4eec\u7684Jump,Fall,Soft Land\uff0cDouble Jump\u6dfb\u52a0\u597d\u52a8\u753b\n  <\/p>\n<\/p>\n<\/p>\n<p>\n   \u63a5\u7740\u5c31\u662f\u52a8\u753b\u8fde\u7ebf\u4e86\u3002\u51e1\u662f\u5230Jump\u548cDoubleJump\u90fd\u53ea\u7528Triiger\u6765\u4f5c\u4e3a\u52a8\u753b\u8f6c\u5316\u6761\u4ef6\n  <\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<p>\n   \u56de\u5230Base\u72b6\u6001\u673a\u4e2d\uff0cWalk,Run,Idle\u7684\u52a8\u753b\u5230Jump\u72b6\u6001\u673a\u7684\u52a8\u753b\u6682\u65f6\u53ea\u6709Jump\u548cFall\uff0c\u800c\u4e14\u52a8\u753b\u6761\u4ef6\u4e5f\u90fd\u662f\u4e00\u6a21\u4e00\u6837\u7684\n  <\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<p>\n   \u9664\u6b64\u4e4b\u5916\u6211\u4eec\u8fd8\u8981\u4e3a\u52a8\u753b\u6dfb\u52a0\u884c\u4e3a\u811a\u672c\uff0c\n  <\/p>\n<p>\n   \u7531\u6b64\u6211\u4eec\u5148\u5bf9\u90e8\u5206\u521b\u5efa\u597d\u884c\u4e3a\u811a\u672c\u3002\n  <\/p>\n<\/p>\n<p>\n   \u8fd9\u4e9b\u91cc\u9762\u5927\u591a\u90fd\u662f\u6dfb\u52a0\u97f3\u4e50\u548c\u7c92\u5b50\u6548\u679c\u6240\u4ee5\u5148\u4e0d\u7528\u7ba1\uff0c\u4f46FallingBehavior\u5219\u8981\u8fdb\u884c\u4fee\u6539\n  <\/p>\n<pre><code>using UnityEngine;\n\npublic class FallingBehavior : StateMachineBehaviour\n{\n    float lastPositionY;\n    float fallDistance;\n    CharacterController2D character;\n\n    private void Awake()\n    {\n        \/\/audio\n        character = FindObjectOfType&lt;CharacterController2D&gt;();\n    }\n\n    \/\/ OnStateEnter is called when a transition starts and the state machine starts to evaluate this state\n    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)\n    {\n        fallDistance = 0;\n        animator.SetFloat(\"FallDistance\", fallDistance);\n\n        \/\/auido\n    }\n\n    \/\/ OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks\n    override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)\n    {\n        if(lastPositionY &gt; character.transform.position.y)\n        {\n            fallDistance += lastPositionY - character.transform.position.y;\n        }\n        lastPositionY = character.transform.position.y;\n        animator.SetFloat(\"FallDistance\", fallDistance);\n    }\n\n    \/\/ OnStateExit is called when a transition ends and the state machine finishes evaluating this state\n    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)\n    {\n        \/\/audio\n    }\n\n    public void ResetAllParams()\n    {\n        lastPositionY = character.transform.position.y;\n        fallDistance = 0;\n    }\n}\n<\/code><\/pre>\n<\/p>\n<hr\/>\n<h2>\n   <a id=\"_34\"><br \/>\n   <\/a><br \/>\n   \u5b66\u4e60\u4ea7\u51fa\uff1a<br \/>\n  <\/h2>\n<p>\n   \u53c2\u6570\u5148\u968f\u4fbf\u8bbe\u8ba1\uff0c\u8bbe\u8ba1\u597d\u540e\u6548\u679c\u5982\u56fe\u3002\n  <\/p>\n<\/p>\n<\/p>\n<\/p><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4e8b\u60c5\u7684\u8d77\u56e0\uff1a \u9996\u5148\u6211\u4e4b\u524d\u5728b\u7ad9\u7684\u65f6\u5019\u7a81\u7136\u53d1\u73b0\u6709\u4e2a\u5927\u4f6c\u8bf4\u590d\u523b\u4e86\u7a7a\u6d1e\u9a91\u58eb\uff0c\u70b9\u8fdb\u53bb\u4e00\u770b\u53d1\u73b0\u5f88\u591a\u573a\u666f\u90fd\u798f\u6e90\u9053\u975e\u5e38\u8be6\u7ec6\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":215,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-855","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-25"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/\u3010unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"og:description\" content=\"\u4e8b\u60c5\u7684\u8d77\u56e0\uff1a \u9996\u5148\u6211\u4e4b\u524d\u5728b\u7ad9\u7684\u65f6\u5019\u7a81\u7136\u53d1\u73b0\u6709\u4e2a\u5927\u4f6c\u8bf4\u590d\u523b\u4e86\u7a7a\u6d1e\u9a91\u58eb\uff0c\u70b9\u8fdb\u53bb\u4e00\u770b\u53d1\u73b0\u5f88\u591a\u573a\u666f\u90fd\u798f\u6e90\u9053\u975e\u5e38\u8be6\u7ec6\uff0c [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/\u3010unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\/\" \/>\n<meta property=\"og:site_name\" content=\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-17T22:00:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"260\" \/>\n\t<meta property=\"og:image:height\" content=\"180\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin@wunen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin@wunen\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/\"},\"author\":{\"name\":\"admin@wunen\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\"},\"headline\":\"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c\",\"datePublished\":\"2025-04-17T22:00:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/\"},\"wordCount\":65,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/www.wunen.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"articleSection\":[\"\u52a8\u4f5c\u5192\u9669\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/\",\"url\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/\",\"name\":\"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"isPartOf\":{\"@id\":\"http:\/\/www.wunen.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"datePublished\":\"2025-04-17T22:00:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg\",\"width\":260,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.wunen.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.wunen.com\/#website\",\"url\":\"http:\/\/www.wunen.com\/\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"description\":\"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9\",\"publisher\":{\"@id\":\"http:\/\/www.wunen.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.wunen.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/www.wunen.com\/#organization\",\"name\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\",\"url\":\"http:\/\/www.wunen.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"contentUrl\":\"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png\",\"width\":1024,\"height\":1024,\"caption\":\"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51\"},\"image\":{\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8\",\"name\":\"admin@wunen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.wunen.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g\",\"caption\":\"admin@wunen\"},\"sameAs\":[\"http:\/\/www.wunen.com\"],\"url\":\"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/\u3010unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\/","og_locale":"zh_CN","og_type":"article","og_title":"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","og_description":"\u4e8b\u60c5\u7684\u8d77\u56e0\uff1a \u9996\u5148\u6211\u4e4b\u524d\u5728b\u7ad9\u7684\u65f6\u5019\u7a81\u7136\u53d1\u73b0\u6709\u4e2a\u5927\u4f6c\u8bf4\u590d\u523b\u4e86\u7a7a\u6d1e\u9a91\u58eb\uff0c\u70b9\u8fdb\u53bb\u4e00\u770b\u53d1\u73b0\u5f88\u591a\u573a\u666f\u90fd\u798f\u6e90\u9053\u975e\u5e38\u8be6\u7ec6\uff0c [&hellip;]","og_url":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/\u3010unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\/","og_site_name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","article_published_time":"2025-04-17T22:00:05+00:00","og_image":[{"width":260,"height":180,"url":"https:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","type":"image\/jpeg"}],"author":"admin@wunen","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin@wunen","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#article","isPartOf":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/"},"author":{"name":"admin@wunen","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8"},"headline":"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c","datePublished":"2025-04-17T22:00:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/"},"wordCount":65,"commentCount":0,"publisher":{"@id":"http:\/\/www.wunen.com\/#organization"},"image":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","articleSection":["\u52a8\u4f5c\u5192\u9669"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/","url":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/","name":"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c - \u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","isPartOf":{"@id":"http:\/\/www.wunen.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage"},"image":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage"},"thumbnailUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","datePublished":"2025-04-17T22:00:05+00:00","breadcrumb":{"@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#primaryimage","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/\u8d44\u8baf.jpg","width":260,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/www.wunen.com\/index.php\/2025\/04\/18\/%e3%80%90unity%e4%bb%8e%e9%9b%b6%e5%bc%80%e5%a7%8b%e5%88%b6%e4%bd%9c%e7%a9%ba%e6%b4%9e%e9%aa%91%e5%a3%ab%e3%80%91%e2%91%a0%e5%88%b6%e4%bd%9c%e4%ba%ba%e7%89%a9%e7%9a%84%e7%a7%bb%e5%8a%a8%e8%b7%b3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.wunen.com\/"},{"@type":"ListItem","position":2,"name":"\u3010Unity\u4ece\u96f6\u5f00\u59cb\u5236\u4f5c\u7a7a\u6d1e\u9a91\u58eb\u3011\u2460\u5236\u4f5c\u4eba\u7269\u7684\u79fb\u52a8\u8df3\u8dc3\u8f6c\u5411\u4ee5\u53ca\u521d\u59cb\u7684\u52a8\u753b\u5236\u4f5c"}]},{"@type":"WebSite","@id":"http:\/\/www.wunen.com\/#website","url":"http:\/\/www.wunen.com\/","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","description":"\u8f6f\u4ef6\u8d44\u8baf\u6765\u7269\u5ae9","publisher":{"@id":"http:\/\/www.wunen.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.wunen.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"http:\/\/www.wunen.com\/#organization","name":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51","url":"http:\/\/www.wunen.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/","url":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","contentUrl":"http:\/\/www.wunen.com\/wp-content\/uploads\/2025\/03\/cropped-\u7269\u5ae9-1.png","width":1024,"height":1024,"caption":"\u7269\u5ae9\u8f6f\u4ef6\u8d44\u8baf\u7f51"},"image":{"@id":"http:\/\/www.wunen.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/d5f7a6cf545656a9c90d507e64452db8","name":"admin@wunen","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.wunen.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d90ec1e3faf77c4d4e66e40c29b85ff6401161e0502f401dae2f0e25b38ce25e?s=96&d=mm&r=g","caption":"admin@wunen"},"sameAs":["http:\/\/www.wunen.com"],"url":"http:\/\/www.wunen.com\/index.php\/author\/adminwunen\/"}]}},"_links":{"self":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/comments?post=855"}],"version-history":[{"count":0,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/posts\/855\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media\/215"}],"wp:attachment":[{"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/media?parent=855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/categories?post=855"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.wunen.com\/index.php\/wp-json\/wp\/v2\/tags?post=855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}