UnityEditor.AnnotationUtility.GetRecentlyChangedAnnotations C# (CSharp) Method

GetRecentlyChangedAnnotations() private method

private GetRecentlyChangedAnnotations ( ) : UnityEditor.Annotation[]
return UnityEditor.Annotation[]
        internal static extern Annotation[] GetRecentlyChangedAnnotations();
        [MethodImpl(MethodImplOptions.InternalCall)]

Usage Example

        private void SyncToState()
        {
            Annotation[] annotations = AnnotationUtility.GetAnnotations();
            string       str         = string.Empty;

            if (AnnotationWindow.s_Debug)
            {
                str += "AnnotationWindow: SyncToState\n";
            }
            this.m_BuiltinAnnotations = new List <AInfo>();
            this.m_ScriptAnnotations  = new List <AInfo>();
            for (int index = 0; index < annotations.Length; ++index)
            {
                if (AnnotationWindow.s_Debug)
                {
                    str = str + "   same as below: icon " + (object)annotations[index].iconEnabled + " gizmo " + (object)annotations[index].gizmoEnabled + "\n";
                }
                AInfo ainfo = new AInfo(annotations[index].gizmoEnabled == 1, annotations[index].iconEnabled == 1, annotations[index].flags, annotations[index].classID, annotations[index].scriptClass);
                if (ainfo.m_ScriptClass == string.Empty)
                {
                    this.m_BuiltinAnnotations.Add(ainfo);
                    if (AnnotationWindow.s_Debug)
                    {
                        str = str + "   " + BaseObjectTools.ClassIDToString(ainfo.m_ClassID) + ": icon " + (object)ainfo.m_IconEnabled + " gizmo " + (object)ainfo.m_GizmoEnabled + "\n";
                    }
                }
                else
                {
                    this.m_ScriptAnnotations.Add(ainfo);
                    if (AnnotationWindow.s_Debug)
                    {
                        str = str + "   " + annotations[index].scriptClass + ": icon " + (object)ainfo.m_IconEnabled + " gizmo " + (object)ainfo.m_GizmoEnabled + "\n";
                    }
                }
            }
            this.m_BuiltinAnnotations.Sort();
            this.m_ScriptAnnotations.Sort();
            this.m_RecentAnnotations = new List <AInfo>();
            Annotation[] changedAnnotations = AnnotationUtility.GetRecentlyChangedAnnotations();
            for (int index = 0; index < changedAnnotations.Length && index < 5; ++index)
            {
                AInfo ainfo = this.GetAInfo(changedAnnotations[index].classID, changedAnnotations[index].scriptClass);
                if (ainfo != null)
                {
                    this.m_RecentAnnotations.Add(ainfo);
                }
            }
            this.m_SyncWithState = false;
            if (!AnnotationWindow.s_Debug)
            {
                return;
            }
            Debug.Log((object)str);
        }
All Usage Examples Of UnityEditor.AnnotationUtility::GetRecentlyChangedAnnotations