Skip to content

MoveFloorUpAndDown ​

_startでGameObject.Findを使ってFloorを取得し、開始時のローカルY座標を基準として-1mから+1mまでVRCTweenで上下に動かし続けます。_stopで保持中のTweenHandleをKillし、_resetでTweenを停止して_start時の初期位置へ戻します。移動は各クライアントでローカルに実行されます。

JSONファイルを開く

json
{
  "version": 1,
  "comment": "_startでGameObject.Findを使ってFloorを取得し、開始時のローカルY座標を基準として-1mから+1mまでVRCTweenで上下に動かし続けます。_stopで保持中のTweenHandleをKillし、_resetでTweenを停止して_start時の初期位置へ戻します。移動は各クライアントでローカルに実行されます。",
  "data": [
    {
      "name": "__floor_name",
      "type": "SystemString",
      "value": "Floor"
    },
    {
      "name": "__floor",
      "type": "UnityEngineGameObject",
      "value": null
    },
    {
      "name": "__floor_transform",
      "type": "UnityEngineTransform",
      "value": null
    },
    {
      "name": "__initial_position",
      "type": "UnityEngineVector3",
      "value": null
    },
    {
      "name": "__zero",
      "type": "SystemSingle",
      "value": 0
    },
    {
      "name": "__one_meter",
      "type": "SystemSingle",
      "value": 1
    },
    {
      "name": "__vertical_offset",
      "type": "UnityEngineVector3",
      "value": null
    },
    {
      "name": "__lower_position",
      "type": "UnityEngineVector3",
      "value": null
    },
    {
      "name": "__upper_position",
      "type": "UnityEngineVector3",
      "value": null
    },
    {
      "name": "__duration_seconds",
      "type": "SystemSingle",
      "value": 4
    },
    {
      "name": "__linear",
      "type": "VRCSDK3ComponentsVRCTweenEase",
      "value": 1
    },
    {
      "name": "__infinite_loops",
      "type": "SystemInt32",
      "value": -1
    },
    {
      "name": "__yoyo",
      "type": "VRCSDK3ComponentsVRCTweenLoopType",
      "value": 1
    },
    {
      "name": "__tween_handle",
      "type": "VRCSDK3ComponentsVRCTweenHandle",
      "value": null
    },
    {
      "name": "__looped_tween_handle",
      "type": "VRCSDK3ComponentsVRCTweenHandle",
      "value": null
    },
    {
      "name": "__default_tween_handle",
      "type": "VRCSDK3ComponentsVRCTweenHandle",
      "value": null
    }
  ],
  "code": [
    {
      "name": "_start",
      "export": true,
      "instructions": [
        {
          "op": "PUSH",
          "operand": "__floor_name"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineGameObject.__Find__SystemString__UnityEngineGameObject",
          "argumentCount": 1,
          "return": "__floor"
        },
        {
          "op": "POP"
        },
        {
          "op": "PUSH",
          "operand": "__floor"
        },
        {
          "op": "EXTERN",
          "signature": "VRCSDK3ComponentsVRCTween.__KillAllTweens__UnityEngineGameObject__SystemVoid",
          "argumentCount": 1
        },
        {
          "op": "PUSH",
          "operand": "__floor"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineGameObject.__get_transform__UnityEngineTransform",
          "argumentCount": 1,
          "return": "__floor_transform"
        },
        {
          "op": "POP"
        },
        {
          "op": "PUSH",
          "operand": "__floor_transform"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineTransform.__get_localPosition__UnityEngineVector3",
          "argumentCount": 1,
          "return": "__initial_position"
        },
        {
          "op": "POP"
        },
        {
          "op": "PUSH",
          "operand": "__zero"
        },
        {
          "op": "PUSH",
          "operand": "__one_meter"
        },
        {
          "op": "PUSH",
          "operand": "__zero"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineVector3.__ctor__SystemSingle_SystemSingle_SystemSingle__UnityEngineVector3",
          "argumentCount": 3,
          "return": "__vertical_offset"
        },
        {
          "op": "POP"
        },
        {
          "op": "PUSH",
          "operand": "__initial_position"
        },
        {
          "op": "PUSH",
          "operand": "__vertical_offset"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineVector3.__op_Subtraction__UnityEngineVector3_UnityEngineVector3__UnityEngineVector3",
          "argumentCount": 2,
          "return": "__lower_position"
        },
        {
          "op": "POP"
        },
        {
          "op": "PUSH",
          "operand": "__initial_position"
        },
        {
          "op": "PUSH",
          "operand": "__vertical_offset"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineVector3.__op_Addition__UnityEngineVector3_UnityEngineVector3__UnityEngineVector3",
          "argumentCount": 2,
          "return": "__upper_position"
        },
        {
          "op": "POP"
        },
        {
          "op": "PUSH",
          "operand": "__floor_transform"
        },
        {
          "op": "PUSH",
          "operand": "__lower_position"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineTransform.__set_localPosition__UnityEngineVector3__SystemVoid",
          "argumentCount": 2
        },
        {
          "op": "PUSH",
          "operand": "__floor"
        },
        {
          "op": "PUSH",
          "operand": "__upper_position"
        },
        {
          "op": "PUSH",
          "operand": "__duration_seconds"
        },
        {
          "op": "PUSH",
          "operand": "__linear"
        },
        {
          "op": "EXTERN",
          "signature": "VRCSDK3ComponentsVRCTween.__TweenLocalPosition__UnityEngineGameObject_UnityEngineVector3_SystemSingle_VRCSDK3ComponentsVRCTweenEase__VRCSDK3ComponentsVRCTweenHandle",
          "argumentCount": 4,
          "return": "__tween_handle"
        },
        {
          "op": "PUSH",
          "operand": "__infinite_loops"
        },
        {
          "op": "PUSH",
          "operand": "__yoyo"
        },
        {
          "op": "EXTERN",
          "signature": "VRCSDK3ComponentsVRCTweenHandle.__SetLoops__SystemInt32_VRCSDK3ComponentsVRCTweenLoopType__VRCSDK3ComponentsVRCTweenHandle",
          "argumentCount": 3,
          "return": "__looped_tween_handle"
        },
        {
          "op": "POP"
        }
      ]
    },
    {
      "name": "_stop",
      "export": true,
      "instructions": [
        {
          "op": "PUSH",
          "operand": "__looped_tween_handle"
        },
        {
          "op": "EXTERN",
          "signature": "VRCSDK3ComponentsVRCTweenHandle.__Kill__SystemVoid",
          "argumentCount": 1
        },
        {
          "op": "PUSH",
          "operand": "__default_tween_handle"
        },
        {
          "op": "PUSH",
          "operand": "__looped_tween_handle"
        },
        {
          "op": "COPY"
        }
      ]
    },
    {
      "name": "_reset",
      "export": true,
      "instructions": [
        {
          "op": "PUSH",
          "operand": "__looped_tween_handle"
        },
        {
          "op": "EXTERN",
          "signature": "VRCSDK3ComponentsVRCTweenHandle.__Kill__SystemVoid",
          "argumentCount": 1
        },
        {
          "op": "PUSH",
          "operand": "__default_tween_handle"
        },
        {
          "op": "PUSH",
          "operand": "__looped_tween_handle"
        },
        {
          "op": "COPY"
        },
        {
          "op": "PUSH",
          "operand": "__floor_transform"
        },
        {
          "op": "PUSH",
          "operand": "__initial_position"
        },
        {
          "op": "EXTERN",
          "signature": "UnityEngineTransform.__set_localPosition__UnityEngineVector3__SystemVoid",
          "argumentCount": 2
        }
      ]
    }
  ]
}