CheckSetupError() public static method

Checks the setup for definite problems.
public static CheckSetupError ( BipedReferences references, bool log ) : bool
references BipedReferences
log bool
return bool
Ejemplo n.º 1
0
        public static bool AutoDetectReferences(ref BipedReferences references, Transform root, BipedReferences.AutoDetectParams autoDetectParams)
        {
            if (references == null)
            {
                references = new BipedReferences();
            }
            references.root = root;
            BipedReferences.DetectReferencesByNaming(ref references, root, autoDetectParams);
            if (references.isValid && BipedReferences.CheckSetupError(references, false) && BipedReferences.CheckSetupWarning(references, false))
            {
                return(true);
            }
            BipedReferences.AssignHumanoidReferences(ref references, root.GetComponent <Animator>(), autoDetectParams);
            bool isValid = references.isValid;

            if (!isValid)
            {
                Warning.Log("BipedReferences contains one or more missing Transforms.", root, true);
            }
            return(isValid);
        }