Skip to content

Commit

Permalink
Merge pull request #21 from from2001:develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
from2001 authored Dec 5, 2023
2 parents bcfc012 + 268e94c commit e7df6f2
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 32 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ openupm add com.from2001.vrm-visualscripting-nodes

## Install Option B: via Unity package manager

### 1, Setup scoped registories
### 1. Setup scoped registories

Open "Edit - Project Settings - Package Manager" on your Unity project.

Expand All @@ -38,17 +38,17 @@ Scopes:
`com.vrmc.vrm`
`com.vrmc.vrmshaders`

![Project Settings](https://github.com/from2001/VRM_VisualScriptingNodes/assets/387880/682f1f2a-e061-4de5-a020-13d98ab2bf89)
![Project Settings](https://github.com/from2001/VRM_VisualScriptingNodes/assets/387880/595b1d91-4435-4195-9b6d-1ca6b43113ce)

### 2, Install VRM Visual Scripting Node Package with Package Manager
### 2. Install VRM Visual Scripting Node Package with Package Manager

![Package Manager](https://github.com/from2001/VRM_VisualScriptingNodes/assets/387880/2809ed0b-61a8-47d9-bdb0-24335ac60163)

## How to Use

This Visual Scripting Graph shows how to load VRM with URL and attach animation as well as getting meta information of the VRM model. LoadVRM node only works with Coroutine checked in On Start Event triger node.

Notice: Check "Coroutine" in "On Start Event" triger node.
Notice: Check "Coroutine" in the "On Start Event" triger node.

![Script Graph](https://github.com/from2001/VRM_VisualScriptingNodes/assets/387880/a0055284-7ad1-434c-80c3-f1f91c25881f)

Expand All @@ -62,7 +62,7 @@ These samples can be imported.

![InstallSamples](https://github.com/from2001/VRM_VisualScriptingNodes/assets/387880/31c42fde-8b71-46e5-a4d5-a488015ca379)

## ToDO
## ToDo

Implement features of [VRM-1.0 APIs](https://vrm-c.github.io/UniVRM/ja/vrm1/api_update.html#expression)

Expand All @@ -75,3 +75,8 @@ Implement features of [VRM-1.0 APIs](https://vrm-c.github.io/UniVRM/ja/vrm1/api_
Add some useful features

- Cache data in local storage

## Repositories

- [GitHub](https://github.com/from2001/com.from2001.vrm-visualscripting-nodes/)
- [OpenUPM](https://openupm.com/packages/com.from2001.vrm-visualscripting-nodes/)
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ MonoBehaviour:
m_EditorClassIdentifier:
_data:
_json: '{"graph":{"variables":{"Kind":"Flow","collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"Load
vrm","summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"coroutine":true,"defaultValues":{},"position":{"x":-434.0,"y":-308.0},"guid":"9f1056f3-201d-469a-bfbd-eff19d835fca","$version":"A","$type":"Unity.VisualScripting.Start","$id":"9"},{"coroutine":false,"defaultValues":{},"position":{"x":-440.0,"y":-15.0},"guid":"185d2354-ce34-41fd-925f-e16903373eb3","$version":"A","$type":"Unity.VisualScripting.Update"},{"defaultValues":{"VRM
URL":{"$content":"","$type":"System.String"}},"position":{"x":-172.0,"y":-311.0},"guid":"93f123d7-c5c5-4312-ba18-a94d220a0d6e","$version":"A","$type":"VrmVisualScriptingNodes.LoadVRM","$id":"13"},{"type":"System.String","value":{"$content":"https://test.psychic-vr-lab.com/files/STYLY-Chan-A.vrm","$type":"System.String"},"defaultValues":{},"position":{"x":-432.0,"y":-150.0},"guid":"18a0de23-0d26-43e6-8c00-de1da5f336c5","$version":"A","$type":"Unity.VisualScripting.Literal","$id":"15"},{"sourceUnit":{"$ref":"9"},"sourceKey":"trigger","destinationUnit":{"$ref":"13"},"destinationKey":"inputTrigger","guid":"456a6e81-8bac-42ae-92fd-b67ab60b4553","$type":"Unity.VisualScripting.ControlConnection"},{"sourceUnit":{"$ref":"15"},"sourceKey":"output","destinationUnit":{"$ref":"13"},"destinationKey":"VRM
URL","guid":"6b710d4d-574c-4634-acc9-673f55ddb86c","$type":"Unity.VisualScripting.ValueConnection"}],"$version":"A"}}'
vrm","summary":null,"pan":{"x":0.0,"y":0.0},"zoom":1.0,"elements":[{"coroutine":true,"defaultValues":{},"position":{"x":-432.0,"y":-322.0},"guid":"9f1056f3-201d-469a-bfbd-eff19d835fca","$version":"A","$type":"Unity.VisualScripting.Start","$id":"9"},{"coroutine":false,"defaultValues":{},"position":{"x":-427.0,"y":-16.0},"guid":"185d2354-ce34-41fd-925f-e16903373eb3","$version":"A","$type":"Unity.VisualScripting.Update"},{"defaultValues":{"VRM
URL":{"$content":"","$type":"System.String"}},"position":{"x":-157.0,"y":-319.0},"guid":"93f123d7-c5c5-4312-ba18-a94d220a0d6e","$version":"A","$type":"VrmVisualScriptingNodes.LoadVRM","$id":"13"},{"specifyFallback":false,"kind":"Object","defaultValues":{"name":{"$content":"URL
of VRM model","$type":"System.String"},"object":null},"position":{"x":-393.0,"y":-175.0},"guid":"4f5cc3bb-c824-421a-9989-f6fee57e321c","$version":"A","$type":"Unity.VisualScripting.GetVariable","$id":"15"},{"sourceUnit":{"$ref":"9"},"sourceKey":"trigger","destinationUnit":{"$ref":"13"},"destinationKey":"inputTrigger","guid":"456a6e81-8bac-42ae-92fd-b67ab60b4553","$type":"Unity.VisualScripting.ControlConnection"},{"sourceUnit":{"$ref":"15"},"sourceKey":"value","destinationUnit":{"$ref":"13"},"destinationKey":"VRM
URL","guid":"7bb01abd-5f40-4310-9f0f-73aa8bf9468b","$type":"Unity.VisualScripting.ValueConnection"}],"$version":"A"}}'
_objectReferences: []
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_data:
_json: '{"declarations":{"Kind":"Object","collection":{"$content":[],"$version":"A"},"$version":"A"}}'
_json: '{"declarations":{"Kind":"Object","collection":{"$content":[{"name":"URL
of VRM model","value":{"$content":"https://test.psychic-vr-lab.com/files/STYLY-Chan-A.vrm","$type":"System.String"},"typeHandle":{"Identification":"System.String,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","$version":"A"},"$version":"A"}],"$version":"A"},"$version":"A"}}'
_objectReferences: []
--- !u!4 &1215055970
Transform:
Expand Down Expand Up @@ -332,13 +334,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1326309104}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0, y: 1, z: 1}
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}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &1670227871
GameObject:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,13 @@ MonoBehaviour:
m_Name: 2. Attach animation
m_EditorClassIdentifier:
_data:
_json: '{"graph":{"variables":{"Kind":"Flow","collection":{"$content":[],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"Attach
sanimation","summary":null,"pan":{"x":268.0,"y":173.0},"zoom":1.0,"elements":[{"coroutine":true,"defaultValues":{},"position":{"x":-204.0,"y":-144.0},"guid":"79ca0710-d064-4ac8-a75a-19512ec01b08","$version":"A","$type":"Unity.VisualScripting.Start","$id":"9"},{"coroutine":false,"defaultValues":{},"position":{"x":-202.0,"y":165.0},"guid":"7b1ffaee-b4d2-4a4f-892b-853bfa503275","$version":"A","$type":"Unity.VisualScripting.Update"},{"defaultValues":{"VRM
URL":{"$content":"","$type":"System.String"}},"position":{"x":75.0,"y":-139.0},"guid":"11f1e39e-9ee2-4393-ba3b-b1edde89fd1e","$version":"A","$type":"VrmVisualScriptingNodes.LoadVRM","$id":"13"},{"type":"System.String","value":{"$content":"https://test.psychic-vr-lab.com/files/STYLY-Chan-A.vrm","$type":"System.String"},"defaultValues":{},"position":{"x":-178.0,"y":10.0},"guid":"d3fef7db-bf04-4a4a-ba2f-ed153a2d48ae","$version":"A","$type":"Unity.VisualScripting.Literal","$id":"15"},{"chainable":false,"member":{"name":"runtimeAnimatorController","parameterTypes":null,"targetType":"UnityEngine.Animator","targetTypeName":"UnityEngine.Animator","$version":"A"},"defaultValues":{"target":null,"input":{"$content":0,"$type":"UnityEngine.Object"}},"position":{"x":379.0,"y":-140.0},"guid":"c17ef876-f0b1-4c36-8574-f235bad0020d","$version":"A","$type":"Unity.VisualScripting.SetMember","$id":"17"},{"sourceUnit":{"$ref":"13"},"sourceKey":"outputTrigger","destinationUnit":{"$ref":"17"},"destinationKey":"assign","guid":"ec425642-8c60-42ac-b9e9-44bfc4820a26","$type":"Unity.VisualScripting.ControlConnection"},{"sourceUnit":{"$ref":"9"},"sourceKey":"trigger","destinationUnit":{"$ref":"13"},"destinationKey":"inputTrigger","guid":"8c1b7ba4-1412-4adb-9393-6d4494e901cc","$type":"Unity.VisualScripting.ControlConnection"},{"sourceUnit":{"$ref":"15"},"sourceKey":"output","destinationUnit":{"$ref":"13"},"destinationKey":"VRM
URL","guid":"ed02d1c9-cc88-4f36-b775-bf19be926b59","$type":"Unity.VisualScripting.ValueConnection"},{"sourceUnit":{"$ref":"13"},"sourceKey":"Game
Object","destinationUnit":{"$ref":"17"},"destinationKey":"target","guid":"f72841da-0670-4109-84de-7546ab7b379a","$type":"Unity.VisualScripting.ValueConnection"}],"$version":"A"}}'
_json: '{"graph":{"variables":{"Kind":"Flow","collection":{"$content":[{"name":"URL
of VRM model","value":{"$content":"https://test.psychic-vr-lab.com/files/STYLY-Chan-A.vrm","$type":"System.String"},"typeHandle":{"Identification":"System.String,
mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089","$version":"A"},"$version":"A"}],"$version":"A"},"$version":"A"},"controlInputDefinitions":[],"controlOutputDefinitions":[],"valueInputDefinitions":[],"valueOutputDefinitions":[],"title":"Attach
sanimation","summary":null,"pan":{"x":192.0,"y":141.0},"zoom":1.0,"elements":[{"coroutine":true,"defaultValues":{},"position":{"x":-204.0,"y":-144.0},"guid":"79ca0710-d064-4ac8-a75a-19512ec01b08","$version":"A","$type":"Unity.VisualScripting.Start","$id":"10"},{"coroutine":false,"defaultValues":{},"position":{"x":-202.0,"y":165.0},"guid":"7b1ffaee-b4d2-4a4f-892b-853bfa503275","$version":"A","$type":"Unity.VisualScripting.Update"},{"defaultValues":{"VRM
URL":{"$content":"","$type":"System.String"}},"position":{"x":75.0,"y":-139.0},"guid":"11f1e39e-9ee2-4393-ba3b-b1edde89fd1e","$version":"A","$type":"VrmVisualScriptingNodes.LoadVRM","$id":"14"},{"chainable":false,"member":{"name":"runtimeAnimatorController","parameterTypes":null,"targetType":"UnityEngine.Animator","targetTypeName":"UnityEngine.Animator","$version":"A"},"defaultValues":{"target":null,"input":{"$content":0,"$type":"UnityEngine.Object"}},"position":{"x":379.0,"y":-140.0},"guid":"c17ef876-f0b1-4c36-8574-f235bad0020d","$version":"A","$type":"Unity.VisualScripting.SetMember","$id":"16"},{"specifyFallback":false,"kind":"Graph","defaultValues":{"name":{"$content":"URL
of VRM model","$type":"System.String"}},"position":{"x":-134.0,"y":53.0},"guid":"82522815-6591-4ace-aa6e-1276e4435cda","$version":"A","$type":"Unity.VisualScripting.GetVariable","$id":"19"},{"sourceUnit":{"$ref":"14"},"sourceKey":"outputTrigger","destinationUnit":{"$ref":"16"},"destinationKey":"assign","guid":"ec425642-8c60-42ac-b9e9-44bfc4820a26","$type":"Unity.VisualScripting.ControlConnection"},{"sourceUnit":{"$ref":"10"},"sourceKey":"trigger","destinationUnit":{"$ref":"14"},"destinationKey":"inputTrigger","guid":"8c1b7ba4-1412-4adb-9393-6d4494e901cc","$type":"Unity.VisualScripting.ControlConnection"},{"sourceUnit":{"$ref":"14"},"sourceKey":"Game
Object","destinationUnit":{"$ref":"16"},"destinationKey":"target","guid":"f72841da-0670-4109-84de-7546ab7b379a","$type":"Unity.VisualScripting.ValueConnection"},{"sourceUnit":{"$ref":"19"},"sourceKey":"value","destinationUnit":{"$ref":"14"},"destinationKey":"VRM
URL","guid":"39a6b6cd-2bfa-4db0-bbd6-16405d931bd3","$type":"Unity.VisualScripting.ValueConnection"}],"$version":"A"}}'
_objectReferences:
- {fileID: 9100000, guid: d414c9f2f23514b6ea3b654f58a8c917, type: 2}
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,13 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 498831428}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0, y: 1, z: 1}
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}
m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0}
--- !u!1 &576166354
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -369,6 +369,37 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1416422916
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1416422917}
m_Layer: 0
m_Name: UniGLTF UnityThreadScheduler
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1416422917
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1416422916}
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 &2032661176
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -441,3 +472,4 @@ SceneRoots:
- {fileID: 41731451}
- {fileID: 2032661179}
- {fileID: 576166357}
- {fileID: 1416422917}
Loading

0 comments on commit e7df6f2

Please sign in to comment.