'PropertyUtils' is inaccessible due to its protection

I can’t reach propertyutils from my assembly definition because of package’s AssemblyInfo.cs doesn’t contain default library. I think we need line like this

[assembly: InternalsVisibleTo("Unity.Animation.Rigging")]

I’m using my solvers in world space. Default chain and two bone are still in local space.
And i think it should be Unity.Animations not Animation
Package version 1.0.2
After upgrading to 0.3.4 preview july 24 version it’s solved.

We changed the visibility of some classes in the Runtime and Editor assemblies when releasing version 1.0.2 in a last effort to reorganize some of the code before the verified release. The intent was to make a clear and well documented API for Animation Rigging.

PropertyUtils were implementation details of the builtin constraints and that’s the reason why it was made internal. However, we can promote it back to public if users feel like it should be part of the Animation Rigging API.

Here is the class implementation:

    internal static class PropertyUtils
    {
        public static string ConstructConstraintDataPropertyName(string property)
        {
            return "m_Data." + property;
        }

        public static string ConstructCustomPropertyName(Component component, string property)
        {
            return component.transform.GetInstanceID() + "/" + component.GetType() + "/" + property;
        }
    }

Cheers!

2 Likes

Hi. I also get an
error CS0122: ‘PropertyUtils’ is inaccessible due to its protection level

in 13.

public class CopyLocationBinder : AnimationJobBinder<CopyLocationJob, CopyLocationData>
{
    public override CopyLocationJob Create(Animator animator, ref CopyLocationData data, Component component)
    {
        return new CopyLocationJob()
        {
            constrained = ReadWriteTransformHandle.Bind(animator, data.constrainedObject),
            source = ReadOnlyTransformHandle.Bind(animator, data.sourceObject),

            // Bind data.invert to job.invert so values can be resolved from the AnimationStream
            invert = Vector3BoolProperty.Bind(animator,
                                              component,
                                              PropertyUtils.ConstructConstraintDataPropertyName(nameof(data.invert)))[/B]
        };
    }
    public override void Destroy(CopyLocationJob job) { }
}

in 1.03 and 1.02.
I am coming from 0.3.4-preview.

Do you have an idea what to do?

Hey, thanks for reporting this. We will reconsider exposing these as public. For the time being please include the functions locally in your project and call those functions instead. The code snippet with the functionality is posted by Simon in the above post.

1 Like