예제 #1
0
    /// <summary>
    /// Called when the script object is loaded
    /// </summary>
    void OnEnable()
    {
        LoadBoneNames();

        // Grab the serialized objects
        mTarget   = (Mount)target;
        mTargetSO = new SerializedObject(target);

        // Ensure we always have a mount point
        if (mTarget.Point == null || mTarget.Point.Anchor == null)
        {
            mIsDirty = true;
            mTarget.CreateMountPoint("Mount Point", "", true);
        }

        // Runs through all other objects and loads the mount point
        LoadOtherMountPoints();
    }