public BaseObjectValidator() { var vObjectTargets = (ObjectTargetAttribute[])GetType().GetCustomAttributes(typeof(ObjectTargetAttribute), true); if (vObjectTargets.Length == 0) { throw new Exception("Subclasses of VObjectValidator are required to be " + "decorated with a VValidate to determine what " + "VObjectTarget they are validating"); } _typeToTrack = vObjectTargets[0].TargetType; _targetType = vObjectTargets[0].TargetAttribute.UnityTarget; }
protected ValidateAttribute(UnityTarget unityTarget) { UnityTarget = unityTarget; }
public ValidateAttribute() { UnityTarget = UnityTarget.Monobehavior; }