Beispiel #1
0
        public override ResolveResultWithInfo ResolveWithoutCache()
        {
            // If it's a reference to something other than MonoBehaviour, it shouldn't be a resolve error
            // E.g. setting the property on a light map when an event fires
            if (!IsMonoBehaviourReference())
            {
                return(new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.IGNORABLE));
            }

            var resolveResultWithInfo = CheckedReferenceImplUtil.Resolve(this, GetReferenceSymbolTable(true));

            if (!resolveResultWithInfo.Result.IsEmpty)
            {
                return(resolveResultWithInfo);
            }

            // TODO: Support references to scripts/event handlers in external packages
            // Surprisingly, it's possible to have a reference to a script asset defined in a read-only package. We
            // don't know anything about these assets, because read-only packages are not part of the C# project
            // structure - they are compiled and added as assembly references. So we don't currently have a way to map
            // an asset GUID back to a compiled class.
            // See also UnityEventTargetReference
//            return new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.NOT_RESOLVED);
            return(new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.IGNORABLE));
        }
        public override ResolveResultWithInfo ResolveWithoutCache()
        {
            var resolveResultWithInfo = CheckedReferenceImplUtil.Resolve(this, GetReferenceSymbolTable(true));

            if (!resolveResultWithInfo.Result.IsEmpty)
            {
                return(resolveResultWithInfo);
            }
            return(new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.NOT_RESOLVED));
        }
        public override ResolveResultWithInfo ResolveWithoutCache()
        {
            // This will take the candidates from the reference symbol table and apply the filters from GetSymbolFilters
            var resolveResultWithInfo = CheckedReferenceImplUtil.Resolve(this, GetReferenceSymbolTable(true));

            if (!resolveResultWithInfo.Result.IsEmpty)
            {
                return(resolveResultWithInfo);
            }
            return(new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.NOT_RESOLVED));
        }
Beispiel #4
0
        public override ResolveResultWithInfo ResolveWithoutCache()
        {
            var resolveResultWithInfo = CheckedReferenceImplUtil.Resolve(this, GetReferenceSymbolTable(true));

            if (!resolveResultWithInfo.Result.IsEmpty)
            {
                return(resolveResultWithInfo);
            }

            return(new ResolveResultWithInfo(EmptyResolveResult.Instance,
                                             AsmDefResolveErrorType.ASMDEF_UNRESOLVED_REFERENCED_PROJECT_ERROR));
        }
Beispiel #5
0
        public override ResolveResultWithInfo ResolveWithoutCache()
        {
            // If it's a reference to something other than MonoBehaviour, it shouldn't be a resolve error
            // E.g. setting the property on a light map when an event fires
            if (!IsMonoBehaviourReference())
            {
                return(new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.IGNORABLE));
            }

            var resolveResultWithInfo = CheckedReferenceImplUtil.Resolve(this, GetReferenceSymbolTable(true));

            if (!resolveResultWithInfo.Result.IsEmpty)
            {
                return(resolveResultWithInfo);
            }

            return(new ResolveResultWithInfo(EmptyResolveResult.Instance, ResolveErrorType.NOT_RESOLVED));
        }