[VRC Constraints] Please Expose VRC Constraint Weights/Source Weights/Structs to Unity Editor Scripting
needs more information
blinkinglights
Hi, I rely on Unity Editor Scripting to automate adding and modifying constraints to my avatar projects. Right now, when it comes to classic constraints, I am able to not only add and remove them, but replace their internal structs/modify their Sources, Source Weights, and Constraint Weights. This is vital for setting up my avatars without getting REALLY heavy on parameters/saving necessary constraint settings entirely in animations.
Please fully expose the internal workings of the new constraints to Unity Editor Scripting! Editor Scripting is an important aspect of achieving classic constraint parity.
Log In
Dexvoid
needs more information
Dexvoid
Hello! Could you please give some more details about which specific properties you can't access? The sources array and all properties within each source are currently marked as public, so they should be modifiable via editor scripting already. As a small example, on the current beta, I can randomize the weights of all sources on a constraint by doing this:
for (int i = 0; i < _constraint.Sources.Length; i++)
{
_constraint.Sources[i].Weight = Random.value;
}