Many of you might be used to using the old Klak/MidiJack libraries for midi input into Unity, however they're getting a little long in the tooth now & Unity has changed up its input system to supposedly be more flexible & modern. The new midi input library is called Minis, I'm pretty sure it's short for Midi New Input System.. but that doesn't really matter :D There isn't a whole lot of easy-to-understand documentation on how to use it in scripts, so I thought I'd share what I'd figured out through digging around Keijiro's example files. I'm kind of assuming you know how to use the Input Action menu - as it would seem you don't even need it, for the method I'm about to show you... In any case if you do setup some midi inputs there (or indeed any other kinds of inputs - and it seems like you can only setup simple single note button presses there? - you would use code resembling this (following) to trigger things functions as you would ...
How to set values for your custom properties in VFX Graph. Yeah, there are binders, but I find they expect a rather precise way of working.. Making your own scripts forces Unity to do what you actually want haha. In my VFX graph, I have a VECTOR 3 value named "realSpawnPos" which I'm using as the spawn position for some particles. It's important to note that "position", whilst it is a Vector3.. doesn't like receiving Vector 3 values. So make sure you set it up as a Vector 3 in the VFX graph. Further to this - Make sure in the VFX Graph, your position node is set to WORLD, if you need to set/get/whatever the world position and not local... your objects are probably nested in a million groups/transforms.. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.VFX; public class bindPosition : MonoBehaviour { public GameObject target_thing; public VisualEffect visualEffect; void U...
Comments
Post a Comment