コード例 #1
0
        public bool TryDetectScriptableObjectIssue(string assetPath, Object target)
        {
            if (target != null)
            {
                return(false);
            }

            if (enabled)
            {
                var record = ScriptableObjectIssueRecord.Create(IssueKind.MissingComponent, assetPath);
                issues.Add(record);
            }

            return(true);
        }
コード例 #2
0
        private void AddIssue(RecordLocation location, string assetPath, GameObject target, Type componentType, string componentName, int orderIndex, string propertyPath)
        {
            IssueRecord record;

            if (location != RecordLocation.Asset)
            {
                record = GameObjectIssueRecord.Create(IssueKind.MissingReference, location, assetPath, target, componentType, componentName, orderIndex, propertyPath);
            }
            else
            {
                record = ScriptableObjectIssueRecord.Create(IssueKind.MissingReference, assetPath, componentName, propertyPath);
            }

            issues.Add(record);
        }