private void DrawAtomButton(AtomBase atom)
 {
     if (GUILayout.Button(atom.debugName ?? "[Anonymous]", Styles.LeftButton))
     {
         _selectedAtom = atom;
     }
 }
예제 #2
0
        internal static void Actualize(AtomBase atom)
        {
            _dirty = true;
            _updatingNextFrame.Enqueue(atom);

            if (ReferenceEquals(_current, null) && Application.isPlaying)
            {
                var go = new GameObject(nameof(AtomScheduler));
                _current = go.AddComponent <AtomScheduler>();
                DontDestroyOnLoad(_current);
            }
        }
        private void DrawSelectedAtom()
        {
            // header
            {
                GUILayout.BeginHorizontal(EditorStyles.toolbar);

                if (GUILayout.Button("< Active Atoms", EditorStyles.toolbarButton))
                {
                    _selectedAtom = null;
                    return;
                }

                GUILayout.FlexibleSpace();

                GUILayout.EndHorizontal();
            }

            var state = _selectedAtom.state == AtomState.Actual ? "Actual"
                : _selectedAtom.state == AtomState.Checking ? "Checking"
                : _selectedAtom.state == AtomState.Pulling ? "Pulling"
                : _selectedAtom.state == AtomState.Obsolete ? "Obsolete"
                : "Unknown";

            GUILayout.Label(_selectedAtom.debugName ?? "[Anonymous]", EditorStyles.largeLabel);
            GUILayout.Label(state, EditorStyles.label);
            //if (_selectedAtom.KeepAlive)
            //{
            //    GUILayout.Label("Keep Alive", EditorStyles.boldLabel);
            //}

            GUILayout.Space(10);

            _selectedAtomScroll = GUILayout.BeginScrollView(_selectedAtomScroll);
            {
                DrawAtomCollection("Used By", _selectedAtom.subscribers, _selectedAtom.subscribersCount, _ => true);
                DrawAtomCollection("Uses", _selectedAtom.children, _selectedAtom.childrenCount, _ => true);
            }
            GUILayout.EndScrollView();
        }
예제 #4
0
 internal CyclicAtomDependencyException(AtomBase source)
     : base("Cyclic atom dependency of " + source)
 {
 }
 private void OnAtomBecameActive(AtomBase obj)
 {
     RefreshActiveAtoms();
 }
예제 #6
0
 internal static void Unreap(AtomBase atom)
 {
     atom.Reaping = false;
 }
예제 #7
0
 internal static void Reap(AtomBase atom)
 {
     _dirty       = true;
     atom.Reaping = true;
     _reaping.Enqueue(atom);
 }
예제 #8
0
파일: Atom.cs 프로젝트: Mefodei/UniMob
 internal WatchScope(AtomBase self)
 {
     _parent        = AtomBase.Stack;
     AtomBase.Stack = self;
 }