Closed Nytra closed 11 months ago
using FrooxEngine.LogiX;
[Category("LogiX/References")]
[NodeName("Extract IDs")]
public class ExtractIDs : LogixNode
{
public readonly Input<RefID> RefID;
public readonly Output<ulong> Position;
public readonly Output<byte> User;
protected override void OnEvaluate()
{
RefID refId = RefID.Evaluate();
if (refId != null)
{
refId.ExtractIDs(out ulong position, out byte user);
Position.Value = position;
User.Value = user;
}
else
{
Position.Value = 0;
User.Value = 0;
}
}
}
this is how i would do this node.
Updated node to use your code
Takes a RefID and outputs a ulong for Position and a byte for User
This is possible to do in vanilla Neos with a handful of logix nodes but this does it in just one.
Arti said this would be useful.